mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 08:08:10 +00:00
STDIN Interface: Disable the --stdin-timeout-abort check after 1000 successful reads from stdin
This commit is contained in:
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,23 +194,32 @@ 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 (rc_select == -1) break;
|
||||
|
||||
if (rc_select == 0)
|
||||
if (selects_returned < DISABLE_READ_TIMEOUT_AFTER)
|
||||
{
|
||||
if (status_ctx->run_thread_level1 == false) break;
|
||||
const int rc_select = select_read_timeout_console (1);
|
||||
|
||||
status_ctx->stdin_read_timeout_cnt++;
|
||||
if (rc_select == -1) break;
|
||||
|
||||
continue;
|
||||
if (rc_select == 0)
|
||||
{
|
||||
if (status_ctx->run_thread_level1 == false) break;
|
||||
|
||||
status_ctx->stdin_read_timeout_cnt++;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
status_ctx->stdin_read_timeout_cnt = 0;
|
||||
|
||||
selects_returned++;
|
||||
}
|
||||
|
||||
status_ctx->stdin_read_timeout_cnt = 0;
|
||||
|
||||
char *line_buf = fgets (buf, HCBUFSIZ_LARGE - 1, stdin);
|
||||
|
||||
if (line_buf == NULL) break;
|
||||
|
Loading…
Reference in New Issue
Block a user