#-*- coding: utf-8 -*- # import hashlib import sys import os def error_enter(error_level): if error_level == 1: print "\nError..." print "The hash lenght must be 32 or 40 long." print "The salt lenght must be 10 long." print "Please check your entry." if error_level == 2: print "\nError..." print "Start point can't be greater than End point" exit() def checkPassword(password): if verbose == 1: print password if type == 0: hash_attack = hashlib.md5(password+salt).hexdigest() if type == 1: hash_attack = hashlib.sha1(password+salt).hexdigest() if hash_attack == hash: print "\nPassword found :", password sys.exit() def recurse(width, position, baseString): #current position for char in easyRange: if (position < width - 1): recurse(width, position + 1, baseString + "%c" % char) checkPassword(baseString + "%c" % char) #os.system("cls") print "##############################################################" print "# FSBV2 Brute Forcer ! V0.3 #" print "# Experimental tool for rechearch only #" print "# Only for insecure demonstration or webmaster recovery #" print "# by Sorcier FXK for Staff DK & Project Kalkulator's Knights #" print "# www.tdark-knight.com #" print "# http://forum.kalkulators.org/ #" print "# sorcierfxk@kalkulators.org #" print "##############################################################" print " " print "Entrer hash user" hash = raw_input("[:> ") print "Entrer le salt" salt = raw_input("[:> ") print "Start point :" minChars = input("[:> ") print "End point :" maxChars = input("[:> ") print "Verbose mode [Y/N]" print "With the verbose mode, brute-force is very slow !!" verbose = raw_input("[:> ") if len(hash) != 32 and len(hash) != 40 or len(salt) != 10: error_level = 1 error_enter(error_level) if minChars > maxChars: error_level = 2 error_enter(error_level) if len(hash) == 32: type = 0 if len(hash) == 40: type = 1 if verbose == "y" or verbose == "Y": verbose = 1 else: verbose = 0 #Initialisation easyRange = range(97, 123) + range(65, 91) + range(48, 58) + [32,33,36,42,43] allRange = range(32,127) #hash = "abaa79ef13450862649f4f936370be11" #salt = "0123456789" print "\nTarget : Hash [" + hash + "] Salt [" + salt + "]" if len(hash) == 32: print "Type : MD5 detected...\n" if len(hash) == 40: print "Type : SHA1 detected...\n" for baseWidth in range(minChars, maxChars + 1): print "Checking passwords width [" + `baseWidth` + "]" recurse(baseWidth, 0, "")