#!/usr/bin/env python import crypt, sys from os import system easyRange = range(97, 123) + range(65, 91) + range(48, 58) + [32,33,36,42,43] allRange = range(32,127) maxChars = 13 def welcome(): system('clear') print "##############################################################" print "# Shadown, Shadow Password Cracker ! V0.1 #" print "# by Sorcier FXK for Staff DK & Project Kalkulator's Knights #" print "# www.tdark-knight.com #" print "# sorcierfxk@kalkulators.org #" print "##############################################################" def checkPassword(password): hash_attack = crypt.crypt(password, id_salt) if hash_attack == enter_hash: print "Password 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) welcome() print "[+] Saisissez votre hash :" enter_hash = raw_input('[>] ') data_hash = enter_hash.split('$') try: id_hash = data_hash[1] salt_hash = data_hash[2] hash_hash = data_hash[3] except: pass if id_hash == "1": print "[>] Hash type : MD5" if id_hash == "5": print "[>] Hash type : SHA-256" if id_hash == "6": print "[>] Hash type : SHA-512" if id_hash != "1" and id_hash != "5" and id_hash != "6": print "[x] Error, unknow hash type or unsupported Blowfish cipher." print "[>] Shadown's end..." sys.exit() id_salt = "$"+id_hash+"$"+salt_hash for baseWidth in range(1, maxChars + 1): print "[>] checking passwords width [" + `baseWidth` + "]" recurse(baseWidth, 0, "")