Byron Posted October 5, 2011 Share 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> Quote Link to comment Share on other sites More sharing options...
PenTester Posted October 5, 2011 Share Posted October 5, 2011 That's nice script. Long time back, i needed this script. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.