Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
D4rk-cracker : A md5 cracker in Python
  • D4rk357
    Posts: 34
    This is my first code in python .. i have worked upon handling unexpected requests and a good format in which the information will be printed .
    This tool can easily be expanded by adding more online md5 crack resources .

    #!/usr/bin/python

    # D4rk-cracker-- A small python code for MD5 cracking
    # Coded By D4rk357[2010]


    import urllib,urllib2, re,sys,cookielib
    from socket import*

    if len(sys.argv) != 2:
    print \"\n|-----------------------------------------------------------------|\"
    print \"| lastman100[@]gmail[dot]com |\"
    print \"| 10/2010 MD 5 Cracker v0.1 |\"
    print \"| Visit : www.garage4hackers.com |\"
    print \"|-----------------------------------------------------------------|\n\"

    mhash= raw_input('please enter the hash to crack :')
    params = urllib.urlencode({'term':mhash})
    f=urllib.urlopen(\"http://md5crack.com/crackmd5.php\", params)
    tas= f.read()
    link=re.compile('Found: md5'+'\S+'+'\s+'+'\S+'+'\s+'+'\w+')

    if link.search(tas):
    a= link.search(tas).group()
    print(\"[+]cracking...\n \n[+]Hash Cracked from md5crack.com \n\")
    print a.strip('[Found,:]')
    else:
    print \"[+] Hash not found on md5crack.com\n\"



    params=urllib.urlencode({'oc_check_md5':mhash})
    f=urllib.urlopen(\"http://opencrack.hashkiller.com/\",params)
    tas=f.read()
    link=re.compile('result'+'.*'+'\S')
    if link.search(tas):
    a= link.search(tas).group()
    print(\"\n[+]Hash Cracked from hashkiller.com \n\")
    print a.strip('[result,\",>,<br/>]')
    else:
    print \"[+] \nHash not found on hashkiller.com\n\"

    params=urllib.urlencode({'search_field':mhash})
    f=urllib.urlopen(\"http://hashchecker.com/index.php?_sls=search_hash\",params)
    tas=f.read()
    link=re.compile('Your md5 hash is :'+'\S+'+'\s+'+'\S+'+'\s+'+'\S+')

    if link.search(tas):
    a= link.search(tas).group()
    print(\"\n[+]Hash Cracked from hashchecker.com \n\")
    print a.strip('[Your md5 hash is :,<br>,<li>,<b>,</b>]')
    else:
    print \"[+] \nHash not found on hashchecker.com\n\"


    http://img337.imageshack.us/img337/3289/desktop2f.png[/code]
  • Xin
    Posts: 3,251
    Good job, very very useful :)
    Xin
  • D4rk357
    Posts: 34
    said:


    Good job, very very useful :)



    Thanks Man .. Cheers .... :)
  • Bursihido
    Posts: 406
    THanks GOod job bhai :)
  • D4rk357
    Posts: 34
    said:


    THanks GOod job bhai :)



    Cheers mate :)
  • D4rk357
    Posts: 34
    said:


    nice work yaar.....:D



    Thanks Man :)
  • Sh3llc0d3
    Posts: 1,910
    Nice coding D4rk, i'm looking at making a similar thing soon in perl :)

    Does it have a good success rate on getting hashes found?
  • D4rk357
    Posts: 34
    said:


    Nice coding D4rk, i'm looking at making a similar thing soon in perl :)

    Does it have a good success rate on getting hashes found?



    Yes quite good . If we add some more online repositories then if this tool doesnt find hash no one will on the whole internet :D .
    Then only thing left will be bruteforcing :)
  • sangf
    Posts: 203
    this was pretty cool, the hashkiller part seems not to be fully working though; i've had some instances where it informs success, but actually failed (at those times it outputs <notfound> with some html tags). i like how small the code is for parsing 3 sites because of regex, pretty neat but totally spagetti like. also, there is an error by default because either you or the forum added some inconsistant indents before printing the header. no point in importing everything from sockets if you don't use it too, lol. and one last thing, i think it'd be much more usable if you made it pass by argument, instead of asking the user to type the hash. i can much rather see myself typing: python md5.py 5d41402abc4b2a76b9719d911017c592. perhaps you could have an option for both types of input depending on if there was a single 32 character parameter, or not.
  • D4rk357
    Posts: 34
    said:


    this was pretty cool, the hashkiller part seems not to be fully working though; i've had some instances where it informs success, but actually failed (at those times it outputs <notfound> with some html tags). i like how small the code is for parsing 3 sites because of regex, pretty neat but totally spagetti like. also, there is an error by default because either you or the forum added some inconsistant indents before printing the header. no point in importing everything from sockets if you don't use it too, lol. and one last thing, i think it'd be much more usable if you made it pass by argument, instead of asking the user to type the hash. i can much rather see myself typing: python md5.py 5d41402abc4b2a76b9719d911017c592. perhaps you could have an option for both types of input depending on if there was a single 32 character parameter, or not.



    Thanks for the input man .. + repped you .. i like constructive criticism which help me improves my codes :)