1

I am new to Kali Linux.

I am trying to generate a wordlist of 6- whatever character words where:

  • the first part is an English word that starts with a capital letter
  • the last 5 characters are 8765. It ends in a period

I've been trying for the last hour to make it work properly in crunch going through the man pages and threads. But I can't seem to be able to get it to work. My main issues are getting the dictionary list from GitHub, then making it start with a capital letter.

Ideally, it would be 9- 11 or 12 characters but I’m uninterested at this point in figuring out how to do that, I’ll do that another time. The problem there is using a dictionary list obviously they have 2 letter and longer letter words that using that ending would exclude 2 letter English words and perhaps truncate longer words.

1
  • Do you need to use crunch specifically?
    – schroeder
    May 10 at 8:47

2 Answers 2

0

Here's a quick and dirty python script that uses the dictionary at /usr/share/dict/american-english (which is installed by default on Ubuntu and other distos) that might point you in the right direction:

dictionary='/usr/share/dict/american-english'
f=open(dictionary, 'r')
for line in f:
    out=line.strip()
    out=out.capitalize()
    out+='8765.'
    print(out)  
f.close()   

This produces:

A8765.
A's8765.
Amd8765.
Amd's8765.
Aol8765.
Aol's8765.
Aws8765.
Aws's8765.
Aachen8765.
Aachen's8765.
[etc.]

To restrict the output to only strings of certain lengths, you can just put an if statement inside the loop with a condition based on len(out)

10
  • looks good but i get following errors
    – Rgh001
    May 13 at 12:50
  • ibb.co/1930SkZ
    – Rgh001
    May 13 at 12:59
  • @Rgh001, It looks like you are trying to run the script in bash, not python. Try saving the script in a folder somewhere on your system; then, on the command line, do python3 /path/to/script.py.
    – mti2935
    May 13 at 14:05
  • Thanks sometimes I’m a fool lol
    – Rgh001
    May 13 at 14:17
  • It’s giving me a stdin error line 1
    – Rgh001
    May 13 at 16:29
0

You can do this easily with john's --stdout flag:

$ cat words.txt                                                           
ab
word
words
wordss
reallylongword


$ john --stdout --wordlist=words.txt --rules=:'c$8$7$6$5$.' --min-length=9 --max-length=12 > mywords.txt
[...]

$ cat mywords.txt 
Word8765.
Words8765.
Wordss8765.

You can either use one of the dictionaries include in Kali (such as the one @mti2935 suggested), or one you download. You can also set the minimum and maximum lengths to whatever you want.

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.