Fast, parallel Rust tool for turning hashcat/john .pot files and plain wordlists into a deduplicated, optionally frequency-sorted password dictionary.
pot2dict is a high-performance Rust utility that transforms cracked password potfiles and raw wordlists into clean, deduplicated dictionaries. Built for scale — from pentesting engagements to massive breach compilation processing.
Unlike simple cut -d: -f2 pipelines, pot2dict handles multithreaded counting over memory-mapped input, supports compressed formats (Gzip, Zstandard), and automatically spills to disk via external k-way merge sort when your dataset exceeds available RAM. Optional bump-arena allocation and mmap-based output writers handle datasets with 50M+ unique passwords and 10GB+ outputs without breaking a sweat.
.gz) and Zstandard (.zst) decompression — no pre-extraction needed.Each line may be a plain password, or a pot-style hash:password line. The password after the last : is extracted automatically.
Lines ending in an empty password (hash:) are skipped by default. Use --keep-trailing-colon to treat a bare trailing colon as the literal password.
Requires Rust 1.70+. Build with full release optimizations (LTO, single codegen unit).
rayon — data parallelism · dashmap — sharded concurrent map · memmap2 — mmap I/O · zstd / flate2 — compression · bumpalo — bump allocator · indicatif — progress bars| Flag | Description |
|---|---|
-o, --output <FILE> | Output file path (default: stdout) |
-p, --processes <N> | Number of worker threads (default: all logical cores) |
--freq | Sort by frequency descending (most common passwords first) |
--unique | Sort alphabetically, deduplicate only (no frequency data) |
--max-mem <FRACTION> | Fraction of system RAM usable for in-memory sort (default: 0.5) |
--temp-dir <DIR> | Directory for spill files during external merge sort |
--keep-trailing-colon | Treat lines ending in bare : as literal password instead of skipping |
--arena | Use persistent per-thread bump arenas (recommended >50M unique passwords) |
--mmap-output | Write output via mmap instead of buffered I/O (recommended >10GB output) |
--parallel-files | Process input files in parallel (auto-enabled above 100 files) |
The external k-way merge sort automatically activates when the in-memory budget is exceeded. Spill files are created in --temp-dir and merged back with minimal memory footprint. Rayon work-stealing ensures all CPU cores stay saturated even with mixed fast/slow input sources.
.pot files.