STDIN Interface: Disable the --stdin-timeout-abort check after 1000 successful reads from stdin

pull/2943/head
Jens Steube 3 years ago
parent 2c9e8ca25c
commit 49117745cf

@ -40,6 +40,7 @@
- HIP Kernels: Enable vector data types for HIP kernels for functionality and performance
- Kernel threads: Use warp size / wavefront size query instead of hard-coded values as the basis for kernel threads
- SCRYPT Kernels: Improve Hashcat.hctune entries for many NV and AMD GPUs for hash mode 8900, 9300, 15700 and 22700
- STDIN Interface: Disable the --stdin-timeout-abort check after 1000 successful reads from stdin
- Tuning Database: Add new module function module_extra_tuningdb_block() to extend hashcat.hctune content from a module
##

@ -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);

Loading…
Cancel
Save