Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2. session_start();
  3. $ulist = file_get_contents("/opt/ulist.txt");
  4.  
  5. ?>
  6. <html>
  7. <body>
  8. <?php
  9. if(isset($_POST['user'] && isset($_POST['pass']){
  10. $user = $_POST['user'];
  11. $pass = $_POST['pass'];
  12.  
  13. if(strpos($ulist, $user) !== false){
  14.  
  15. } else
  16. {
  17. echo 'Wrong username or password..';
  18. }
  19. }
  20. if(!$_SESSION['valid']){
  21. echo '
  22. <form action="index.php" method="post">
  23. <input type="text" name="user" /><br />
  24. <input type="password" name="pass" /><br />
  25. <input type="submit" value="Log in" />
  26. </form>';
  27. ?>
  28. </body>
  29. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement