md5-kraker
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
set_time_limit(600);
//-----------
$exec_start = array_sum(explode(' ', microtime()));
$str = 'ik';
$md5 = (isset($_POST['md'])) ? $_POST['md'] : md5($str);
//---------------
$alfabet=array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
,"?","-","[","]","<",">","!","~","@","#","$","%","^","&","*","(",")","-","_","+","=","{","}",",",
".","/","0","1","2","3","4","5","6","7","8","9",":",";");
$maxletters=count($alfabet);
$maxtekens=(isset($_POST['len'])) ? $_POST['len'] : 3;
$k = 0;
//-------------
function x($a, $t)
{
$t++;
global $maxtekens, $maxletters, $alfabet , $str,$md5, $exec_start,$k;
for($i=0;$i<$maxletters;$i++)
{
$num = $a . $alfabet[$i];
if(md5($num) != $md5) {
if($t < $maxtekens)
{
x($a . $alfabet[$i], $t);
}
} else {
$x = ($str != 'ik') ? $str : $md5;
echo "<table width='500' style='border: 1px solid #000; font-family: verdana; font-size: 12px;'><tr><td align='center'><b>Wachtwoord kraker</b></td></tr></table>";
echo '<table width="500" style="border: 1px solid #000; font-family: verdana; font-size: 12px;"><tr><td>Eerst</td><td>Uitkomst</td></tr>';
echo '<tr><td>md5: '.$x.'</td><td>Wachtwoord: <b>'.$num.'</b></td></tr>';
echo '<tr><td>Deze Loop: '.$i.'</td><td>Totaal: '.number_format($k).'</td></tr>';
echo '<tr><td>Created in:</td><td>'.round(array_sum(explode(' ', microtime())) - $exec_start, 5).' Seconds</td></tr>';
echo '</table>';
exit;
}
$k++;
}
}
///---- form -----------
if(!isset($_POST['submit']) || isset($_POST['make'])) {
$ww = (isset($_POST['ww'])) ? md5($_POST['ww']) : '';
$l = (isset($_POST['ww'])) ? strlen($_POST['ww']) : '';
//------- een beetje rommelig
echo "<form method='post'>";
echo "<table width='400' style='border: 1px solid #000; font-family: verdana; font-size: 12px;'><tr><td align='center'><b>Wachtwoord kraker</b></td></tr></table>";
echo "<table width='400' style='border: 1px solid #000; font-family: verdana; font-size: 12px;'>";
echo "<tr><td>Lengte wachtwoord:</td><td><input type='text' name='len' size='6' value='".$l."'></td></tr>";
echo "<tr><td>MD5:</td><td><input type='text' name='md' size='32' value='".$ww."'></td></tr>";
echo "<tr><td></td><td align='right'><input type='submit' name='submit' value='Raad!'></td></tr>";
echo "<tr><td></td><td></td></tr>";
echo "<tr><td>Maak md5:</td><td><input type='text' name='ww'> <input type='submit' name='make' value='Maak MD5'></td></tr>";
echo '</table></form>';
//----- wachtwoord kraken
} elseif(is_numeric($_POST['len']) && strlen($_POST['md']) == 32) {
x("", 0);
} else {
header("Location: ".$_SERVER['PHP_SELF']);
}
?>
set_time_limit(600);
//-----------
$exec_start = array_sum(explode(' ', microtime()));
$str = 'ik';
$md5 = (isset($_POST['md'])) ? $_POST['md'] : md5($str);
//---------------
$alfabet=array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",
"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"
,"?","-","[","]","<",">","!","~","@","#","$","%","^","&","*","(",")","-","_","+","=","{","}",",",
".","/","0","1","2","3","4","5","6","7","8","9",":",";");
$maxletters=count($alfabet);
$maxtekens=(isset($_POST['len'])) ? $_POST['len'] : 3;
$k = 0;
//-------------
function x($a, $t)
{
$t++;
global $maxtekens, $maxletters, $alfabet , $str,$md5, $exec_start,$k;
for($i=0;$i<$maxletters;$i++)
{
$num = $a . $alfabet[$i];
if(md5($num) != $md5) {
if($t < $maxtekens)
{
x($a . $alfabet[$i], $t);
}
} else {
$x = ($str != 'ik') ? $str : $md5;
echo "<table width='500' style='border: 1px solid #000; font-family: verdana; font-size: 12px;'><tr><td align='center'><b>Wachtwoord kraker</b></td></tr></table>";
echo '<table width="500" style="border: 1px solid #000; font-family: verdana; font-size: 12px;"><tr><td>Eerst</td><td>Uitkomst</td></tr>';
echo '<tr><td>md5: '.$x.'</td><td>Wachtwoord: <b>'.$num.'</b></td></tr>';
echo '<tr><td>Deze Loop: '.$i.'</td><td>Totaal: '.number_format($k).'</td></tr>';
echo '<tr><td>Created in:</td><td>'.round(array_sum(explode(' ', microtime())) - $exec_start, 5).' Seconds</td></tr>';
echo '</table>';
exit;
}
$k++;
}
}
///---- form -----------
if(!isset($_POST['submit']) || isset($_POST['make'])) {
$ww = (isset($_POST['ww'])) ? md5($_POST['ww']) : '';
$l = (isset($_POST['ww'])) ? strlen($_POST['ww']) : '';
//------- een beetje rommelig
echo "<form method='post'>";
echo "<table width='400' style='border: 1px solid #000; font-family: verdana; font-size: 12px;'><tr><td align='center'><b>Wachtwoord kraker</b></td></tr></table>";
echo "<table width='400' style='border: 1px solid #000; font-family: verdana; font-size: 12px;'>";
echo "<tr><td>Lengte wachtwoord:</td><td><input type='text' name='len' size='6' value='".$l."'></td></tr>";
echo "<tr><td>MD5:</td><td><input type='text' name='md' size='32' value='".$ww."'></td></tr>";
echo "<tr><td></td><td align='right'><input type='submit' name='submit' value='Raad!'></td></tr>";
echo "<tr><td></td><td></td></tr>";
echo "<tr><td>Maak md5:</td><td><input type='text' name='ww'> <input type='submit' name='make' value='Maak MD5'></td></tr>";
echo '</table></form>';
//----- wachtwoord kraken
} elseif(is_numeric($_POST['len']) && strlen($_POST['md']) == 32) {
x("", 0);
} else {
header("Location: ".$_SERVER['PHP_SELF']);
}
?>