feat: add rule support to OMEN attack and fix relative path resolution

Extract _select_rules() helper from quick_crack/loopback_attack and wire
it into omen_attack so OMEN can run with rule chains. Extend hcatOmen()
to accept and apply an hcatChains argument including debug mode injection.

Fix resolve_path() to honour HATE_CRACK_ORIG_CWD (set by the install shim)
so relative hash/wordlist paths resolve against the caller's working directory
instead of the repo root. Increase default omenMaxCandidates to 50M.
This commit is contained in:
Justin Bollinger
2026-03-18 18:17:41 -04:00
parent 9423b5a64d
commit 3bc85d9b8a
7 changed files with 304 additions and 163 deletions
+2 -2
View File
@@ -99,7 +99,7 @@ install: submodules
@UV_BIN=$$(command -v uv 2>/dev/null || echo "$$HOME/.local/bin/uv"); \
"$$UV_BIN" sync
@mkdir -p "$${XDG_BIN_HOME:-$$HOME/.local/bin}"
@printf '#!/usr/bin/env bash\nset -euo pipefail\nexec uv run --directory %s python -m hate_crack "$$@"\n' "$(CURDIR)" \
@printf '#!/usr/bin/env bash\nset -euo pipefail\nexport HATE_CRACK_ORIG_CWD="$$PWD"\nexec uv run --directory %s python -m hate_crack "$$@"\n' "$(CURDIR)" \
> "$${XDG_BIN_HOME:-$$HOME/.local/bin}/hate_crack"
@chmod +x "$${XDG_BIN_HOME:-$$HOME/.local/bin}/hate_crack"
@echo "Installed hate_crack shim to $${XDG_BIN_HOME:-$$HOME/.local/bin}/hate_crack"
@@ -107,7 +107,7 @@ install: submodules
update: submodules
@uv sync
@mkdir -p "$${XDG_BIN_HOME:-$$HOME/.local/bin}"
@printf '#!/usr/bin/env bash\nset -euo pipefail\nexec uv run --directory %s python -m hate_crack "$$@"\n' "$(CURDIR)" \
@printf '#!/usr/bin/env bash\nset -euo pipefail\nexport HATE_CRACK_ORIG_CWD="$$PWD"\nexec uv run --directory %s python -m hate_crack "$$@"\n' "$(CURDIR)" \
> "$${XDG_BIN_HOME:-$$HOME/.local/bin}/hate_crack"
@chmod +x "$${XDG_BIN_HOME:-$$HOME/.local/bin}/hate_crack"
@echo "Updated hate_crack shim at $${XDG_BIN_HOME:-$$HOME/.local/bin}/hate_crack"