From 7a8561f068a5fb2d0ecc3dccd3f4ba54726980ff Mon Sep 17 00:00:00 2001 From: maride Date: Fri, 13 May 2022 23:53:41 +0200 Subject: [PATCH] Also print the last chunk upon hitting the win breakpoint --- src/Bruteforce.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bruteforce.py b/src/Bruteforce.py index e91a951..05608a4 100644 --- a/src/Bruteforce.py +++ b/src/Bruteforce.py @@ -62,6 +62,8 @@ def Bruteforce(bm, tm, knownPrefix, knownSuffix, chunksize, charset): return knownPrefix + knownSuffix else: # good input, we stepped further + knownPrefix += res + # let's examine it - check if we hit the win breakpoint :) if bm.HitWin() or not bm.HitLose(): EnableLogging() @@ -71,7 +73,6 @@ def Bruteforce(bm, tm, knownPrefix, knownSuffix, chunksize, charset): return knownPrefix + knownSuffix # No win breakpoint hit, but still a good step forward - proceed - knownPrefix += res EnableLogging() print(f"Found new scorer, we're now at '{knownPrefix}[...]{knownSuffix}'") DisableLogging()