tanmay606

Python MD5 Cracker Script [ 13lackDemOn ]

Mar 19th, 2015
568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.66 KB | None | 0 0
  1. """
  2.  FOR EDUCATIONAL PURPOSE ONLY
  3.  !/usr/bin/python
  4.  Python Script to Crack MD5 Hash Easily. [ P0C ]  
  5.  This was written for educational purpose and pentest only. Use it at your own risk.
  6.  Author will not be responsible for any damage !!
  7.   Toolname  : md5cracker script python
  8.  Type : 0ffline Cr@ck3R Script.
  9.   Programmer    : T@nmaY / 13lackD3Mon
  10.   Version   : 1.0
  11.   Date      : FRI FEB 27 13:24:44 WIT 2015
  12.  Platform : Windows All versions with PYTHON installed or you can make [.exe ] by Py2Exe :)
  13.  Facebook : tanmay606
  14.  Special thanks To G00Gl3.
  15.  
  16.  [_] Automatically save cracked hash in text file " CRACKED.txt ".
  17.  
  18. """
  19. try:
  20.  import time
  21.  __init__='\x69\x6d\x70\x6f\x72\x74\x20\x68\x61\x73\x68\x6c\x69\x62\x3b\x69\x6d\x70\x6f\x72\x74\x20\x6f\x73\x3b'
  22.  exec(__init__)
  23. except ImportError:
  24.  print "\n"
  25.  print "[ERROR]: You need HASHLIB and OS Module to run this script."
  26.  print "\n"
  27.  raw_input('Press Enter To Exit.')
  28.  exit(1)
  29. def banner():
  30.  os.system('title MD5 P@ssW0rd Cr@ck3R By: T@nmaY / 13lackD3Mon  [ Writt3n In : Pyth0n ] [ IDLE ]')
  31.  os.system('color a')
  32.  print "*******************************************************************************"
  33.  print "|>>        MD5 P@ssW0rd Cr@ck3R | Writt3n By : T@nmaY / 13lackD3Mon         <<|"
  34.  print "*******************************************************************************"
  35.  print "[!] Warning : I am not responsible for any harm done by this tool."
  36.  print "[!] NOTE : Only for Educational Purpose.\n"
  37. def crack():
  38.  os.system('title MD5 P@ssW0rd Cr@ck3R By: T@nmaY / 13lackD3Mon  [ Writt3n In : Pyth0n ] [ CRACKING HASH ]')
  39.  print "Please Wait Cracking Hash. . . .\n"
  40.  print "\n"
  41.  lenght = len(data)
  42.  for string in data:
  43.   lenght -= 1
  44.   no_whitespace = string.replace('\n','')
  45.   enc_string = hashlib.md5(no_whitespace).hexdigest()
  46.   if(enc_string==md5hash):
  47.    os.system('title MD5 P@ssW0rd Cr@ck3R By: T@nmaY / 13lackD3Mon  [ Writt3n In : Pyth0n ] [ HASH CRACKED ! ]')
  48.    os.system('color a')
  49.    print "\n[CRACKED] %s : [ %s ]"%(md5hash,no_whitespace)
  50.    cracked = open('CRACKED.txt','a+')
  51.    text = "\n[CRACKED] %s: [ %s ]"%(md5hash,no_whitespace)
  52.    text+="\n\n#13lackD3Mon"
  53.    cracked.write(text)
  54.    cracked.close()
  55.    raw_input("\nPress Enter To Exit.");
  56.    exit(1)
  57.   else:
  58.    print "[Attempt Left : %s] + trying word : %s"%(lenght,no_whitespace)
  59.  print "\n[Error] unable to decrypt hash with provided [WORDLIST]."
  60.  print "\n"
  61.  raw_input('Press Enter To Exit.')
  62. def work():
  63.  global data,lenght;
  64.  try:
  65.   file = open(dict_file)
  66.   data = file.readlines()
  67.   pass
  68.  except IOError:
  69.   print "\n[=] Error : Cant find < DICTIONARY FILE > ."
  70.   print "\n"
  71.   raw_input('Press Enter To Exit.');
  72.   exit(1);
  73.  if(len(md5hash) == 32):
  74.   try:
  75.    crack();
  76.   except KeyboardInterrupt:
  77.    print "\n Ctrl+C Pressed."
  78.    raw_input()
  79.    exit(1)
  80.  else:
  81.   print "\n[=] Error : Algorithm of md5 is not correct. [ Incorrect Hash ]"
  82.   print "\n"
  83.   raw_input('Press Enter To Restart.')
  84. while True:
  85.  os.system('cls')
  86.  banner();
  87.  dict_file = raw_input('[>] Drag dictionary file : ');
  88.  md5hash = raw_input('[>] Enter Hash : ');
  89.  if(dict_file=='' and md5hash==''):
  90.   print "\n[=] Error : Empty Dictionary file. Please Put One File."
  91.   print "[=] Error : Empty Hash."
  92.   print "\n"
  93.   raw_input('Press Enter To Restart.');
  94.  elif(dict_file==''):
  95.   print "\n[=] Error : Empty Dictionary file. Please Put One File."
  96.   print "\n"
  97.   raw_input('Press Enter To Restart.');
  98.  elif(md5hash==''):
  99.   print "[=] Error : Empty Hash."
  100.   print "\n"
  101.   raw_input('Press Enter To Restart.');
  102.  else:
  103.   try:
  104.    work();
  105.   except KeyboardInterrupt:
  106.    print " Ctrl+C Pressed."
  107.    exit(1)
  108. #13lackD3Mon.
Add Comment
Please, Sign In to add comment