I can’t get me head around this question and what I need to do with the php code to crack the password.
Link to question, as it won’t allow me to post it.
I can’t get me head around this question and what I need to do with the php code to crack the password.
Link to question, as it won’t allow me to post it.
What it requires you to do is starting at 1, increment upto 10000 or until password found, whatever comes first. (which will be the password of course)
Here you go:
[php]<?php
$string = md5(‘m’ . rand(1, 10000));
echo 'Crack this password: ’ . $string . ‘
’;
for($i=1;$i<=10000;$i++) {
$test = md5(‘m’ . $i);
if($test === $string) {
echo ‘The password is: m’ . $i;
break;
}
}
?>
Output:
Crack this password: 6819fe4798577ec64f263196167ed1bd
The password is: m7256
[/php]
Hope that helps,
Red