Last active
August 29, 2015 14:03
-
-
Save nssy/50cbbbe23c16804c47e9 to your computer and use it in GitHub Desktop.
Hash Creator (PHP)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = isset($_POST['string']) ? $_POST['string'] : null; | |
$selected_algo = isset($_POST['algo']) ? $_POST['algo'] : null; | |
if (!empty($string) && !empty($selected_algo )) | |
{ | |
if (in_array($selected_algo, hash_algos())) { | |
echo 'The ',$selected_algo, ' for ( <b>', $string, '</b> ) is => ', hash($selected_algo, $string, false); | |
} else { | |
echo 'Hash Method no supported'; | |
} | |
} else { | |
echo 'Please enter your Raw text'; | |
$selected_algo = 'sha1'; | |
} | |
?> | |
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hash Creator</title> | |
<script> | |
window.onload = function() { | |
var input = document.getElementById("raw-string").focus(); | |
} | |
</script> | |
</head> | |
<body> | |
<form action="#" method="post"> | |
<label for="string">Enter the String: </label> | |
<input type="text" id="raw-string" name="string" value="<?=$string?>" style="color:white;background:#001;" tabindex="1" autofocus/> | |
<select name="algo" size="1"> | |
<?php foreach ( hash_algos() as $key => $algo):?> | |
<option value="<?=$algo?>" <?php if($selected_algo===$algo) echo 'selected=""';?>> | |
<?=$algo?> | |
</option> | |
<?php endforeach?> | |
</select> | |
<button type="submit" class="btn theme-btn">Go</button> | |
</form> | |
<div class="more"><a href="https://crackstation.net/" target="_blank">Checkout Hash reversal here</a></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment