A simple MD5 cracker

Go down

A simple MD5 cracker

Post  cyberhunter on Sun May 25, 2008 10:37 pm

This one cracks using a wordlist. It loads the whole wordlist into memory first so that the pogram runs faster. So it is not suitable for larger wordlists.
Code:

<?php
if(isset($HTTP_POST_VARS['crack']))
{
   $wordlist = file_get_contents("password.lst");
   if(!$wordlist){echo "Error opening wordlist!!";exit;}
   $word=strtok($wordlist,"\n");
   $hash=$HTTP_POST_VARS['hash'];
   $result = preg_match("/^[a-zA-Z0-9=]+$/i",$hash);
   if(strlen($hash)!=32 || $result==false ){echo "Invalid hash!!";exit;}
   $flag=0;
   while($word)
   {
      if(md5(trim($word))==$hash)
      {
         $flag=1;break;
      }
      $word = strtok("\n");
   }
   if($flag)
      echo "Hash cracked!!\nPassword : $word";
   else
      echo "Hash not found!!";
}
?>
<html>
<body>
<form action="md5crack.php" method="POST">
<fieldset>
<legend>MD5 Hash Cracker</legend>
Hash to crack : <input type="edit" name="hash" />
<input type="hidden" name="crack" value="1" />
<input type="submit" value="Submit" />
</fieldset>
</form>
Code by thomasantony :D
</body>
</html>
avatar
cyberhunter
Info Cracker
Info Cracker

Posts : 201
Join date : 2008-03-12
Age : 34
Location : In your computer

View user profile http://www.infofreakz.co.cc

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum