Created
April 28, 2016 18:59
-
-
Save gwinans/b98488cfb0aaea0b29efcf96f256a8c8 to your computer and use it in GitHub Desktop.
MySQL Password Hash Generator
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
<html> | |
<head> | |
<title>MySQL Password Hash Generator</title> | |
</head> | |
<body> | |
<?php | |
if ( isset($_POST['pass1']) AND isset($_POST['pass2']) ): | |
$pass = ($_POST['pass1'] === $_POST['pass2']) ? $_POST['pass1'] : FALSE; | |
if ( $pass === FALSE ): | |
echo 'Passwords do not match.<br /><br />'; | |
else: | |
echo 'Send the following string to Geoff Winans:<br /><br />'; | |
echo '<input type="text" value="*'.strtoupper(sha1(sha1($pass, true))).'" style="width: 350px" disabled /><br /><br />'; | |
endif; | |
endif | |
?> | |
<form method='post' action='hash.php'> | |
<table> | |
<tr> | |
<td align="right">Pass:</td> <td><input type='password' name='pass1' /></td> | |
</tr> | |
<tr> | |
<td>Confirm Pass:</td> <td><input type='password' name='pass2' /></td> | |
</tr> | |
<tr> | |
<td> </td><td align="right"><input type='submit' value='Submit'></td> | |
</tr> | |
</table> | |
</form> | |
<body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment