Automatically unlink restore file if all hashes have been cracked

pull/533/head
jsteube 8 years ago
parent 7f2ab2db60
commit 79c0fc6a11

@ -7,23 +7,14 @@
#include "types.h" #include "types.h"
#include "logging.h" #include "logging.h"
#include "memory.h" #include "memory.h"
#include "interface.h" #include "hwmon.h"
#include "timer.h" #include "timer.h"
#include "mpsp.h" #include "hashes.h"
#include "rp_cpu.h"
#include "tuningdb.h"
#include "thread.h" #include "thread.h"
#include "opencl.h"
#include "hwmon.h"
#include "restore.h" #include "restore.h"
#include "hashes.h" #include "terminal.h"
#include "outfile.h"
#include "potfile.h"
#include "debugfile.h"
#include "loopback.h"
#include "status.h" #include "status.h"
#include "shared.h" #include "shared.h"
#include "terminal.h"
#include "monitor.h" #include "monitor.h"
static void monitor (hashcat_ctx_t *hashcat_ctx) static void monitor (hashcat_ctx_t *hashcat_ctx)

@ -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) 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);
} }
} }

@ -6,26 +6,10 @@
#include "common.h" #include "common.h"
#include "types.h" #include "types.h"
#include "logging.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 "thread.h"
#include "opencl.h" #include "timer.h"
#include "hwmon.h"
#include "restore.h"
#include "hashes.h"
#include "outfile.h"
#include "potfile.h"
#include "debugfile.h"
#include "loopback.h"
#include "status.h" #include "status.h"
#include "restore.h"
#include "shared.h" #include "shared.h"
#include "terminal.h" #include "terminal.h"

Loading…
Cancel
Save