mardi 31 juillet 2018

Python 3 md5 hashes in webpage

I'm building this md5 password crack to find hashes hidden in a webpage. My url page is in a separate file while im using the function (html) to call the website in order to find and crack the hashes. I'm kind of stuck on how to finish off the code, at least to find the hashed without cracking them at this point. This is my code to find the hidden hashes. Thanks

def dictionary_attack(html):
dictionary = ['qwerty','qwerty1','password','password1','default','default','123','12345','123456']
password_found = False

for dictionary_value in dictionary:
    hashed_value = (hashlib.md5(dictionary_value)).hexdigest()
    if hashed_value == password_hash:
        password_found = True
        recovered_password = dictionary_value

if password_found -- True:
    print ('Found \n',password_hash)
    print ('password rec' , recovered_password)

else:
    print ('pass not found')
if __name__ == '__main__':
    main(html)




Aucun commentaire:

Enregistrer un commentaire