
Lord Raiden wrote: I get the same thing too. What it is, is the spammer is masking their IP to the webserver's environment variables. So the webserver can't see anything but zeros, and that's what it logs. Not much you can do about it short of blocking users who spoof or block their IP addresses from registering.
I've decided a simpler aproach to this. I've combined the spam bot ban script here with a simple policy. You don't post within 30 days, I delete your account. If it gets worse, I will drop it to 7. So if the register and don't post within 7 days, buh-bye.
Code: Select all
function getip() {
if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown"))
$ip = getenv("HTTP_CLIENT_IP");
else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown"))
$ip = getenv("HTTP_X_FORWARDED_FOR");
else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown"))
$ip = getenv("REMOTE_ADDR");
else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown"))
$ip = $_SERVER['REMOTE_ADDR'];
else
$ip = "unknown";
return($ip);
}
The function 'getenv' does not work if your Server API is ASAPI (IIS).
So, try to don't use getenv('REMOTE_ADDR'), but $_SERVER["REMOTE_ADDR"].
computersOC wrote: Another BUG:
I see the same IP address listed like five times in my banlist. Can we have this mod do a check first to see if it is already listed? Thanks.