linhbatinh
12-09-2009, 02:50 PM
Điều kiện: RewriteEngine On
Nội dung file .htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\"|%22).*(\>|%3E|<|%3C).* [NC]
RewriteRule ^(.*)$ report.php [NC]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC]
RewriteRule ^(.*)$ report.php [NC]
RewriteCond %{QUERY_STRING} (javascript:).*(\;).* [NC]
RewriteRule ^(.*)$ report.php [NC]
RewriteCond %{QUERY_STRING} (\;|\'|\"|\%22).*(union|select|insert|drop|update|md5|bench mark|or|and|if).* [NC]
RewriteRule ^(.*)$ report.php [NC]
RewriteRule (,|;|<|>|'|`) /report.php [NC]Nội dung file report.php
$r= $_SERVER['REQUEST_URI'];
$q= $_SERVER['QUERY_STRING'];
$i= $_SERVER['REMOTE_ADDR'];
$u= $_SERVER['HTTP_USER_AGENT'];
$mess = $r . ' | ' . $q . ' | ' . $i . ' | ' .$u;
mail("your_email@site.com","bad request",$mess,"from:bot@site.com");
echo "Warning !";
?>Việc cuối cùng đặt 2 file .htaccess và report.php ngang hàng nhau. Goodluck !
Nguồn VHCTEAM
Nội dung file .htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\"|%22).*(\>|%3E|<|%3C).* [NC]
RewriteRule ^(.*)$ report.php [NC]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC]
RewriteRule ^(.*)$ report.php [NC]
RewriteCond %{QUERY_STRING} (javascript:).*(\;).* [NC]
RewriteRule ^(.*)$ report.php [NC]
RewriteCond %{QUERY_STRING} (\;|\'|\"|\%22).*(union|select|insert|drop|update|md5|bench mark|or|and|if).* [NC]
RewriteRule ^(.*)$ report.php [NC]
RewriteRule (,|;|<|>|'|`) /report.php [NC]Nội dung file report.php
$r= $_SERVER['REQUEST_URI'];
$q= $_SERVER['QUERY_STRING'];
$i= $_SERVER['REMOTE_ADDR'];
$u= $_SERVER['HTTP_USER_AGENT'];
$mess = $r . ' | ' . $q . ' | ' . $i . ' | ' .$u;
mail("your_email@site.com","bad request",$mess,"from:bot@site.com");
echo "Warning !";
?>Việc cuối cùng đặt 2 file .htaccess và report.php ngang hàng nhau. Goodluck !
Nguồn VHCTEAM