sQuo Posted March 2, 2014 Share Posted March 2, 2014 [LENGUAJE=php]<?php/*HashcrackerAuthor: Slarek*/?>The hash you wish to crackYour wordlist's location Hash type:<?phpforeach(hash_algos() as $algo){ echo "{$algo} ";}?> <?phpif(isset($_POST["hash"], $_POST["pwlist"], $_POST["type"]) && $_POST["hash"] != "" && $_POST["pwlist"] != ""){ set_time_limit(0); ini_set("memory_limit", "-1");//When handling bigger lists $hasharray = array();//other array shall stay plaintext and this array($hasharray) will be hashed $pwloc = $_POST["pwlist"]; $hash = $_POST["hash"]; $type = $_POST["type"]; $counter = 0; $content = file_get_contents($pwloc);//file instead of file_get_contents, i don't need to use explode $array = explode("\r\n", $content); $hasharray = $array;//copy the array's content into another array which values will be hashed foreach($hasharray as $value) { $hashedvalue = hash($type, $value); if($hashedvalue == $hash) { echo " Match found! Cracked hash: {$array[$counter]}"; break; } else { $counter++;//this helps us to find the correct word from the plaintext array if($counter == count($array)) { echo " Failed to crack the hash!"; } } }}?>[/LENGUAJE] Link to comment Share on other sites More sharing options...
Recommended Posts