How hashcat/hashcat-legacy works
Hashcat is a CPU-based password-recovery utility. Its principal workflow is to load target hashes, generate candidate passwords using an attack mode and optional transformations, compute hashes, compare them with targets, and report recovered plaintexts. The README documents seven attack modes and more than 100 hashing algorithms; the tree also shows rule, mask, charset, and algorithm implementations. The CLI and engine excerpts support the loading, dispatch, hashing, and comparison roles shown here; some attack-mode wiring and output persistence details are not sampled, so those connections are omitted.
Main entry points: hashcat-cli.c CLI and orchestration · engine.c Hashing engine · rp.c Rule transformations · rules Rule collections
Components 15
Recovery workflow
- CLI and orchestration
src/hashcat-cli.c - Hash loading and indexing
src/hashcat-cli.c
Candidate generation
- Attack modes
src/hashcat-cli.c - Word candidates
- Rule transformations
src/rp.c - Rule collections
rules - Mask patterns
masks - Charset definitions
charsets
Hash computation
- Hashing engine
src/engine.c - Hash algorithms
src/engine.c - Digest comparison
src/hashcat-cli.c
Results and state
- Recovered passwords
- Recovery state
Other components
- Operator
- Target hashes
Connections 16
- Operator → CLI and orchestration: invokes
- Target hashes → Hash loading and indexing: supplies hashes
- CLI and orchestration → Hash loading and indexing: loads targets
- CLI and orchestration → Attack modes: selects attack
- Word candidates → Attack modes: provides candidates
- Rule collections → Rule transformations: provides rules
- Mask patterns → Attack modes: provides patterns
- Charset definitions → Attack modes: provides characters
- Attack modes → Rule transformations: applies transforms
- CLI and orchestration → Hashing engine: dispatches work
- Hashing engine → Hash algorithms: computes digests
- Hashing engine → Digest comparison: submits digests
- Hash loading and indexing → Digest comparison: supplies targets
- Digest comparison → CLI and orchestration: reports matches
- CLI and orchestration → Recovered passwords: emits plaintexts
- CLI and orchestration → Recovery state: records recovery state