Cracking hashes with Python
wishingforsam at gmail.com
Tue Nov 26 12:46:18 CET 2013
Thanks. From what I've been able to find online I've created a dictionary
file with words and the words I know the hash values to be and I'm trying
to get it to use that however when I run this I get no errors but it
doesn't do anything, like ask me to input my hash value. Am i just being
>import sys, re, hashlib
> if len(hashes) != 32:
> print '[-] Improper length for md5 hash.'
> md5hashes = raw_input('\nPlease enter the Hash value to be decrypted:
>wordlist = open('C:\dictionary.txt', r)
> words = wordlist
> print "[-] Error: Check the path.\n"
>words = words.readlines()
>print "\n",len(words),"words loading…"
>for word in words:
> hash = hashlib.md5(word[:-1])
> value = hash.hexdigest()
>if hashes == value:
> print "[+] Password is:"+word,"\n"
>print('\n1 – Dictionary Check')
>print('2 – Exit')
>selection = raw_input('\nSelect an option from above: ')
>if selection == "1":
>elif selection == "2":
On Tue, Nov 26, 2013 at 10:39 AM, Chris Angelico <rosuav at gmail.com> wrote:
> On Tue, Nov 26, 2013 at 9:30 PM, TheRandomPast <wishingforsam at gmail.com>
> > and I've started the second part, the part to crack them. If anyone
> could tell me where I'd find more information on this subject and how to
> crack them that would be great. As I print them on screen I was thinking I
> could write a program that allows the md5 to be entered and then cracked.
> Okay. This is where the irreversible nature of hash functions comes
> into play. You can't actually take the hash and go back to the
> password; what you have to do is try lots of passwords and find one
> that has the right hash.
> Python has a data structure that lets you store keys and values, and
> then see whether the key you're looking for is there. See if you can
> use that.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list