Advertisement
m3gahootz

PYTHON MD5 HASH CRACKER .

Dec 14th, 2013
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.42 KB | None | 0 0
  1.  
  2. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  3.  
  4. M3GAHOOTZ
  5. fb.com/hooti667
  6. twitter/megahootz
  7. youtube.com/m3gahootz
  8.  
  9. //////////////////////////////////////////////////////////////////////////////////////////////////////
  10.  
  11. #########################################################################################
  12. # PYTHON FILE .
  13. # MD5 CracKeR .
  14. # Author : M3GAHOOTZ .
  15. # Sharing its CarinG .
  16. ##########################################################################################
  17.  
  18. --------------------------------------------------------------------------------------------------------------
  19.  
  20. #!/usr/bin/python
  21. # This was written for educational purpose only. Use it at your own risk.
  22. # Author will be not responsible for any damage!
  23. #
  24. #################################################################
  25. # < MD5 Cracker v1.0 > #
  26. # <Coded by M3GAHOOTZ> #
  27. # <fb.com/hooti667> #
  28. # <30/10/2013> #
  29. #################################################################
  30.  
  31. import sys
  32. import time
  33. import urllib2
  34. import urllib
  35. import re
  36. import hashlib
  37.  
  38. if len(sys.argv) < 2:
  39. print '\nUsage:'
  40. print '\t%s --online [hash..] ' % sys.argv[0]
  41. print '\t%s --offline [hash..] [dictionary..]' % sys.argv[0]
  42. sys.exit(1)
  43.  
  44. def banner():
  45. print '''
  46.  
  47. #################################################################
  48. # < MD5 Cracker v1.0 > #
  49. # <Coded by M3GAHOOTZ> #
  50. # <fb.com/hooti667> #
  51. # <30/10/2013> #
  52. #################################################################
  53. | [#] MD5 Hash Cracker (online | offline) |
  54. | [#] Facebook page: http://www.facebook.com/hooti667 |
  55. | [#] Written by: #M3GAHOOTZ's |
  56. --------------------------------------------------------/
  57.  
  58. '''
  59.  
  60. option = sys.argv[1]
  61. passwd = sys.argv[2]
  62.  
  63. if option == '--online':
  64. if len(passwd) != 32:
  65. print '\n[*] Error: "%s" doesn\'t seem to be a valid MD5 hash "32 bit hexadecimal"' % passwd
  66. else:
  67. try:
  68. banner()
  69. def myaddr():
  70. site = 'http://md5.my-addr.com/'
  71. rest = 'md5_decrypt-md5_cracker_online/md5_decoder_tool.php'
  72. para = urllib.urlencode({'md5':passwd})
  73. req = urllib2.Request(site+rest)
  74. try:
  75. fd = urllib2.urlopen(req, para)
  76. data = fd.read()
  77. match= re.search('(Hashed string</span>: )(\w+.\w+)', data)
  78. if match: print '[-] site: %s\t\t\tPassword: %s' % (site, match.group(2))
  79. else: print '[-] site: %s\t\t\tPassword: Not found' % site
  80. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error: seems to be down' % site
  81. myaddr()
  82.  
  83. def victorov():
  84. try:
  85. site = 'http://www.victorov.su/'
  86. para = 'md5/?md5e=&md5d=%s' % passwd
  87. req = urllib2.Request(site+para)
  88. req.add_header
  89. opener = urllib2.urlopen(req)
  90. data = opener.read()
  91. match = re.search('(<b>)(.+[^>])(</b>)', data)
  92. if match: print '[-] site: %s\t\t\tPassword: %s' % (site, match.group(2))
  93. else: print '[-] site: %s\t\t\tPassword: Not found' % site
  94. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error: seems to be down' % site
  95. victorov()
  96.  
  97. def md5crack():
  98. site = 'http://www.md5crack.com/'
  99. rest = 'crackmd5.php'
  100. para = urllib.urlencode({'term':passwd})
  101. req = urllib2.Request(site+rest)
  102. try:
  103. fd = urllib2.urlopen(req, para)
  104. data = fd.read()
  105. match = re.search('(Found: md5)(..)(\w+.\w+)', data)
  106. if match: print '[-] site: %s\t\t\tPassword: %s' % (site, match.group(3))
  107. else: print '[-] site: %s\t\t\tPassword: Not found' % site
  108. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error seems to be down' % site
  109. md5crack()
  110.  
  111.  
  112. def rednoize():
  113. site = 'http://md5.rednoize.com/'
  114. para = 'p&s=md5&q=%s&_=' % passwd
  115. try:
  116. req = urllib2.urlopen(site+'?'+para)
  117. data = req.read()
  118. if not len(data): print '[-] site: %s\t\t\tPassword: Not found' %site
  119. else: print '[-] site: %s\t\t\tPassword: %s' % (site, data)
  120. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error: seems to be down' % site
  121. rednoize()
  122.  
  123. def md5pass():
  124. site = 'http://www.md5pass.info/'
  125. para = urllib.urlencode({'hash':passwd, 'get_pass':'Get+Pass'})
  126. req = urllib2.Request(site)
  127. try:
  128. fd = urllib2.urlopen(req, para)
  129. data = fd.read()
  130. match = re.search('(Password - <b>)(\w+)', data)
  131. if match: print '[-] site: %s\t\t\tPassword: %s' % (site, match.group(2))
  132. else: print '[-] site: %s\t\t\tPassword: Not found' % site
  133. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error: seems to be down' % site
  134. md5pass()
  135.  
  136. def md5decryption():
  137. site = 'http://md5decryption.com/'
  138. para = urllib.urlencode({'hash':passwd,'submit':'Decrypt+It!'})
  139. req = urllib2.Request(site)
  140. try:
  141. fd = urllib2.urlopen(req, para)
  142. data = fd.read()
  143. match = re.search(r'(Decrypted Text: </b>)(.+[^>])(</font><br/><center>)', data)
  144. if match: print '[-] site: %s\t\t\tPassword: %s' % (site, match.group(2))
  145. else: print '[-] site: %s\t\t\tPassword: Not found' % site
  146. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error: seems to be down' % site
  147. md5decryption()
  148.  
  149.  
  150. def bigtrapeze():
  151. site = 'http://www.bigtrapeze.com/'
  152. rest = 'md5/index.php?query=%s' % passwd
  153. req = urllib2.Request(site+rest)
  154. req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.2)\
  155. Gecko/20100316 AskTbSPC2/3.9.1.14019 Firefox/3.6.2')
  156. try:
  157. opener = urllib2.build_opener()
  158. data = opener.open(req).read()
  159. match = re.search('(=> <strong>)(\w+.\w+)', data)
  160. if match: print '[-] site: %s\t\t\tPassword: %s' % (site, match.group(2))
  161. else: print '[-] site: %s\t\t\tPassword: Not found' % site
  162. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error: seems to be down' % site
  163. bigtrapeze()
  164.  
  165. def cloudcracker():
  166. site = 'http://www.netmd5crack.com/'
  167. para = 'cgi-bin/Crack.py?InputHash=%s' % passwd
  168. try:
  169. req = urllib.urlopen(site+para)
  170. data = req.read()
  171. match = re.search(r'<tr><td class="border">[^<]+</td><td class="border">\
  172. (?P<hash>[^>]+)</td></tr></tbody></table>', data)
  173. if match: print '[-] site: %s\t\t\tPassword: %s' % (site, match.group(hash))
  174. else: print '[-] site: %s\t\t\tPassword: Not found' % site
  175. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error: seems to be down' % site
  176. cloudcracker()
  177.  
  178.  
  179. def hashcracking():
  180. site = 'http://md5.hashcracking.com/'
  181. rest = 'search.php'
  182. para = 'md5=%s' % passwd
  183. try:
  184. req = urllib2.urlopen(site+rest+'?'+para)
  185. data = req.read()
  186. match = re.search('(is)(.)(\w+.\w+)', data)
  187. if match: print '[-] site: %s\t\t\tPassword: %s' % (site, match.group(3))
  188. else: print '[-] site: %s\t\t\tPassword: Not found' % site
  189. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error: seems to be down' % site
  190. hashcracking()
  191.  
  192. def cloudcracker():
  193. site = 'http://www.cloudcracker.net/'
  194. para = urllib.urlencode({'inputbox':passwd, 'submit':'Crack+MD5+Hash!'})
  195. req = urllib2.Request(site)
  196. try:
  197. fd = urllib2.urlopen(req, para)
  198. data = fd.read()
  199. match = re.search('(this.select)(....)(\w+=")(\w+.\w+)', data)
  200. if match: print '[-] site: %s\t\t\tPassword: %s\n' % (site, match.group(4))
  201. else: print '[-] site: %s\t\t\tPassword: Not found\n' % site
  202. except urllib2.URLError: print '[+] site: %s \t\t\t[+] Error: seems to be down' % site
  203. cloudcracker()
  204. except KeyboardInterrupt: print '\nTerminated by user ...'
  205.  
  206. elif option == '--offline':
  207. banner()
  208. try:
  209. def offline():
  210. print '[+] This opertaion will take some time, be patient ...'
  211. dictionary = sys.argv[3]
  212. dic = {}
  213. shooter = 0
  214. try:
  215. f = open(dictionary, 'rb')
  216. start = time.time()
  217. for line in f:
  218. line = line.rstrip()
  219. dic[line] = hashlib.md5(line).hexdigest()
  220. for k in dic.keys():
  221. if passwd in dic[k]:
  222. stop = time.time()
  223. global spent
  224. spent = stop - start
  225. print '\n[-] Hash: %s\t\tData: %s\t\tTime: %.f seconds' % (dic[k], k, spent)
  226. shooter += 1
  227. if shooter == 0: print "\n[*]Password not found in [%s] try the online cracker\n" % dictionary
  228. f.close()
  229. except IOError: print '\n[*] Erorr: %s doesn\'t exsit \n' % dictionary
  230. offline()
  231. except KeyboardInterrupt: print '\nTerminated by user ...'
  232.  
  233. else: pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement