SHARE
TWEET

Untitled

a guest Mar 16th, 2018 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   $lines = file("secure.txt");
  2.       print"$lines[0]";
  3.       print "$lines[1]";
  4.       if(    strcmp($_POST['username'],$lines[0]) == 0
  5.           && strcmp($_POST['password'],$lines[1]) == 0)
  6.       {
  7.         //code
  8.     }
  9.     else
  10.     {
  11.         print access denied stuff
  12.     }
  13.  
  14. secure.txt contains:
  15. admin
  16. password
  17.  
  18. user enters in the form
  19. username: admin
  20. password: password
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top