adding-an-attack
Use when adding a new attack mode to hate_crack — the exact six wiring steps across main.py, attacks.py, and hate_crack.py, including the duplicate menu mapping that is easy to miss.
来源信息
- 仓库
- trustedsec/hate_crack
- 最近来源活动
- 2026年8月21日 16:30
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 1,866
- 分支
- 283
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- adding-an-attack
- description
- Use when adding a new attack mode to hate_crack — the exact six wiring steps across main.py, attacks.py, and hate_crack.py, including the duplicate menu mapping that is easy to miss.
# Adding a New Attack
An attack spans three files (see "Three-Layer Attack Pattern" in `CLAUDE.md`).
Do all six steps — skipping step 6 leaves the attack invisible from the root
entry point even though it works via `main.py`.
1. Add the hashcat wrapper function in `main.py` (e.g. `hcatMyAttack(...)`)
2. Add the handler in `attacks.py` (e.g. `def my_attack(ctx: Any)`)
3. Add a dispatcher in `main.py`: `def my_attack(): return _attacks.my_attack(_attack_ctx())`
4. Add the print line in `main.py`'s menu display loop (~line 3807+)
5. Add the menu entry in `main.py`'s `get_main_menu_options()`
6. Add the menu entry in `hate_crack.py`'s `get_main_menu_options()` (the duplicate)
在 GitHub 查看