Commit Graph
100 Commits
Author SHA1 Message Date
Justin BollingerandClaude Opus 4.6 e205e6e886 feat: add LLM Markov Attack (menu option 15)
Add a new attack mode that uses a local LLM via Ollama to generate
password candidates, converts them into hashcat .hcstat2 Markov
statistics via hcstat2gen, and runs a Markov-enhanced mask attack.

Two generation sub-modes:
- Wordlist-based: feeds sample from an existing wordlist to the LLM
  as pattern context (config-selectable default with Y/N override)
- Target-based: prompts for company name, industry, and location
  for contextual password generation

Pipeline: Ollama API -> candidate file -> hcstat2gen -> LZMA compress
-> hashcat -a 3 --markov-hcstat2

Config additions: ollamaUrl, ollamaModel, markovCandidateCount,
markovWordlist. No new pip dependencies (uses stdlib urllib/lzma).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 13:13:39 -05:00
Justin BollingerandClaude Opus 4.6 91906e3313 fix: separate hcatPath (hashcat dir) from hate_path (asset dir)
hcatPath now exclusively points to the hashcat install directory and is
auto-discovered from PATH when not configured. hate_path is resolved
from the package directory (installed) or repo root (development) with
no auto-discovery. Extracted vendor-assets/clean-vendor Makefile targets
to deduplicate the install logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 20:23:12 -05:00
Justin Bollinger 61bca2c4b6 docs: update README with current attacks and features 2026-02-10 11:56:14 -05:00
Justin Bollinger 55acd71b89 fix: remove switch prompt from download_found hashview option
The download_found option downloads already-cracked hashes (with cleartext
passwords). These cannot be used for cracking, so the 'Switch to this hashfile
for cracking?' prompt is inappropriate and confusing.

The switch prompt is kept for download_left since those are uncracked hashes
that can be cracked.

- Remove the switch-to-cracking prompt from download_found flow
- Add clarifying message that found hashes are already cracked
- Align with intended behavior: download_left prompts to switch, download_found just downloads
2026-02-10 10:46:28 -05:00
Justin Bollinger cac2f1ff7c fix: exclude submodule directories from mypy checks and update pre-push hook
- Add HashcatRosetta and hashcat-utils to mypy exclude patterns in pyproject.toml
- Update .github/workflows/mypy.yml to exclude submodule directories
- Update pre-push hook to exclude submodules and use consistent mypy flags
- Set ignore_missing_imports=true to handle external dependencies gracefully
- Ensure pre-push hook permissions are set correctly (executable)

Fixes mypy check failures caused by missing hashcat_rosetta.formatting stub.
2026-02-10 10:24:51 -05:00
Justin Bollinger 10c4d544db Update menu text for option 91 to show 'Analyze Hashcat Rules' 2026-02-10 09:21:44 -05:00
Justin Bollinger e56da58026 Apply ruff formatting fixes
- 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'
2026-02-09 20:08:51 -05:00
Justin Bollinger 3cf40a44c8 Add menu option 91 for rule analysis using HashcatRosetta 2026-02-09 20:02:52 -05:00
Justin Bollinger 0b83a8476f Update HashcatRosetta submodule to latest version with rule analysis features 2026-02-09 19:58:58 -05:00
Justin Bollinger ebfcb59ed8 Add HashcatRosetta as a submodule for rule analysis functionality 2026-02-09 19:58:04 -05:00
Justin Bollinger b526765aa5 added debug options 2026-02-09 14:30:37 -05:00
Justin Bollinger a8c1abae2f updated documentation 2026-02-06 19:51:48 -05:00
Justin Bollinger 3e6efc0ef8 removed extended expander 2026-02-06 19:37:39 -05:00
Justin Bollinger 604813edd4 fingerprint: select expander length and optionally run hybrid on expanded 2026-02-06 16:44:11 -05:00
Justin Bollinger d9e9930471 working loopback mode with tests 2026-02-06 15:06:25 -05:00
Justin Bollinger b3732abf14 updated loopback logic and added testing 2026-02-06 14:37:37 -05:00
Justin Bollinger 09ac410ace updated loopback logic and added testing 2026-02-06 14:36:15 -05:00
Justin BollingerandGitHub 721628ca9a Remove badge status explanations from README
Removed explanations for badge statuses in the README.
2026-02-06 09:51:28 -05:00
Justin Bollinger 242e065101 ci: add individual badges for each Python version (3.9-3.14)
- Create separate workflow files for Python 3.9, 3.10, 3.11, 3.12, 3.13, 3.14
- Each Python version gets its own status badge
- Easily track which version(s) are failing tests
- Update README to display all 6 Python version badges
- Badges are clickable and link to individual workflow results
- Maintain pytest.yml as combined multi-version workflow
2026-02-06 09:50:32 -05:00
Justin Bollinger 94e1377137 ci: split tests workflow into separate ruff, mypy, and pytest workflows
- Create individual workflow files for ruff, mypy, and pytest
- Each workflow has its own status badge for independent monitoring
- Ruff badge shows code quality status
- Mypy badge shows type checking status
- Pytest badge shows multi-version testing status
- Update README with all three badges and clear status documentation
- Remove combined tests.yml in favor of granular workflows
2026-02-06 09:49:30 -05:00
Justin Bollinger 8ef6c1cba2 ci: add multi-version Python testing and status banners
- Separate lint job for ruff and mypy checks on Python 3.13
- Add pytest matrix strategy to test Python 3.9 through 3.14
- Add GitHub Actions status badge to README
- Document CI/CD pipeline and what each check does
- Include pass/fail criteria for linting, type checking, and testing
- Link to Actions tab for detailed workflow results
2026-02-06 09:46:26 -05:00
Justin Bollinger 3320553bad test: improve live test to skip gracefully when server unavailable
- 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
2026-02-06 09:43:49 -05:00
Justin Bollinger 582988ea99 test: improve live test to skip gracefully when server unavailable
- 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
2026-02-06 09:43:23 -05:00
Justin Bollinger c87142b2d5 test: update CLI menu test strings to match recent changes
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.
2026-02-06 09:39:07 -05:00
Justin Bollinger bd7b74a11e build: add dev-install and dev-reinstall targets to Makefile
- Add 'make dev-install' to install project with [dev] dependencies
- Add 'make dev-reinstall' to uninstall and reinstall with dev deps
- Convenient way for developers to get linters and type checkers
2026-02-06 09:36:50 -05:00
Justin Bollinger da2f56bf2a docs: add Development section to README
- Document how to install dev dependencies
- Provide commands for running ruff and mypy locally
- Include pre-push hook example for automated checks
- List all included dev dependencies
- Help contributors run checks before pushing
2026-02-06 09:35:20 -05:00
Justin Bollinger c6995718dc refactor: add optional dev dependencies and mypy configuration
- Add optional [dev] dependency group with mypy, ruff, pytest, and type stubs
- Include types-requests, types-beautifulsoup4, and types-openpyxl
- Add mypy config to exclude submodule directories
- Update GitHub workflow to install with optional dev dependencies
- Remove --ignore-missing-imports flag from mypy for stricter type checking
2026-02-06 09:34:38 -05:00
Justin Bollinger ded2de4002 fix: resolve mypy import-untyped errors for requests library 2026-02-06 09:31:17 -05:00
Justin Bollinger 3a4ed72c82 ruff fixes 2026-02-06 09:29:13 -05:00
Justin Bollinger a938d57578 ruff fixes 2026-02-06 09:14:33 -05:00
Justin Bollinger 835c573158 download wordlists testing 2026-02-05 17:36:46 -05:00
Justin Bollinger 18cfab079a fixed wordlist download and unit testing for live api 2026-02-05 16:32:17 -05:00
Justin Bollinger ba61662d03 automatic hash_id detection via api for hashview hashes and updated tests. 2026-02-05 15:39:08 -05:00
Justin Bollinger af5fe15ec4 automatic hash_id detection via api for hashview hashes 2026-02-05 14:56:27 -05:00
Justin Bollinger 9756f83b0c lots of refactoring around the menues and building out test cases 2026-02-05 13:52:06 -05:00
Justin Bollinger bbaa40958a Update hashview API flow and tests 2026-02-04 15:48:19 -05:00
Justin Bollinger 6f9f4879e1 updated gitignore to ignore expanded files 2026-02-04 12:53:57 -05:00
Justin Bollinger c46504a979 updated output path 2026-02-03 21:50:40 -05:00
Justin Bollinger bfa2eb5720 fixed issue with argument parsing when using uv run vs an installed uv tool 2026-02-03 20:40:00 -05:00
Justin Bollinger 2131cc3900 rule download fixes from hashmob 2026-02-03 20:05:44 -05:00
Justin Bollinger 7f0c395759 rule download fixes from hashmob 2026-02-03 19:44:58 -05:00
Justin Bollinger 944064ffc7 expanded tests and hashview menu changes 2026-02-03 19:28:45 -05:00
Justin Bollinger 5bc0ada206 Merge branch 'main' of https://github.com/trustedsec/hate_crack 2026-02-03 17:21:43 -05:00
Justin Bollinger 8513754ab0 updated formatting to take account terminal width 2026-02-03 17:10:00 -05:00
Justin Bollinger 0b7b9dfd7f updated formatting to take account terminal width 2026-02-03 17:07:26 -05:00
Justin Bollinger a399f24dc5 updated formatting to take account terminal width 2026-02-03 17:05:27 -05:00
Justin Bollinger f79fd45ff8 updated formatting to take account terminal width 2026-02-03 17:01:57 -05:00
Justin Bollinger 74e6987a89 fixed menu option by number 2026-02-03 14:53:57 -05:00
Justin Bollinger d9172c94ee fixed pathing issue with hybrid 2026-02-02 16:06:55 -05:00
Justin Bollinger 9e42d905d2 fixed pathing issue with hybrid 2026-02-02 15:56:16 -05:00
Justin Bollinger 267de30753 updated formatting for rules listing 2026-02-02 13:22:41 -05:00
Justin Bollinger 25c280628e fixed menu pytest options that failed after updating them 2026-02-02 13:18:12 -05:00
Justin Bollinger ac71a7f2b3 fixed menu pytest options that failed after updating them 2026-02-02 13:16:20 -05:00
Justin Bollinger 3cdfab477c possible fix for hashonly 2026-02-02 13:12:35 -05:00
Justin Bollinger 98a5fa0fcd fixed wordlist directory issue when using tools 2026-02-02 12:50:57 -05:00
Justin Bollinger 00f4348637 updated Makefile to enhance uninstall 2026-02-02 12:39:55 -05:00
Justin Bollinger b074b5d784 fixed wordlist display 2026-02-02 12:39:24 -05:00
Justin Bollinger 4fa8af4684 updated formatting for the output of wordlists and standardizing 2026-02-02 12:30:06 -05:00
Justin Bollinger fe8bde2302 config file location issues 2026-02-02 11:53:12 -05:00
Justin Bollinger be5886a735 makefile asset issues 2026-02-01 23:49:19 -05:00
Justin Bollinger 35737b645b uv toll uninstall fix 2026-02-01 23:46:46 -05:00
Justin Bollinger 8fd7dcf30c updated Makefile submodule 2026-02-01 23:39:02 -05:00
Justin Bollinger ac639e3f8f updated Makefile submodule 2026-02-01 23:37:03 -05:00
Justin Bollinger a7c2636175 updated Makefile submodule 2026-02-01 23:35:20 -05:00
Justin Bollinger 158eee4747 fixed pathing issue 2026-02-01 23:18:54 -05:00
Justin Bollinger fef4d5794a fixed pathing issue 2026-02-01 23:16:19 -05:00
Justin Bollinger bda34fde81 fixed pathing issue 2026-02-01 23:11:40 -05:00
Justin Bollinger 2f0419e809 fixed pathing issue 2026-02-01 22:43:44 -05:00
Justin Bollinger 892eb6b839 Revert ancestor asset lookup 2026-02-01 22:41:42 -05:00
Justin Bollinger 9695e1b676 Fix uv tool asset lookup 2026-02-01 22:32:24 -05:00
Justin Bollinger 18efb9592e fixed pathing issues and automatic building of files due to relative paths 2026-02-01 22:19:28 -05:00
Justin Bollinger 2c8c2e61a9 Remove automatic make execution in ensure_binary
Instead of automatically running 'make' when binaries are missing,
now provides clear instructions for users to manually build utilities.

This gives users more control and makes the build process explicit.
Users will see: 'Please build the utilities by running: cd <dir> && make'
2026-02-01 22:10:58 -05:00
Justin Bollinger 3a858c7e7d Add regression tests for asset path separation
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.
2026-02-01 22:06:52 -05:00
Justin Bollinger 80fca8f41b Fix asset path resolution: separate hashcat and hate_crack locations
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.
2026-02-01 22:05:27 -05:00
Justin Bollinger 604da2a3e2 Improve error handling for misconfigured hcatPath
- 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.
2026-02-01 22:02:35 -05:00
Justin Bollinger d23a0a8be8 issue executing hate_crack from make install outside of the install directory 2026-02-01 21:54:33 -05:00
Justin BollingerandGitHub b68a79fadd Merge pull request #66 from trustedsec/makefile_additions
Updated Makefile
2026-02-01 20:47:48 -05:00
Justin Bollinger 82d2a1a13a updated makefile 2026-02-01 20:46:01 -05:00
Justin BollingerandGitHub 255c9b212a Merge pull request #61 from trustedsec/ci-github-actions
Add CI workflow and E2E install tests
2026-01-31 23:47:32 -05:00
Justin Bollinger b9161441c4 Print hashview menu header even when API key missing 2026-01-31 23:46:28 -05:00
Justin Bollinger a4ad60e51b CI: set HATE_CRACK_SKIP_INIT for tests 2026-01-31 23:44:49 -05:00
Justin Bollinger 277ab2deef CI: use venv python for pytest 2026-01-31 23:43:35 -05:00
Justin Bollinger 0351431806 Merge draft PR #65 2026-01-31 23:41:33 -05:00
Justin Bollinger fb3911cba5 Merge draft PR #64 2026-01-31 23:40:41 -05:00
Justin Bollinger 793bae9114 Merge draft PR #63 2026-01-31 23:40:09 -05:00
Justin Bollinger 46e9b9546c Merge draft PR #62 2026-01-31 23:39:11 -05:00
Justin Bollinger 2063292937 CI: create uv venv before installing deps 2026-01-31 23:31:30 -05:00
Justin Bollinger 0fdb3005df CI: install project deps before pytest 2026-01-31 23:24:19 -05:00
Justin Bollinger e163e58f93 CI: install pytest 2026-01-31 23:22:04 -05:00
Justin Bollinger fbd8d7041f Add make test and update testing docs 2026-01-31 23:17:16 -05:00
Justin Bollinger 60db30eb83 Use Makefile in Docker test image 2026-01-31 23:08:50 -05:00
Justin Bollinger 1b01993a19 Expand Docker E2E tests with hashcat crack 2026-01-31 23:01:14 -05:00
Justin Bollinger 9863dcd201 Add GitHub Actions test workflow 2026-01-31 22:54:08 -05:00
Justin Bollinger 203afb3d82 Restore hate_crack package and add E2E install tests 2026-01-31 22:50:51 -05:00
Justin Bollinger c298008f8e added uv pytest 2026-01-30 16:47:05 -05:00
Justin Bollinger ea251904c9 fixed uv tool install 2026-01-30 16:39:03 -05:00
Justin Bollinger b3d7576e35 updated tests 2026-01-28 10:56:00 -05:00
Justin Bollinger fd293a75c6 updated tests 2026-01-27 20:04:45 -05:00
Justin Bollinger d788f31f84 updated hashview apis and tests. 2026-01-27 16:00:09 -05:00
Justin Bollinger 2dd8ca0029 updated pytests for hashview 2026-01-27 13:24:38 -05:00