From e5657723d35ef4aa2d4b703e4e324548294c22fc Mon Sep 17 00:00:00 2001 From: philsmd <921533+philsmd@users.noreply.github.com> Date: Tue, 22 Mar 2022 15:26:52 +0100 Subject: [PATCH] improve --stdout + --stdin-timeout-abort fix --- src/user_options.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/user_options.c b/src/user_options.c index 2cc7cf592..a7e5e3512 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -1372,7 +1372,11 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) // --stdin-timeout-abort can only be used in stdin mode - if (user_options->hc_argc > 1) + int hc_argc_expected = 1; // our hash file (note: hc_argc only counts hash files and dicts) + + if (user_options->stdout_flag == true) hc_argc_expected = 0; // special case: no hash file + + if (user_options->hc_argc != hc_argc_expected) { event_log_error (hashcat_ctx, "Use of --stdin-timeout-abort is only allowed in stdin mode (pipe).");