Sauce Code
Banned.
Hia guys this is the first tool i made using python im still new to it so please dont hate
it can decrypt MD5, Hex And Base64
it can decrypt MD5, Hex And Base64
Code:
# Welcome to Sauce Code's You can encrypt/decrypt: Hexadecimal, MD5 and Base64.
# This program was created for educational purposes only. I (author) am not responsible for misuse.
# Written on 8/02/13
# Debugged on 9/02/13
import hashlib, urllib2 , urllib, sys
def start():
print '-' * 40
print "Welcome to Sauce Code's Cracker Tool"
print '-' * 40
print "Would you like to:"
print "\t1. Work with Hexadecimal."
print "\t2. Work with MD5."
print "\t3. Work with Base64.\n"
choice = raw_input("> ")
if choice == "1":
hex()
elif choice == "2":
md5Hash()
elif choice == "3":
base64()
else:
print "Enter 1, 2 or 3, idiot."
start()
def hex():
print "Hexadecimal to string (1) or string to hexadecimal (2)?"
i = raw_input("> ")
if i == "1":
toStr = raw_input("Enter hex string: ").decode("hex")
print "Ascii string = %s" % toStr
finish()
elif i == "2":
toHex = raw_input("Enter string: ").encode("hex")
print "Hexadecimal string = %s" % toHex
finish()
else:
print "Enter 1 or 2, idiot."
hexConverter()
def md5Hash():
print "String to MD5 (1) or MD5 to String (2)?"
print "*You may need to allow a firewall exception when prompt*"
i = raw_input("> ")
if i == "1":
toStr = hashlib.md5(raw_input("Enter string: ")).hexdigest()
print "MD5 hash = %s" % toStr
finish()
elif i == "2":
url = "[url]http://md5.my-addr.com/md5_decrypt-md5_cracker_online/md5_decoder_tool.php[/url]"
md5 = str(raw_input("Enter MD5 hash: "))
data = {'md5': md5}
data = urllib.urlencode(data)
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
oldStr = response.readlines()[161] # Line in html where response is
newStr = oldStr.replace("</div>", " ") # Chopping up line
hash = newStr[77:] # Chop it more
if hash == "":
print "Sorry, no matches in database."
finish()
else:
print "Ascii string = %s" % hash
finish()
else:
print "Enter 1 or 2, idiot."
md5Hash()
def base64():
print "Base64 to string (1) or string to Base64 (2)?"
i = raw_input("> ")
if i == "1":
toStr = raw_input("Enter Base64 string: ").decode("base64")
print "Ascii string = %s" % toStr
finish()
elif i == "2":
toB64 = raw_input("Enter Ascii string: ").encode("base64")
print "Base64 string = %s" % toB64
finish()
else:
print "Enter 1 or 2, idiot."
base64()
def finish():
print "\nType 'restart' to restart program or 'quit' to exit."
e = raw_input("> ")
if e == "restart":
start()
elif e == "quit":
exit(0)
else:
finish()
start() # Let it begin...