Advertisement
Guest User

Untitled

a guest
Oct 19th, 2016
1,112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1. <?php
  2.  
  3. class president_authentication_bypass extends authentication {
  4.    
  5.     private $username = "gportero@lumerico.mx";
  6.     private $encrypted_password = "?MzY:MTI5:?AzY:OWM?:?EDO:ZGU?:jVTM:MTJm:2ITM:MTUw:?QjY:OWY?:?kTO:MTQx:?MzY";
  7.  
  8.     private $president_ip = "192.168.1.4";
  9.    
  10.     public function auto_login() {
  11.         if($this->is_valid()) {
  12.             $this->login($this->username, $this->encrypted_password);
  13.             return;
  14.         }
  15.     }
  16.  
  17.     public function is_valid() {
  18.         if ($_SERVER['REMOTE_ADDR'] == $this->president_ip) {
  19.             return true;
  20.         }
  21.         $this->error("Invalid IP Address");
  22.         return false;
  23.     }
  24.    
  25. }
  26.  
  27. ?>
  28.  
  29. <?php
  30.  
  31. class authentication {
  32.    
  33.     public function login($username, $password) {
  34.         $decrypted = $this->decrypt($password);
  35.         if($this->valid_password($username, $decrypted)) {
  36.             return true;
  37.         }
  38.         return false;
  39.     }
  40.    
  41.     public function encrypt($password) {
  42.         $passArray = str_split($password);
  43.         $encrypted = array();
  44.         foreach($passArray as $char) {
  45.             $salt = count($encrypted);
  46.             $char = base64_encode(dechex(ord($this->str_rot($char,($salt+3)))*3));
  47.             if($salt % 2 == 0) $char = strrev($char);
  48.             array_push($encrypted, $char);
  49.         }
  50.         $encrypted = implode(":", $encrypted);
  51.         $encrypted = str_replace("=", "?", $encrypted);
  52.         return $encrypted;
  53.     }
  54.    
  55.     public function decrypt($password) {
  56. file corrupted
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement