Hashcat / John Potfile Wordlist Generator

pot2dict v0.3.0

Fast, parallel Rust tool for turning hashcat/john .pot files and plain wordlists into a deduplicated, optionally frequency-sorted password dictionary.

Rust Multithreaded Gzip / Zstd External Merge Sort Memory Safe Bump Arena Mmap I/O
Overview

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.

Core Features
Multithreaded mmap processing
Rayon-parallel counting over memory-mapped files, chunked at newline boundaries for perfect splitting without data corruption.
📦
Compressed input support
Native Gzip (.gz) and Zstandard (.zst) decompression — no pre-extraction needed.
DashMap global counter
Sharded concurrent hashmap eliminates lock contention when processing many small input files in parallel.
💾
Automatic external merge sort
In-memory parallel sort with automatic spill-to-disk when the dataset exceeds your configured memory budget.
🧠
Bump arena allocation
Optional persistent per-thread bump arenas for very large unique-password sets (~50M+), reducing allocator overhead.
📤
Mmap output writer
Optional mmap-based output for very large outputs (~10GB+), bypassing buffered I/O limitations.
Input Format

Each line may be a plain password, or a pot-style hash:password line. The password after the last : is extracted automatically.

# Plain wordlist password123 letmein qwerty # Hashcat potfile (hash:password) 5f4dcc3b5aa765d61d8327deb882cf99:password e99a18c428cb38d5f260853678922e03:abc123 # John potfile (user:hash:password) admin:1a1dc91c907325c69271ddf0c944bc72:letmein

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.

Installation

Requires Rust 1.70+. Build with full release optimizations (LTO, single codegen unit).

# Clone the repository git clone https://github.com/A113L/pot2dict.git cd pot2dict # Build optimized release binary cargo build --release # Binary location ./target/release/pot2dict
Key dependencies:
rayon — data parallelism  ·  dashmap — sharded concurrent map  ·  memmap2 — mmap I/O  ·  zstd / flate2 — compression  ·  bumpalo — bump allocator  ·  indicatif — progress bars
Usage Examples
# Basic: extract passwords, sort by frequency pot2dict hashcat.pot -o dict.txt --freq # Multiple inputs with compression pot2dict crack1.pot crack2.txt.gz crack3.txt.zst -o merged.txt --freq # Deduplicate only, alphabetical order pot2dict huge_wordlist.txt -o unique.txt --unique # Limit RAM usage, spill to /tmp pot2dict breach_compilation/ -o dict.txt --freq --max-mem 0.3 --temp-dir /tmp # Massive dataset: arena + mmap output pot2dict *.pot -o massive.txt --freq --arena --mmap-output
Command-Line Options
FlagDescription
-o, --output <FILE>Output file path (default: stdout)
-p, --processes <N>Number of worker threads (default: all logical cores)
--freqSort by frequency descending (most common passwords first)
--uniqueSort 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-colonTreat lines ending in bare : as literal password instead of skipping
--arenaUse persistent per-thread bump arenas (recommended >50M unique passwords)
--mmap-outputWrite output via mmap instead of buffered I/O (recommended >10GB output)
--parallel-filesProcess input files in parallel (auto-enabled above 100 files)
Performance Characteristics
~50M
Unique passwords with arena mode
10GB+
Output size with mmap writer

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.

Workflow Integration
Step 1
Crack with hashcat / john
Run your cracking session and accumulate results in .pot files.
Step 2
Feed pot2dict
Point pot2dict at potfiles, compressed logs, or raw wordlist dumps.
Step 3
Generate ranked dictionary
Output frequency-sorted lists for reuse in smarter rule-based or mask attacks.
Get the Source

pot2dict is open source and hosted on GitHub. MIT licensed.

View pot2dict on GitHub