diff --git a/src/monitor.c b/src/monitor.c index aeec24824..d15a2ecf7 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -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,29 +332,37 @@ static int monitor (hashcat_ctx_t *hashcat_ctx) { time (&status_ctx->timer_bypass_cur); - // --bypass-delay check - if((status_ctx->timer_bypass_cur - status_ctx->timer_bypass_start) >= user_options->bypass_delay) + if(status_ctx->devices_status == STATUS_RUNNING) { - time (&status_ctx->timer_bypass_start); - - // --bypass-threshold check - if((u32)(hashcat_ctx->hashes->digests_done - status_ctx->bypass_digests_done) < user_options->bypass_threshold) + // --bypass-delay check + if((status_ctx->timer_bypass_cur - status_ctx->timer_bypass_start) >= user_options->bypass_delay) { - event_log_info (hashcat_ctx, NULL); - event_log_info (hashcat_ctx, NULL); + time (&status_ctx->timer_bypass_start); - 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); - status_ctx->bypass_digests_done = 0; - } else - { + event_log_info (hashcat_ctx, "Bypass threshold reached! Next dictionary / mask in queue selected. Bypassing current one."); + + event_log_info (hashcat_ctx, NULL); + status_ctx->bypass_digests_done = 0; + } + 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; + } } }