mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-04-28 12:03:11 -07:00
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:
@@ -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 = (
|
||||
|
||||
Reference in New Issue
Block a user