From e47a58db44552fbff724326485ea3dee7010644e Mon Sep 17 00:00:00 2001 From: Chick3nman Date: Mon, 14 Feb 2022 12:43:20 -0600 Subject: [PATCH 1/3] Introduce logic to stop advice message from suggesting options that do not work in the current attack mode. Fixes #3169 --- src/main.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index d57e05cf1..7264ac173 100644 --- a/src/main.c +++ b/src/main.c @@ -746,12 +746,15 @@ static void main_monitor_performance_hint (MAYBE_UNUSED hashcat_ctx_t *hashcat_c if (user_options->slow_candidates == false) { - event_log_advice (hashcat_ctx, "* Append -S to the commandline."); - event_log_advice (hashcat_ctx, " This has a drastic speed impact but can be better for specific attacks."); - event_log_advice (hashcat_ctx, " Typical scenarios are a small wordlist but a large ruleset."); - event_log_advice (hashcat_ctx, NULL); + if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) + { + event_log_advice (hashcat_ctx, "* Append -S to the commandline."); + event_log_advice (hashcat_ctx, " This has a drastic speed impact but can be better for specific attacks."); + event_log_advice (hashcat_ctx, " Typical scenarios are a small wordlist but a large ruleset."); + event_log_advice (hashcat_ctx, NULL); + } } - + event_log_advice (hashcat_ctx, "* Update your backend API runtime / driver the right way:"); event_log_advice (hashcat_ctx, " https://hashcat.net/faq/wrongdriver"); event_log_advice (hashcat_ctx, NULL); From b187c662369d5759b05723f125e25cf0f06f8f8e Mon Sep 17 00:00:00 2001 From: Chick3nman Date: Mon, 14 Feb 2022 12:51:33 -0600 Subject: [PATCH 2/3] Further checks for attack modes where -S isn't relevant --- src/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 7264ac173..2e45fc441 100644 --- a/src/main.c +++ b/src/main.c @@ -748,10 +748,13 @@ static void main_monitor_performance_hint (MAYBE_UNUSED hashcat_ctx_t *hashcat_c { if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) { - event_log_advice (hashcat_ctx, "* Append -S to the commandline."); - event_log_advice (hashcat_ctx, " This has a drastic speed impact but can be better for specific attacks."); - event_log_advice (hashcat_ctx, " Typical scenarios are a small wordlist but a large ruleset."); - event_log_advice (hashcat_ctx, NULL); + if ((user_options->attack_mode != ATTACK_MODE_HYBRID1) && (user_options->attack_mode != ATTACK_MODE_HYBRID2)) + { + event_log_advice (hashcat_ctx, "* Append -S to the commandline."); + event_log_advice (hashcat_ctx, " This has a drastic speed impact but can be better for specific attacks."); + event_log_advice (hashcat_ctx, " Typical scenarios are a small wordlist but a large ruleset."); + event_log_advice (hashcat_ctx, NULL); + } } } From c8b3164722824135dbdcc1c555f19e4dcc79d26e Mon Sep 17 00:00:00 2001 From: Chick3nman Date: Mon, 14 Feb 2022 12:57:51 -0600 Subject: [PATCH 3/3] Change logic to cover all cases --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 2e45fc441..8f17b4151 100644 --- a/src/main.c +++ b/src/main.c @@ -748,7 +748,7 @@ static void main_monitor_performance_hint (MAYBE_UNUSED hashcat_ctx_t *hashcat_c { if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) { - if ((user_options->attack_mode != ATTACK_MODE_HYBRID1) && (user_options->attack_mode != ATTACK_MODE_HYBRID2)) + if ((user_options->attack_mode != ATTACK_MODE_HYBRID1) && (user_options->attack_mode != ATTACK_MODE_HYBRID2) && (user_options->attack_mode != ATTACK_MODE_ASSOCIATION)) { event_log_advice (hashcat_ctx, "* Append -S to the commandline."); event_log_advice (hashcat_ctx, " This has a drastic speed impact but can be better for specific attacks.");