1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-11 08:10:59 +00:00

Do stdin read timeout check only in case no data has been processed

This commit is contained in:
Jens Steube 2018-10-20 18:53:14 +02:00
parent d96b649751
commit d4123333c0

View File

@ -285,22 +285,25 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
// stdin read timeout check // stdin read timeout check
if (status_ctx->stdin_read_timeout_cnt >= STDIN_TIMEOUT_MIN) if (status_get_progress_done (hashcat_ctx) == 0)
{ {
if (status_ctx->stdin_read_timeout_cnt >= STDIN_TIMEOUT_MAX) if (status_ctx->stdin_read_timeout_cnt >= STDIN_TIMEOUT_MIN)
{ {
EVENT_DATA (EVENT_MONITOR_NOINPUT_ABORT, NULL, 0); if (status_ctx->stdin_read_timeout_cnt >= STDIN_TIMEOUT_MAX)
{
EVENT_DATA (EVENT_MONITOR_NOINPUT_ABORT, NULL, 0);
myabort (hashcat_ctx); myabort (hashcat_ctx);
status_ctx->shutdown_inner = true; status_ctx->shutdown_inner = true;
break; break;
} }
if ((status_ctx->stdin_read_timeout_cnt % STDIN_TIMEOUT_MIN) == 0) if ((status_ctx->stdin_read_timeout_cnt % STDIN_TIMEOUT_MIN) == 0)
{ {
EVENT_DATA (EVENT_MONITOR_NOINPUT_HINT, NULL, 0); EVENT_DATA (EVENT_MONITOR_NOINPUT_HINT, NULL, 0);
}
} }
} }
} }