From 3f7b48218f6782f5fc2840d3fd8bf5dd81d7fa29 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Mon, 15 May 2023 03:06:15 +0200 Subject: [PATCH] check if selected hash-mode cannot crack multiple hashes with the same salt only if salt_type is SALT_TYPE_GENERIC or SALT_TYPE_EMBEDDED --- src/hashes.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/hashes.c b/src/hashes.c index 9ed4cc680..bc1f776ce 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -2266,15 +2266,18 @@ int hashes_init_stage4 (hashcat_ctx_t *hashcat_ctx) // https://github.com/hashcat/hashcat/issues/3641 - if ((hashconfig->opts_type & OPTS_TYPE_DEEP_COMP_KERNEL) == 0) + if (hashconfig->salt_type == SALT_TYPE_GENERIC || hashconfig->salt_type == SALT_TYPE_EMBEDDED) { - if (hashconfig->attack_exec == ATTACK_EXEC_OUTSIDE_KERNEL) + if ((hashconfig->opts_type & OPTS_TYPE_DEEP_COMP_KERNEL) == 0) { - if (hashes->digests_cnt != hashes->salts_cnt) + if (hashconfig->attack_exec == ATTACK_EXEC_OUTSIDE_KERNEL) { - event_log_error (hashcat_ctx, "This hash-mode plugin cannot crack multiple hashes with the same salt, please select one of the hashes."); + if (hashes->digests_cnt != hashes->salts_cnt) + { + event_log_error (hashcat_ctx, "This hash-mode plugin cannot crack multiple hashes with the same salt, please select one of the hashes."); - return -1; + return -1; + } } } }