fix: ensure hashcat.induct exists before loopback test

Hashcat renames ~/.hashcat/sessions/hashcat.induct after each session.
When the directory is absent the loopback test fails with "No such file
or directory". Recreate the directory in the test setup so it always
exists when the loopback command runs.
This commit is contained in:
Justin Bollinger
2026-03-19 12:20:37 -04:00
parent e41134eb1a
commit 9345e69bf4
+4
View File
@@ -122,6 +122,10 @@ def test_toggle_rule_parses_with_and_without_loopback(tmp_path: Path, capsys):
pytest.skip("hashcat not available in PATH")
if not _hashcat_sessions_writable():
pytest.skip("hashcat session directory (~/.hashcat/sessions) is not writable")
# Hashcat renames hashcat.induct after each run; recreate so loopback can write.
(Path.home() / ".hashcat" / "sessions" / "hashcat.induct").mkdir(
parents=True, exist_ok=True
)
show_output = os.environ.get("HATE_CRACK_SHOW_HASHCAT_OUTPUT") == "1"
show_cmd = (