- Fix line length and formatting in hate_crack/api.py
- Fix line wrapping and f-string formatting in hate_crack/attacks.py
- Apply code style improvements in hate_crack/main.py
- Format test files for consistency
- All changes applied via 'ruff check --fix'
- Add server reachability check before attempting connection
- Test skips if Hashview server is not available on localhost:5000
- Prevents test failures when HASHVIEW_TEST_REAL env var is set but server isn't running
- Allows test to succeed when Docker/server is available and configured
The Hashview menu has been updated:
- Old: 'Available Customers'
- New: 'What would you like to do?'
Updated test to check for the current menu text that displays
when using the --hashview flag.
Tests now verify that hashcat-utils are loaded from hate_crack repo
even when hcatPath points to a different directory (like /opt/hashcat).
Why previous tests didn't catch this bug:
- config.json.example has hcatPath = "" (empty)
- Code has fallback: hcatPath = config.get('hcatPath', '') or hate_path
- So hcatPath accidentally defaulted to hate_path during testing
- This masked the bug where utilities incorrectly used hcatPath
Added tests that would have caught this:
- test_hashcat_utils_uses_hate_path_not_hcat_path
- test_config_with_explicit_hashcat_path
- test_readme_documents_correct_usage
Also added code comment documenting the fallback behavior.
BREAKING CHANGE: Corrected understanding of hcatPath configuration
- hcatPath should point to hashcat binary location (or omit if in PATH)
- hashcat-utils and princeprocessor are located in hate_crack repo
- Changed code to use hate_path for utilities instead of hcatPath
- Updated error messages to guide users correctly
- Updated README with correct configuration examples
- Asset discovery now properly uses HATE_CRACK_HOME environment variable
This fixes the issue where users had hcatPath pointing to hashcat
installation but the code was looking there for hashcat-utils.
- Add directory existence check in ensure_binary() before attempting make
- Provide clear error message when build directory doesn't exist
- Add troubleshooting section to README.md explaining common hcatPath mistakes
- Add tests for invalid hcatPath scenario and installed tool execution
- Helps users distinguish between hashcat path and hate_crack path
Fixes issue where users set hcatPath to hashcat installation directory
instead of hate_crack repository directory, causing confusing errors.