note 72063 deleted from function.md5 by felipe

From: Date: Fri, 15 Aug 2008 23:12:43 +0000
Subject: note 72063 deleted from function.md5 by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-143541@lists.php.net to get a copy of this message
Note Submitter: me at dontemailme dot com ---- i made a php script that can guess a hashed string's value, but it takes forever with more than 2 characters in the password <?php set_time_limit(0); $randpass = chr(rand()).chr(rand()); print "RANDOM PASSWORD: $randpass"; print "<br/>"; $password = md5("$randpass"); $guesswrd = ""; $tries = 0; $start = microtime(true); while($password != md5($guesswrd)){ $guesswrd = chr(rand()).chr(rand()); $tries+=1; } $end = microtime(true); $time = $end-$start; print "GUESSED PASSWORD: $guesswrd"; print "<br/>"; print "It took $tries tries and $time seconds"; ?>

« previous php.notes (#143541) next »