Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

Journal babbage's Journal: Anti-blog spam efforts

So, anecdotally, it looks like Google's anti-blog-spam campaign may be working. A handful of easy changes to my home blog seems to have helped tremendously:

  • I looked over Google's plan, and Movable Type's recommendations.
  • I added the Movable Type implementation of the "nofollow" plugin
  • I renamed all the MT CGI scripts so that spammers have to actually look to find the comment URL.
  • I added a new script at the old comment & trackback URL:

    #!/usr/bin/perl -wT
    print "Content-type: text/plain\n\n";

  • After noticing that the spammers all seem to have a referer of "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)", I added the following code to the comment script:

    sub squash_spammers {
    my $agent = $ENV{'HTTP_USER_AGENT'} ||= "";
    my $referer = $ENV{'HTTP_REFERER'} ||= "";
    if ( ( $agent =~ m/NET CLR 1.1.4322/ ) ||
    ( $referer =~ m@\.info/$@ ) )
    # print "Content-type: text/plain\n\nsorry\n";
    die "Sorry, this is a spam-free zone. $!";

    This is now called in the eval block that does the rest of the work for the comment script, so attempts to spam me automatically fail. If I need to add more criteria, I can hook them in as needed, but these two rules seem to have caught everything so far.

Since making these changes, things have gotten much better. I've had no comment spam this week (usually, a handful makes it past the comment spam plugin), and more strikingly, the amount of referer traffic -- requests for random URLs with referer fields like "http://buy-zanax-online.best-buy-site-4u.info" -- has almost, if not quite entirely, disappeared. This is wonderful.

We'll see how well it's working a month from now though ...

This discussion has been archived. No new comments can be posted.

Anti-blog spam efforts

Comments Filter:

No amount of genius can overcome a preoccupation with detail.