Hack Forums
[Python] Python MD5 Cracker - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Python MD5 Cracker (/showthread.php?tid=5161882)



Python MD5 Cracker - emadaldin1 - Feb 7, 2016

This is very simple code I wrote in python
I started last night and had so many errors
most of it was the result of
Code
IndentationError: expected an indented block
python will give you this error if you even forget to add or remove space and I did get help from here too :D
just thought I can share it here with you guys
Code
import hashlib
def md5hash(data):
    a = ""
    m = hashlib.md5()
    m.update(data)
    a = m.hexdigest()
    return a
try:
    with open('worldlist.txt') as file:
        pass
except IOError as e:
    print "Unable to find file worldlist.txt"
    exit()
link = raw_input("enter hash name :" )
with open("worldlist.txt") as f:
    for line in f:
        text = line.rstrip()
        md5hash(text)
        if link == md5hash(text):
            print("pass: {}, hash: {}".format(text, link))
            break
        else:
            print md5hash(text)
            print("Does not match.")
how to use
go to
Code
https://hashkiller.co.uk/downloads.aspx
you can download any of these wordlist from the site
Code
Wordlists:     HashKiller Passwords [114MB] Updated daily
      HashKiller Output Wordlist [144MB / 511MB]
      human0id - Passwords, Security and Other Stuff
      PsycOPacKv2 [1.4GB / 5.36GB]
now make sure before you run the file
to rename the wordlist to
Code
worldlist.txt
second run the project
paste your md5 code that you have
and if the project cracked the hash from the world list file
then it will show you something like this
Code
pass: userlogin.%EXT%, hash: 8b952b51f41b730446faad05c200fea8
enjoy
0_0


* - @beef - Feb 7, 2016

I'm not being rude but if you struggled so much with that simple error then I doubt you coded this and you probably copied and pasted it from somewhere.


* - emadaldin1 - Feb 7, 2016

(Feb 7, 2016 08:57 AM)@B33F Wrote:  I'm not being rude but if you struggled so much with that simple error then I doubt you coded this and you probably copied and pasted it from somewhere.

ouch that did hurt 0_0 lol
such pain to work hard :(
and then someone tell you that you copied and pasted it from somewhere
Nope 0_0
man I struggled with that error and other errors too and there no shame admitting it since this is my second project in python
but thanks anyway 0_0
I'm not being rude but you are rude 0_0


* - @beef - Feb 7, 2016

(Feb 7, 2016 09:16 AM)emadaldin1 Wrote:  ouch that did hurt 0_0 lol
such pain to work hard :(
and then someone tell you that you copied and pasted it from somewhere
Nope 0_0
man I struggled with that error and other errors too and there no shame admitting it since this is my second project in python
but thanks anyway 0_0
I'm not being rude but you are rude 0_0

If its your second project then that's impressive. Nice


* - emadaldin1 - Feb 7, 2016

Thanks you very much
but I'm still new and I think this code is very simple
well I would really like to hear some comments about the project
and if it equires a lot of more work
what can be made better or etc
let me hear your opinions :D
thanks