mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-04-28 12:03:11 -07:00
chore: replace transmission-cli with transmission-daemon in CI/install
Delete wordlists/kill_transmission.sh (replaced by Python extraction). Update Makefile, Dockerfile.test, lima config, README, TESTING.md, and test_dependencies.py to reference transmission-daemon/transmission-remote instead of transmission-cli. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ RUN apt-get update \
|
|||||||
ocl-icd-libopencl1 \
|
ocl-icd-libopencl1 \
|
||||||
pocl-opencl-icd \
|
pocl-opencl-icd \
|
||||||
p7zip-full \
|
p7zip-full \
|
||||||
transmission-cli \
|
transmission-daemon \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN python -m pip install -q uv==0.9.28
|
RUN python -m pip install -q uv==0.9.28
|
||||||
|
|||||||
8
Makefile
8
Makefile
@@ -79,13 +79,13 @@ install: submodules
|
|||||||
}; \
|
}; \
|
||||||
command -v brew >/dev/null 2>&1 || { echo >&2 "Homebrew not found. Please install Homebrew first: https://brew.sh/"; exit 1; }; \
|
command -v brew >/dev/null 2>&1 || { echo >&2 "Homebrew not found. Please install Homebrew first: https://brew.sh/"; exit 1; }; \
|
||||||
command -v 7z >/dev/null 2>&1 || brew install p7zip; \
|
command -v 7z >/dev/null 2>&1 || brew install p7zip; \
|
||||||
command -v transmission-cli >/dev/null 2>&1 || brew install transmission-cli; \
|
command -v transmission-daemon >/dev/null 2>&1 || brew install transmission; \
|
||||||
elif [ -f /etc/debian_version ]; then \
|
elif [ -f /etc/debian_version ]; then \
|
||||||
echo "Detected Debian/Ubuntu"; \
|
echo "Detected Debian/Ubuntu"; \
|
||||||
command -v gcc >/dev/null 2>&1 || { sudo apt-get update && sudo apt-get install -y build-essential; }; \
|
command -v gcc >/dev/null 2>&1 || { sudo apt-get update && sudo apt-get install -y build-essential; }; \
|
||||||
NEED_INSTALL=""; \
|
NEED_INSTALL=""; \
|
||||||
command -v 7z >/dev/null 2>&1 || NEED_INSTALL="$$NEED_INSTALL p7zip-full"; \
|
command -v 7z >/dev/null 2>&1 || NEED_INSTALL="$$NEED_INSTALL p7zip-full"; \
|
||||||
command -v transmission-cli >/dev/null 2>&1 || NEED_INSTALL="$$NEED_INSTALL transmission-cli"; \
|
command -v transmission-daemon >/dev/null 2>&1 || NEED_INSTALL="$$NEED_INSTALL transmission-daemon"; \
|
||||||
if [ -n "$$NEED_INSTALL" ]; then \
|
if [ -n "$$NEED_INSTALL" ]; then \
|
||||||
sudo apt-get update && sudo apt-get install -y $$NEED_INSTALL; \
|
sudo apt-get update && sudo apt-get install -y $$NEED_INSTALL; \
|
||||||
fi; \
|
fi; \
|
||||||
@@ -159,11 +159,11 @@ uninstall:
|
|||||||
@if [ "$(shell uname)" = "Darwin" ]; then \
|
@if [ "$(shell uname)" = "Darwin" ]; then \
|
||||||
echo "Detected macOS"; \
|
echo "Detected macOS"; \
|
||||||
command -v brew >/dev/null 2>&1 || { echo >&2 "Homebrew not found. Please uninstall Homebrew packages manually."; exit 1; }; \
|
command -v brew >/dev/null 2>&1 || { echo >&2 "Homebrew not found. Please uninstall Homebrew packages manually."; exit 1; }; \
|
||||||
brew uninstall --ignore-dependencies p7zip transmission-cli || true; \
|
brew uninstall --ignore-dependencies p7zip transmission || true; \
|
||||||
rm -rf ~/.cache/uv; \
|
rm -rf ~/.cache/uv; \
|
||||||
elif [ -f /etc/debian_version ]; then \
|
elif [ -f /etc/debian_version ]; then \
|
||||||
echo "Detected Debian/Ubuntu"; \
|
echo "Detected Debian/Ubuntu"; \
|
||||||
sudo apt-get remove -y p7zip-full transmission-cli || true; \
|
sudo apt-get remove -y p7zip-full transmission-daemon || true; \
|
||||||
rm -rf ~/.cache/uv; \
|
rm -rf ~/.cache/uv; \
|
||||||
else \
|
else \
|
||||||
echo "Unsupported OS. Please uninstall dependencies manually."; \
|
echo "Unsupported OS. Please uninstall dependencies manually."; \
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -45,7 +45,7 @@ Then customize configuration in `config.json` if needed (wordlist paths, API key
|
|||||||
### 3. Install dependencies and hate_crack
|
### 3. Install dependencies and hate_crack
|
||||||
|
|
||||||
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-daemon)
|
||||||
- Builds submodules (hashcat-utils, princeprocessor, and optionally omen)
|
- Builds submodules (hashcat-utils, princeprocessor, and optionally omen)
|
||||||
- Python dependencies via uv and a CLI shim at `~/.local/bin/hate_crack`
|
- Python dependencies via uv and a CLI shim at `~/.local/bin/hate_crack`
|
||||||
|
|
||||||
@@ -65,19 +65,19 @@ make reinstall
|
|||||||
These are required for certain download/extraction flows:
|
These are required for certain download/extraction flows:
|
||||||
|
|
||||||
- `7z`/`7za` (p7zip) — used to extract `.7z` archives.
|
- `7z`/`7za` (p7zip) — used to extract `.7z` archives.
|
||||||
- `transmission-cli` — used to download Weakpass torrents.
|
- `transmission-daemon` / `transmission-remote` — used to download Weakpass torrents.
|
||||||
|
|
||||||
Manual install commands:
|
Manual install commands:
|
||||||
|
|
||||||
Ubuntu/Kali:
|
Ubuntu/Kali:
|
||||||
```bash
|
```bash
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y p7zip-full transmission-cli
|
sudo apt-get install -y p7zip-full transmission-daemon
|
||||||
```
|
```
|
||||||
|
|
||||||
macOS (Homebrew):
|
macOS (Homebrew):
|
||||||
```bash
|
```bash
|
||||||
brew install p7zip transmission-cli
|
brew install p7zip transmission
|
||||||
```
|
```
|
||||||
|
|
||||||
Then install the Python dependencies and CLI shim:
|
Then install the Python dependencies and CLI shim:
|
||||||
@@ -583,7 +583,7 @@ Set any of the following to enable live checks:
|
|||||||
- `HASHMOB_TEST_REAL=1` — live Hashmob connectivity/CLI menu check
|
- `HASHMOB_TEST_REAL=1` — live Hashmob connectivity/CLI menu check
|
||||||
- `HASHVIEW_TEST_REAL=1` — live Hashview CLI menu check
|
- `HASHVIEW_TEST_REAL=1` — live Hashview CLI menu check
|
||||||
- `WEAKPASS_TEST_REAL=1` — live Weakpass CLI menu check
|
- `WEAKPASS_TEST_REAL=1` — live Weakpass CLI menu check
|
||||||
- `HATE_CRACK_REQUIRE_DEPS=1` — fail if `7z` or `transmission-cli` is missing
|
- `HATE_CRACK_REQUIRE_DEPS=1` — fail if `7z` or `transmission-daemon` is missing
|
||||||
|
|
||||||
### Live Hashview Upload Test
|
### Live Hashview Upload Test
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@ Prerequisites: [Lima](https://lima-vm.io/) and `rsync` must be installed.
|
|||||||
brew install lima
|
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).
|
The test VM provisions automatically with all Linux dependencies (hashcat, build-essential, curl, git, gzip, p7zip-full, transmission-daemon, ocl-icd-libopencl1, pocl-opencl-icd, uv).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
HATE_CRACK_RUN_LIMA_TESTS=1 uv run pytest tests/test_lima_vm_install.py -v
|
HATE_CRACK_RUN_LIMA_TESTS=1 uv run pytest tests/test_lima_vm_install.py -v
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ make coverage
|
|||||||
| `HASHMOB_TEST_REAL=1` | Enable live Hashmob connectivity tests |
|
| `HASHMOB_TEST_REAL=1` | Enable live Hashmob connectivity tests |
|
||||||
| `HASHVIEW_TEST_REAL=1` | Enable live Hashview CLI menu tests |
|
| `HASHVIEW_TEST_REAL=1` | Enable live Hashview CLI menu tests |
|
||||||
| `WEAKPASS_TEST_REAL=1` | Enable live Weakpass CLI menu tests |
|
| `WEAKPASS_TEST_REAL=1` | Enable live Weakpass CLI menu tests |
|
||||||
| `HATE_CRACK_REQUIRE_DEPS=1` | Fail if `7z` or `transmission-cli` are missing |
|
| `HATE_CRACK_REQUIRE_DEPS=1` | Fail if `7z` or `transmission-daemon` are missing |
|
||||||
| `HATE_CRACK_RUN_LIVE_TESTS=1` | Enable live Hashview upload test (requires valid credentials in `config.json`) |
|
| `HATE_CRACK_RUN_LIVE_TESTS=1` | Enable live Hashview upload test (requires valid credentials in `config.json`) |
|
||||||
| `HATE_CRACK_RUN_LIVE_HASHVIEW_TESTS=1` | Enable live Hashview wordlist upload test |
|
| `HATE_CRACK_RUN_LIVE_HASHVIEW_TESTS=1` | Enable live Hashview wordlist upload test |
|
||||||
| `HATE_CRACK_RUN_E2E=1` | Enable local uv tool install E2E test |
|
| `HATE_CRACK_RUN_E2E=1` | Enable local uv tool install E2E test |
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ provision:
|
|||||||
ocl-icd-libopencl1 \
|
ocl-icd-libopencl1 \
|
||||||
pocl-opencl-icd \
|
pocl-opencl-icd \
|
||||||
p7zip-full \
|
p7zip-full \
|
||||||
transmission-cli
|
transmission-daemon
|
||||||
|
|
||||||
- mode: user
|
- mode: user
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
@@ -21,5 +21,9 @@ def test_dependency_7z_installed():
|
|||||||
_require_executable("7z")
|
_require_executable("7z")
|
||||||
|
|
||||||
|
|
||||||
def test_dependency_transmission_cli_installed():
|
def test_dependency_transmission_daemon_installed():
|
||||||
_require_executable("transmission-cli")
|
_require_executable("transmission-daemon")
|
||||||
|
|
||||||
|
|
||||||
|
def test_dependency_transmission_remote_installed():
|
||||||
|
_require_executable("transmission-remote")
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
TORRENT_DIR="${TR_TORRENT_DIR:-}"
|
|
||||||
TORRENT_NAME="${TR_TORRENT_NAME:-}"
|
|
||||||
|
|
||||||
if [ -z "$TORRENT_DIR" ] || [ -z "$TORRENT_NAME" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
TORRENT_PATH="${TORRENT_DIR}/${TORRENT_NAME}"
|
|
||||||
|
|
||||||
SEVENZ_BIN=$(command -v 7z || command -v 7za || true)
|
|
||||||
if [ -n "$SEVENZ_BIN" ]; then
|
|
||||||
if [ -f "$TORRENT_PATH" ] && [[ "$TORRENT_PATH" == *.7z ]]; then
|
|
||||||
"$SEVENZ_BIN" x -sdel "$TORRENT_PATH" -o"$TORRENT_DIR"
|
|
||||||
elif [ -d "$TORRENT_PATH" ]; then
|
|
||||||
find "$TORRENT_PATH" -maxdepth 2 -type f -name "*.7z" -print0 | while IFS= read -r -d '' zfile; do
|
|
||||||
"$SEVENZ_BIN" e -sdel "$zfile"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$PPID" ]; then
|
|
||||||
kill "$PPID"
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user