Advertisement
Guest User

Untitled

a guest
Oct 12th, 2015
1,398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.93 KB | None | 0 0
  1. Frankkung@DSS:~# curl challenge01.root-me.org/web-serveur/ch11/index.php~
  2. <?php
  3.  
  4. $username="ch11";
  5. $password="OCCY9AcNm1tj";
  6.  
  7.  
  8. echo '
  9.      <html>
  10.      <body>
  11.     <h1>Authentication v 0.00</h1>
  12. ';
  13.  
  14. if ($_POST["username"]!="" && $_POST["password"]!=""){
  15.     if ($_POST["username"]==$user && $_POST["password"]==$password)
  16.     {
  17.       print("<h2>Welcome back {$row['username']} !</h2>");
  18.       print("<h3>Your informations :</h3><p>- username : $row[username]</p><br />");
  19.       print("To validate the challenge use this password</b>");
  20.     } else {
  21.       print("<h3>Error : no such user/password</h2><br />");
  22.  
  23.     }
  24. }
  25.  
  26. echo '
  27.     <form action="" method="post">
  28.       Login&nbsp;<br/>
  29.       <input type="text" name="username" /><br/><br/>
  30.       Password&nbsp;<br/>
  31.       <input type="password" name="password" /><br/><br/>
  32.       <br/><br/>
  33.       <input type="submit" value="connect" /><br/><br/>
  34.     </form>
  35.      </body>
  36.      </html>
  37. ';
  38.  
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement