- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
<?
if(!defined('Hacking')) { die('Hacking attempt!'); exit;}
$database_user_name="demo";
$database_password="demo";
$database_name="demo";
$display_errors = false;
$AdminEmail="[email protected]";
$bpref="demo";
$domenname="demo";
function connect_db()
{
global $database_user_name, $database_password;
$db=mysql_connect("localhost",$database_user_name,$database_password) or die ("Could not connect");
mysql_query("SET NAMES cp1251") or die("Invalid query: " .mysql_error());
return $db;
}
function db_name()
{
global $database_name;
$db_name=$database_name;
return $db_name;
}
function get_now()
{
$db=connect_db();
$db_name=db_name();
mysql_select_db($db_name,$db);
$sql="select now() as now";
$result=mysql_query($sql,$db);
$myrow=mysql_fetch_array($result);
$now=$myrow["now"];
return $now;
}
function puterror($message)
{
echo("<p>$message</p>");
exit();
}
foreach($_GET as $chexss) {
if((eregi("<[^>]*script[^>]*>", $chexss)) || (eregi("<[^>]*object[^>]*>", $chexss)) ||
(eregi("<[^>]*iframe[^>]*>", $chexss)) || (eregi("<[^>]*applet[^>]*>", $chexss)) ||
(eregi("<[^>]*meta[^>]*>", $chexss)) || (eregi("<[^>]*style[^>]*>", $chexss)) ||
(eregi("<[^>]*form[^>]*>", $chexss)) || (eregi("\([^>][^)]*\)", $chexss)) ||
(eregi("<[^>]*frameset[^>]*>", $chexss)) || (eregi("<[^>]*onmouseover[^>]*>", $chexss)) ||
(eregi("<[^>]*img[^>]*>", $chexss)) || (eregi("\"", $chexss)) || (eregi("'", $chexss))){
die("Попытка ХАКА !");
}
}
$zzzz = html_entity_decode(urldecode($_SERVER['QUERY_STRING']));
if ($zzzz) {
if ((strpos($zzzz, '<') !== false) ||
(strpos($zzzz, '>') !== false) ||
(strpos($zzzz, '"') !== false) ||
(strpos($zzzz, './') !== false) ||
(strpos($zzzz, '../') !== false) ||
(strpos($zzzz, '\'') !== false) ||
(strpos($zzzz, '.pl') !== false) ||
(strpos($zzzz, '.php') !== false))
{
die("Попытка ХАКА !");
}
}
$zamena_b = array( "\x27", "\x22", "\x60", "\t",'\n','\r', '\\', "'","¬","#",";","~","[","]","{","}","=","-","+",")","(","*","&","^","%","$","<",">","?","!",".pl", ".php",'"' );
$_GET = str_replace($zamena_b, '', $_GET);
$_POST = str_replace($zamena_b, '', $_POST);
$_SESSION = str_replace($zamena_b, '', $_SESSION);
$_COOKIE = str_replace($zamena_b, '', $_COOKIE);
$_ENV = str_replace($zamena_b, '', $_ENV);
$_FILES = str_replace($zamena_b, '', $_FILES);
$_REQUEST = str_replace($zamena_b, '', $_REQUEST);
$_SERVER = str_replace($zamena_b, '', $_SERVER);
?>
Просторы интернета богаты... Так вот люди работают с СУБД