Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 9th, 2020 142 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. header("Content-Type: text/plain; charset=UTF-8");
  3.  
  4. // Verify login and password
  5. $login = $_GET['login'];
  6. $password = $_GET['password'];
  7. if(empty($login) || empty($password)) {
  8.     exit('Empty login or password');
  9. }
  10.  
  11. // Load IPB init script
  12. $_SERVER['SCRIPT_FILENAME'] = __FILE__;
  13. require_once 'init.php';
  14.  
  15. // Try authenticate
  16. $loginClass = new \IPS\Login;
  17. $member = NULL;
  18. foreach(\IPS\Login::methods() as $method) {
  19.     try {
  20.         $member = $method->authenticateUsernamePassword( $loginClass, $login, $password );
  21.         if (!$member->member_id) {
  22.             $member = NULL;
  23.             continue;
  24.         }
  25.         break;
  26.     } catch (\Exception $e) {
  27.         // Do nothing
  28.     }
  29. }
  30.  
  31. // We're done
  32. echo($member ? 'OK:' . $member->name : 'Incorrect login or password');
  33. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top