Jump to content

Recommended Posts

Posted

"""
md5pybrute
----------
plain retarded `bruteforcer' for md5
based on a dictionary
----------
Usage:
BruteHash(hash, dictionary).start()
"""

import hashlib
import threading


class BruteHash(threading.Thread):
""" theaded worker """
def __init__(self, uhash, filename):
self.uhash = uhash
self.filename = filename
try:
self.filehandler = open(self.filename, "r", encoding="utf-8")
except FileNotFoundError:
print("No such file, exiting.")
exit(1)
except IsADirectoryError:
print("No directories, files only.")
exit(1)
else:
self.lines = self.filehandler.readlines()
threading.Thread.__init__(self)
def run(self):
for line in self.lines:
line = line.replace("\n", "").encode("utf-8")
thash = hashlib.md5(line).hexdigest()
if thash == self.uhash:
print("Found a match!\n", line.decode())
exit()

otjidm.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...