Okay, that's why I write a very simplified password to crack passwords in python, which translates a password with alphanumeric characters. Currently, this code only supports 1 character passwords and a password file with an internal password of md5. Ultimately, he will turn on the option to indicate your own character restrictions (how many characters he tries to crack until it works). Right now I canβt kill this code when I want it to die. I included a try besides snippit, however it does not work. What have I done wrong?
Code: http://pastebin.com/MkJGmmDU
import linecache, hashlib alphaNumeric = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",1,2,3,4,5,6,7,8,9,0] class main: def checker(): try: while 1: if hashlib.md5(alphaNumeric[num1]) == passwordHash: print "Success! Your password is: " + str(alphaNumeric[num1]) break except KeyboardInterrupt: print "Keyboard Interrupt." global num1, passwordHash, fileToCrack, numOfChars print "What file do you want to crack?" fileToCrack = raw_input("> ") print "How many characters do you want to try?" numOfChars = raw_input("> ") print "Scanning file..." passwordHash = linecache.getline(fileToCrack, 1)[0:32] num1 = 0 checker() main