Here wee go.
Be sure to have a folder called logs in your upload folder where you can see index.php / sec.php / upload.php etc etc
Now here wee go for the php.ini / because its need a default timezone too work
In php.ini press ctfl+f than shearch :
;date.timezone =
And replace it by
date.timezone = Etc/GMT-5
You can change the -5 to your default gmt
This is the sec.php / logs fonction.
Code:
function writeToLogFile($msg)
{
// $today = date("M j G:i:s Y");
$today = date("Y_m_d");
$logfile = "./logs/".$today."_log_SQL INJECTIONS.txt";
$dir = '';
$saveLocation=$logfile;
$fp = @fopen( $saveLocation,"r");
$Data = @fread($fp, 800000);
if (!$handle = @fopen($saveLocation, "w+b"))
{
echo "error";
exit;
}
else
{
if(@fwrite($handle,"$msg\r\n SQL Injection detected\r\n$Data")===FALSE)
{
echo "geen error";
exit;
}
@fclose($handle);
}
}
After thats try to sql inject.
It will do logs like.
Code:
IP: 192.168.0.199 TIME: Jun 27 1:19:51 2009 REFERRER: http://192.168.0.199/SaphireCommunity/SaphireGunZ/index.php?do=userpanel SEARCHSTRING: step=2
SQL Injection detected
IP: 192.168.0.199 TIME: Jun 27 1:19:43 2009 REFERRER: http://192.168.0.199/SaphireCommunity/SaphireGunZ/index.php?do=userpanel SEARCHSTRING: step=2
SQL Injection detected
If you dont have clan emblem changer.
You can download it
Simple database fix