Created
May 29, 2012 13:43
-
-
Save durbon/2828446 to your computer and use it in GitHub Desktop.
login.php de ejemplo. fuerza brutal contra formularios
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 | |
session_start(); | |
if($_SERVER["REQUEST_METHOD"] == "POST") | |
{ | |
$usuario = "pedro"; | |
$pass= "123456"; | |
if(! ($_POST['username'] == $usuario && $_POST['password'] == $pass) ) | |
{ | |
Echo "<html>"; | |
Echo "<title>MUY mal</title>"; | |
Echo "<b>Acceso denegado</b>"; | |
session_destroy() ; | |
return false; | |
} | |
else { | |
Echo "<html>"; | |
Echo "<title>MUY bien</title>"; | |
Echo "<b>Acceso concedido</b>"; | |
session_destroy(); | |
return true; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment