Moving on with our crunch+wordlists subject (from now on, writing in English). Since we discuessed the main basic aspects of wordlists, crunch and some special situations concerning them, this post shall be shorter - I intend to present a little mopre complex method to generete wordlists: using charset.lst.
First of all, charset dot what?!
The charset.lst file (which comes compiled on Kali - check /usr/share/crunch to see it) is meant to offer a predefined character lists, so you don’t need to specify all the characters you want to use in your wordlist by hand in full - all you have to do is specify the reference name in the charset.lst file.
Some of the character sets offered by charset.lst are:
- lalpha: lowercase letters only;
- ualpha: uppercase letters only;
- lalpha-numeric: lowercase letters and numbers;
- ualpha-numeric: uppercase letters and numbers;
- lalpha-numeric-all-space: lowercase letters, numbers and special characters like ?, ;, :, space, etc;
- ualpha-numeric-all-space: uppercase letters, numbers and special characters like ?, ;, :, space, etc;
- mixalpha: uppercase and lowercase letters;
- mixalpha-numeric-all-space: lowercase letters, uppercase letters, numbers and special characters and space.
There are some other predefined sets of characters, feel free to use cat /usr/share/crunch/charset.lst
and see something like this:
Example of output for cat charset.lst
Using crunch with chartset.lst
Thus, in order to use one of these predefined charset.lst groups to generate, for example, an wordlist of possible combinations of mixalpha characters (upper and lowercase) with 6 to 10 characters long and save its output into “WList.txt”, you should use option “-f charset.lst” into your crunch command, just like this:
$ crunch 6 8 -f charset.lst mixalpha -o WList.txt
In order to use ”@” with charset.lst, an example of crunch command would be _(exercise: what would be the output saved into ‘huge-wordlist.txt’?):
$ crunch 8 8 -f charset.lst mixalpha-numeric-all-space -t @@@@1983 -o huge-wordlist.txt
The “Master Wordlist” with crunch + charset.lst, grouping possible combinations between 8 and 12 characters long would be the output of:
$ crunch 8 12 -f charset.lst mixalpha-numeric-all-space -o master-wordlist.txt
Conclusion
Today, we’ve explored the usage of crunch command to generate wordlists, potentially enhanced by its combination with the file charset.lst - even creating a colossal wordlist file. On our next post, we will discuss Google Hacking/Dorks. 😉
In case of any issues, feel free to contact me at any time.
#100daysofcode #day5of100 #programming #coding #code #python #developer #coder #programmer #peoplewhocode #hacking #ethicalhacking #hacktheplanet #wordlist #crunch