./misc/rtgen.py

0.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
#!/usr/bin/env python
#Very Simple Wordlist Generator
 
#http://www.darkc0de.com
#d3hydr8[at]gmail[dot]com
 
import sys, time
 
def write(w):
	time.sleep(0.2) #Edit according to your system.
	ofile.writelines(''.join(w)+"\n")
 
def main(first, start, second=[]):
	if not start: return write(second)
    	for i in range(len(first)):
        	second.append(first.pop(i))
        	main(first, start-1, second)
        	first.insert(i, second.pop())
 
if len(sys.argv) != 4:
	print "\nUsage: ./rtgen.py <char_set> <length> <output file>\n"
	sys.exit(1)
print "\nCharSet:",sys.argv[1]
print "Length:",sys.argv[2]
print "Writing Output:",sys.argv[3]
print "\nWorking..."
ofile = open(sys.argv[3], "a")
main(list(sys.argv[1]), int(sys.argv[2]))
ofile.close()
print "\nDone\n"
 

Back