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.

schroeder
  • 123,438
  • 55
  • 284
  • 319
Rgh001
  • 51
  • 1

2 Answers2

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)

mti2935
  • 19,868
  • 2
  • 45
  • 64
  • looks good but i get following errors – Rgh001 May 13 '22 at 12:50
  • https://ibb.co/1930SkZ – Rgh001 May 13 '22 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 '22 at 14:05
  • Thanks sometimes I’m a fool lol – Rgh001 May 13 '22 at 14:17
  • It’s giving me a stdin error line 1 – Rgh001 May 13 '22 at 16:29
  • @Rgh001 Are you within the python interpreter when you try to run this? If so, that's the problem (see https://stackoverflow.com/questions/13961140/syntax-error-when-using-command-line-in-python for more info). From a bash (or whatever shell you use) command line, just do: `python3 /path/to/script.py` (where script.py is the file that contains the script). – mti2935 May 13 '22 at 16:34
  • Ugh I'm so close. Ok so I understand and that was indeed the problem but now when I run it out of interpreter it says No such file. My command was python3 /Users/Franklin/Desktop/dictionary.py – Rgh001 May 13 '22 at 16:52
  • It sounds like you are close. Make sure that the file `/Users/Franklin/Desktop/dictionary.py` contains the script that I posted in my answer above. From the bash command line, if you do `cat /Users/Franklin/Desktop/dictionary.py`, it should display the script. – mti2935 May 13 '22 at 17:08
  • Still saying no such file. I'm using command prompt as my shell, changed the location to Users – Rgh001 May 15 '22 at 00:59
  • @Rgh001 I'll work with you offline on this. You can email me. The following command will output my email address: `echo -n 'bWlrZUBtZWl4bGVyLXRlY2guY29tCg==' | base64 -d` – mti2935 May 15 '22 at 12:47
  • What would I need to add to this code to add something to the beginning of the list? – Rgh001 May 25 '22 at 23:47
  • @Rgh001 `out='somethingathebegining'+out` – mti2935 May 26 '22 at 01:20
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.

Gh0stFish
  • 4,664
  • 14
  • 15