Monday, February 22, 2010

Bash wordlist/dictionary generator for brute-forcing

This example code will generate passwords of 4 characters only. To generate bigger passwords, there has to be more loops (pretty obvious in the code below). Happy Brute-forcing !!
1 #!/bin/bash
2
3 list=`echo {0..9} {a..z} {A..Z}`
4
5 for c1 in $list
6 do
7 for c2 in $list
8 do
9 for c3 in $list
10 do
11 for c4 in $list
12 do
13 echo $c1$c2$c3$c4
14 done
15 done
16 done
17 done
18