<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Let's Crack Some MD5</title>
</head>
<body style="margin: 0px; padding: 0px; font-family: arial; font-size: 12px;">

<div style="border-bottom: 1px solid #aaa; background-color:#e6e6e6; padding: 5px; text-align: center;">
<?	if($query) { 
		if($found) {
			echo $query . " => <strong>" . $found . "</strong>";
		} else {
			echo "Unable to crack via search engines";
		}
	} else {
			echo "Light-force MD5 crack using search engines";
		} 
?>
</div>
		
<div id="hash_form" style="margin:5px; padding:5px;">
<form action="<?= $_SERVER[
    "PHP_SELF"
] ?>" method="post">Please enter an MD5 hash you wish to crack:
<input type="text" name="query" size="32" maxlength="32">
<input type="submit" name=" Crack ">
</form>
</div>
		
<div id="hash_response" style="margin:5px; padding:5px;">
<? if($query) { ?>
<strong>Result:</strong><br>
<?
if ($found) {
	// Matched the key
	echo "<ul>Congratulations!";
	echo "<li>The hash <strong>$query</strong> has been deciphered to: <strong>$found</strong></li>";
		switch($found_location) {
		case "YAHOO_URL":
	echo "<li>The plain-text was found in a Yahoo URL</li>";
		break;
		case "YAHOO_SUMMARY":
	echo "<li>The plain-text was found in Yahoo's summary of a page</li>";
		break;
		case "YAHOO_PAGE":
	echo "<li>The plain-text was found in a page via Yahoo</li>";
		break;
		case "GOOGLE_SUMMARY":
	echo "<li>The plain-text was found in Google's summary of a page</li>";
		break;
		case "DATABASE":
	echo "<li>This plain-text had already been found via search engine</li>";
		break;
	}
echo "<li>Found in " . $time . " seconds</li>"; 
echo "</ul>";
} else {
	echo "<ul>Sorry!";
	echo "<li>We couldn't crack the hash with a search engine.</li>";
	echo "<li>Hacked for " . $time . " seconds.</li>";
	echo "</ul>";  
	}
}
?>
</div>
</body>
</html>