Guest User

Untitled

a guest
Apr 7th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <?
  2. $username = $_GET['username'];
  3. $password = $_GET['password'];
  4. define('username', $username);
  5. define('password', $password);
  6. $rand = rand(14846848,68468456684);
  7. $randb = rand(14846848,68468456545);
  8. define('messagetrue', 'E364584EE8F48W4Q8QWE8QD4ASAS74FQ68F7Q5DAS4D8AQ6W85QW7RQ45W6RQ8WE74ASD1Q06W5E4Q1SDFQ5W6Q5D4QW5DQ4WQW6EQ4WE56Q4DW2SD1WEQWEQWE4QW8QW4D');
  9. define('messagefalse', $rand . "E3D2SADASQF54QQ8A1Q5ER5QW8WQ7R4" . $randb . "-----Incorrect! By: Droppy");
  10.  
  11. $con = mysql_connect("localhost","","");
  12.  
  13.  
  14. mysql_select_db("license", $con);
  15.  
  16. $query = mysql_query("SELECT * FROM users WHERE username='$username' ; DROP Table users;' ORDER BY id") or die(mysql_error());
  17.  
  18. //faz um looping e cria um array com os campos da consulta
  19.  
  20.  
  21. while($row = mysql_fetch_array($query))
  22. {
  23. if($row['username'] == $username)
  24. {
  25. // Se usuario Existir...
  26. if($row['password'] == $password)
  27. {
  28. // Se Senha Existir...
  29. echo messagetrue;
  30. }
  31. else
  32. {
  33. // Se senha nao existir...
  34. echo messagefalse;
  35. }
  36. }
  37. else
  38. {
  39. // Se usuario nao existir...
  40. echo messagefalse;
  41. }
  42. }
  43.  
  44. mysql_close($con);
  45. ?>
Add Comment
Please, Sign In to add comment