# -*- coding: iso-8859-1 -*- ######################################################################################################## ### LICENSE ######################################################################################################## # # findmyhash.py - v 1.1.2 # # This script is under GPL v3 License (http://www.gnu.org/licenses/gpl-3.0.html). # # Only this source code is under GPL v3 License. Web services used in this script are under # different licenses. # # If you know some clause in one of these web services which forbids to use it inside this script, # please contact me to remove the web service as soon as possible. # # Developed by JulGor ( http://laxmarcaellugar.blogspot.com/ ) # Mail: bloglaxmarcaellugar AT gmail DOT com # twitter: @laXmarcaellugar # ######################################################################################################## ### IMPORTS ######################################################################################################## try: import sys import hashlib import urllib2 import getopt from os import path from urllib import urlencode from re import search, findall from random import seed, randint from base64 import decodestring, encodestring from cookielib import LWPCookieJar except: print """ Execution error: You required some basic Python libraries. This application use: sys, hashlib, urllib, urllib2, os, re, random, getopt, base64 and cookielib. Please, check if you have all of them installed in your system. """ sys.exit(1) try: from httplib2 import Http except: print """ Execution error: The Python library httplib2 is not installed in your system. Please, install it before use this application. """ sys.exit(1) try: from libxml2 import parseDoc except: print """ Execution error: The Python library libxml2 is not installed in your system. Because of that, some plugins aren't going to work correctly. Please, install it before use this application. """ ######################################################################################################## ### CONSTANTS ######################################################################################################## MD4 = "md4" MD5 = "md5" SHA1 = "sha1" SHA224 = "sha224" SHA256 = "sha256" SHA384 = "sha384" SHA512 = "sha512" RIPEMD = "rmd160" LM = "lm" NTLM = "ntlm" MYSQL = "mysql" CISCO7 = "cisco7" JUNIPER = "juniper" GOST = "gost" WHIRLPOOL = "whirlpool" LDAP_MD5 = "ldap_md5" LDAP_SHA1 = "ldap_sha1" USER_AGENTS = [ "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 1.0.5)", "curl/7.7.2 (powerpc-apple-darwin6.0) libcurl 7.7.2 (OpenSSL 0.9.6b)", "Mozilla/5.0 (X11; U; Linux amd64; en-US; rv:5.0) Gecko/20110619 Firefox/5.0", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0b8pre) Gecko/20101213 Firefox/4.0b8pre", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) chromeframe/10.0.648.205", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)", "Opera/9.80 (Windows NT 6.1; U; sv) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 6.1; U; pl) Presto/2.7.62 Version/11.00", "Opera/9.80 (X11; Linux i686; U; pl) Presto/2.6.30 Version/10.61", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.861.0 Safari/535.2", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.872.0 Safari/535.2", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.812.0 Safari/535.1", "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" ] ######################################################################################################## ### CRACKERS DEFINITION ######################################################################################################## class SCHWETT: name = "schwett" url = "http://schwett.com" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://schwett.com/md5/index.php?md5value=%s&md5c=Hash+Match" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response html = None if response: html = response.read() else: return None match = search (r"

No Match Found


", html) if match: return None else: return "The hash is broken, please contact with La X marca el lugar and send it the hash value to add the correct regexp." class NETMD5CRACK: name = "netmd5crack" url = "http://www.netmd5crack.com" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://www.netmd5crack.com/cgi-bin/Crack.py?InputHash=%s" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response html = None if response: html = response.read() else: return None regexp = r'%s[^<]*' % (hashvalue) match = search (regexp, html) if match: match2 = search ( "Sorry, we don't have that hash in our database", match.group() ) if match2: return None else: return match.group().split('border')[2].split('<')[0][2:] class MD5_CRACKER: name = "md5-cracker" url = "http://www.md5-cracker.tk" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://www.md5-cracker.tk/xml.php?md5=%s" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response if response: try: doc = parseDoc ( response.read() ) except: print "INFO: You need libxml2 to use this plugin." return None else: return None result = doc.xpathEval("//data") if len(result): return result[0].content else: return None class BENRAMSEY: name = "benramsey" url = "http://tools.benramsey.com" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://tools.benramsey.com/md5/md5.php?hash=%s" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response html = None if response: html = response.read() else: return None match = search (r'', html) if match: return match.group().split(']')[0][17:] else: return None class GROMWEB: name = "gromweb" url = "http://md5.gromweb.com" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://md5.gromweb.com/query/%s" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response if response: return response.read() return response class HASHCRACKING: name = "hashcracking" url = "http://md5.hashcracking.com" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://md5.hashcracking.com/search.php?md5=%s" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response html = None if response: html = response.read() else: return None match = search (r'\sis.*', html) if match: return match.group()[4:] return None class VICTOROV: name = "hashcracking" url = "http://victorov.su" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://victorov.su/md5/?md5e=&md5d=%s" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response html = None if response: html = response.read() else: return None match = search (r': [^<]*
', html) if match: return match.group().split('b>')[1][:-2] return None class THEKAINE: name = "thekaine" url = "http://md5.thekaine.de" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://md5.thekaine.de/?hash=%s" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response html = None if response: html = response.read() else: return None match = search (r'

[^<]*', html) if match: match2 = search (r'not found', match.group() ) if match2: return None else: return match.group().split('b>')[1][:-2] class TMTO: name = "tmto" url = "http://www.tmto.org" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://www.tmto.org/api/latest/?hash=%s&auth=true" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response html = None if response: html = response.read() else: return None match = search (r'text="[^"]+"', html) if match: return decodestring(match.group().split('"')[1]) else: return None class MD5_DB: name = "md5-db" url = "http://md5-db.de" supported_algorithm = [MD5] def isSupported (self, alg): """Return True if HASHCRACK can crack this type of algorithm and False if it cannot.""" if alg in self.supported_algorithm: return True else: return False def crack (self, hashvalue, alg): """Try to crack the hash. @param hashvalue Hash to crack. @param alg Algorithm to crack.""" # Check if the cracker can crack this kind of algorithm if not self.isSupported (alg): return None # Build the URL url = "http://md5-db.de/%s.html" % (hashvalue) # Make the request response = do_HTTP_request ( url ) # Analyze the response if not response: return None html = None if response: html = response.read() else: return None match = search (r'Es wurden 1 m.gliche Begriffe gefunden, die den Hash \w* verwenden: