1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-31 19:08:43 +00:00

Cleanup and handle being [p]aused

Offset the timer when paused and cleanup/format code
This commit is contained in:
PenguinKeeper7 2023-10-05 14:45:04 +01:00
parent cc0e8a3864
commit 6fdbeff7f7

View File

@ -13,7 +13,6 @@
#include "restore.h"
#include "status.h"
#include "monitor.h"
#include "memory.h"
int get_runtime_left (const hashcat_ctx_t *hashcat_ctx)
{
@ -333,6 +332,8 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
{
time (&status_ctx->timer_bypass_cur);
if(status_ctx->devices_status == STATUS_RUNNING)
{
// --bypass-delay check
if((status_ctx->timer_bypass_cur - status_ctx->timer_bypass_start) >= user_options->bypass_delay)
{
@ -350,13 +351,19 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
event_log_info (hashcat_ctx, NULL);
status_ctx->bypass_digests_done = 0;
} else
}
else
{
// enough recovered to continue the session
status_ctx->bypass_digests_done = hashcat_ctx->hashes->digests_done;
}
}
}
else if(status_ctx->devices_status == STATUS_PAUSED)
{
status_ctx->timer_bypass_start += 1;
}
}
}
// final round of save_hash