<?php
error_reporting(0);
ini_set('display_errors',0);
function true_protect($str)
	{
	 if (!is_array($str))
	  {
	 $str = str_replace("\0",'',$str);
	 $str = str_replace("'",'"',$str);
	 $str = str_replace("`",'"',$str);
	 $str = str_ireplace("union",'uniоn',$str);
	 $str = str_ireplace("select",'sеlect',$str);
	 $str = str_ireplace("benchmark",'bеnchmark',$str);
	 $str = str_ireplace("database",'dаtаbаsе',$str);
	 $str = str_ireplace("table",'tаble',$str);
	 $str = str_ireplace("update",'updаte',$str);
	 $str = str_ireplace("insert",'insеrt',$str);
	 $str = str_ireplace("script",'sсriрt',$str);
	 $str = str_replace("../",'***',$str);
	  }
	  else
	  {
	  $str = array_map('true_protect',$str);
	  }
	 return $str;
	}
if ($_GET) {
$_GET = array_map('true_protect',$_GET); }
if ($_POST) {
$_POST = array_map('true_protect',$_POST); }
if ($_COOKIE) {
$_COOKIE = array_map('true_protect',$_COOKIE); }
$_SERVER['HTTP_USER_AGENT'] = true_protect($_SERVER['HTTP_USER_AGENT']);
$_SERVER['HTTP_X_FORWARDED_FOR'] = true_protect($_SERVER['HTTP_X_FORWARDED_FOR']);

if ($_FILES) { 
foreach ($_FILES as $file_name=>$file_array) { 
if (strpos($_FILES[$file_name]['name'],"\0")!==false or strpos($_FILES[$file_name]['name'],'/')!==false or stripos($_FILES[$file_name]['name'],'.php')!==false or stripos($_FILES[$file_name]['name'],'.phtml')!==false) { 
header('Location: http://viptabor.ru'); exit; } 
$filetmpdata=file_get_contents($_FILES[$file_name]['tmp_name']); 
if (strpos($filetmpdata,'<?php')!==false) { 
header('Location: http://viptabor.ru'); exit; } 
unset($filetmpdata); } 
unset($file_name); 
unset($file_array); }
?>