Guest User

Untitled

a guest
Mar 7th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. <?
  2.  
  3. include('../../../../httpdocs/API/dbconf.php');
  4. include('../../../../httpdocs/API/dbconnect.php');
  5. $iptriple = connect($dbconf['iptriple']);
  6.  
  7. if (isset($_REQUEST['Username']) && isset($_REQUEST['Password'])) {
  8. $number = $_REQUEST['Username'];
  9. $password = $_REQUEST['Password'];
  10.  
  11. mysql_real_escape_string($number);
  12. mysql_real_escape_string($password);
  13.  
  14. $encryptedpass = md5($password);
  15.  
  16. // query
  17. $query = "SELECT id, username, password, first_name, last_name FROM `ab_account` WHERE username IN ('$number') AND password IN('$encryptedpass');";
  18. $result = mysql_query($query, $iptriple);
  19.  
  20.  
  21. // check to make sure the user / pass combo is valid
  22. if (mysql_num_rows($result) > 0) {
  23. // set the resulting field array to $account
  24. $account = mysql_fetch_row($result);
  25.  
  26. $number = $account['username'];
  27. $name = $account['first_name'] . $account['last_name'];
  28.  
  29.  
  30. print "[DATA]\r\n";
  31. print "Success=1\r\n";
  32.  
  33.  
  34. print "[SETTINGS]\r\n";
  35. print "proxies:proxy0:user_name=\"$number\"\r\n";
  36. print "proxies:proxy0:password=\"$password\"\r\n";
  37. print "proxies:proxy0:display_name=\"$name\"\r\n";
  38. print "system:license:key=\"$key\"\r\n";
  39.  
  40. } else {
  41. print "[DATA]\r\n";
  42. print "Success=0\r\n";
  43. print "Failure=\"Your username and password do not match!\"";
  44.  
  45. }
  46.  
  47.  
  48.  
  49. $fp = fopen("eyebeamlog.txt", "a+");
  50.  
  51. $data = $_GET;
  52.  
  53. $data = "<pre>" . print_r($data, 1) . "</pre>\n";
  54.  
  55. fwrite($fp, $data);
  56. fwrite($fp, "Username: " . $number . "\n");
  57. fwrite($fp, "Password: " . md5($password) . "\n");
  58. fwrite($fp, "Query: " . $query . "\n");
  59. //fwrite($fp, "DisplayName: " . $name . "\n");
  60.  
  61. fclose($fp);
  62.  
  63. } else {
  64. print "[DATA]\r\n";
  65. print "Success=0\r\n";
  66. print "Failure=You need to supply a username and password!";
  67.  
  68. }
  69.  
  70. ?>
Add Comment
Please, Sign In to add comment