I am trying to create a variable length word list with crunch that guarantees a exclamation point (!) at the end of each word. I want a wordlist of all words of length 4 - 6, with the last character being an exclamation point and the rest being lower case letters. I'm then going to feed all of this into hashcat.

What command/crunch options would I use?


I'm fairly sure you can not create a word-list of variable word length and a fixed terminating character. Be sure to denote a specific word library if you have one, I'm using the default in these examples.

You have two options:

  1. Run Crunch 3 separate times, once for each word-length (in total) 4 alpha with an appended '!', 5 alphas with an appended '!', etc... Also note, you need to make sure you escape the exclamation with a backslash. You can also establish parameters on the word-list file size, or number of words compiled.

    ./crunch 5 5 -t @@@@/! -o filename.txt
    ./crunch 6 6 -t @@@@@/! -o filename.txt
    ./crunch 7 7 -t @@@@@@/! -o filename.txt

    Note the above word-lengths 5, 6 and 7. This corresponds to a word containing 4, 5 or 6 alphabetical characters, with an additional fixed special '!' character. The commands ./crunch 4 6 and/or ./crunch 3 5 will not create words of correct length.

  2. Run one instance of Crunch to generate only the nonfixed characters,

    ./crunch 4 6 -o filename.txt

    Write a basic script to retroactively append the '!',

  • Thank you, very helpful. Good idea to run three separate instances. – corneria Jan 29 '17 at 23:42

Adding to the previous answer. I think you can issue the following command:

./crunch 3 5 -f /usr/share/rainbowcrack/charset.txt loweralpha -o filename.txt

And then you run a bash script to append an exclamation mark at the end. I'm not all that good at bash scripting but:

touch new-file.txt;
for line in $(cat filename.txt);do echo $line! >> new-file.txt;done

This will give you passwords (all lower case) between the length of 4-6 and ending with an exclamation mark.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.