1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 14:48:12 +00:00

Automatically unlink restore file if all hashes have been cracked

This commit is contained in:
jsteube 2016-10-04 11:13:33 +02:00
parent 7f2ab2db60
commit 79c0fc6a11
3 changed files with 15 additions and 37 deletions

View File

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

View File

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

View File

@ -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"