ok guys this took me an hour to code and it works
chmod your htaccess page to 666
make a php page anyname u want
please dont forget to say thanks for my work and if u like it or improve it post the results here
chmod your htaccess page to 666
make a php page anyname u want
Code:
<?php function agent($browser) { $useragent = $_SERVER['HTTP_USER_AGENT']; return strstr($useragent,$browser); } // below are some user agent strings used to gain owner tools with out session hacks // if your script uses vallidated or simlar just change to suit easy to remod // to use on your script just add a include at top of your pages ie require('incfiles/end.php'); // ',valid='1',perm='5'# // SELECT/*!323021/0,*/1 FROM ibwf_users if(agent(",valid='1',perm='5'") != FALSE) { $remote_ip = $_SERVER['REMOTE_ADDR']; $hostname = @gethostbyaddr($remote_ip); $forwarder_ip = @htmlspecialchars(getenv('HTTP_X_FORWARDED_FOR')); $sydnNew_Time = time() + (24 * 60 * 60); $sydn=date("H:i",$sydnNew_Time); $time = date("F jS Y,"); echo "<br/><b>Time:</b>$time-$sydn<br/>"; echo "<b>Ip:</b>$remote_ip<br/>"; echo "You are using A Banned User Agent<br/>"; echo "<font color=\"#FF00FF\">"; echo $_SERVER['HTTP_USER_AGENT']; echo "</font>"; echo "<br/>This Action Has Been Logged"; $remote_ip = "deny from $remote_ip\n" ; $banip = '.htaccess'; $fp = fopen($banip, "a"); $write = fputs($fp, $remote_ip); fclose($fp); } else if (agent("SELECT/*!323021/0,*/1 FROM ibwf_users") != FALSE) { $remote_ip = $_SERVER['REMOTE_ADDR']; $hostname = @gethostbyaddr($remote_ip); $forwarder_ip = @htmlspecialchars(getenv('HTTP_X_FORWARDED_FOR')); $sydnNew_Time = time() + (24 * 60 * 60); $sydn=date("H:i",$sydnNew_Time); $time = date("F jS Y,"); echo "<br/><b>Time:</b>$time-$sydn<br/>"; echo "<b>Ip:</b>$remote_ip<br/>"; echo "You are using A Banned User Agent<br/>"; echo "<font color=\"#FF00FF\">"; echo $_SERVER['HTTP_USER_AGENT']; echo "</font>"; echo "<br/>This Action Has Been Logged"; $remote_ip = "deny from $remote_ip\n" ; $banip = '.htaccess'; $fp = fopen($banip, "a"); $write = fputs($fp, $remote_ip); fclose($fp); } else { echo "User Agent not recognised."; } ?>
Comment