From ca124189e4727d16c55691b74df35c8f9ae65b38 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Mon, 4 May 2026 08:48:56 -0400 Subject: [PATCH] feat(pcfg): verify pcfg_cracker presence at startup (non-fatal) --- hate_crack/main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hate_crack/main.py b/hate_crack/main.py index 8702aa5..91b9dd3 100755 --- a/hate_crack/main.py +++ b/hate_crack/main.py @@ -716,6 +716,16 @@ if not SKIP_INIT: except SystemExit: print("OMEN attacks will not be available.") + # Verify pcfg_cracker presence (optional, for PCFG attacks) + # pcfg_cracker is pure-Python; we just check the script files exist. + pcfg_guesser_script = os.path.join(hate_path, "pcfg_cracker", "pcfg_guesser.py") + pcfg_prince_ling_script = os.path.join(hate_path, "pcfg_cracker", "prince_ling.py") + if not os.path.isfile(pcfg_guesser_script) or not os.path.isfile(pcfg_prince_ling_script): + print("pcfg_cracker not found at " + os.path.join(hate_path, "pcfg_cracker")) + print("PCFG attacks will not be available. Run 'make' to fetch submodules.") + elif not shutil.which("python3"): + print("python3 not on PATH. PCFG attacks will not be available.") + except Exception as e: print(f"Module initialization error: {e}") if not shutil.which("hashcat") and not os.path.exists("/usr/bin/hashcat"):