>>6257
Well I'll do it anyway just to make you mad.
import sys, time, re, crypt
t=raw_input("Enter in a string to be bruteforced: ")
chars=range(48,58)+range(97,123)
pt=time.time()
def mktripcode(pw):
salt = (pw + 'H.')[1:3]
salt = re.compile('[^\.-z]').sub('.', salt)
trip = crypt.crypt(pw, salt)[-10:]
return trip
def checkPassword(password):
if re.search(t, mktripcode(password), re.I):
ct=time.time()
print ""
print "match [" + password + "]"
print "tripcode [" + mktripcode(password) + "]"
print "in", ct-pt, "seconds."
raw_input("")
sys.exit()
def recurse(width, position, baseString):
for char in chars:
if (position < width - 1):
recurse(width, position + 1, baseString + "%c" % char)
else:
checkPassword(baseString + "%c" % char)
maxChars = 6
for baseWidth in range(1, maxChars + 1):
sys.stdout.write("checking passwords width [" + `baseWidth` + "]...")
recurse(baseWidth, 0, "")
print ""