root@sparrow:~/writeups$ cat crunch.md
// cracking
crunch
21 Jul 2026
· 3 min read
crunch is a brute-force wordlist generator bundled with Kali: it produces every possible combination for a given charset and length. It is used to build tailored lists when generic dictionaries do not match the target's password policy.What really matters is that crunch is combinatorial and exhaustive: the keyspace grows exponentially with length, so its real value is not generating everything but constraining the space with -t patterns (position and character type) and piping the output into a cracker via stdin instead of writing terabytes to disk.
1. Beginner level — charset, length and output

| Command | What it does |
|---|---|
crunch 4 8 | Generates words of 4 to 8 chars (a-z) |
crunch 8 8 -o wl.txt | Fixed length to a file |
crunch 6 6 0123456789 | Digits only (6-digit PINs) |
crunch 4 6 abcABC123 | Custom charset |
crunch 8 8 -t @@@@%%%% | Pattern: 4 letters + 4 numbers |
crunch 5 5 -p perro gato | Permutes words (not characters) |
crunch 1 8 -f charset.lst mixalpha | Uses a named charset |
crunch 8 8 -t pass@@@@ | Fixed prefix + wildcards |
crunch 4 4 -o - | hashcat -m 0 hash - | Pipes via stdout to hashcat |
crunch 8 8 -c 10000 -o START | Splits into files of N lines |
crunch 6 6 -d 2@ | Limits consecutive repeated characters |
crunch 8 8 -s aaaaaaaa | Starts from a specific word |
crunch 8 8 -e zzzzzzzz | Ends at a specific word |
cat /usr/share/crunch/charset.lst | Lists the predefined charsets |
2. Advanced level — patterns, compression and feed

| Command | What it does |
|---|---|
crunch 8 8 -t @@@^^^%% | Letters, symbols and numbers by position |
crunch 12 12 -t Pass%%%%@@@@ -o wl.txt | Complex pattern with prefix |
crunch 8 8 -t ,@@@@@@@ | First uppercase (,) + lowercase |
crunch 10 10 -t @@@@2024!! | Fixed year between wildcards |
crunch 6 6 abcdef -o - | aircrack-ng -w - cap.cap | Direct feed to aircrack-ng |
crunch 8 8 -d 1@ -t %%%%%%%% | No consecutive repeated characters |
crunch 8 8 -b 20mib -o START | Splits by size (not by lines) |
crunch 4 6 -f charset.lst lalpha-numeric | Specific named charset |
crunch 8 8 -t @@@@@@@@ -i | Reverses the generation order |
crunch 5 5 -p abc 123 | Permutes a set of tokens |
crunch 8 8 -z gzip -o wl | Compresses the output on the fly |
crunch 8 8 -q words.txt | Permutes the lines of a file |
crunch 8 8 -t ^@@@@@@@ | First character a symbol |
crunch 1 8 mixalpha-numeric-all -o - | john --stdin | Feeds john via stdin |
3. Details people miss
- Output size grows exponentially: a full a-z 8-character list is around 200 TB. crunch prints the estimated size before it starts, so always read it before writing to disk.
- In
-teach symbol is a different wildcard:@=lowercase,,=uppercase,%=numbers,^=symbols. Mixing them up produces the wrong list without warning. - To avoid filling the disk, pipe with
-o -straight into hashcat, john or aircrack-ng via stdin instead of saving the file. - If you need a literal
@ , % ^inside-t, escape it with\; otherwise crunch treats it as a wildcard. - crunch does not require root, but it does need real space: use
-c(by lines) or-b(by size) to split the output and avoid blowing up the filesystem.
Responsible use
These commands are for systems you own or have explicit written authorisation to test (labs, CTFs, contracted engagements). Using them against third-party infrastructure without permission is illegal in most countries.