Create a custom wordlist (password generator dump file) using Crunch

User Avatar
👤 admin
🔴 Admin
✍️ The most important thing in the world is to not be alone.
⏳ Last active: 15 Apr 2025 at 16:01
📅 Created: 18 Feb 2021 at 13:05
👀 Viewed: 19 times
✉️ Send Email

What is Crunch?

Crunch is a great linux tool used for generating passwords. You can tell him what combination you need and it will generate it. If you need all the password combinations containing 6 digits and for example "abcde1234!" it will generate a file with all of them. The output from crunch can be sent to the screen, file, or to another program.

The syntax is really simple:


./crunch <from-len> <to-len> [-f <path to charset.lst> charset-name] [-o wordlist.txt or START]

options:

-f /path/to/charset.lst charset-name
              Specifies a character set from the charset.lst

-o wordlist.txt
              Specifies the file to write the output to, eg: wordlist.txt

./crunch 8 8 -f charset.lst mixalpha-numeric-all-space -o wordlist.txt
       crunch  should generate a 8 character wordlist using the mixalpha-number-all-space character set from charset.lst and will write the wordlist to a file named wordlist.txt.  The file will start at cbdogaaa and end at "  dog "

For compleate manual please visit crunch man page.

Installation in Ubuntu linux


sudo apt install crunch

Installation in Debian linux


sudo apt-get install crunch

Example 1 generating a 6 digit file containing "abcde1234!"


crunch 6 6 'abcde1234!' -o exportfile.txt

Image

Example 2 generating a 8 digit file containing special characters


crunch 8 8 pentest\@\#\$\%\^\&\! -o textnum.txt

Image

Here is a simple video using crunch

https://youtu.be/_l6eZSa4LYE

Conclusion Crunch is used from penetration testing teams to generate random passwords to test wireless systems, firewalls and other IoT systems, it simple, easy to use and it's fast.

If you are interested you can check How to generate a random password in linux using /dev/random

If you want to comment: Login or Register