From 8e83bdeea3ac6b120ee765deb338b13ae367429e Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Wed, 8 Apr 2026 13:05:08 -0400 Subject: [PATCH] fix: only report combined output file when it exists cleanup() previously always printed 'Cracked passwords combined in X.out' even when combine_ntlm_output() returned early (no cracked hashes) or the hash type wasn't NTLM pwdump. Now checks file existence first and falls back to pointing at the raw .out file. Co-Authored-By: Claude Opus 4.6 (1M context) --- hate_crack/main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hate_crack/main.py b/hate_crack/main.py index 9e299e1..8614e03 100755 --- a/hate_crack/main.py +++ b/hate_crack/main.py @@ -2988,10 +2988,11 @@ def cleanup(): if hcatHashType == "1000" and pwdump_format: print("\nComparing cracked hashes to original file...") combine_ntlm_output() - print( - "\nCracked passwords combined with original hashes in %s" - % (hcatHashFileOrig + ".out") - ) + out_path = hcatHashFileOrig + ".out" + if os.path.isfile(out_path): + print(f"\nCracked passwords combined with original hashes in {out_path}") + else: + print(f"\nNo cracked hashes to combine. Raw output (if any): {hcatHashFile}.out") print("\nCleaning up temporary files...") if os.path.exists(hcatHashFile + ".masks"): os.remove(hcatHashFile + ".masks")