工作原理
John the Ripper 通过以下指令原生支持 Hashcat 规则语法 !! hashcat logic ON 指令。此工具将你的 Hashcat 规则包装在有效的 John 配置部分中,以便你直接在 John 命令中使用。
- 1. 粘贴你的 Hashcat 规则: 每行一条规则,与 Hashcat .rule 文件中的格式完全一致(例如
l $1 so0). - 2. 设置规则集名称: 用于配置部分头和
--rules运行 John 时的参数标志。 - 3. 下载 .conf 文件: 工具将规则包装为所需的 John 格式并生成可直接使用的配置。
- 4. 运行 John: 通过以下方式传递 .conf 文件
--config以及规则集名称使用--rules。John 在哈希之前将每条 Hashcat 规则应用于字典中的每个条目。
生成的 .conf 结构
[List.Rules:yourRulesetName] !! hashcat logic ON <your hashcat rules> !! hashcat logic OFF
常用 Hashcat 规则函数
任何有效的 Hashcat 规则函数都会原样传递——转换器只做包装,不做修改。常见示例:
| 规则 | 效果 |
|---|---|
| : | No-op: pass the word unchanged |
| l | Lowercase all characters |
| u | Uppercase all characters |
| c | Capitalise first letter, lowercase rest |
| r | Reverse the word |
| $X | Append character X |
| ^X | Prepend character X |
| sXY | Replace all X with Y |
| d | Duplicate the word |
| t | Toggle case of all characters |
常见问题
Why not just use John's built-in rule syntax?
Hashcat rules are more widely shared. Leaked rulesets like OneRuleToRuleThemAll, d3adhob0, and best64.rule are all in Hashcat format. This converter lets you use them in John without rewriting every rule manually.
Are all Hashcat rules supported?
John's hashcat logic mode supports the vast majority of Hashcat rule functions. A small number of advanced Hashcat-only functions (such as complex memory rules) may not execute. John will skip unrecognised functions rather than error.
Is my ruleset stored on the server?
No. Rules are processed in memory on submit and immediately discarded. Nothing is logged or stored.
Can I chain multiple rules?
Yes. Each line is an independent rule chain applied to every wordlist entry. John processes all rules in the section, generating one output candidate per rule per word.