note 72063 added to function.md5
| From: | me at dontemailme dot com | Date: | Sun, 31 Dec 2006 17:52:32 +0000 |
| Subject: | note 72063 added to function.md5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-121147@lists.php.net to get a copy of this message | ||
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";
?>
----
Server IP: 216.194.113.175
Probable Submitter: 69.142.2.170
----
Manual Page -- http://www.php.net/manual/en/function.md5.php
Edit -- https://master.php.net/note/edit/72063
Del: integrated -- https://master.php.net/note/delete/72063/integrated
Del: useless -- https://master.php.net/note/delete/72063/useless
Del: bad code -- https://master.php.net/note/delete/72063/bad+code
Del: spam -- https://master.php.net/note/delete/72063/spam
Del: non-english -- https://master.php.net/note/delete/72063/non-english
Del: in docs -- https://master.php.net/note/delete/72063/in+docs
Del: other reasons-- https://master.php.net/note/delete/72063
Reject -- https://master.php.net/note/reject/72063
Search -- https://master.php.net/manage/user-notes.php