diff --git a/src/monitor.c b/src/monitor.c index 22cb585fb..6a8e352ce 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -7,23 +7,14 @@ #include "types.h" #include "logging.h" #include "memory.h" -#include "interface.h" +#include "hwmon.h" #include "timer.h" -#include "mpsp.h" -#include "rp_cpu.h" -#include "tuningdb.h" +#include "hashes.h" #include "thread.h" -#include "opencl.h" -#include "hwmon.h" #include "restore.h" -#include "hashes.h" -#include "outfile.h" -#include "potfile.h" -#include "debugfile.h" -#include "loopback.h" +#include "terminal.h" #include "status.h" #include "shared.h" -#include "terminal.h" #include "monitor.h" static void monitor (hashcat_ctx_t *hashcat_ctx) diff --git a/src/restore.c b/src/restore.c index cb0a0b17b..fa766655d 100644 --- a/src/restore.c +++ b/src/restore.c @@ -304,13 +304,16 @@ void cycle_restore (restore_ctx_t *restore_ctx, opencl_ctx_t *opencl_ctx) void unlink_restore (restore_ctx_t *restore_ctx, status_ctx_t *status_ctx) { - if ((status_ctx->devices_status == STATUS_EXHAUSTED) || (status_ctx->devices_status == STATUS_CRACKED)) + if ((status_ctx->devices_status == STATUS_EXHAUSTED) && (status_ctx->run_thread_level1 == true)) // this is to check for [c]heckpoint { - if (status_ctx->run_thread_level1 == true) // this is to check for [c]heckpoint - { - unlink (restore_ctx->eff_restore_file); - unlink (restore_ctx->new_restore_file); - } + unlink (restore_ctx->eff_restore_file); + unlink (restore_ctx->new_restore_file); + } + + if (status_ctx->devices_status == STATUS_CRACKED) + { + unlink (restore_ctx->eff_restore_file); + unlink (restore_ctx->new_restore_file); } } diff --git a/src/terminal.c b/src/terminal.c index d3788e83a..92d12c3f1 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -6,26 +6,10 @@ #include "common.h" #include "types.h" #include "logging.h" -#include "interface.h" -#include "timer.h" -#include "ext_OpenCL.h" -#include "ext_ADL.h" -#include "ext_nvapi.h" -#include "ext_nvml.h" -#include "ext_xnvctrl.h" -#include "mpsp.h" -#include "rp_cpu.h" -#include "tuningdb.h" #include "thread.h" -#include "opencl.h" -#include "hwmon.h" -#include "restore.h" -#include "hashes.h" -#include "outfile.h" -#include "potfile.h" -#include "debugfile.h" -#include "loopback.h" +#include "timer.h" #include "status.h" +#include "restore.h" #include "shared.h" #include "terminal.h"