Your ip-address ($ipaddress) is banned (reason: Hacking activities)
Your ip-address is banned because it is blacklisted on httpBL.abuse.ch. It was previously identified as source of hacking activities.
You can look up your ip address ($ipaddress) for more information.
";
if($logo == "1") { echo '
'; }
exit();}
if($response == "127.0.0.3") {
if($logging == "1") { logit($time,$ipaddress,$hostname,$response); }
echo "Your ip-address ($ipaddress) is banned
(reason: Source of RFI attacks)
Your ip-address is banned because it is blacklisted on httpBL.abuse.ch. It was previously identified as source of RFI attacks.
You can look up your ip address ($ipaddress) for more information.
";
if($logo == "1") { echo '
'; }
exit();}
if($response == "127.0.0.4") {
if($logging == "1") { logit($time,$ipaddress,$hostname,$response); }
echo "Your ip-address ($ipaddress) is banned
(reason: Referer Spam)
Your ip-address is banned because it is blacklisted on httpBL.abuse.ch. It was previously identified as source of referer spam.
You can look up your ip address ($ipaddress) for more information.
";
if($logo == "1") { echo '
'; }
exit();}
if($response == "127.0.0.5") {
if($logging == "1") { logit($time,$ipaddress,$hostname,$response); }
echo "Your ip-address ($ipaddress) is banned
(reason: Automated scanning drone)
Your ip-address is banned because it is blacklisted on httpBL.abuse.ch. It was previously identified as automated scanning drone.
You can look up your ip address ($ipaddress) for more information.
";
if($logo == "1") { echo '
'; }
exit();}
}
function logit($time,$ipaddress,$hostname,$response) {
$useragent = trim(strip_tags($_SERVER['HTTP_USER_AGENT']));
$logfile = fopen("httpbl.log", a);
fwrite($logfile, "$time | $ipaddress | $hostname | $useragent | $response\r\n");
}
function abusech_httpbl_menu() {
add_options_page('abuse.ch httpBL Options', 'abuse.ch httpBL', 'manage_options', 'abusech_httpbl', 'abusech_httpbl_options');
}
function abusech_httpbl_options() {
if (!current_user_can('manage_options')) {
wp_die( __('You do not have sufficient permissions to access this page.') );
}
// Use default setting if the Plugin has not been setup yet
if($useDefaults=!(get_option('httpBL_IsSetup')=="1"))
{
$logging = 1;
$logo = 1;
}
else
{
$logging = get_option('logging');
$logo = get_option('logo');
}
// Diplay option page
?>
abuse.ch httpBL Options
ERROR: httpbl.log is not writable!Solution: Create and and change permission of httpbl.log in the root directory (chmod 666) or disable the logging function below.';
}
?>
Below you can see the options for the abuse.ch httpBL plugin:
httpBL Log";
if(0 == filesize($_SERVER["DOCUMENT_ROOT"]."/httpbl.log"))
{
echo "Logfile is empty
";
}
else
{
echo '| Timestamp | IP address | Hostname | User-Agent | httpBL zone |
';
$file = fopen($_SERVER["DOCUMENT_ROOT"]."/httpbl.log", "r");
while(!feof($file))
{
$line = fgets($file);
$logarray = explode(" | ", $line);
$httpblzone = trim($logarray[4]);
if($httpblzone == '127.0.0.2'){ $httpblzone = 'Script Kiddie'; } elseif($httpblzone == '127.0.0.3'){ $httpblzone = 'RFI attacker'; } elseif($httpblzone == '127.0.0.4'){ $httpblzone = 'Referer Spammer'; } else{ $httpblzone = 'Scanning drone'; }
echo "| ".$logarray[0]." | ".$logarray[1]." | ".$logarray[2]." | ".substr($logarray[3], 0, 60)." | $httpblzone |
";
}
fclose($file);
echo '
';
}
}
else
{
echo 'As soon as you enable the logging function and the logfile contains some content, you will see some output here.
';
}
}
add_action('init', 'check_for_httpbl');
add_action('admin_menu', 'abusech_httpbl_menu');
?>