Guest User

Untitled

a guest
Jul 18th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. # remove this line; added to prevent possible RFI <?php exit(254); ?>
  2. <?php
  3. if(!isset($_GET['u']) || !isset($_GET['p'])) {
  4. echo "false line 2";
  5. exit.'INVALID';
  6. }
  7.  
  8. mysql_connect('localhost', 'scapemar_script', 'lolcakes'); // connect
  9. mysql_select_db('scapemar_keys'); // choose the database
  10.  
  11. $clean = array_map('mysql_real_escape_string', $_GET); // clean the array
  12.  
  13. $query = mysql_query('SELECT * FROM `auths` WHERE `user`=\'".$clean['user']."\';');
  14. $row = mysql_fetch_assoc($query); // get the row from the database
  15. if(!$query){
  16. echo "invalid";
  17. exit.'INVALID';
  18. }
  19. if(mysql_num_rows($query) != 1) { // if it isn't 1 row, say invalid
  20. echo "false not one row ";
  21. echo mysql_num_rows($query);
  22. exit.'INVALID';
  23. }
  24.  
  25. if($row['pass'] != $clean['p']) {
  26. echo "false";
  27. exit.'INVALID';
  28. } else {
  29. echo "true";
  30. exit.'VALID';
  31. }
  32.  
  33. ?>
Add Comment
Please, Sign In to add comment