chore: remove hashcat submodule

hashcat is now a system dependency (installed via apt/brew or PATH) rather
than a compiled submodule. The Lima VM provision script installs it via apt,
and local installs are expected to have hashcat available in PATH.

- Remove hashcat entry from .gitmodules
- Remove hashcat/ submodule checkout
- Remove hashcat submodule skip logic from Makefile submodules target
- Simplify submodules-pre hashcat check to PATH-only
- Update vendor-assets and clean targets to remove submodule references
- Update README: hashcat is now a required prerequisite, not optional
- Document Lima VM E2E prerequisites (lima, rsync) and list all packages
  provisioned automatically by the test VM
This commit is contained in:
Justin Bollinger
2026-03-06 15:51:10 -05:00
parent 43506b78af
commit eb3119747b
4 changed files with 28 additions and 21 deletions

4
.gitmodules vendored
View File

@@ -10,10 +10,6 @@
path = omen path = omen
url = https://github.com/RUB-SysSec/OMEN.git url = https://github.com/RUB-SysSec/OMEN.git
ignore = dirty ignore = dirty
[submodule "hashcat"]
path = hashcat
url = https://github.com/hashcat/hashcat.git
ignore = dirty
[submodule "princeprocessor"] [submodule "princeprocessor"]
path = princeprocessor path = princeprocessor
url = https://github.com/hashcat/princeprocessor.git url = https://github.com/hashcat/princeprocessor.git

View File

@@ -12,10 +12,6 @@ submodules:
$(MAKE) submodules-pre; \ $(MAKE) submodules-pre; \
if [ -f .gitmodules ] && command -v git >/dev/null 2>&1; then \ if [ -f .gitmodules ] && command -v git >/dev/null 2>&1; then \
for path in $$(git config --file .gitmodules --get-regexp path | awk '{print $$2}'); do \ for path in $$(git config --file .gitmodules --get-regexp path | awk '{print $$2}'); do \
if [ "$$path" = "hashcat" ] && command -v hashcat >/dev/null 2>&1; then \
echo "hashcat already installed in PATH, skipping submodule compilation"; \
continue; \
fi; \
if [ "$$path" = "princeprocessor" ]; then \ if [ "$$path" = "princeprocessor" ]; then \
$(MAKE) -C "$$path/src" CFLAGS_LINUX64="-W -Wall -std=c99 -O2 -s -DLINUX"; \ $(MAKE) -C "$$path/src" CFLAGS_LINUX64="-W -Wall -std=c99 -O2 -s -DLINUX"; \
if [ -f "$$path/src/pp64.bin" ]; then cp "$$path/src/pp64.bin" "$$path/"; \ if [ -f "$$path/src/pp64.bin" ]; then cp "$$path/src/pp64.bin" "$$path/"; \
@@ -32,9 +28,8 @@ submodules:
submodules-pre: submodules-pre:
@# Pre-step: basic sanity checks and file generation before building submodules. @# Pre-step: basic sanity checks and file generation before building submodules.
@# Ensure required directories exist (whether as submodules or vendored copies). @# Ensure required directories exist (whether as submodules or vendored copies).
@# hashcat is optional here: submodule is compiled if present, else PATH hashcat is used. @command -v hashcat >/dev/null 2>&1 || { \
@test -d hashcat || command -v hashcat >/dev/null 2>&1 || { \ echo "Error: hashcat not found. Install hashcat (e.g. apt install hashcat or brew install hashcat)."; exit 1; }
echo "Error: hashcat not found. Either initialize the hashcat submodule or install hashcat."; exit 1; }
@test -d hashcat-utils || { echo "Error: missing required directory: hashcat-utils"; exit 1; } @test -d hashcat-utils || { echo "Error: missing required directory: hashcat-utils"; exit 1; }
@test -d princeprocessor || { echo "Error: missing required directory: princeprocessor"; exit 1; } @test -d princeprocessor || { echo "Error: missing required directory: princeprocessor"; exit 1; }
@test -d omen || { echo "Warning: missing directory: omen (OMEN attacks will not be available)"; } @test -d omen || { echo "Warning: missing directory: omen (OMEN attacks will not be available)"; }
@@ -51,7 +46,7 @@ vendor-assets:
@rm -rf hate_crack/hashcat hate_crack/hashcat-utils hate_crack/princeprocessor hate_crack/omen @rm -rf hate_crack/hashcat hate_crack/hashcat-utils hate_crack/princeprocessor hate_crack/omen
@mkdir -p hate_crack/hashcat @mkdir -p hate_crack/hashcat
@if [ -f hashcat/hashcat ]; then \ @if [ -f hashcat/hashcat ]; then \
echo "Vendoring compiled hashcat submodule binary..."; \ echo "Vendoring compiled hashcat binary from submodule..."; \
cp hashcat/hashcat hate_crack/hashcat/hashcat; \ cp hashcat/hashcat hate_crack/hashcat/hashcat; \
[ -d hashcat/rules ] && cp -R hashcat/rules hate_crack/hashcat/rules || true; \ [ -d hashcat/rules ] && cp -R hashcat/rules hate_crack/hashcat/rules || true; \
[ -d hashcat/OpenCL ] && cp -R hashcat/OpenCL hate_crack/hashcat/OpenCL || true; \ [ -d hashcat/OpenCL ] && cp -R hashcat/OpenCL hate_crack/hashcat/OpenCL || true; \
@@ -71,7 +66,7 @@ vendor-assets:
[ -d "$$HASHCAT_DIR/OpenCL" ] && cp -R "$$HASHCAT_DIR/OpenCL" hate_crack/hashcat/OpenCL || true; \ [ -d "$$HASHCAT_DIR/OpenCL" ] && cp -R "$$HASHCAT_DIR/OpenCL" hate_crack/hashcat/OpenCL || true; \
[ -d "$$HASHCAT_DIR/modules" ] && cp -R "$$HASHCAT_DIR/modules" hate_crack/hashcat/modules || true; \ [ -d "$$HASHCAT_DIR/modules" ] && cp -R "$$HASHCAT_DIR/modules" hate_crack/hashcat/modules || true; \
else \ else \
echo "Error: hashcat not found. Either compile the hashcat submodule or install hashcat."; \ echo "Error: hashcat not found. Install hashcat (e.g. apt install hashcat or brew install hashcat)."; \
exit 1; \ exit 1; \
fi fi
@cp -R hashcat-utils hate_crack/ @cp -R hashcat-utils hate_crack/
@@ -124,7 +119,6 @@ dev-reinstall: uninstall dev-install
clean: clean:
-$(MAKE) -C hashcat-utils clean -$(MAKE) -C hashcat-utils clean
-$(MAKE) -C hashcat clean
-@if [ -f .gitmodules ]; then git submodule deinit -f --all; fi -@if [ -f .gitmodules ]; then git submodule deinit -f --all; fi
rm -rf .pytest_cache .ruff_cache build dist *.egg-info rm -rf .pytest_cache .ruff_cache build dist *.egg-info
rm -rf ~/.cache/uv rm -rf ~/.cache/uv

View File

@@ -9,11 +9,21 @@
## Installation ## Installation
### 1. Install hashcat (Optional) ### 1. Install hashcat
Hashcat is included as a git submodule and will be compiled automatically. If you already have hashcat installed and in your PATH, the build step will skip the submodule compilation. Hashcat must be installed and available in your PATH:
To manually install hashcat instead (e.g., system package or pre-built binary), ensure `hashcat` is available in your PATH or set `hcatPath` in `config.json`. Ubuntu/Kali:
```bash
sudo apt-get install -y hashcat
```
macOS (Homebrew):
```bash
brew install hashcat
```
Or download a pre-built binary from https://hashcat.net/hashcat/ and set `hcatPath` in `config.json` to its location.
### 2. Download hate_crack ### 2. Download hate_crack
@@ -36,7 +46,7 @@ Then customize configuration in `config.json` if needed (wordlist paths, API key
The easiest way is to run `make` (or `make install`), which auto-detects your OS and installs: The easiest way is to run `make` (or `make install`), which auto-detects your OS and installs:
- External dependencies (p7zip, transmission-cli) - External dependencies (p7zip, transmission-cli)
- Builds submodules (hashcat-utils, princeprocessor, and optionally hashcat if not in PATH) - Builds submodules (hashcat-utils, princeprocessor, and optionally omen)
- Python tool via uv - Python tool via uv
```bash ```bash
@@ -532,10 +542,18 @@ HATE_CRACK_RUN_DOCKER_TESTS=1 uv run pytest tests/test_docker_script_install.py
The Docker E2E test also downloads a small subset of rockyou and runs a basic The Docker E2E test also downloads a small subset of rockyou and runs a basic
hashcat crack to validate external tool integration. hashcat crack to validate external tool integration.
Lima VM end-to-end test (macOS only, requires Lima): Lima VM end-to-end test (macOS only):
Prerequisites: [Lima](https://lima-vm.io/) and `rsync` must be installed.
```bash ```bash
uv run pytest tests/test_lima_vm_install.py -v brew install lima
```
The test VM provisions automatically with all Linux dependencies (hashcat, build-essential, curl, git, gzip, p7zip-full, transmission-cli, ocl-icd-libopencl1, pocl-opencl-icd, uv).
```bash
HATE_CRACK_RUN_LIMA_TESTS=1 uv run pytest tests/test_lima_vm_install.py -v
``` ```
This test validates installation and execution within a lightweight Linux VM on macOS. This test validates installation and execution within a lightweight Linux VM on macOS.

Submodule hashcat deleted from 2d71af3718