Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Web-Based Hash Cracker (Based off Hashcat)

Hey guys. I coded this earlier today. It's nothing special, but it's useful nonetheless. Obviously, this requires hashcat and a little modification. You'll have to specify the paths to your hash and your wordlist.

Code
<!DOCTYPE HTML>
<html>
<body>
<center>

    <form action="" method="post">
    Hash:<br><input type="text" name="hash"><br><br>
    <input type="submit">
    </form>

    <br>
    <br>

<?php

if(isset($_POST["hash"])) {

    $hash = $_POST["hash"];

    $filename = rand(1, 100);
    $handle = fopen($filename, "w");
    fwrite($handle, $hash);
    fclose($handle);

    $crackhash = shell_exec("hashcat -a 0 -m 0 /opt/lampp/htdocs/$filename /home/jared/Documents/passwords/output.txt"); // SPECIFY HASH LOCATION AND WORDLIST LOCATION
    preg_match_all("#$hash:(.*)\s#", $crackhash, $output);
    if($output[1][0] != NULL)
        echo "Password is: <font color='green'><b>" . @$output[1][0] . "</b></font>";

    else
        echo "<font color='red'><b>Password was not found.</b></font>";

    exec("rm $filename");

}

?>

</center>
</body>
</html>
Im pretty sure the PHP application would timeout before the hash is cracked.
Im not sure tho.

you could have it post the hash, then add the hash to the users hash list as "cracking" and when its cracked will show in the hash list.
You know that you can change the time limit..So change the timeout limit in PHP script and your server and you will be fine
(Apr 22, 2013 07:13 AM)3lit3 Wrote:  You know that you can change the time limit..So change the timeout limit in PHP script and your server and you will be fine

and who will keep the broswer open for days on end... for that one thing.
(Apr 22, 2013 10:11 AM)DrWhat Wrote:  and who will keep the broswer open for days on end... for that one thing.

Me? My browser on my laptop has not been closed in weeks/months.
If hashcat takes days to crack... you're running '98 or you have one HELL of a wordlist.
I think this would better be used for a php command line script. Or if you could use ajax so there's no timeouts.
[Image: wOdD4yf.gif]
(Apr 22, 2013 04:25 PM)Pillows Wrote:  I think this would better be used for a php command line script. Or if you could use ajax so there's no timeouts.

If it were command line it would be 100% useless. You could just ./hashcat instead.
(Apr 22, 2013 04:24 PM)B00B5 Wrote:  If hashcat takes days to crack... you're running '98 or you have one HELL of a wordlist.

LOL wordlist thats funny, I use brute force.

If you can crack this in less then a day then maybe you should run the hashcat thing

7213fba3c54d2505269a6ac4875c8895

the guy with 24 AMD HD 6990 says his rig can go through all MD5 hashes in 1 day 16 hours
Nice script this seems pretty good.
Nice script thanks for sharing !!
(Apr 23, 2013 06:39 AM)DrWhat Wrote:  LOL wordlist thats funny, I use brute force.

If you can crack this in less then a day then maybe you should run the hashcat thing

7213fba3c54d2505269a6ac4875c8895

the guy with 24 AMD HD 6990 says his rig can go through all MD5 hashes in 1 day 16 hours

7213fba3c54d2505269a6ac4875c8895:$k|21|3X
(May 10, 2024 05:25 PM)account_ Wrote:  7213fba3c54d2505269a6ac4875c8895:$k|21|3X

11 years later, someone cracked it 😆😆
Always willing to help, learn and teach. Hit me up if you need help.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by тнe randoм dυтcн gυySep 10, 2016 02:52 AM 11 527 Sep 10, 2016 02:52 AM
Last Post: Sakuto
[PHP] by amr2006Feb 13, 2013 02:02 AM 10 1,687 Feb 13, 2013 02:02 AM
Last Post: skyle17