Файл: Luxe-Shop v6.0/application/views/sheild/sheild.php
Строк: 50
<?php
mysql_query('SET NAMES UTF-8');
include_once('classes/class.sqlinj.php');
include_once('classes/class.ipblock.php');
include_once('classes/class.file_protector.php');
error_reporting(E_COMPILE_ERROR);
class automaticvalids
{
private function hackblock()
{
//print_r($_COOKIE);
header('Location: sheild/html/hacker.html');
echo '<script>location.href='sheild/html/hacker.html'</script>';
exit;
}
private function valid()
{
$services=array(new sqlinj(), new ipblock(), new file_protector());
foreach ($services as $object)
{
$result=$object->getstatus();
if ($result==1)
{
$this->logerror($object->gettype());
$object->alert();
}
}
}
public function block()
{
$this->drawlogo();
$this->logerror('program block');
$this->hackblock();
}
private function drawlogo()
{
echo '
';
}
private function logerror($type)
{
$file=fopen('sheild/log.attacklog', 'a+');
$text='
+++++++++++++++++++++++++++++++++++++++++++
date: ';
$text.=date("d-m-Y").' , '.date("H:i:s");
$text.='
type: '.$type.'
ip: '.$_SERVER['REMOTE_ADDR'].'
pagefrom: '.$_SERVER['HTTP_REFERER'].'
';
fwrite($file, $text);
fclose($file);
}
public function loguser()
{
$file=fopen('sheild/log.logusers', 'a+');
$text='
+++++++++++++++++++++++++++++++++++++++++++
date: ';
$text.=date("d-m-Y").' , '.date("H:i:s");
$text.='
session: '.session_id().'
ip: '.$_SERVER['REMOTE_ADDR'].'
pagefrom: '.$_SERVER['HTTP_REFERER'].'
';
fwrite($file, $text);
fclose($file);
}
public function __construct()
{
$this->drawlogo();
$this->valid();
}
}
$var=new automaticvalids();
if (!is_object($var))
{
header('Location: sheild/html/error.html');
}
//$var->loguser();
///for use in program//////////////////////////////////////////////////////
function puship()
{
$var=new ipblock();
$var->push();
}
function revalid()
{
$var=new automaticvalids();
}
function blockpage()
{
$var=new automaticvalids();
$var->block();
}
function loguser()
{
$var=new automaticvalids();
$var->loguser();
}
//////////////////////////////////////////////////////////
?>