Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Brute String Generator - Python Code Bank


Brute String Generator
Will produce all possible words within a given alphabet and with a specific length. You can specify a prefix if u know one. For more info look at the header comment.
                #!/usr/bin/env python
import sys
#copyleft by cb0 (2010) - bruteStringer.py
#first posted on HBH
########################################################################################
#Brute String Generator
#Start it with ./brutestringer.py 4 6 "abcdefghijklmnopqrstuvwxyz1234567890" ""
#will produce all strings with length 4 to 6 and chars from a to z and numbers 0 to 9
#You need to edit these settings to fit your needs.
#
#e.g. (1) When the prefix is know, use it as 4th parameter, 
#You know the pass is "MyPass***" and the *** are some numbers then call it with
#./brutestringer.py 3 3 "1234567890" "MyPass"
#
#e.g. (2) ./brutestringer.py 2 3 "abc" ""
#aa
#ab
#ac
#[...]
#ccb
#ccc
########################################################################################

def rec(w, b, p):
	for c in sys.argv[3]:
		if (b < w - 1):
			rec(w, b + 1, p + "%c" % c)
        print p

for b in range(int(sys.argv[1])+1, int(sys.argv[2]) + 2):
    rec(b, 0, sys.argv[4])

            
Comments
Sorry but there are no comments to display