Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
hate_crack — TrustedSec チームによる、Hashcat を通じてクラッキング手法を自動化するツール。 | Kitploit
ツール/GitHubGitHub/trustedsec/hate_crack
パスワードクラッキングパスワード攻撃ハッシュ分析ペネトレーションテスト
GitHubtrustedsec/hate_crack

hate_crack

TrustedSec チームによる、Hashcat を通じてクラッキング手法を自動化するツール。

リポジトリを見るウェブサイト
1.9k287113時間32分前Kitploit レビュー済み

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
root@kitploit:~
  ___ ___         __             _________                       __
 /   |   \_____ _/  |_  ____     \_   ___ \____________    ____ |  | __
/    ~    \__  \\   __\/ __ \    /    \  \/\_  __ \__  \ _/ ___\|  |/ /
\    Y    // __ \|  | \  ___/    \     \____|  | \// __ \\  \___|    <
 \___|_  /(____  /__|  \___  >____\______  /|__|  (____  /\___  >__|_ \
       \/      \/          \/_____/      \/            \/     \/     \/

インストール

ソースからのインストールが唯一のサポート対象パスです。hate_crack は PyPI には配布されていません: pip install hate-crack は意図的に失敗する 0.0.0 プレースホルダーに解決され、ここにリダイレクトされます。この名前は、他者が似たようなパッケージを公開できないように保持されているだけです — 詳細は packaging/pypi-placeholder/ を参照してください。

1. hashcat をインストールする

Hashcat がインストールされ、PATH に含まれている必要があります:

Ubuntu/Kali:```bash sudo apt-get install -y hashcat

root@kitploit:~
macOS (Homebrew):```bash
brew install hashcat

または、https://hashcat.net/hashcat/ からビルド済みバイナリをダウンロードし、config.json 内の hcatPath にその場所を設定します。

2. hate_crack のダウンロード

サブモジュール付きでクローンします(hashcat-utils、princeprocessor、pcfg_cracker、Corporate_Masks、およびオプションで omen に必要です):```bash git clone --recurse-submodules https://github.com/trustedsec/hate_crack.git cd hate_crack

root@kitploit:~
サブモジュールなしでクローンした場合は、サブモジュールを初期化してください:```bash
git submodule update --init --recursive

次に、必要に応じて設定をカスタマイズします。hate_crack は2つの設定ファイルを使用し、それぞれが異なる設定群を管理します。

  • config.json — ワードリストのパス、マスク、ルール、チューニング、potfile、hashcat のパス、候補数の上限、通知トグル、CLI の既定設定(35項目)。
  • .env — サードパーティ統合設定のみ:Hashview と Hashmob の認証情報、Pushover の認証情報、Ollama、pipal(14項目)。git の追跡対象外で、モード 0600 で作成されます。

その境界線がそこにある理由は一つだけです: .env はシークレットを保持できるファイルだからです。サードパーティサービスの認証情報と設定は、git 管理外の 0600 ファイルに入ります。hate_crack がローカルで行うすべては config.json に残り、共有・差分・自分のメモへのコミットが安全です。Pushover の 認証情報 が .env にあり、Pushover のオン/オフ トグル が config.json にあるのもそのためです — トグルはローカルの設定であり、シークレットではありません。

各キーには、正確に1つの置き場所があります。他のファイルに置かれたキーは無視され、hate_crack はそのキーが属するファイル名を示す警告を表示します。それでも、任意のキーは環境変数をエクスポートすることで、1回の実行に限り上書きできます。ほとんどのユーザーは、既定のパスがそのまま動作するため、この手順を省略できます。

config.json は恒久的で第一級の存在です — 非推奨ではなく、削除の予定もありません。移動したのは統合設定のみです。

単一の config.json からアップグレードする場合? hate_crack は初回実行時に自動で移行します。統合設定は新しい 0600 の .env にコピーされ、その後 config.json から削除されるため、2つのファイルが両方ともそれらを管理することはありません。移動したキー(値は決して表示されません)を出力し、元のファイルに触れる前に原本を config.json.pre-split.bak として保存します。config.json の他のすべては、キーの順序を含め、そのまま残ります。

初回実行: hate_crack が両方のファイルを作成するので、何もする必要はありません。代わりに .env を手動で設定する場合は、追跡されているテンプレートをコピーしてください:```bash cp .env.example .env chmod 600 .env

root@kitploit:~
`.env.example` はコミットされ、すべての認証情報キーが空の状態で同梱されます。`.env` 自体は**決して**コミットしてはなりません — `.env` は gitignore されており、通常のバックアップ表記も同様に無視されます。また、hate_crack は常にモード `0600`(所有者のみ読み書き可能)でこのファイルを作成します。`.env.example` はスキーマから生成されます。`hate_crack/config_schema.py` を変更した後は、`uv run python -m hate_crack.config_writer` を実行して再生成してください。

### 3. 依存関係と hate_crack のインストール

最も簡単な方法は `make`(または `make install`)を実行することです。これにより OS が自動検出され、以下がインストールされます:

- 外部依存関係(p7zip、transmission-daemon / transmission-remote)
- サブモジュール(hashcat-utils、princeprocessor、pcfg_cracker、任意で omen)のビルド、およびデータのみの Corporate_Masks マスクセットのチェックアウト
- uv による Python 依存関係と、`~/.local/bin/hate_crack` への CLI シム```bash
make

これは冪等です - 既にインストール済みのツールはスキップします。クリーン再インストールを強制するには:```bash make reinstall

root@kitploit:~
**または依存関係を手動でインストール:**

### 外部依存関係
これらは特定のダウンロード/抽出フローに必要です:

- `7z`/`7za` (p7zip) — `.7z` アーカイブの抽出に使用されます。
- `transmission-daemon` / `transmission-remote` — Weakpass トレントのダウンロードに使用されます。

手動インストールコマンド:

Ubuntu/Kali:```bash
sudo apt-get update
sudo apt-get install -y p7zip-full transmission-daemon

macOS (Homebrew):```bash brew install p7zip transmission-cli # provides transmission-daemon and transmission-remote

root@kitploit:~
次に、Python の依存関係と CLI シムをインストールします:```bash
uv sync
mkdir -p ~/.local/bin
printf '#!/usr/bin/env bash\nset -euo pipefail\nexec uv run --directory %s python -m hate_crack "$@"\n' "$(pwd)" > ~/.local/bin/hate_crack
chmod +x ~/.local/bin/hate_crack

プロジェクト構造

コアロジックは現在、hate_crack/ 配下のモジュールに分割されています:

  • hate_crack/cli.py: argparse ヘルパーと設定のオーバーライド。
  • hate_crack/api.py: Hashview、Weakpass、Hashmob との統合(ダウンロード/メニュー/ヘルパー)。
  • hate_crack/attacks.py: メニューの攻撃ハンドラー。
  • hate_crack/hashmob_wordlist.py: Hashmob ワードリストユーティリティ(薄いラッパー。api.py を呼び出します)。
  • hate_crack/corpus_stats.py: LLM にコーパスを説明するために使用される、コーパス全体のパスワード統計。
  • hate_crack/plaintext.py: コーパス行からパスワードを復元します(ハッシュプレフィックスの除去、$HEX[...] のデコード)。LLM モード、corpus_stats、rulegen で共有されます。
  • hate_crack/llm.py: Atomic Agents による構造化(JSON)LLM 候補生成。
  • hate_crack/menu.py: オプションの矢印キーナビゲーションを含む共通メニューレンダラー。
  • hate_crack/noninteractive.py: スクリプト化された攻撃サブコマンド用のディスパッチャー。
  • hate_crack/notify/: 通知パッケージ(Pushover バックエンド、クラックごとのテール監視)。
  • hate_crack/username_detect.py: 入力ファイルを検出して、hashcat の を決定します。

トップレベルの hate_crack.py は引き続きメインのエントリポイントであり、これらのモジュールを統括します。


参考文献と謝辞

このプロジェクトは、多数の外部プロジェクトやサービスに依存しており、それらから着想を得ています。以下に感謝します:

  • Hashview (http://github.com/hashview/)
  • Weakpass (https://weakpass.com)
  • Hashmob (https://hashmob.net)

使用方法

make でインストールした後、hate_crack をどこからでも実行できます:```bash hate_crack

or with arguments:

hate_crack <hash_file> <hash_type> [options]

root@kitploit:~
または、`uv` 経由で実行します:```bash
uv run hate_crack.py <hash_file> <hash_type>

ツールとして実行(推奨)

リポジトリルートで make を使用してインストールします - これによりサブモジュールがビルドされ、アセットがバンドルされます:```bash cd /path/to/hate_crack make hate_crack

root@kitploit:~
`make install` コマンドは、`~/.local/bin/hate_crack` に bash シムを作成します。これはリポジトリディレクトリから実行されるため、現在の作業ディレクトリに関係なく、設定とアセットは常に見つかります。

設定は次の場所でも検索されます:
- リポジトリのルートとパッケージディレクトリ
- `~/.hate_crack`

**注:** `config.json` の `hcatPath` は hashcat バイナリの場所のみを指定します(hashcat が PATH にある場合は任意)。Hate_crack のアセット(hashcat-utils、princeprocessor、pcfg_cracker、Corporate_Masks、omen)はリポジトリディレクトリから読み込まれ、`make install` によって自動的にバンドルされます。

### スクリプトとして実行
スクリプトは `uv` シバンを使用します。実行可能にして実行してください:```bash
chmod +x hate_crack.py
./hate_crack.py

Pythonを直接使用することもできます:```bash python hate_crack.py

root@kitploit:~
### 非対話型 / スクリプトでの使用法

自動化のために、メニューを介さずに単一の攻撃を直接起動できます。攻撃名が最初の引数になり、その後にハッシュファイルとhashcatハッシュタイプが続きます。前処理のプロンプト(コンピュータアカウントのフィルタリング、LM優先のブルートフォース、重複アカウントの重複排除)は、このモードではデフォルトが自動的に受け入れられます。プロセスは、成功時には `0` で終了し、エラー時には非ゼロで終了します(ハッシュファイルの欠落、数値以外のハッシュタイプ、ワードリストの欠落、または不明なルールファイル名)。```bash
# Quick crack: one wordlist + optional rule(s) from the rules directory
hate_crack quick hashes.txt 1000 --wordlist rockyou.txt --rules best64.rule

# Chain two rules in a single run
hate_crack quick hashes.txt 1000 --wordlist rockyou.txt --rules best64.rule+d3ad0ne.rule

# Run two rules as two separate passes
hate_crack quick hashes.txt 1000 --wordlist rockyou.txt --rules best64.rule d3ad0ne.rule

# Canned dictionary methodology (uses your configured wordlists)
hate_crack dict hashes.txt 1000

# Brute force lengths 1-8
hate_crack brute hashes.txt 1000 --min 1 --max 8

# Top-mask attack targeting ~4 hours
hate_crack topmask hashes.txt 1000 --target-time 4

Troubleshooting

更新時に「would clobber existing tag」エラーが発生する

古いクローンは更新を拒否し、次のような長い行のリストを出力することがあります:``` ! [rejected] v2.5.0 -> v2.5.0 (would clobber existing tag)

root@kitploit:~
これは2026年7月より前に作成されたクローンに影響します。公開された履歴は、コミットされるべきではなかったいくつかのファイルを削除するためにその後書き換えられ、その結果すべてのコミットに新しいIDが付与されました。したがって、古いクローンのタグは、このリポジトリがもはや含まないオブジェクトを指しており、gitは既に持っているタグを移動することを拒否します。チェックアウトに問題はなく、クラッキングデータが危険にさらされることもありません。

一度だけのリセットで回復できます。これにより、チェックアウト内のローカルコミットと編集が破棄されるため、gitで追跡されているもの(追跡されていない`config.json`とは異なります)をカスタマイズした場合は、最初にブランチにコミットしてください:```bash
cd /path/to/hate_crack
git fetch --tags --force origin
git checkout -B main origin/main
make install

--force はここではタグの更新のみを行い、コミットには触れません。その後、 組み込みアップデータは正常に動作します。2.18 より前のバージョンでは、この 復旧を自分で実行できなかったため、一度手動で行う必要があります。

エラー: ビルドディレクトリが存在しません

次のようなエラーが表示された場合:``` Error: Build directory /opt/hashcat/hashcat-utils does not exist. Expected to find expander at /opt/hashcat/hashcat-utils/bin/expander.

root@kitploit:~
これは、hate_crack のアセットがインストールされたパッケージに同梱されていないことを意味します。

**パスの説明:**
- `config.json` 内の `hcatPath` → **hashcat バイナリの場所** を指します (オプション、PATH に含めることも可能)
- `hashcat-utils/` と `princeprocessor/` → `make install` によってパッケージに同梱されます

**解決策:**
Makefile を使用して再インストールしてください。これによりサブモジュールがビルドされ、ツールがインストールされます:```bash
cd /path/to/hate_crack  # the repository checkout
make install

Default configuration (config.json.example):

Most users can use defaults without customization:

  • hcatWordlists: ./wordlists (relative to repo root or HOME/.hate_crack)
  • hcatOptimizedWordlists: ./optimized_wordlists (directory used by Quick Crack; falls back to hcatWordlists if not found)
  • rules_directory: ./hashcat/rules (includes submodule rules)
  • hcatTuning: `` (empty string - no default tuning flags)

Example config.json customizations:```json { "hcatPath": "/usr/local/bin", # Location of hashcat binary (optional, auto-detected from PATH) "hcatBin": "hashcat", # Hashcat binary name "hcatWordlists": "./wordlists", # Dictionary wordlist directory (relative or absolute) "rules_directory": "./hashcat/rules", # Rules directory (relative or absolute) "hcatTuning": "", # Additional hashcat flags (empty by default) ... }

root@kitploit:~
**設定の読み込み:**
- 各キーの優先順位: `os.environ` > そのキーに対応するホームファイル (`.env` または `config.json`) > 組み込みのデフォルト
- 存在しないキーは組み込みのデフォルトにフォールバックします。`config.json.example` にはすべての `config.json` キーが記載されています。
- 両方のファイルは互いに独立して、次の順序で検索されます: **リポジトリルート**、次に**インストールされたパッケージディレクトリ**、その次に**`~/.hate_crack`**。最初に見つかったものが優先されます。2つのファイルが異なるディレクトリから来るのは正常です。
- 初回実行時には、両方のファイルが作成されます — `config.json` は `config.json.example` から、`.env` は組み込みのデフォルトから。古い `config.json` に統合キーがまだ残っている場合、それらは新しい `.env` にコピーされ、hate_crack は `config.json` から削除すべきキーを教えてくれます。hate_crack が `config.json` 自体を編集することは決してありません。
- 実行のたびに、hate_crack は実際に読み込んだ2つのファイルを出力します:  ```
  [*] config.json: /home/you/.hate_crack/config.json
  [*] .env:        /home/you/.hate_crack/.env

設定が「反映されない」とデバッグを始める前に、この2行を読んでほしい。この2行は、検索順序にまつわる2つの落とし穴があるために存在する。

  • チェックアウトはホームディレクトリより優先される。 リポジトリのルートが最初に検索されるため、ツールを実行する任意のチェックアウト内にある .env や config.json は、~/.hate_crack にあるものより優先される。そして、チェックアウトからツールを実行することこそが、そもそもそこにそれらのファイルを作成する原因なのだ。これが実際の ~/.hate_crack 設定を覆い隠す場合、hate_crack は現在、両方のパスを名指しする3つ目の [!] 行でそれを警告する。その行は「以下のファイルは無視されている」という意味であり、2つ目の同等に有効な設定として扱ってはならない。
  • カレントワーキングディレクトリは検索されない。 たまたまいるディレクトリ内の .env は、意図的に無視される。エンゲージメントディレクトリには、誰も設定として意図していないファイルが溢れているからだ。設定ファイルはリポジトリのルートか ~/.hate_crack に置くこと。

Error: merge with ref 'refs/heads/master' but no such ref was fetched

次のエラーが表示された場合:``` Your configuration specifies to merge with the ref 'refs/heads/master' from the remote, but no such ref was fetched.

root@kitploit:~
デフォルトブランチが `master` から `main` に変更されました。修正するには:```bash
git remote set-head origin -a
git branch -m master main
git branch --set-upstream-to=origin/main main
git pull

Makefile ターゲット

デフォルト(完全インストール) - サブモジュールをビルドし、依存関係をインストールして、ツールをインストールします:```bash make

or explicitly:

make install

root@kitploit:~
これは冪等です - 既にインストール済みのツールはスキップします。

**クリーン再インストールを強制:**```bash
make reinstall

クイックアップデート - サブモジュールを再ビルドしてツールを再インストールします(変更をプルした後):```bash make update

root@kitploit:~
**アンインストール** - OSの依存関係とツールを削除します:```bash
make uninstall

hashcat-utilsのみをビルド:```bash make hashcat-utils

root@kitploit:~
**テストを実行** - 必要なときはHATE_CRACK_SKIP_INITを自動的に処理します:```bash
make test

カバレッジレポート:```bash make coverage

root@kitploit:~
**ビルド/テスト成果物のクリーンアップ:**```bash
make clean

開発

開発環境のセットアップ

任意の開発依存関係(リンターやテストツールを含む)を指定してプロジェクトをインストールします:```bash make dev-install

root@kitploit:~
### リンターと型チェックの実行

変更をプッシュする前に、これらのチェックをローカルで実行してください。すべてまとめて行うには `make lint` を使用し、個別に実行することもできます:

**Ruff (リンターとフォーマット):**```bash
make ruff
# or manually:
uv run ruff check hate_crack tests tools packaging hate_crack.py

問題の自動修正:```bash uv run ruff format hate_crack tests tools packaging hate_crack.py uv run ruff check --fix hate_crack tests tools packaging hate_crack.py

root@kitploit:~
**ty (型チェック):**```bash
make ty
# or manually:
uv run ty check hate_crack

すべてのチェックをまとめて実行する:```bash make lint

root@kitploit:~
### テストの実行

テストは、サブモジュールがビルドされていないことを自動検出し、`HATE_CRACK_SKIP_INIT=1` を自動的に設定します。```bash
make test

またはpytestを直接実行してください:```bash uv run pytest -v

root@kitploit:~
カバレッジ付き:```bash
make coverage

またはpytestを使用:```bash uv run pytest --cov=hate_crack

root@kitploit:~
### Git フック (prek)

Git フックは [prek](https://github.com/j178/prek) (v0.3.3+) によって管理されます。フックをインストールするには、次のコマンドを実行します:```bash
prek install --hook-type pre-push --hook-type pre-commit

これは、pre-commit local-repo TOMLスキーマを使用して prek.toml で定義されたフックをインストールします。

  • pre-push (local hooks): ruff, ruff-format, ty, pytest, pytest-lima, bandit
  • pre-commit (pre-commit/pre-commit-hooks から): trailing-whitespace, end-of-file-fixer, check-yaml, check-merge-conflict, check-added-large-files, detect-private-key

pre-commitの自動修正ツールはファイルをその場で書き換えるため、実行後に再度ステージしてコミットしてください。

注: prek 0.3.3 はトップレベルで repos = [...] を期待します。古い [hooks.<stage>] commands = [...] 形式はサポートされていません。

矢印キーメニュー操作

メニューはデフォルトで従来の番号付き print() + input() 選択を使用し、複数桁のキー全体を受け付けます。

simple-term-menu による矢印キーナビゲーションを有効にするには、HATE_CRACK_ARROW_MENU=1 を設定します。このモードでは1桁のショートカットキーのみが機能し、10以上の番号のオプションには矢印キーで到達する必要があります。矢印キーモードはTTYも必要とするため、出力がパイプされる場合はオフのままです。

開発依存関係

オプションの [dev] グループには以下が含まれます:

  • ty - 静的型チェッカー
  • ruff - 高速なPythonリンターおよびフォーマッター
  • pytest - テストフレームワーク
  • pytest-cov - カバレッジレポート

共通オプション:

  • --download-hashview: クラック前にHashviewからハッシュをダウンロードします。
  • --hashview: ハッシュ、ワードリスト、ジョブを管理するための対話型Hashviewメニュー。
  • --hashview --help: Hashviewのコマンドラインオプションを表示します。
  • --weakpass: Weakpassからワードリストをダウンロードします。
  • --hashmob: Hashmob.netからワードリストをダウンロードします。
  • --download-torrent <FILENAME>: 特定のWeakpassトレントファイルをダウンロードします。
  • --download-all-torrents: キャッシュから利用可能なすべてのWeakpassトレントをダウンロードします。
  • --wordlists-dir <PATH> / --optimized-wordlists-dir <PATH>: ワードリストディレクトリを上書きします。
  • --pipal-path <PATH>: pipalのパスを上書きします。
  • --restore-potfile: 起動時にhashcatのPOTファイルから <hashfile>.out を再構築し、既存の内容を置き換えてから通常のメニューに進みます。このフラグがない場合、POTの参照は がまだ存在しないときのみ実行されます。メニューオプション93は、確認プロンプト付きでオンデマンドに同じことを行います。

Hashview統合

hate_crackは、集中管理されたハッシュ管理と分散クラッキングのためにHashviewと統合します。

対話型メニュー

対話型Hashviewメニューにアクセス:```bash hate_crack.py --hashview

root@kitploit:~
Menu options:
- **(1) クラック済みハッシュのアップロード** - 現在のセッションのクラック済み結果をHashviewにアップロードします
- **(2) ワードリストのアップロード** - ワードリストファイルをHashviewにアップロードします
- **(3) ワードリストのダウンロード** - Hashviewからワードリストをダウンロードします
- **ルールのダウンロード** - Hashviewからルールファイルをダウンロードします(プレーンテキストに展開され、`hashcat -r` で使用可能)
- **(4) 残りハッシュのダウンロード** - 未クラックの残りハッシュをダウンロードします(クラッキング用に切り替えるか確認します)
- **(5) 見つかったハッシュのダウンロード** - すでにクラック済みのハッシュと平文パスワードをダウンロードします(参照・分析用)
- **(6) ハッシュファイルのアップロードとジョブの作成** - 新しいハッシュファイルをアップロードしてクラッキングジョブを作成します
- **(99) メインメニューに戻る** - メインメニューに戻ります

**重要: 見つかったハッシュのダウンロードと残りハッシュのダウンロードの違い**
- **残りハッシュのダウンロード (4)**: クラッキングが必要な未クラックのハッシュをダウンロードします。利用可能な場合は見つかったハッシュと自動的にマージされ、このハッシュファイルに切り替えてクラッキングするか確認を求められます。
- **見つかったハッシュのダウンロード (5)**: すでにクラック済みのハッシュを hash:cleartext 形式でダウンロードします。これらは参照用であり、それ以上クラックすることはできません。切り替えの確認は表示されません。

#### コマンドラインインターフェース

Hashview の操作はコマンドラインからも実行できます:

クラック済みハッシュのアップロード:```bash
hate_crack.py --hashview upload-cracked --file <output_file>.out --hash-type 1000

ワードリストをアップロード:```bash hate_crack.py --hashview upload-wordlist --file .txt --name "My Wordlist"

root@kitploit:~
ルールファイルをダウンロード(解凍済み、`hashcat -r` で使用可能):```bash
hate_crack.py --hashview download-rules --rules-id 4 --output best64.rule

残りのハッシュをダウンロード(クラッキング用の未解読ハッシュ):```bash hate_crack.py --hashview download-left --customer-id 1 --hashfile-id 123

root@kitploit:~
見つかったハッシュ(解読済みのハッシュと平文)をダウンロード:```bash
hate_crack.py --hashview download-found --customer-id 1 --hashfile-id 123

ハッシュファイルをアップロードしてジョブを作成:```bash hate_crack.py --hashview upload-hashfile-job --file hashes.txt --customer-id 1
--hash-type 1000 --job-name "NTLM Crack Job" --hashfile-name "Domain Hashes"

root@kitploit:~
#### 設定

`.env` に Hashview の認証情報を設定します (これらは統合設定であるため、`config.json` にはありません):```
HASHVIEW_URL=https://hashview.example.com
HASHVIEW_API_KEY=your-api-key-here

Ollama 設定

LLM 攻撃 (オプション 12) は Ollama を使用してパスワード候補を生成します。モデル、コンテキストウィンドウ、およびリクエストタイムアウトは .env で設定します:``` OLLAMA_MODEL=qwen2.5:32b OLLAMA_NUM_CTX=8192 OLLAMA_TIMEOUT=300

root@kitploit:~
- **`OLLAMA_MODEL`** — 候補生成に使用するOllamaモデル(デフォルト: `qwen2.5:32b`)。LLM攻撃は構造化(JSON)出力を使用するため、ツール/JSONサポートが優れたモデルを選択してください。
- **`OLLAMA_NUM_CTX`** — モデルのコンテキストウィンドウサイズ(デフォルト: `8192`)。これはコーパス統計が導入される前は `2048` でしたが、与えられるプロンプトを保持するには小さすぎました: 500件のサンプル平文は、システムプロンプトと応答の前に約2,000〜3,500トークン消費するため、Ollamaはサンプラーがファイル全体に慎重に分散させたサンプルの一部を黙って切り捨てていました。
- **`OLLAMA_TIMEOUT`** — 生成応答を待ってから諦めるまでの秒数(デフォルト: `300`)。最初のリクエストで大きなモデルがまだVRAMに読み込まれている場合にこの値を上げてください。そうしないとタイムアウトを超える可能性があります。hate_crackは、タイムアウトが発生したときに経過タイムアウトとこの設定名を出力します。
- **`OLLAMA_MAX_SAMPLE_LINES`** — LLMモードがリテラル平文もプロンプトに貼り付ける閾値(デフォルト: `500`)。`0` 以下の値は `500` として扱われます。

  コーパス由来モード(**Wordlist**、**Cracked passwords**、**Pattern rules**)は、その一部を貼り付けるのではなく、常にコーパス全体を統計的に記述します — ベースワードのシェア、マスク、大文字小文字、長さ、末尾の数字と記号、年 —。集約には上限があるため、120,000パスワードのダンプでも500行のものと同じ程度のプロンプト領域で済みます。コーパス全体がこの閾値に収まる場合は、生の平文も含まれます。小さなコーパスをモデルから隠しても何も得られないからです。

  これは、最大 `ollamaMaxSampleLines` 個のパスワードを等間隔にサンプリングして貼り付ける以前の動作を置き換えます。大きなダンプのサンプルは頻度情報をまったく伝えませんでした: モデルは組織の8%が使用するベースワードと、個人が使用するベースワードを区別できませんでした。これはまさに、推測を実行する価値があるものにするシグナルです。
- **`OLLAMA_NO_CLOUD`** — `true` の場合、3つのLLMバックエンド(Ollama、vLLM、または汎用OpenAI互換サーバー)のいずれについても、このホストから外部へ何も送信しません。この1つの設定で2つのチェックが行われます: Ollamaは `-cloud` タグ付きモデル(`gpt-oss:120b-cloud`、`deepseek-v3.1:671b-cloud`)を、ローカルモデルが使用する同じローカルエンドポイントを介してollama.comにプロキシするため、リクエストは何も変わって見えません — これはモデル名で拒否されます。設定されたバックエンドURLもチェックされます: ループバック、プライベート、リンクローカルではない宛先(および `localhost` や `.local`/`.internal`/`.lan`/`.localdomain` 名ではないもの)は宛先によって拒否され、このチェックで解決できないホスト名も、検証できない宛先を通すのではなく、フェイルクローズで拒否されます。hate_crackのプロンプトには、回復された平文、コーパス統計、クライアントの名前、業界、場所が含まれるため、どちらかのチェックが発動すると、リクエストは構築される前に拒否されます。デフォルトは `false` で、意図的に設定されたクラウドモデルまたはリモートサーバーが引き続き機能します。クライアントデータをホストの外に出してはならないエンゲージメントではこれをオンにしてください。
- **`OLLAMA_AUTO_RESEARCH`** — `true`(デフォルト)の場合、**Target info** モードは会社名を入力するとすぐにローカルモデルに業界、場所、親会社/買収履歴を提案させ、編集可能なプロンプトのデフォルトとして提供します。`false` に設定すると、常に空白のプロンプトが表示されます(遅いモデルで有用です。リサーチは攻撃開始前にもう1往復余分にかかるため)。
- **`OLLAMA_HOST`** — Ollamaが待ち受けている場所。素の `host:port`(`theplague.lan:11434`)またはスキーム付きの完全なURL(`https://ollama.example.com`)を受け入れます。どちらの場合もベースURLは使用前に正規化されます。デフォルトは `localhost:11434` です。`.env` に設定するか、実際の環境変数としてエクスポートして単一の実行に対して上書きします — これはOllama自身のCLIが読み取るのと同じ変数名です。
- LLM Attackを使用する前に、Ollamaが実行中でモデルがプルされていることを確認してください(`ollama pull qwen2.5:32b`)— hate_crackは不足しているモデルを自動プルしなくなりました。

攻撃には3つの生成モードがあります:

1. **Target info** — 会社 / 業界 / 場所 / 親会社。モデルはこれらの詳細から候補を導き出します。

   会社名を入力すると、hate_crackは同じローカルモデルにその組織についてすでに知っていることを尋ね、**Industry**、**Location**、**Parent Company** のプロンプトに回答を事前入力し、括弧内に表示します:   ```
   Company name: Acme Rail Services

   [!] The values in parentheses below are the local model's GUESSES, not verified OSINT.
       Press Enter to accept, or type your own value to override.
   Industry (freight rail maintenance):
   Location (Omaha, Nebraska):
   Parent company / acquired by:

Enter キーを押して提案を受け入れるか、上書きして入力します。これらの値はモデルの記憶であり、OSINT ではありません — クライアントに関するインテリジェンスではなく、出発点として扱ってください。検索はローカルの Ollama サーバーだけを使用するため、クライアント名がホストの外に出ることはありません。Web やサードパーティの API 呼び出しはありません。モデルが組織を認識しない場合(小規模なクライアントではよくあることです)、何も返されず、空のプロンプトが表示されます: ``` Company name: Acme Rail Services Industry: Location: Parent company / acquired by:

root@kitploit:~
リサーチの失敗(タイムアウト、Ollama が実行されていない、空の回答)は攻撃を決してブロックしません。単に空のプロンプトにフォールバックするだけです。リサーチを完全にスキップするには、`ollamaAutoResearch` を `false` に設定してください。
2. **ワードリスト** — サンプルのワードリストからベースワードを導出します。
3. **クラック済みパスワード** — このセッションで既に回復された平文(`<hashfile>.out`)をモデルにフィードバックし、対象組織独自のパスワード規則(ベースワード、季節、年、接尾辞、リートスピーク)を推測させ、同じスタイルの*新しい*候補を生成させます。このオプションは、少なくとも1つのハッシュがクラックされた後にのみ表示されます。ファイル全体は、Wordlist モードとまったく同じように統計的に分析されます(上記の `ollamaMaxSampleLines` を参照)。

#### PCFG 設定

PCFG 攻撃(オプション 20)と PRINCE-LING 攻撃(オプション 21)は、`pcfg_cracker` サブモジュールを使用します。これらは `config.json` で設定します:```json
{
"pcfgRuleset": "DEFAULT",
"pcfgMaxCandidates": 50000000,
"pcfgPrinceLingMaxCandidates": 10000000
}
  • pcfgRuleset — 使用するトレーニング済み文法の名前(デフォルト: DEFAULT)。pcfg_cracker/Rules/<name>/ に解決されます。pcfg_cracker の trainer.py で独自のルールセットをトレーニングし、この値にルールセット名を設定してください。
  • pcfgMaxCandidates — PCFG 攻撃で pcfg_guesser.py が出力する最大候補数(デフォルト: 50000000)。
  • pcfgPrinceLingMaxCandidates — prince_ling.py がキャッシュされた PRINCE ベースワードリストに書き込む最大ベースワード数(デフォルト: 10000000)。

最適化カーネル (optimizedKernelAttacks)

hashcat の -O フラグは最適化カーネルを選択します。これらは大幅に高速ですが、候補の長さを制限し(おおよそ31文字、一部のモードではそれ以下)、それより長いものは黙ってスキップします。config.json の optimizedKernelAttacks は -O で実行する攻撃を列挙します。リストから攻撃を除外すると、フル長カーネルで実行されます。config.json.example のリストは、config.json が存在しない場合に適用される組み込みデフォルトと一致します。

4つの攻撃はこの設定を尊重しますが、デフォルトでは最適化されません。なぜなら -O の上限を超える候補を生成するためです。オプトインするにはリストに追加してください:

  • hcatNgramX, hcatOllama, hcatOmen, hcatLMtoNT

設定を編集せずに1回の実行で -O をすべて無効にするには、--no-optimized-kernel(短縮形 --no-optimize)を渡してください。これはすべての攻撃に対してリストを上書きし、さらに hcatTuning に記述された -O も削除します。そうしないと、リストに関係なく hashcat に渡されてしまうからです。

名前は完全一致で照合され、認識できないエントリは無視されずに起動時に報告されます。別の攻撃に委譲する攻撃は、自身の名前ではなく委譲先の攻撃によって制御されることに注意してください。PRINCE-LING は hcatPrince に従い、Spoonman、Rosetta、および LLM パターンルールモードは hcatQuickDictionary に従います。

攻撃カバレッジ追跡 (coverage_enabled)

長期にわたるエンゲージメントでは、同じハッシュファイルが多くのセッションで、ローテーションするワードリスト、ルールファイル、マスクリストとともに攻撃されます。すでにカバーした領域を再実行して何時間も費やしがちです。特に、同じルール行が複数のルールファイルに存在する場合がそうです。hate_crack は各ハッシュファイルに対して既に実行した内容を記録し、重複をスキップするよう提案します。

カバレッジはファイル単位ではなくエントリ単位で記録されます。個々のルール行と個々の .hcmask 行が、それぞれ実行時に使用したワードリストとペアになります。これにより、今日実行するカスタムルールファイルが、先週 best64.rule でカバー済みのルールのうち40個を繰り返していることを認識できます。また、ルールが「カバー済み」となるのは、試行した特定のワードリストに対してのみである理由でもあります。同じルールでも異なるコーパスに対しては、まったく異なる候補が試されるからです。

ハッシュファイルはその内容の sha256 によって識別されるため、セッション間でファイルをリネームしたり移動したりしてもカバレッジは維持されます。ワードリストも同じ方法で識別されます。ダイジェストはサイズと mtime に対してメモ化されるため、数ギガバイトのコーパスも毎回の攻撃ではなく一度だけハッシュ化されます。

実際にスキップすべきものがある場合にのみ、プロンプトが表示されます:``` [*] Coverage: 40 of 45 rules in this Dictionary have already been run against this hash file. [?] Skip them and run only the 5 new rules? [Y/n]:

root@kitploit:~
`Y` と答えると、hate_crack は未試行のエントリだけを保持する一時ルールファイルを構築します。`n` と答えると、とにかく全体を実行します。*すべて*のエントリが繰り返しの場合、攻撃を完全にスキップするかどうか尋ねられます。そのため、カバー済みの範囲を意図的に再実行する場合でも、ツールを再起動する必要はありません。

フィルタされない攻撃も実行済みとして記録されます。これにより、「このターゲットに対して PRINCE を既に実行したか?」と答えられるようになります。

意図的な制限は3つあります:

- **カバレッジは hashcat がキースペースを使い尽くした場合にのみ記録されます** (exit 1)。ctrl-C またはエラーでは何も記録されず、exit 0 でも記録されません。exit 0 はすべてのハッシュがクラックされたことを意味し、hashcat はキースペースを最後まで処理*せずに*全ハッシュのクラックを報告します。また、極端なケースとして「すべてのハッシュが potfile エントリとして見つかった」場合は、候補を1つも試さずに報告します。記録が少なすぎる場合、後で冗長な実行が1回増えるだけです。
- **動的候補生成器は決してフィルタされません。** PRINCE、PCFG、OMEN、Markov ブルートフォース、LLM モードには差分を取るための固定セットがないため、
  実行済みとしてログに記録されるだけで、それ以外はそのまま残されます。連結されたルールファイル(`-r a -r b`)はエントリごとではなく単一の単位として追跡されます。これは、hashcat が2つのファイルの*デカルト積*を適用するため、個々の行を削除すると、その行が関与するすべての組み合わせが黙って削除されることになるからです。
- **`--loopback` の実行は記録されますが、決してフィルタされません。** hashcat は新しくクラックされた平文を*追加の*候補としてフィードバックするため、
  そのような実行では完全なワードリストとルールセットに加えて、リサイクルされた平文が到達するものすべてを試します。このため、2つの方向は非対称になります。記録しておくことは理にかなっているため、
  同じワードリストとルールによる後日の通常の実行は繰り返しとして正しく認識されますが、2回目の loopback 実行はリサイクルするクラックが増えるため、スキップされることはありません。

これを無効にするには、`config.json` の `coverage_enabled` を `false` に設定するか、単一の実行には
`--no-coverage` を渡します。これはストアを参照も更新も行いません。

#### カバレッジの確認とリセット

メインメニューのオプション **85 — Attack Coverage** は、読み込まれたハッシュファイルに対して
何が実行されたか、その実行履歴を表示し、クリアすることもできます。同じ3つの操作は
スクリプトからも実行できます:```bash
# What has already been run against this hash file?
hate_crack coverage status --hashfile hashes.txt

# Every attack that has run against it, oldest first
hate_crack coverage history --hashfile hashes.txt

# Start over for this hash file only (prompts unless --yes)
hate_crack coverage forget --hashfile hashes.txt --yes

ハッシュファイルは内容によって識別されるため、後にどこへ移動されてもこれらは機能します。forget はその1つのターゲットにのみ影響します — ストアは ~/.hate_crack/coverage/attack_coverage.sqlite3 に存在し、そのファイルを削除すると すべての ターゲットのカバレッジがリセットされます。

スクリプト実行

カバレッジによって完全にスキップされるスクリプト攻撃は、デフォルトでは依然として 0 で終了するため、カバレッジを有効にしても既存のハーネスが失敗し始めることはありません。何も起動されなかった場合に代わりに終了コード 3 を得るには、--exit-code-on-skip を渡します:```bash hate_crack --exit-code-on-skip hashes.txt dict

0 = ran, 1 = bad input, 2 = unknown command, 3 = everything was already covered

root@kitploit:~
Exit 3 は *何も* 実行されなかったことを意味します。部分的にフィルタリングされたパス — 一部のエントリはスキップされ、一部は試行された — でも、攻撃が実際に作業を行ったため、終了コード `0` のままです。

### 通知 (メニューオプション 82)

hate_crack は、攻撃完了時、およびオプションで個々のハッシュがクラックされたときに Pushover プッシュ通知を送信できます。すべての制御はメインメニューのオプション `82 — 通知` にあります:

1. **Pushover 通知の切り替え [ON/OFF]** — マスタースイッチ。`config.json` に `notify_enabled` として保存されます。
2. **クラック毎通知の切り替え [ON/OFF]** — ON の場合、バックグラウンドのテイラーが `.out` ファイルを監視し、クラックごとに通知をプッシュします (ティック毎のバースト集約付き)。`config.json` に `notify_per_crack_enabled` として保存されます。マスタースイッチが OFF の間は有効にできません — 最初にオプション 1 を有効にしてください。
3. **テスト Pushover 通知を送信** — 定型プッシュを送信して、Pushover のトークン/ユーザーのペアが機能することを確認できます。マスタースイッチが OFF でも機能します。

認証情報は `.env` にあります。残りの調整ノブは `config.json` の設定ファイル専用です:

- `NOTIFY_PUSHOVER_TOKEN`, `NOTIFY_PUSHOVER_USER` (`.env` 内) — プッシュを発火させるために必須です。メニューからこれらを書き込む操作はありません。自分で `.env` を編集してください。
- `notify_attack_allowlist` — `[y/N/always]` プロンプトなしで自動同意する攻撃名。`always` と回答すると自動的に入力されます。
- `notify_suppress_in_orchestrators` (デフォルト `true`) — Extensive Crack によって連鎖された個々の攻撃を沈黙させ、代わりに単一のサマリーを発火します。連鎖攻撃ごとに通知を受け取るには `false` に設定します。複数のパスを実行する他のメニューエントリ (例えば複数のルールチェーンを使用する Quick Crack) はオーケストレーターではなく、常にパスごとに通知します。
- `notify_max_cracks_per_burst` (デフォルト `5`), `notify_poll_interval_seconds` (デフォルト `5.0`) — クラック毎テイラーのチューニング。バースト集約ロジックについては `hate_crack/notify/tailer.py` を参照してください。

### ワードリストツール (メニューオプション 80)

ワードリストツールのサブメニューは、hashcat-utils バイナリを利用したワードリスト前処理ユーティリティと、Hashmob.net および Weakpass からのワードリストダウンロードを提供します。メインメニューのオプション **80** からアクセスします。

| オプション | バイナリ | 機能 |
|--------|--------|--------------|
| 1 | `len.bin` | 長さでフィルタリング - 最小長と最大長の間の単語のみを保持 |
| 2 | `req-include.bin` | 文字クラスを必須化 - 必要なすべての文字タイプを含む単語のみを保持 |
| 3 | `req-exclude.bin` | 文字クラスを除外 - 除外された文字タイプをいずれか含む単語を削除 |
| 4 | `cutb.bin` | 部分文字列を抽出 - 各単語からバイト範囲を切り出す |
| 5 | `splitlen.bin` | 長さで分割 - 単語の長さごとに個別ファイルを作成 (出力ディレクトリ内に `01`〜`64` という名前のファイル) |
| 6 | `rli.bin` / `rli2.bin` | 単語を減算 - 1つ以上の他のファイルに出現するエントリを削除 |
| 7 | `gate.bin` | シャード - 複数マシンでの分散クラッキング用に N 個おきの単語を抽出 |
| 8 | - | ワードリストを最適化 - 重複排除し、最適化ワードリストディレクトリ配下に長さ別ファイルへ分割 |
| 9 | - | Hashmob.net からワードリストをダウンロード |
| 10 | - | Weakpass からワードリストをダウンロード (BitTorrent 経由) |

**文字クラスマスクビット** (オプション 2 と 3 で使用): `1`=小文字、`2`=大文字、`4`=数字、`8`=記号、`16`=その他。値を加算します: `7` = 小文字+大文字+数字。

**シャーディングの想定される使い方**: シャーディングは1つのワードリストを N 個の等しく重複しない部分に分割し、作業を複数のマシンまたは GPU に分散できるようにします。各パートは *インターリーブ* され (N 行ごと)、各シャードはリスト全体の代表的なサンプルとなり、連続した先頭/末尾チャンクではありません — 単一ノードが低確率の末尾だけをクラックするような事態にはなりません。

オプション 7 を1回実行し、入力ワードリスト、出力ベースパス、シャード数 (N) を指定します。単一パスで N 個すべてのパートを書き出し、ゼロ埋めされたパート番号 (`base.001`, `base.002`, … から `base.00N` まで) で名前が付けられます。各ノードに1パートずつコピーし、そのノードの hashcat 実行がそれを指すようにします。シングル GPU システムではシャーディングによる高速化はありませんが、1つのパートだけでも、完全なリストに着手する前の迅速なトリアージパスとして高速で代表的なサンプルになります。

#### 自動更新チェック

hate_crack は起動時に GitHub で新しいリリースを自動的にチェックできます。この機能は `check_for_updates` 設定オプションで制御されます。```json
{
  "check_for_updates": true
}
  • check_for_updates — 起動時に自動バージョンチェックを有効にします(デフォルト: true)。
  • 有効にすると、hate_crack は GitHub から最新のリリース情報を取得し、更新がある場合に通知を表示します。
  • チェックは非同期で実行されるため、起動をブロックしません。ネットワークエラーは黙って無視されます。
アップデートチャンネル
チャンネルフラグソース得られるもの
リリース--updatemain

バージョンは通常の semver に従い、バンプは実際にバッチに含まれるものから 決まります。第 2 コンポーネントは機能のみで上がります。feat コミットを 1 つでも含むサイクルは X.(Y+1).0 を目指し、修正・ドキュメント・雑務のみの サイクルは X.Y.(Z+1) を目指します。

nightly-dev は、バッチが向かっているバージョンのリリース候補にタグを付けます — v2.20.1rc1, v2.20.1rc2, … — そして main へのマージにより、その 同じターゲットが最終リリースに昇格します。候補は本物の PEP 440 プレリリースなので、 両端で正しく順序付けられます:

root@kitploit:~
2.20.0  <  2.20.1rc1  <  2.20.1rc2  <  2.20.1  <  2.21.0rc1  <  2.21.0

ターゲットはサイクルの途中で変わることがあります。最初に追加された feat がそれまで X.Y.(Z+1) だったものを X.(Y+1).0 に移し、新しいターゲットに対して候補番号が振り直されます。 番号は常に、バッチが今日リリースするであろうバージョンを指します。

メジャーコンポーネントは自動では決して上がりません — ! の件名や BREAKING CHANGE: のフッターは機能としてカウントされます。自動のメジャーは、打ち間違えた 件名ひとつで、取り消し不能な公開リリースにつながるからです。メジャーは 明確に人間の行為です。手でタグを打ち、プッシュしてください。

この方針は tools/next_version.py にあり、両方のタグ付けワークフローで共有され、 tests/test_next_version.py でユニットテストされています。

起動時チェックは常にリリースのみを提供します。ナイトリービルドは GitHub リリースを一切公開せず、チェックは GitHub の "latest release" エンドポイントを読むからです — そのため check_for_updates を有効にしても、ナイトリーに引き込まれることはありません。現在、チャンネルを 分けているのは 2 つあります。それと、候補が本物の PEP 440 プレリリースであるため、 生のバージョン番号を比較するツールでも、それが最終リリースよりも古いものとして 扱われるという事実です。

どちらのフラグも、まずチェックアウトを対応するブランチに切り替えます(そして、 未コミットの変更がある場合は拒否します)。ナイトリーを実行中で、 リリース済みコードに戻りたい場合は、--update で main に戻ります。

検出済みハッシュの自動マージ(左側ダウンロード時のみ)

左側ハッシュ(未クラックのハッシュ)をダウンロードするとき、hate_crack は自動的に次の操作を行います:

  1. 補助操作として、Hashview から検出済み(クラック済み)ハッシュをダウンロードしようとします
  2. 検出済みハッシュをローカルの .out ファイル(例: left_1_123.txt.out または pwdump 形式の left_1_123.nt.txt.out)とマージします
  3. 重複エントリを削除します
  4. マージ後に一時分割ファイルをクリーンアップします

これにより、未クラックのハッシュを扱う際、ローカルのクラッキング結果が Hashview の中央データベースと同期された状態を保てます。

注: download-found オプションは、既にクラック済みのハッシュを参照用に別途ダウンロードするもので、マージを行わず、クラッキングを促すこともありません。

<hash_type> は hashcat --help を実行することで取得できます。

ハッシュの例: http://hashcat.net/wiki/doku.php?id=example_hashes``` $ hashcat --help |grep -i ntlm 5500 | NetNTLMv1 | Network protocols 5500 | NetNTLMv1 + ESS | Network protocols 5600 | NetNTLMv2 | Network protocols 1000 | NTLM | Operating-Systems

root@kitploit:~

Wait, in the provided text, after "INPUT:" there is no actual content? It seems like the user message ends with "INPUT:" and then maybe there was supposed to be content, but it's empty. The assistant's response is supposed to be the translation. But there's no input content.

I need to respond with just the translated content, but there is no content. Possibly the user intends for me to translate the chunk that is supposedly provided, but it's missing. However, the instruction says "Translate the following Kitploit tool content. This is chunk 120 of 139 from a longer Markdown document being translated in sequence. The source language is en. Target language: ja. Content type: README chunk 120/139." And then gives rules. Then "INPUT:" with nothing after. So I think the input is empty.

But the system prompt says "Translate the following Kitploit tool content." and the content is supposed to be after "INPUT:" but it's empty. In such a case, I should output nothing? Or indicate that the input is empty? However, the instruction says "Return ONLY the translated text. No preamble, no commentary, no wrapping in code blocks, no JSON/YAML/XML, no arrays, no objects, no schemas, no key/value wrappers." So if the input is empty, the translation is empty. But that might be an error.

Given the context, perhaps the user intended to paste the chunk but it got cut off. As an AI, I should handle this gracefully. I can assume the input is empty and output nothing. But the instruction says "Do not ask questions. Do not engage in conversation." So I'll just output an empty string.

However, the response is supposed to be raw Markdown/plain text content only. Since there is no input, there is nothing to translate. I'll output nothing.

But I'm not sure if the platform expects some output. To be safe, I can output a blank line? But the instruction says no leading newline unless it exists in source. If source is empty, output empty.

I'll produce an empty response.``` $ ./hate_crack.py 1000


/ | _____ / | ____ _ ___ ____________ ____ | | __ / ~ __ \ / __ \ / \ /_ __ _ \ / | |/ / \ Y // __ | | \ / \ _| | // __ \ _| < ___| /(__ /| _ >______ /|__| ( /___ >|_
/ / /
___/ / / / / Version 2.0

root@kitploit:~
## テスト

テストスイートはほとんどオフラインで、モック/フィクスチャを使用します。ライブネットワークチェックと
システム依存関係チェックは、環境変数によるオプトインです。

### テストをローカルで実行する```bash
# Run all tests
uv run pytest -v

# Run specific test
uv run pytest tests/test_hashview.py -v

また、make test で全テストスイートを実行することもできます。

ライブテスト(オプトイン)

以下のいずれかを設定すると、ライブチェックが有効になります:

  • HASHMOB_TEST_REAL=1 — Hashmob の接続/CLIメニューチェック
  • HASHVIEW_TEST_REAL=1 — Hashview の CLI メニューチェック
  • WEAKPASS_TEST_REAL=1 — Weakpass の CLI メニューチェック
  • HATE_CRACK_REQUIRE_DEPS=1 — 7z、transmission-daemon、transmission-remote のいずれかがない場合は失敗する

ライブ Hashview アップロードテスト

ライブ Hashview アップロードテストはデフォルトではスキップされます。実行するには、環境変数を設定し、 .env に有効な認証情報を指定してください:```bash HATE_CRACK_RUN_LIVE_TESTS=1 uv run pytest tests/test_upload_cracked_hashes.py -v

root@kitploit:~
### ローカル Docker スタックに対する Hashview ライブテスト

ライブテストをリモートの Hashview サーバーに対して実行する代わりに、
テストスイートでローカルの [Hashview](https://github.com/hashview/hashview)
Docker スタックを起動し、シードデータを投入し、ライブテストを実行してから破棄することができます。
`HASHVIEW_TEST_LOCAL=1` を設定し、`HASHVIEW_REPO` を Hashview のチェックアウト先に指定します:```bash
HASHVIEW_TEST_LOCAL=1 HASHVIEW_REPO=~/projects/hashview \
  HATE_CRACK_SKIP_INIT=1 uv run pytest tests/test_hashview_cli_subcommands_subprocess.py -v

これにより、Hashview リポジトリ内の docker compose が起動し、管理者 API キー、顧客、ハッシュファイル、クラック済みの「実効タスク」データがシードされ、テストが読み取る HASHVIEW_* 環境変数がエクスポートされます。便利な環境変数:

  • HASHVIEW_TEST_LOCAL=1 — ローカルスタックを有効にする(それ以外では何もしない)
  • HASHVIEW_REPO=<path> — Hashview のチェックアウト先(デフォルト: ~/projects/hashview)
  • HASHVIEW_KEEP=1 — セッション終了後もコンテナを起動したままにする(再実行が高速化)
  • HASHVIEW_LOCAL_PORT=5000 — アプリが公開されるホスト側ポート

hate_crack CLI は HASHVIEW_URL / HASHVIEW_API_KEY 環境変数を尊重します(これら2つのキーが含まれる .env を上書きします)。これにより、スイートは永続化された設定を編集することなく CLI をローカルスタックに向けられます。

エンドツーエンドのインストールテスト(ローカル + Docker)

ローカルの uv tool install とスクリプト実行(一時的な HOME を使用):```bash HATE_CRACK_RUN_E2E=1 uv run pytest tests/test_e2e_local_install.py -v

root@kitploit:~
Dockerベースのエンドツーエンドのインストール/実行(`Dockerfile.test` によってキャッシュされる):```bash
HATE_CRACK_RUN_DOCKER_TESTS=1 uv run pytest tests/test_docker_script_install.py -v

Docker E2E テストは、rockyou の小さなサブセットをダウンロードし、外部ツールの統合を検証するために基本的な hashcat クラックを実行します。

Lima VM エンドツーエンドテスト(macOS のみ):

前提条件: Lima と rsync がインストールされている必要があります。```bash brew install lima

root@kitploit:~
テストVMは、すべてのLinux依存関係(hashcat、build-essential、curl、git、gzip、p7zip-full、transmission-daemon、ocl-icd-libopencl1、pocl-opencl-icd、uv)を自動的にプロビジョニングします。```bash
HATE_CRACK_RUN_LIMA_TESTS=1 uv run pytest tests/test_lima_vm_install.py -v

このテストは、macOS上の軽量Linux VM内でのインストールと実行を検証します。

テスト構成

  • tests/test_hashview.py: モックされたAPIレスポンスを用いたHashviewAPIクラスの包括的なテストスイート。以下を含みます:
    • 顧客一覧とデータ検証
    • 認証と認可のテスト
    • ハッシュファイルのアップロード機能
    • 完全なジョブ作成ワークフロー

すべてのテストはモックされたAPIコールを使用するため、Hashviewサーバーへの接続なしで実行できます。


(1) クイッククラック (2) 包括的なPure_Hateメソドロジークラック (3) ブルートフォース攻撃 (4) トップマスク攻撃 (5) フィンガープリント攻撃 (6) コンビネーター攻撃 (7) ハイブリッド攻撃 (8) Pathwellトップ100マスクブルートフォースクラック (9) PRINCE攻撃 (10) Bandrelメソドロジー (11) ループバック攻撃 (12) LLM攻撃 (13) OMEN攻撃 (14) アドホックマスク攻撃 (15) マルコフブルートフォース攻撃 (16) N-gram攻撃 (17) 順列攻撃 (18) ランダムルール攻撃 (19) Combipowパスフレーズ攻撃 (20) PCFG攻撃 (21) PRINCE-LING攻撃 (22) Spoonman攻撃 (23) Rosetta攻撃 (24) コーポレートマスクのブルートフォース (25) スマートマスク攻撃

(80) ワードリストツール (81) ルールファイルツール (82) 通知

(93) POTファイルから.outを再生成 (94) Hashview API (95) Pipalでハッシュを分析 (96) 出力をExcel形式にエクスポート (97) クラック済みハッシュを表示 (98) READMEを表示 (99) 終了

タスクを選択:```

Option 94 — Hashview API is only listed when HASHVIEW_API_KEY is set in .env.

The YOLO, Middle, and Thorough Combinator attacks were previously at keys 10-12. They now live in the Combinator Attacks submenu (option 6) along with Combinator3 and CombinatorX.

Quick Crack

Runs a dictionary attack against wordlists in your hcatOptimizedWordlists directory (falls back to hcatWordlists if not configured) and optionally applies rules. Multiple rules can be selected by comma-separated list, and chains can be created with the '+' symbol. Pressing Enter at the wordlist prompt uses the configured optimized wordlists directory as the default.

root@kitploit:~
どのルールを実行しますか?
(1) best64.rule
(2) d3ad0ne.rule
(3) T0XlC.rule
(4) dive.rule
(99) YOLO...すべてのルールを実行
実行するルールをカンマ区切りのリストで入力してください。ルールをチェーンして実行するには + 記号を使用します。
例えば 1+1 は best64.rule を2回チェーンして実行し、1,2 は best64.rule と d3ad0ne.rule を順番に実行します。
賢く選んでください:```




#### Extensive Pure_Hate Methodology Crack
Runs several attack methods provided by Martin Bos (formerly known as pure_hate):
  * Brute Force Attack (7 characters)
  * Dictionary Attack
    * All wordlists in `hcatWordlists` with `best64.rule`
    * `rockyou.txt` with `d3ad0ne.rule`
    * `rockyou.txt` with `T0XlC.rule`
  * Top Mask Attack (Target Time = 4 Hours)
  * Fingerprint Attack
  * Smart Mask Attack
  * Combinator Attack
  * Hybrid Attack
  * Extra - Just For Good Measure
    - Runs a dictionary attack using `rockyou.txt` with chained `combinator.rule` and `InsidePro-PasswordsPro.rule` rules

#### Brute Force Attack
Brute forces all characters with the choice of a minimum and maximum password length.

#### Top Mask Attack
Uses StatsGen and MaskGen from PACK (https://thesprawl.org/projects/pack/) to perform a top mask attack using passwords already cracked for the current session.
Presents the user a choice of target cracking time to spend (default 4 hours).

#### Fingerprint Attack
https://hashcat.net/wiki/doku.php?id=fingerprint_attack

Runs a fingerprint attack using passwords already cracked for the current session. Expander substring length escalates automatically (7, 14, 21, ... up to the chosen ceiling), and an optional wordlist can be combined against the expanded fragments in addition to self-combination. Set `hcatFingerprintWordlist` in `config.json` to a default wordlist path so the prompt offers it instead of asking for a path every time; leave it as `""` to always ask (or skip).

#### Smart Mask Attack
Looks for literal "skeleton" patterns shared by 3+ already-cracked passwords for the current session -- e.g. a fixed stem like `CrawlingHorse` followed by a run of digits, or `ChangeMe2day` followed by digits and symbols drawn from a consistent charset. For each pattern found, runs a targeted `-a 3` mask attack (using the exact observed literal text and an inferred charset for the varying part) against the full remaining hash list, so other accounts sharing that stem get swept up even though brute-forcing the stem itself was never tried. Prompts once, before the attack starts, for an optional candidate-count guardrail (default 50,000,000,000; 0 disables it).

#### Combinator Attack
https://hashcat.net/wiki/doku.php?id=combinator_attack

Runs a combinator attack using the "rockyou.txt" wordlist.

#### Hybrid Attack
https://hashcat.net/wiki/doku.php?id=hybrid_attack

* Runs several hybrid attacks using the "rockyou.txt" wordlists.
  - Hybrid Wordlist + Mask - ?s?d wordlists/rockyou.txt ?1?1
  - Hybrid Wordlist + Mask - ?s?d wordlists/rockyou.txt ?1?1?1
  - Hybrid Wordlist + Mask - ?s?d wordlists/rockyou.txt ?1?1?1?1
  - Hybrid Mask + Wordlist - ?s?d ?1?1 wordlists/rockyou.txt
  - Hybrid Mask + Wordlist - ?s?d ?1?1?1 wordlists/rockyou.txt
  - Hybrid Mask + Wordlist - ?s?d ?1?1?1?1 wordlists/rockyou.txt

#### Pathwell Top 100 Mask Brute Force Crack
Runs a brute force attack using the top 100 masks from KoreLogic:
https://blog.korelogic.com/blog/2014/04/04/pathwell_topologies

#### PRINCE Attack
https://hashcat.net/events/p14-trondheim/prince-attack.pdf

Runs a PRINCE attack using wordlists/rockyou.txt

#### YOLO Combinator Attack
Runs a continuous combinator attack using random wordlists from the configured wordlists directory for the left and right sides.

#### Middle Combinator Attack
https://jeffh.net/2018/04/26/combinator_methods/

Runs a modified combinator attack adding a middle character mask:
wordlists/rockyou.txt + masks + worklists/rockyou.txt

Where the masks are some of the most commonly used separator characters:
2 4 <space> - _ , + . &

#### Thorough Combinator Attack
https://jeffh.net/2018/04/26/combinator_methods/

* Runs many rounds of different combinator attacks with the rockyou list.
  - Standard Combinator attack: rockyou.txt + rockyou.txt
  - Middle Combinator attack: rockyou.txt + ?n + rockyou.txt
  - Middle Combinator attack: rockyou.txt + ?s + rockyou.txt
  - End Combinator attack: rockyou.txt + rockyou.txt + ?n
  - End Combinator attack: rockyou.txt + rockyou.txt + ?s
  - Hybrid middle/end attack: rockyou.txt + ?n + rockyou.txt + ?n
  - Hybrid middle/end attack: rockyou.txt + ?s + rockyou.txt + ?s


#### Bandrel Methodology

Prompts for comma-separated names and creates a pseudo hybrid attack by capitalizing the first letter and adding up to six additional characters at the end. Each word is limited to a total of five minutes.

  - Built-in common words (seasons, months) included as a customizable `config.json` entry (`bandrel_common_basedwords`)
  - The default five-minute time limit is customizable via `bandrelmaxruntime` in `config.json`

#### Loopback Attack
https://hashcat.net/wiki/doku.php?id=loopback_attack

Uses hashcat's loopback mode to feed cracked passwords from the current session back into the attack pipeline with rules applied. This generates new password candidates based on variations of already-cracked passwords, which is particularly effective for finding related passwords that follow similar patterns.

* Prompts for rule selection to apply to the loopback candidates
* Uses an empty wordlist with the --loopback flag to process previously cracked passwords
* Automatically downloads Hashmob rules if no rules are available locally

#### LLM Attack
Uses a local Ollama instance to generate password candidates for a capture-the-flag scenario. Prompts for the fake company name, industry, location, and parent company / acquisition history, then sends these details to the configured LLM model to produce likely password candidates using industry terms and company name permutations. The generated candidates are fed into a hashcat wordlist+rules attack.

* Requires a running Ollama instance (default: `http://localhost:11434`, override with `OLLAMA_HOST` in `.env` or the environment) with the model already pulled — hate_crack does not auto-pull
* Candidate generation uses structured (JSON) output via Atomic Agents, so pick a model with good schema adherence (default: `qwen2.5:32b`)
* Configurable model, context window, request timeout, and sample size via `.env` (see Ollama Configuration below)
* Prompts for target company name, industry, location, and parent company / acquisition history. The industry, location, and parent company prompts are pre-filled with the local model's guesses about the named organization (editable, and clearly labelled as guesses rather than verified OSINT); disable with `ollamaAutoResearch: false`
* Alternatively derives basewords from a sample **wordlist**, or from the **cracked passwords** of the current session (`<hashfile>.out`) so the model mirrors the target organization's own password conventions and produces new candidates in that style (only offered once something has been cracked)
* A live spinner with an elapsed-seconds counter runs during generation, and requests are bounded by `ollamaTimeout` so a model stuck loading into VRAM reports a timeout instead of hanging

**Pattern rules mode** (option 4 in the LLM submenu) takes the same shape as the [Spoonman Attack](#spoonman-attack) — a baseword list run through a rule file, both derived from one corpus — but infers each side with the model instead of extracting it. Spoonman is exact and therefore bounded: its basewords all appear in the corpus and its rules only reproduce transformations the corpus already shows. This asks the model to generalize on both axes, so it can name the *word families* behind a sample (the company and its products, site names, local sports teams, seasons, mascots) and write decorations the corpus does not contain.

* Pattern source is either the current session's cracked passwords (offered first, and only once something has been cracked, since those reveal the target's real conventions) or a sample wordlist
* **You are not asked to pick a rule file.** The model writes one, from the same corpus statistics — a stock rule file encodes the internet's habits, and the point of spending a model round trip is to encode *this* organization's
* Basewords are normalized to lowercase letters only, discarding anything under 3 characters, so the generated rules supply case, digits, and punctuation exactly once
* Generated rules are validated before hashcat sees them, and anything using an op hashcat does not have, a position argument outside `0-9A-Z`, more than 31 functions, or a stray comment or non-ASCII character is discarded. hashcat drops an invalid rule *silently* when valid rules share the file, so an unscreened line would become missing coverage rather than an error. The op table was established by testing hashcat itself, not from its rule documentation, which lists ops hashcat will not actually run
* Local-model yield varies a lot run to run, so a thin answer is asked again once and the two rounds are merged — a handful of rules would waste the pass they are spent on
* If no rule survives validation the basewords still run, unmutated, rather than throwing away the expensive half of the run
* Output lands in `<hashfile>.llm_patterns/` as `basewords.txt` and `rules.rule` — per-run scratch, laid out like `.spoonman/` and removed on exit

#### OMEN Attack
Uses the Ordered Markov ENumerator (OMEN) to train a statistical password model from a wordlist and generate password candidates. This attack learns patterns from known passwords and generates new candidates based on those patterns.

* Requires OMEN binaries (createNG and enumNG) to be built from the omen submodule
* Interactive menu: use existing model, train new model, or cancel
* Training wordlist picker shows available wordlists from configured directory or accepts a custom path
* Validates all 5 required model files (createConfig, CP/IP/EP/LN.level) before running
* Captures and reports enumNG errors instead of failing silently
* Generates up to a specified number of password candidates (configurable via `omenMaxCandidates`)
* Pipes generated candidates directly into hashcat for cracking
* Model files and metadata are stored in `~/.hate_crack/omen/` for persistence across sessions

#### Combinator Attacks Submenu
Opens an interactive submenu with six combinator attack variants (formerly at menu keys 10-12). Consolidates related attacks for cleaner menu organization:
- Combinator Attack - combines two wordlists
- YOLO Combinator Attack - combines all permutations of multiple wordlists
- Middle Combinator Attack - combines wordlists with an extra word in the middle
- Thorough Combinator Attack - comprehensive combination of wordlists with rules
- Combinator3 Attack - combines exactly 3 wordlists using `combinator3.bin`, generating all `word1+word2+word3` combinations piped to hashcat
- CombinatorX Attack - combines 2-8 wordlists using `combinatorX.bin` with optional `--sepFill` separator character between word segments

#### Ad-hoc Mask Attack
Runs hashcat mask attack (mode 3) with a user-specified custom mask string. Allows fine-grained control over character-set brute forcing.

* Opens with a choice between typing a mask and selecting a mask file
* Prompts for a hashcat mask (e.g., `?u?l?l?l?d?d` for uppercase + lowercase + lowercase + lowercase + digit + digit)
* Supports custom character sets for specialized character combinations: `-1` through `-4` on any hashcat, plus `-5` through `-8` on hashcat 7 and newer. A mask using `?5`–`?8` against an older hashcat is flagged before the run rather than failing inside it; if the version cannot be read, the mask is passed through and hashcat decides
* Only prompts for the custom slots the mask actually references — `?1?3?d` asks about `-1` and `-3` and nothing else, and a mask with no custom tokens is never asked at all. Detection is token-aware, so the escaped `??1` is a literal `?1` and prompts for nothing. A slot left blank is still skipped, with a warning that hashcat will reject a mask whose charset is undefined
* Mask files (`.hcmask`) can be selected with tab completion, defaulting to the bundled `masks/` directory; hashcat runs every mask in the file in order. Because a mask file defines its own charsets inline, the `-1` through `-4` prompts are skipped when one is chosen
* Optionally runs the mask incrementally (`--increment`), trying shorter lengths before the full mask. Answering yes prompts for an increment minimum and maximum; either can be left blank, and leaving both blank increments over the mask's full keyspace with hashcat choosing the bounds. Offered for typed masks and mask files alike
* Useful for targeted brute forcing when you know password structure patterns

#### Markov Brute Force Attack
Generates password candidates using Markov chain statistical models. Similar to OMEN but simpler and faster.

* Checks for existing `.hcstat2` Markov table from previous sessions (with option to reuse, regenerate, or cancel)
* Generates table from training source if needed:
  - Can use cracked passwords from current session (`.out` file) as training data
  - Or select any wordlist from configured directory or custom path
* Interactive menu: choose minimum and maximum password length
* Uses `--increment` flag to test lengths in sequence
* Markov table persists with hash file (filename.out.hcstat2) for fast subsequent runs
* Faster than OMEN for general-purpose brute forcing

#### N-gram Attack
Generates n-gram candidates from a corpus file using `ngramX.bin` from hashcat-utils and pipes them into hashcat.

* Prompts for a corpus file with tab completion, defaulting to the configured wordlist directory
* Prompts for an n-gram group size (default 3)
* Gzip-compressed corpus files are auto-detected and decompressed on the fly
* Useful when you have target-relevant prose (scraped site copy, leaked documents, internal wiki exports) rather than a password list

#### Permutation Attack
Generates all character permutations of each word in a targeted wordlist and pipes them to hashcat via `permute.bin` from hashcat-utils.

* Prompts for a single wordlist file (not a directory)
* Effective against short targeted wordlists where the character set is known but the order is not (company abbreviations, name fragments, known tokens)
* WARNING: Scales as N! per word - an 8-character word produces 40,320 permutations. Only practical for words up to ~8 characters.
* Uses `permute.bin < wordlist | hashcat` pipeline pattern

#### Random Rules Attack
Generates a set of random hashcat mutation rules using `generate-rules.bin`, writes them to a temporary file, then runs hashcat against a chosen wordlist with those rules.

* Prompts for rule count (default 65536)
* Prompts for wordlist path with tab-completion and numbered selection
* Temporary rules file is cleaned up after the run regardless of outcome
* Useful when known rule sets are exhausted - explores random rule-space for additional cracks

#### Combipow Passphrase Attack
Generates all unique non-empty subset combinations from a short wordlist using `combipow.bin` and pipes them into hashcat. Designed for passphrase cracking when you know the pool of words a password was built from.

* Prompts for a wordlist file (max 63 lines - combipow generates up to 2^n-1 combinations)
* Optional space separator (`-s` flag) to insert spaces between words in each combination
* Warns if the wordlist exceeds 20 lines (output volume may be large)
* Aborts with a clear message if the wordlist exceeds 63 lines (hard limit)
* Candidates are piped directly to hashcat stdin

#### PCFG Attack
Uses [pcfg_cracker](https://github.com/lakiw/pcfg_cracker) to generate candidates from a Probabilistic Context-Free Grammar, piping `pcfg_guesser.py` output directly into hashcat's stdin mode. A PCFG models password *structure* (baseword + digits + symbol, capitalization habits, keyboard walks) with learned probabilities, so candidates come out roughly in descending likelihood order.

* Requires the `pcfg_cracker` submodule. Presence is checked at startup and reported non-fatally: if it is missing, the PCFG attacks are simply unavailable. Run `make` to fetch it.
* Uses the trained grammar named by `pcfgRuleset` in `config.json` (default `DEFAULT`), read from `pcfg_cracker/Rules/<name>/`
* Candidate count is capped by `pcfgMaxCandidates` (default 50,000,000)
* hate_crack does not wrap grammar training. To build a grammar from a target-specific password set, run pcfg_cracker's own `trainer.py` and point `pcfgRuleset` at the resulting ruleset name

#### PRINCE-LING Attack
Uses pcfg_cracker's `prince_ling.py` to derive an optimized PRINCE base wordlist from a trained grammar, then hands it to the existing PRINCE attack. PRINCE-LING picks base words the grammar says are actually productive, so the PRINCE combination space is far less wasteful than pointing PRINCE at a generic wordlist.

* Requires the `pcfg_cracker` submodule and a trained ruleset directory, same as the PCFG attack
* The generated wordlist is cached at `<hcatOptimizedWordlists>/pcfg_prince_ling_<ruleset>.txt` and reused across sessions
* Regenerates only when the ruleset directory is newer than the cached wordlist, so retraining a grammar invalidates the cache automatically
* Generation is written to a temporary file and atomically moved into place; a failed or interrupted run cleans up its partial file and leaves any existing cache intact
* Base wordlist size is capped by `pcfgPrinceLingMaxCandidates` (default 10,000,000)

#### Spoonman Attack
Derives a baseword list and a hashcat rule file from a corpus of known plaintext passwords — a previous engagement's cracked output, a leak dump, or any password list — such that the baseword x rule cross product reconstructs the corpus exactly (see the memory bound below for the one case where it does not). Contributed as issue #169 by @Spoonman1091.

Each password is split into its letters-only lowercased core (the baseword) plus a rule that rebuilds the original from it, using `l`/`u`/`c` for casing, `T{p}` toggles, `${x}`/`^{x}` for trailing and leading characters, and `i{p}{x}` for interior ones.

* When the current session already has cracked plaintexts (`<hash file>.out` exists and is non-empty), a picker offers those as the corpus ahead of a free-form path — the target's own recovered passwords derive rules describing that target's actual conventions, which is exactly what you want to fire back at the remaining uncracked hashes. Deriving from `.out` and then cracking the same hash file appends new plaintexts to that same file, growing the corpus for the next run; that is the intended feedback loop, not corruption. Sessions with no cracked output yet see no picker at all — just today's path prompt
* Prompts for the corpus, then for how much of the rule file to run: top 50% coverage (listed first and recommended), top 75%, top 95%, top 99%, or the full set
* Rules are sorted by how many passwords each one rebuilds, so a truncated file keeps the most productive rules. Coverage is extremely long-tailed: on a 98.2M-password sample, 50% coverage needed 4,120 rules while 95% needed 16,119,661 and 100% needed 21,029,696 — the last few percent typically costs orders of magnitude more rules than the first half, which is why the smallest tier is listed first and is usually the right choice
* Output is written beside the hash file in `<hash file>.spoonman/`, alongside the other ephemeral wordlists: `basewords.txt`, `rules.full.rule`, the capped rule files, and `coverage.txt` with per-milestone rule counts. Derivation is skipped on later runs of the same hash file unless the corpus has been modified since, and the directory is removed on exit by the temp-file cleanup
* Derivation is bounded in memory. Both counters would otherwise grow for the whole read with nothing written until the end, so a corpus large enough to exhaust RAM lost the entire pass to an OOM kill and produced no output; a measured run against a 31 GB corpus reached 14.1 GB resident at 11% of the file and was still accelerating. Each counter is now capped at 20 million distinct keys (about 1.6 GB apiece), and the lowest-frequency keys are discarded once it is exceeded. If that happens, the run says so on the console and in `coverage.txt`, the output reconstructs the retained keys rather than 100% of the corpus, and the coverage percentages are relative to those. Corpora below the cap are unaffected
* Passwords that cannot be expressed as a rule are written verbatim as their own baseword with a `:` no-op, so coverage stays complete. This covers two hashcat limits: rule positions cannot address past index 35, and hashcat rejects any rule with more than 31 functions — silently, when valid rules share the file
* The derivation self-checks every password by reconstructing it in-process, and reports any failures rather than reporting success
* Corpus lines may carry a hash in front of the password, as cracked output does. A leading field is dropped only when it has the shape of a hash (a hex digest at a known length, or a crypt-style `$id$` string), so `hash:salt:plain` is handled while a plaintext or wordlist entry containing a colon survives intact. `$HEX[...]` plaintexts are decoded. If most lines look like an uncracked dump rather than cracked output, `coverage.txt` records the count and the attack warns — the derived basewords and rules would otherwise be meaningless without any error being raised

#### Rosetta Attack
Mines hashcat `--debug-mode 5` logs for the basewords and rules that already cracked something, then runs their full cross product. Powered by [HashcatRosetta](https://github.com/bandrel/HashcatRosetta), the same library behind [Analyze Hashcat Rules](#analyze-hashcat-rules-rule-file-tools-option-5).

No setup is needed to feed it: `_add_debug_mode_for_rules` appends `--debug-mode 5 --debug-file` to every rule-based hashcat invocation hate_crack makes, so the logs accumulate in `hcatDebugLogPath` (`~/.hate_crack/hashcat_debug` by default, one file per session) as a side effect of normal use. A mode 5 log records only candidates that cracked a hash, in the form `baseword:rule:candidate:wordlist`, which is what makes both halves known-productive against this target population; the trailing wordlist field also shows which list is earning its keep on a multi-wordlist run. HashcatRosetta parses mode 4 and mode 5 alike, so logs written before the switch are still read.

The value is in the cross product rather than the recorded pairs. A pair present in a log has already cracked its hash and will not crack another, but a rule that worked on one baseword has usually never been tried against the others — so N basewords and M rules yield close to N x M untried candidates.

The menu first asks how to rank rules — choices 1-3 below, plus a fourth, unrelated mode:

* Rules can be ranked by application frequency, by how many distinct basewords each one worked on, or by how many unique candidates each one generated. Frequency is the default; baseword spread is the better choice when the goal is a rule set that generalizes past the specific words it was learned from
* Only after one of those three is picked does hate_crack list the logs found in `hcatDebugLogPath` newest-first with their sizes; pick one, pick all of them (up to 20), or type a path to a log from elsewhere
* Prompts for how many top rules to keep and how many top basewords. Both default to all — a blank answer keeps every winning rule the logs contain, and zero means the same thing. Enter a number to cap either. The keyspace is the product of the two and is printed before hashcat starts
* Output is written beside the hash file in `<hash file>.rosetta/` as `basewords.txt` and `rules.rule`, alongside the other ephemeral wordlists, and the directory is removed on exit by the temp-file cleanup
* Reading stops at 1,000,000 debug lines, since the analyzer needs the whole batch in memory at once. Truncation is reported on the console rather than assumed harmless — logs from a long run routinely exceed this, in which case the newest log is the one worth selecting
* **LLM Mask Attack** (4) - a different mode entirely, and the only one that needs no debug logs. Prompts for a natural-language description of the passwords you expect (length, character patterns, symbols, etc.), sends it to the locally configured Ollama model, writes the returned masks to `<hash file>.hcmask`, and runs a `-a 3` hashcat mask attack against them

#### Corporate Masks Brute Force
Statistical masks (8-14 characters) derived from analysis of 3.2M NTLM hashes cracked on real engagements. Powered by [Corporate_Masks](https://github.com/golem445/Corporate_Masks), these masks encode realistic password patterns from successful penetration tests.

* Prompts for minimum and maximum mask length (default 8-10)
* Longer lengths cost exponentially more keyspace—start with 8-10 for speed, or 8-12 for thoroughness
* Each mask file is run as a separate hashcat invocation in ascending length order
* Gracefully handles missing mask files (skips them) and absent submodule (prints warning and returns)
* Supports optimized kernels (`-O` flag) for faster cracking
* Ctrl-C during one length aborts remaining lengths

#### Wordlist Tools (option 80)
A submenu of wordlist preprocessing utilities using hashcat-utils binaries. All tools read from and write to files on disk. All file and directory path prompts support tab completion.

| Key | Tool | Description |
|-----|------|-------------|
| 1 | Filter by Length | Keep only words between a min and max length (`len.bin`) |
| 2 | Require Char Classes | Keep words that include all char classes in mask (`req-include.bin`). Mask: 1=lower, 2=upper, 4=digit, 8=symbol (additive) |
| 3 | Exclude Char Classes | Remove words containing any char class in mask (`req-exclude.bin`). Same mask encoding |
| 4 | Extract Substring | Cut bytes from each word at a given offset and optional length (`cutb.bin`) |
| 5 | Split by Length | Create per-length files in an output directory (`splitlen.bin`) |
| 6 | Subtract Wordlist | Remove lines from a wordlist that appear in one or more remove files. Mode 1 uses `rli2.bin` (single file); mode 2 uses `rli.bin` (multiple files) |
| 7 | Shard Wordlist | Split a wordlist into N equal, interleaved parts in one run, written as `base.001`…`base.00N` for distributed cracking (`gate.bin`) |
| 8 | Optimize Wordlists | Dedupe and split the selected wordlists into per-length files under an output directory |
| 9 | Download from Hashmob.net | Browse and download wordlists from Hashmob.net into the configured wordlist directory |
| 10 | Download from Weakpass | Browse and download Weakpass wordlist torrents, with automatic extraction |

All binaries are in `hate_crack/hashcat-utils/bin/`.

#### Rule File Tools (option 81)
Preprocesses hashcat rule files using `cleanup-rules.bin` and `rules_optimize.bin` from hashcat-utils, and downloads rule files from Hashmob.net.

* **Clean** (1) - removes invalid syntax and duplicate rules using `cleanup-rules.bin`. Useful after combining rule files or downloading rules from external sources.
* **Optimize** (2) - consolidates redundant operations using `rules_optimize.bin`. Reduces rule file size and improves cracking speed.
* **Clean and optimize** (3) - runs both operations in sequence via a temporary file, then writes the final result.
* **Download rules from Hashmob.net** (4) - fetches rule files into the configured `rulesDirectory`.
* **Analyze Hashcat rules** (5) - opcode frequency analysis of a rule file, powered by HashcatRosetta.

The three preprocessing operations read from an input file and write to a separate output file (original is never modified).

#### Download Rules from Hashmob.net (Rule File Tools option 4)
Downloads the latest rule files from Hashmob.net's rule repository. These rules are curated and optimized for password cracking and can be used with the Quick Crack and Loopback Attack modes.

* Downloads rule sets in parallel using a thread pool (up to 4 concurrent downloads)
* Skips rules already downloaded locally
* Reports download summary with success/failure counts
* Stores rules in the configured rules directory

#### Analyze Hashcat Rules (Rule File Tools option 5)
Powered by HashcatRosetta (https://github.com/bandrel/HashcatRosetta), this feature analyzes hashcat rule files to provide detailed insights into rule composition and complexity.

* Prompts for a rule file path
* Displays frequency analysis of rule opcodes (operations)
* Helps understand what transformations a rule set performs
* Useful for rule debugging and optimization

#### Download Wordlists from Hashmob.net (Wordlist Tools option 9)
Downloads wordlists from Hashmob.net's collection of cracked passwords and commonly used wordlists.

* Interactive menu for browsing available wordlists
* Progress tracking for large downloads
* Stores wordlists in configured wordlist directory

#### Weakpass Wordlist Menu (Wordlist Tools option 10)
Interactive menu for downloading and managing wordlists from Weakpass.com via BitTorrent.

* Browse available Weakpass wordlist torrents
* Download specific wordlists or entire collections
* Automatic extraction of compressed archives
* Progress tracking for torrent downloads

-------------------------------------------------------------------
### Version History

The full, per-release changelog now lives in [CHANGELOG.md](https://github.com/trustedsec/hate_crack/blob/HEAD/CHANGELOG.md).
ツールをダウンロード
username:hash
--username
  • hate_crack/formatting.py、hate_crack/progress.py: 出力フォーマットと進捗表示のヘルパー。
  • hate_crack/main.py: メイン CLI 実装。
  • .out
  • --maxruntime <SECONDS>: 最大実行時間を上書きします。
  • --bandrel-basewords <PATH>: bandrelのベースワードファイルを上書きします。
  • --update: 最新リリースに更新して再インストールします。リリースタグは main にあるため、チェックアウトが別のブランチにある場合は main に切り替えます。
  • --nightly: 代わりに nightly-dev ブランチから最新のナイトリーに更新します。ナイトリーはCIを通過していますが、カットされたリリースの一部ではありません。--update --nightly と書くこともできます。
  • --no-optimized-kernel (または --no-optimize): 実行全体を通してhashcatに -O を渡しません。config.json の optimizedKernelAttacks を上書きし、hcatTuning に指定した -O も削除します。設定への書き戻しは行われないため、この実行のみに適用されます。サブコマンドを使用する場合は、サブコマンドの前に置きます: ./hate_crack.py --no-optimize quick hashes.txt 1000 --wordlist words.txt
  • --debug: デバッグログを有効にします(stderrに書き込みます)。
  • 最新の正式リリース。これがデフォルトであり、起動時チェックが提供するものです。
    ナイトリー--nightlynightly-devCI を通過したがまだリリースされていない作業。