Damn that YaBB!
Saturday, May 5th, 2007I have recently been using a 404 notifier plugin, however the links to mark a comment as spam don’t work. So, I resorted to doing it the PHP and Apache way.
All the spam was coming from bots trying to access a YaBB script. This was located (or so they thought) at /cgi-bin/yabb2/YaBB.pl
I decided that I’d use some htaccess and some PHP. So here it is:
The .htaccess
RewriteEngine On
RewriteRule ^cgi-bin/yabb2/YaBB.pl$ /damnthatyabb.php [L,NC]
The PHP
<?php
if ($_GET['msg']) {
echo 'Thanks for posting, spammer.';
}
else {
echo '<form action="/cgi-bin/yabb2/YaBB.pl" method="GET"> <textarea name="msg"></textarea><input type="submit" /></form>';
}
What it does
It basically takes their input and does nothing with it, but gives them a sense of achievement. We don’t want to disappoint our guests now, do we?