Guest User

Untitled

a guest
Jan 20th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. For Massacre:
  2.        INVALID QUERY
  3.  
  4. <?php
  5. $result = mysql_query('SELECT * WHERE 1=1');
  6. if (!$result) {
  7.     die('Invalid query: ' . mysql_error());
  8. }
  9.  
  10. ?>
  11.  
  12.              VALID QUERY
  13. <?php
  14. // DIS B VALID QUERY NIGGA
  15. $username = 'root';
  16. $password  = 'abcdefghijklmnopqrstuvwxyz';
  17.  
  18. $query = sprintf("SELECT username, password
  19.    WHERE username='%s' AND password='%s'",
  20.     mysql_real_escape_string($username),
  21.     mysql_real_escape_string($password));
  22.  
  23. // ight so nao i b performin da query!1!1!!!
  24. $result = mysql_query($query);
  25.  
  26. // did dis shit send?
  27. if (!$result) {
  28.     $message  = 'Invalid query: ' . mysql_error() . "\n";
  29.     $message .= 'Whole query: ' . $query;
  30.     die($message);
  31. }
  32.  
  33. while ($row = mysql_fetch_assoc($result)) {
  34.     echo $row['username'];
  35.     echo $row['password'];
  36. }
  37.  
  38. // END OF SCRIPT YOU NIGGER
  39. mysql_free_result($result);
  40. ?>
Add Comment
Please, Sign In to add comment