0) { header("Expires: ".gmdate('D, d M Y H:i:s',time()+$expires_default)." GMT"); } if ($expires_default<0) { header("Expires: Thu, 01 Jan 1970 00:00:01 GMT"); header("Cache-Control: no-cache"); header("Pragma: no-cache"); } $session_get=$HTTP_GET_VARS['session_new']; if ($session_get) { $location_get=$session_get; $strpos=strpos($session_get,"?"); if ($strpos && (substr($session_get,0,7)!="http://" && substr($session_get,0,8)!="https://")) { $session_get=substr($session_get,0,$strpos+1); $location_get=decode($session_get); $session_add=getenv('QUERY_STRING'); $strpos=strpos($session_add,"?"); $location_get=$location_get.substr($session_add,$strpos+1); $pos1=strpos($location_get,"?"); $pos2=strpos($location_get,"&"); if (($pos1 && $pos2 && $pos2<$pos1) || (!$pos1 && $pos2)) { $location_get=preg_replace("#&#si","?",$location_get,1); } } $location=$location_get; } $session_post=$HTTP_POST_VARS['session_new']; if ($session_post) { $location_post=decode($session_post); $location=$location_post; } $url_array=url($location,1); $location=$url_array[0]; $location_code=code($location); if (!$location) { $info=""; if ($demo_version) { $info.="*Demo*
"; } if ($info_allow) { $info.="Maximal time: $time_limit sec."; if (count($location_allow)) { $info.="
The resolved sites:
"; $info.=implode("
",$location_allow); $info.="
On other sites it will be executed."; } } if ($charset_default) { header("Content-Type: text/html; charset=$charset_default"); $content=decode_charset($content,"utf-8",$charset_default); } if ($sel_browser=='1') { echo "\n"; echo "\n"; echo "$nume\n"; echo ""; echo""; echo ""; echo"
".$data."
"; echo "
\"logo\"
"; ?>
XtGem Forum catalog
'; echo "Browser:

"; } echo 'Adress:

Return to wWw.R3ap3R.BiZ

'; exit; } if (count($location_allow)) { $sovp=0; for ($j=0;$j4) { $content_ras="html"; } if (stristr($head,"Content-Type:")) { preg_match("#Content-Type: ([^\"';\s]+);?( charset=([^\"';\s]+))?[\s\r\n]#is",$head,$type); $content_type=strtolower($type[1]); $content_charset=strtolower($type[3]); } if (!$content_type) { $content_type="text/html"; } for($i=0;$i]#is",$content,$content_charset); $content_charset=strtolower($content_charset[1]); } if (!$content_charset) { $content_charset=$charset_query; } if (stristr($head,"WWW-Authenticate:")) { preg_match("#WWW-Authenticate: (.*?)[\r\n]#is",$head,$auth); header("WWW-Authenticate: $auth[1]"); header("HTTP/1.0 401 Unauthorized"); } $refresh=""; if (preg_match("#Location: (.*?)[\s\r\n]#is",$head,$tmp)) { $refresh=parse($tmp[1]); $refresh="http://".getenv('HTTP_HOST').getenv('SCRIPT_NAME')."?session_new=".code($refresh); header("Location: $refresh"); } preg_match_all("#]#is",$content,$refresh_array); replace($refresh_array[0],$refresh_array[0],$refresh_array[1],"?session_new=",""); $content_len=strlen($content); if (!$content_len) { exit; } if ($content_type!="text/html" && $content_type!="text/plain" && $content_type!="application/x-javascript") { if (strrchr($path_new, "/")){$filename=substr(strrchr($path_new, "/"), 1); }else{ $filename=$path_new; } if (preg_match("#(text|image).*?#si",$content_type)) { header("Content-Type: $content_type"); }else{ header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=$filename"); header("Accept-Ranges: bytes"); header("Content-length: $content_len"); } echo $content; exit; } if ($charset_default) { $content_new=decode_charset($content,$content_charset,$charset_default); if ($content_new==$content) { $head_charset=$content_charset; }else{ $head_charset=$charset_default; $content=$content_new; } }else{ $head_charset=$content_charset; } if ($head_charset) { header("Content-Type: $content_type; charset=$head_charset"); } $content_no_script=preg_replace("#]*?[>].*?#is","",$content); preg_match_all("#]*?[>].*?#is",$content,$script_array); if ($script_array[0]) { $content_script=implode("\n",array_unique($script_array[0])); } if ($content_ras=="js" || $content_type=="application/x-javascript") { $content_script=$content; $content_no_script=""; } preg_match("#]#si",$content,$base_array); $base_href=$base_array[1]; if ($base_href) { $url_array=url($base_href,0); $preffix_new=$url_array[7]; $content=preg_replace("#]#si","",$content); } preg_match_all("!(].*?\>|
)!is",$content,$form_array); $form_array=array_values(array_unique($form_array[0])); for ($i=0;$i]!is",$form_array[$i],$tmp); $action_array[$i]=$tmp[1]; if (!$action_array[$i]) { $action_array[$i]=$location; } if (stristr($form_array[$i],"post")) { $method_new="POST"; }else{ $method_new="GET"; } $form_array_new[$i]=preg_replace("' action=.*?([\s>])'si","$1",$form_array[$i]); $form_array_new[$i]=preg_replace("' method=.*?([\s>])'si","$1",$form_array_new[$i]); $form_array_new[$i]=preg_replace("' "; if ($charset_default) { $replace.="\n"; } $content=str_replace($form_array[$i],$replace,$content); } preg_match_all("#\.action[\s]*=[\s]*[\"'](.*?)[\"']#is",$content,$script_action_array); $script_action_replace=str_replace(".action",".session_new.value",$script_action_array[0]); replace($script_action_array[0],$script_action_replace,$script_action_array[1],"",""); preg_match_all("#(]#is",$content,$href_array); replace($href_array[0],$href_array[0],$href_array[2],"?session_new=",""); preg_match_all("#<(img|embed|frame|iframe|input|script)[\s][^>]*?src[\s]*=[\s]*\\\?\"?'?([^>]*?)\\\?[\"'\s>]#is",$content,$src_array); replace($src_array[0],$src_array[0],$src_array[2],"?session_new=",""); preg_match_all("#\.src[\s]*=[\s]*[\"'](.*?)[\"']#is",$content,$script_src_array); replace($script_src_array[0],$script_src_array[0],$script_src_array[1],"?session_new=",""); preg_match_all("#<(body|table|td)[\s].*?background[\s]*=[\s]*\"?'?(.*?)[\"'\s>]#is",$content,$background_array); replace($background_array[0],$background_array[0],$background_array[2],"?session_new=",""); preg_match_all("#(location.href|document.location|document.url|parent.location)[\s]*=[\s]*[\"'](.*?)[\"']#is",$content,$location_array); replace($location_array[0],$location_array[0],$location_array[2],"?session_new=",""); preg_match_all("#(window.open|location.assign)\([\"'](.*?)[\"',\s>\)]#is",$content,$window_array); replace($window_array[0],$window_array[0],$window_array[2],"?session_new=",""); preg_match_all("#[\"'](https?://.*?|https?%3A%2F%2F.*?)[\"'\s\)>]#is",$content_script,$http_array); replace($http_array[0],$http_array[0],$http_array[1],"?session_new=",""); preg_match_all("#document.cookie[\s]*=[\s]*[\"'](.*?)[\"']#is",$content,$script_cookie_array); $script_cookie_array=$script_cookie_array[1]; for ($i=0; $i\n"; echo "\n"; echo "$nume\n"; echo ""; echo""; echo ""; echo"
".$data."
"; echo "
\"logo\"
"; ?>
'; echo 'There is no communication with a server,repeat attempt later.
'; if ($sel_browser=='1') { echo "Browser:

"; } echo 'Adress:

Return to wWw.R3ap3R.BiZ

'; } } if ($scheme=="https") { $fp=pfsockopen("ssl://$host",$port,$errno,$errstr); if (!$fp){echo "It is impossible to incorporate to a server,there is no support SSL."; } } if (!$fp) { exit; } fputs($fp,$message); while(!feof($fp)) { $fgets=fgets($fp,2048); if ($fgets=="\r\n" || $fgets=="\n") { break; } $head.=$fgets; } while(!feof($fp)) { $content.=fread($fp,2048); } fclose($fp); return array($message,$head,$content); } function url($location,$save) { if (!$location) { return; } global $url_default,$scheme_new,$method_new,$host_new,$port_new,$path_new,$preffix_new; $url=@parse_url($url_default); $scheme_default=$url[scheme]; $host_default=$url[host]; $path_default=$url[path]; $method_default="GET"; $port_default=80; $url=preg_replace("#://?#si","://",$location,1); $url=@parse_url($url); $scheme=$url[scheme]; if (!$scheme) { $scheme=$scheme_new; } if (!$scheme) { $scheme=$scheme_default; } $method=$method_new; if (!$method) { $method=$method_new; } if (!$method) { $method=$method_default; } $host=$url[host]; if (!$host) { $host=$host_new; } if (!$host) { $host=$host_default; } $port=$url[port]; if (!$port) { $port=$port_new; } if (!$port) { $port=$port_default; } $path=$url[path]; $path=str_replace("\\","/",$path); $path="/$path"; $path=preg_replace("'/{2,100}'si","/",$path); for ($i=0;$i<10;$i++) { $path=preg_replace("#/[^\./][^/]+/\.\.?/#si","/",$path); } for ($i=0;$i<10;$i++) { $path=preg_replace("#/\.\.?/#si","/",$path); } $get=$url[query]; $get=get($get); $adr=$scheme."://".$host; if (($scheme=="http" && $port!=80) || ($scheme=="https" && $port!=443)) { $adr.=":".$port; } $preffix=$adr.substr($path,0,strrpos($path,"/"))."/"; $location=$adr.$path; if ($get) { $location.="?$get"; } if ($save) { $scheme_new=$scheme; $method_new=$method; $host_new=$host; $port_new=$port; $path_new=$path; $preffix_new=$preffix; $location_new=$location; } return array($location,$scheme,$method,$host,$port,$path,$get,$preffix); } function parse($url) { global $scheme_new,$host_new,$port_new,$path_new,$preffix_new,$base_href; if (!$url || $url=="http://" || $url=="https://" || $url=="\\") { return $preffix_new; } if ($base_href) { $adr=$base_href; }else{ $adr=$scheme_new."://".$host_new; } if ($port_new && (($scheme_new=="http" && $port_new!=80) || ($scheme_new=="https" && $port_new!=443))) { $adr.=":".$port_new; } if (substr($url,0,1)=="/") { $url=$adr.$url; }elseif (substr($url,0,1)=="?") { if ($base_href){$url=$adr.$url; }else{ $url=$adr.$path_new.$url; } }else{ $tmp=@parse_url($url); if ($tmp[scheme]!="http" && $tmp[scheme]!="https" && $tmp[scheme]!="ftp") { $url=$preffix_new.$url; } } return $url; } function code($str) { if (!$str) { return; } $str=parse($str); $str=base64_encode($str); $str=str_replace("=","$",$str); $code="$str?"; return $code; } function decode($code) { if (!$code) { return; } if (substr($code,0,7)=="http://" || substr($code,0,8)=="https://") { return $code; } if (substr($code,-1)=="?") { $code=substr($code,0,-1); } $code=str_replace("$","=",$code); $str=base64_decode($code); return $str; } function replace($mass1,$mass2,$mass3,$left,$right) { global $content,$no_replace_all_array,$no_replace_left_array; for ($i=0;$i",$get); preg_match_all("#=([^&;]+)#is",$get,$mass); $mass=$mass[1]; for ($i=0; $i"k","windows-1251"=>"w","iso8859-5"=>"i","x-cp866"=>"a","x-mac-cyrillic"=>"m","utf-8"=>"u"); $from=$charset[$code]; $to=$charset[$decode]; if (!$from || !$to) { return $content; } if ($from=="u") { $content=convert_utf_string($content,"w"); $content=convert_cyr_string ($content,"w",$to); }elseif ($to=="u") { $content=convert_cyr_string ($content,$from,"w"); $content=convert_utf_string($content,"u"); }else{ $content=convert_cyr_string ($content,$from,$to); } return $content; } function convert_utf_string($str,$type) { static $conv=''; if(!is_array($conv)) { $conv=array(); for ($x=128;$x<=143; $x++) { $conv['utf'][]=chr(209).chr($x); $conv['win'][]=chr($x+112); } for ($x=144; $x<=191; $x++) { $conv['utf'][]=chr(208).chr($x); $conv['win'][]=chr($x+48); } $conv['utf'][]=chr(208).chr(129); $conv['win'][]=chr(168); $conv['utf'][]=chr(209).chr(145); $conv['win'][]=chr(184); } if ($type=='w') { return str_replace($conv['utf'],$conv['win'],$str ); }elseif ($type=='u') { return str_replace ($conv['win'],$conv['utf'],$str); }else{ return $str; } } ?>