From d8f753af4e7e19df773edca60010338e3e378754 Mon Sep 17 00:00:00 2001 From: Solar Designer Date: Sun, 5 Jun 2022 19:00:37 +0200 Subject: [PATCH] Wordlist mode: With PerRuleStats, handle aborts during batch padding --- src/wordlist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wordlist.c b/src/wordlist.c index dc812d35dbd..bb08a465264 100644 --- a/src/wordlist.c +++ b/src/wordlist.c @@ -1400,7 +1400,8 @@ void do_wordlist_crack(struct db_main *db, const char *name, int rules) if (rules > 1 && prerule) { unsigned long long p = status.cands, fake_p = 0; if (!(options.flags & FLG_STDOUT)) do { - crk_direct_process_key("injected wrong password"); + if (crk_direct_process_key("injected wrong password")) + goto done; fake_p++; } while (p == status.cands); unsigned int g = status.guess_count - prev_g; @@ -1450,6 +1451,7 @@ void do_wordlist_crack(struct db_main *db, const char *name, int rules) if (pipe_input) goto GRAB_NEXT_PIPE_LOAD; +done: crk_done(); rec_done(event_abort || (status.pass && db->salts));