diff --git a/config.json.example b/config.json.example index dfc890f..5215c2d 100644 --- a/config.json.example +++ b/config.json.example @@ -1,5 +1,5 @@ { - "hcatPath": "/path/to/hate_crack", + "hcatPath": "/path/to/hashcat", "hcatBin": "hashcat", "hcatTuning": "--force --remove", "hcatPotfilePath": "~/.hashcat/hashcat.potfile", diff --git a/hate_crack/main.py b/hate_crack/main.py index 325842f..c889562 100755 --- a/hate_crack/main.py +++ b/hate_crack/main.py @@ -270,6 +270,11 @@ def ensure_binary(binary_path, build_dir=None, name=None): # But hashcat-utils and princeprocessor should ALWAYS use hate_path hcatPath = config_parser.get("hcatPath", "") or hate_path hcatBin = config_parser["hcatBin"] +# If hcatBin is not absolute and hcatPath is set, construct full path from hcatPath + hcatBin +if not os.path.isabs(hcatBin) and hcatPath: + _candidate = os.path.join(hcatPath, hcatBin) + if os.path.isfile(_candidate): + hcatBin = _candidate hcatTuning = config_parser["hcatTuning"] hcatWordlists = config_parser["hcatWordlists"] hcatOptimizedWordlists = config_parser["hcatOptimizedWordlists"]