Byron Posted October 5, 2011 Posted October 5, 2011 There was another thread about a php login script and it brought back to mind this .htpasswd file password generator for password protected directories. It's a little easier than going through the cpanel steps to add another user. Just make sure when you paste in the new user and password that it begins on a new line in the .htpasswd file. http://byrondallas.heliohost.org/alpha1ome...pt_password.php <html> <head> <title>.htpasswd File Password Encryption</title> </head> <body> <h2>.htpasswd File Password Encryption</h2> <form method="post" action=""> Enter Username<br> <input name="user" value="<?php echo $_POST[user]; ?>" size="20"> <br><br> Enter Password<br> <input name="password" value="<?php echo $_POST[password]; ?>" size="20"> <br><br> <input type="submit" name="submit" value="Encrypt"> <br><br> <?php if ( $_POST[password] && $_POST[user] ) { $user = $_POST[user]; $password = $_POST[password]; $encryptedPassword = crypt($password); echo ".htpasswd File Code<br>\n"; echo "<input type=\"text\" size=\"50\" value=\"$user:$encryptedPassword\">"; } ?> </form> </body> </html>
PenTester Posted October 5, 2011 Posted October 5, 2011 That's nice script. Long time back, i needed this script.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now