# im trying to make a password cracker but i have a syntax error. the problem is in line 15 im not sure how to fix it.
# i believe it's a problem with the speech marks. any help?? thx!!
# i believe it's a problem with the speech marks. any help?? thx!!
import md5
counter = 1
pass_in = raw_input("Enter MD5 Hash: ")
pwfile = raw_input("Please enter the dictionary attack file name: ")
try:
pwfile = open(pwfile, "r")
except:
print ("\nFile not found.")
quit()
for password in pwfile:
filemd5 = md5.new(password.strip()).hexidigest()
print "Trying password number %d: %s " % (counter, password.strip())
counter += 1
if pass_in == filemd5:
print "\nMatch found. \nPassword is: %s" % password
break
else: print "\Failed. Password not found."
