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:
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,29 +332,37 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
|
|||||||
{
|
{
|
||||||
time (&status_ctx->timer_bypass_cur);
|
time (&status_ctx->timer_bypass_cur);
|
||||||
|
|
||||||
// --bypass-delay check
|
if(status_ctx->devices_status == STATUS_RUNNING)
|
||||||
if((status_ctx->timer_bypass_cur - status_ctx->timer_bypass_start) >= user_options->bypass_delay)
|
|
||||||
{
|
{
|
||||||
time (&status_ctx->timer_bypass_start);
|
// --bypass-delay check
|
||||||
|
if((status_ctx->timer_bypass_cur - status_ctx->timer_bypass_start) >= user_options->bypass_delay)
|
||||||
// --bypass-threshold check
|
|
||||||
if((u32)(hashcat_ctx->hashes->digests_done - status_ctx->bypass_digests_done) < user_options->bypass_threshold)
|
|
||||||
{
|
{
|
||||||
event_log_info (hashcat_ctx, NULL);
|
time (&status_ctx->timer_bypass_start);
|
||||||
event_log_info (hashcat_ctx, NULL);
|
|
||||||
|
|
||||||
bypass (hashcat_ctx);
|
// --bypass-threshold check
|
||||||
|
if((u32)(hashcat_ctx->hashes->digests_done - status_ctx->bypass_digests_done) < user_options->bypass_threshold)
|
||||||
|
{
|
||||||
|
event_log_info (hashcat_ctx, NULL);
|
||||||
|
event_log_info (hashcat_ctx, NULL);
|
||||||
|
|
||||||
event_log_info (hashcat_ctx, "Bypass threshold reached! Next dictionary / mask in queue selected. Bypassing current one.");
|
bypass (hashcat_ctx);
|
||||||
|
|
||||||
event_log_info (hashcat_ctx, NULL);
|
event_log_info (hashcat_ctx, "Bypass threshold reached! Next dictionary / mask in queue selected. Bypassing current one.");
|
||||||
status_ctx->bypass_digests_done = 0;
|
|
||||||
} else
|
event_log_info (hashcat_ctx, NULL);
|
||||||
{
|
status_ctx->bypass_digests_done = 0;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user