|
|
|
@ -194,22 +194,31 @@ static int calc_stdin (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par
|
|
|
|
|
memset (device_param->pws_comp, 0, device_param->size_pws_comp);
|
|
|
|
|
memset (device_param->pws_idx, 0, device_param->size_pws_idx);
|
|
|
|
|
|
|
|
|
|
#define DISABLE_READ_TIMEOUT_AFTER 1000
|
|
|
|
|
|
|
|
|
|
int selects_returned = 0;
|
|
|
|
|
|
|
|
|
|
while (device_param->pws_cnt < device_param->kernel_power)
|
|
|
|
|
{
|
|
|
|
|
const int rc_select = select_read_timeout_console (1);
|
|
|
|
|
if (selects_returned < DISABLE_READ_TIMEOUT_AFTER)
|
|
|
|
|
{
|
|
|
|
|
const int rc_select = select_read_timeout_console (1);
|
|
|
|
|
|
|
|
|
|
if (rc_select == -1) break;
|
|
|
|
|
if (rc_select == -1) break;
|
|
|
|
|
|
|
|
|
|
if (rc_select == 0)
|
|
|
|
|
{
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
if (rc_select == 0)
|
|
|
|
|
{
|
|
|
|
|
if (status_ctx->run_thread_level1 == false) break;
|
|
|
|
|
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt++;
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt++;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt = 0;
|
|
|
|
|
|
|
|
|
|
status_ctx->stdin_read_timeout_cnt = 0;
|
|
|
|
|
selects_returned++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *line_buf = fgets (buf, HCBUFSIZ_LARGE - 1, stdin);
|
|
|
|
|
|
|
|
|
|