Advertisement
Guest User

Untitled

a guest
Jan 10th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. ?php
  2.  
  3. $startTime = microtime(true);
  4. $fileDir = dirname(__FILE__);
  5.  
  6. require($fileDir . '/library/XenForo/Autoloader.php');
  7. XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');
  8.  
  9. XenForo_Application::initialize($fileDir . '/library', $fileDir);
  10. XenForo_Application::set('page_start_time', $startTime);
  11.  
  12. $username = $_GET['username'];
  13. $password = $_GET['password'];
  14. $password_to_db = $_GET["password"];
  15. $hwid = $_GET['hwid'];
  16. $host = "localhost";
  17. $user = "log";
  18. $pass = "pass";
  19. $database = "db";
  20. date_default_timezone_set('Europe/Kiev');
  21. @mysql_connect($host,$user,$pass);
  22. @mysql_select_db($database);
  23.  
  24. $db = XenForo_Application::getDb();
  25.  
  26. $data = $db->fetchOne('
  27. SELECT
  28. auth.data
  29. FROM xf_user_authenticate AS auth
  30. INNER JOIN xf_user AS user ON
  31. (user.user_id = auth.user_id)
  32. WHERE user.username = ?
  33. ', $username);
  34.  
  35. $auth = XenForo_Authentication_Abstract::createDefault();
  36.  
  37. $auth->setData($data);
  38.  
  39. $check = $auth->authenticate($username, $password);
  40.  
  41. Zend_Debug::dump($check);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement