Created
June 25, 2014 12:48
-
-
Save tonifisler/395b4724092164393695 to your computer and use it in GitHub Desktop.
Generate htpasswd
This file contains hidden or 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 | |
if (isset($_POST['login']) AND isset($_POST['pass'])) | |
{ | |
$login = $_POST['login']; | |
$pass_crypted = crypt($_POST['pass']); | |
echo '<p>Ligne é copier dans le .htpasswd:<br>' . $login . ':' . $pass_crypted . '</p>'; | |
} | |
else | |
{ | |
?> | |
<p>Enter your login and password.</p> | |
<form method="post"> | |
<p> | |
Login : <input type="text" name="login"><br> | |
Mot de passe : <input type="password" name="pass"><br><br> | |
<input type="submit" value="Crypt this shit!"> | |
</p> | |
</form> | |
<?php | |
} | |
?> | |
<?php echo 'Path of .htpasswd: ' . realpath('.htpasswd'); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment