-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
63 lines (59 loc) · 1.57 KB
/
index.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
63
<!DOCTYPE html>
<head><title>ARAULLO, EUGENIO EMMANUEL</title></head>
<body>
<h1>ARAULLO, EUGENIO EMMANUEL (AGOJO): My MD5 cracker</h1>
<h3>Via brute-force, my program attempts to know the PIN value of the MD5 given.</h3>
<?php
// If there is no parameter, this code is all skipped
$goodtext = "PIN: Not Found";
if ( isset($_GET['md5']) ) {
$time_pre = microtime(true);
$md5 = $_GET['md5'];
// static values
$show = 15;
$length = 4;
$limit = 10000;
$digit = 0;
print "<pre>Debug Output<br>";
for($count=0; $count<$limit; $count++){
$try = strval($count);
while (strlen($try) < $length) {
$try = $digit.$try;
}
$check = hash('md5', $try);
if ($count < $show) print "trying: $try\n";
if ( $check == $md5 ) {
$goodtext = $try;
break;
}
}
print "</pre>";
print "Total Checks: $count";
print "<h2>PIN: $goodtext</h2>";
// Compute elapsed time
$time_post = microtime(true);
print "Elapsed time: ";
print $time_post-$time_pre;
print "<br><br>";
} else {
$md5 = "";
print "<h2>$goodtext</h2>";
}
?>
</pre>
<form>
<?php
print "<input type='text' name='md5' size='40' value='$md5'> ";
print "<input type='submit' value='Crack MD5'>";
?>
</form>
<ul>
<li><a href="index.php">Reset</a></li>
<li><a href="md5.php">MD5 Encoder</a></li>
<li><a href="makecode.php">MD5 Code Maker</a></li>
<li><a
href="https://github.com/ginomeee/md5-cracker"
target="_blank">Source code for this application</a></li>
</ul>
</body>
</html>