Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # @Author: yoavmmn
- # @Date: 01-02-2017 22:58
- # @Last modified by: yoavmmn
- # @Last modified time: 01-02-2017 23:21
- # solving riddle.website login
- import threading, time, random, sys
- import hashlib
- from string import letters, digits
- from itertools import product
- strs = digits + letters
- if len(sys.argv) !=1:
- print "Usage: ./md5brute.py"
- sys.exit(1)
- final_md5 = "8e16941e6d51be408459221a1c905eda"
- username = "PoliC3"
- const = "allwa7"
- expression = username + const
- flag = False
- print "\n\t MD5 Bruteforce finder"
- print "\t--------------------------------------------------\n"
- print "[+] User:",username
- class Worker(threading.Thread):
- def run(self):
- global success
- flag = False
- try:
- for i in range(10):
- for per in product(strs, repeat = i):
- md5 = hashlib.md5()
- value = ''.join(per)
- current = md5.update(expression+value)
- print "-"*12
- print "Tested string: %s" % ("PoliC3allwa7"+value)
- print "current MD5:", md5.hexdigest()
- if md5.hexdigest() == final_md5:
- success = value
- flag = True
- time.sleep(2)
- try:
- print "\n\n\t[+] Found hash: %s md5(%s): %s" % (expression, expression, fixed_md5)
- print "\t[+] Found Password"
- print "\t[+] User:",username," Password:",success
- except(NameError):
- print "\n\t[+] Couldn't find correct password"
- pass
- print "\n\t[+] Done\n"
- sys.exit(1)
- except(RuntimeError), msg:
- pass
- for i in range(1):
- work = Worker()
- work.start()
- time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement