mirror of
https://github.com/hashcat/hashcat.git
synced 2025-08-01 11:28:08 +00:00
Cleanup and handle being [p]aused
Offset the timer when paused and cleanup/format code
This commit is contained in:
parent
cc0e8a3864
commit
6fdbeff7f7
@ -13,7 +13,6 @@
|
|||||||
#include "restore.h"
|
#include "restore.h"
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "monitor.h"
|
#include "monitor.h"
|
||||||
#include "memory.h"
|
|
||||||
|
|
||||||
int get_runtime_left (const hashcat_ctx_t *hashcat_ctx)
|
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);
|
time (&status_ctx->timer_bypass_cur);
|
||||||
|
|
||||||
|
if(status_ctx->devices_status == STATUS_RUNNING)
|
||||||
|
{
|
||||||
// --bypass-delay check
|
// --bypass-delay check
|
||||||
if((status_ctx->timer_bypass_cur - status_ctx->timer_bypass_start) >= user_options->bypass_delay)
|
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);
|
event_log_info (hashcat_ctx, NULL);
|
||||||
status_ctx->bypass_digests_done = 0;
|
status_ctx->bypass_digests_done = 0;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// enough recovered to continue the session
|
// enough recovered to continue the session
|
||||||
status_ctx->bypass_digests_done = hashcat_ctx->hashes->digests_done;
|
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
|
// final round of save_hash
|
||||||
|
Loading…
Reference in New Issue
Block a user