HTTP black lists stop comment spammers

HTTP black lists stop comment spammers

Jun 4, 2008 9:11 AM 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.com
If 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{}
}
Readers Comments

No Comments have been submited.

 
Leave a Comment

Your email will not be displayed or published.
Upon submitting your comment you will get a confirmation email.
Please keep comments relavent to the topic at hand.
name
Email
Website (optional)
Comment
 
Type Code