mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-07-28 14:47:22 -07:00
feat: add ngramX attack and gzip auto-detection for external binaries
- Add _is_gzipped() magic-byte detector and _wordlist_path() context manager that transparently decompresses gzip files to a temp path - Apply gzip handling to hcatCombinator3 and hcatCombinatorX via contextlib.ExitStack so compressed wordlists work without manual prep - Add hcatNgramX() wrapper using ngramX.bin <corpus> <group_size> piped to hashcat, with gzip auto-detection on the corpus file - Add ngram_attack() handler in attacks.py with tab-autocomplete corpus selection and configurable group size (default 3) - Register attack as menu option 19 in both main.py and hate_crack.py - Fix wordlist_optimizer.py: .app extension on macOS was wrong, use .bin - Add tests/test_ngram_gzip.py covering ngram_attack handler, _is_gzipped, and _wordlist_path context manager (temp file cleanup, plain passthrough)
This commit is contained in:
@@ -40,7 +40,7 @@ def main():
|
||||
|
||||
# Resolve binary paths relative to script location
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
ext = ".app" if sys.platform == "darwin" else ".bin"
|
||||
ext = ".bin" if sys.platform == "darwin" else ".bin"
|
||||
splitlen_bin = os.path.join(script_dir, "hashcat-utils", "bin", f"splitlen{ext}")
|
||||
rli_bin = os.path.join(script_dir, "hashcat-utils", "bin", f"rli{ext}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user