• Published on | Apr 05, 2006 | by FozzTexx

Putting an end to spam with bBlog

It took quite a while after I put up my blog before the spammers found it. But once they did they have been relentless. They clog it up every day with tons of comment spam and trackback spam. I've been going back to the bBlog site periodically checking for an update, but it seems that bBlog development ceased back in July of 2005.

Sure, I could switch to some other blog software, but the reason I went with bBlog was because of the simplicity. I don't really want to try to figure out how some other blog works, much less figure out how to import all the entries I've already made into some other package.

On the bBlog forums there's lots of threads about suggestions for dealing with spam, but I didn't really see any easy solutions. Lots of people talking about installing a ton of other packages to do captchas and then hand patching a ton of files to make it work. Didn't really appeal to me so I've never hassled with it.

Trying to block spammers by IP is a waste of time. They all use open proxies and use tons of different IPs. Yesterday I was bombarded with over 50 spams and they came from 25 or more different IPs.

I finally got fed up enough I decided to do something about it. To block comment spam I did something very simple: I just renamed all the fields to something else. I seriously doubt any spammer is going to take the time to modify his generic spambot to parse my forms. If they do, I'll deal with it then.

For trackback spam I had to do something just slightly more sophisticated. I added a quick&dirty function that will go out and fetch the URL that has been passed and check it for a link to the blog entry they claim they are talking about. No link, no trackback.

I've setup a cgi script which will randomize the field names in the patch. Click here to download. Here is the test shell script. Once you've downloaded it you can apply it. Also make sure you make the trackback-test.sh script executable.

Join The Discussion

+1  Posted by Megasore • Apr.25.2006 at 23.39 • Reply

Your benevolent Space Megasaur approves. Thank you, puny human, for your anti-spam efforts!

+1  Posted by Chris • Apr.30.2006 at 22.28 • Reply

How do you install this?

+1  Posted by FozzTexx • May.01.2006 at 07.31 • Reply

patch < antispam.patch

or else apply the patch to the appropriate files manually. Also put the trackback-test.sh script into the bblog folder, next to the trackback.php and do

chmod 555 trackback-test.sh

+1  Posted by Jim Venner • May.10.2006 at 01.44 • Reply

This looks like a great idea and I would love to test it out. However I am unsure how to use this. I have tried re-naming the file to php and indeed I can then view the script in dreamweaver but I am unsure what i need to replace this with. Is there any chance of a tutorial on the implementation of this script ?

Cheers Jim

+1  Posted by FozzTexx • May.10.2006 at 07.01 • Reply

It's a patch, not a php file. You either need to apply the patch manually or use the patch command.

+1  Posted by Jim Venner • May.11.2006 at 03.25 • Reply

Ahhh, Ok. Not sure how I do this 'patch' thing. Do I need to upload it into my bblog root and then use the bblog admin panel to run it? The link is down for the trackback-test.sh by the way.

Cheers Jim

+1  Posted by FozzTexx • May.11.2006 at 07.19 • Reply

patch is a shell command. If you don't have it you'll have to look at the diffs and manually make the changes to the appropriate files.

I fixed the link to the trackback-test.sh script.

+1  Posted by Fat Fingers • Jan.13.2007 at 11.08 • Reply

What a brilliantly simple idea. Thanks for sharing it with us. Perhaps some of the other blog scripts out there could use something similar.