HTTP black lists stop comment spammers
Posted on Jun 4, 2008 by
Paul White I got sick of seeing failed viewstate in my event logs. so I wrote some
code that checks visitors against a HTTP blacklist. I found that one
of my blacklists was full of false positives. Not that the given IP
wasn't abusive at one point in time but I found it was full of proxies
of which are frequently used by legitimate users. After comparing some
user logs I found that I was blocking a few of my member. The HTTP
blacklist from Project Honey Pot works, but had the problem with
proxies as I stated above. However one that I have had much better
luck with is the one by
stopforumspam.comIf you are looking to stop comment spammers from seeing your site, I highly recommend them.
void Session_Start(Object Sender, EventArgs e){
// check for Spammers
try{
string spamtext = getHTMLpage("http://www.stopforumspam.com/api?ip="+myip);
if(spamtext.IndexOf("<appears>yes</appears>")!=-1){
//found spammer
insertToDB("INSERT INTO honeypot(ip_address, date_created, response) VALUES('"+myip+"',NOW(),'stopforumspam')");
// send them off to the provider of my blacklist so they get the point
HttpContext.Current.Response.Redirect("http://stopforumspam.com");
}
}
catch{}
}
Discussion
No Comments have been submitted