tanmay606

Python MD5 Cracker Script [ 13lackDemOn ]

Mar 19th, 2015
522
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.  Email : kevinmetnik606@gmail.com
  13.  Platform : Windows All versions with PYTHON installed or you can make [.exe ] by Py2Exe :)
  14.  Facebook : tanmay606
  15.  Special thanks To G00Gl3.
  16.  
  17.  [_] Automatically save cracked hash in text file " CRACKED.txt ".
  18.  
  19. """
  20. try:
  21.  import time
  22.  __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'
  23.  exec(__init__)
  24. except ImportError:
  25.  print "\n"
  26.  print "[ERROR]: You need HASHLIB and OS Module to run this script."
  27.  print "\n"
  28.  raw_input('Press Enter To Exit.')
  29.  exit(1)
  30. def banner():
  31.  os.system('title MD5 P@ssW0rd Cr@ck3R By: T@nmaY / 13lackD3Mon  [ Writt3n In : Pyth0n ] [ IDLE ]')
  32.  os.system('color a')
  33.  print "*******************************************************************************"
  34.  print "|>>        MD5 P@ssW0rd Cr@ck3R | Writt3n By : T@nmaY / 13lackD3Mon         <<|"
  35.  print "*******************************************************************************"
  36.  print "[!] Warning : I am not responsible for any harm done by this tool."
  37.  print "[!] NOTE : Only for Educational Purpose.\n"
  38. def crack():
  39.  os.system('title MD5 P@ssW0rd Cr@ck3R By: T@nmaY / 13lackD3Mon  [ Writt3n In : Pyth0n ] [ CRACKING HASH ]')
  40.  print "Please Wait Cracking Hash. . . .\n"
  41.  print "\n"
  42.  lenght = len(data)
  43.  for string in data:
  44.   lenght -= 1
  45.   no_whitespace = string.replace('\n','')
  46.   enc_string = hashlib.md5(no_whitespace).hexdigest()
  47.   if(enc_string==md5hash):
  48.    os.system('title MD5 P@ssW0rd Cr@ck3R By: T@nmaY / 13lackD3Mon  [ Writt3n In : Pyth0n ] [ HASH CRACKED ! ]')
  49.    os.system('color a')
  50.    print "\n[CRACKED] %s : [ %s ]"%(md5hash,no_whitespace)
  51.    cracked = open('CRACKED.txt','a+')
  52.    text = "\n[CRACKED] %s: [ %s ]"%(md5hash,no_whitespace)
  53.    text+="\n\n#13lackD3Mon"
  54.    cracked.write(text)
  55.    cracked.close()
  56.    raw_input("\nPress Enter To Exit.");
  57.    exit(1)
  58.   else:
  59.    print "[Attempt Left : %s] + trying word : %s"%(lenght,no_whitespace)
  60.  print "\n[Error] unable to decrypt hash with provided [WORDLIST]."
  61.  print "\n"
  62.  raw_input('Press Enter To Exit.')
  63. def work():
  64.  global data,lenght;
  65.  try:
  66.   file = open(dict_file)
  67.   data = file.readlines()
  68.   pass
  69.  except IOError:
  70.   print "\n[=] Error : Cant find < DICTIONARY FILE > ."
  71.   print "\n"
  72.   raw_input('Press Enter To Exit.');
  73.   exit(1);
  74.  if(len(md5hash) == 32):
  75.   try:
  76.    crack();
  77.   except KeyboardInterrupt:
  78.    print "\n Ctrl+C Pressed."
  79.    raw_input()
  80.    exit(1)
  81.  else:
  82.   print "\n[=] Error : Algorithm of md5 is not correct. [ Incorrect Hash ]"
  83.   print "\n"
  84.   raw_input('Press Enter To Restart.')
  85. while True:
  86.  os.system('cls')
  87.  banner();
  88.  dict_file = raw_input('[>] Drag dictionary file : ');
  89.  md5hash = raw_input('[>] Enter Hash : ');
  90.  if(dict_file=='' and md5hash==''):
  91.   print "\n[=] Error : Empty Dictionary file. Please Put One File."
  92.   print "[=] Error : Empty Hash."
  93.   print "\n"
  94.   raw_input('Press Enter To Restart.');
  95.  elif(dict_file==''):
  96.   print "\n[=] Error : Empty Dictionary file. Please Put One File."
  97.   print "\n"
  98.   raw_input('Press Enter To Restart.');
  99.  elif(md5hash==''):
  100.   print "[=] Error : Empty Hash."
  101.   print "\n"
  102.   raw_input('Press Enter To Restart.');
  103.  else:
  104.   try:
  105.    work();
  106.   except KeyboardInterrupt:
  107.    print " Ctrl+C Pressed."
  108.    exit(1)
  109. #13lackD3Mon.
Add Comment
Please, Sign In to add comment