more on portfolio









August 2008
M T W T F S S
« May «-»  
 123
45678910
11121314151617
18192021222324
25262728293031






 


How to: Block Spambots for phpBB

Log entry of March 22nd 2008 06:51:05 pm
Filed under: How To, PHPbb, PHPbb Mods, phpBB Related
« Paper Claws
The case of a missing wordpress version. »

This is a clever idea in blocking spambot for phpbb 2 (for phpbb 3, click here).

It was posted by jalaln, a member from phpbb community. This modification is to block registrations from timezone GMT-12 that is used by almost all spambots.

Here’s the coding:
#
#-----[ OPEN ]——————————————
#

includes/usercp_register.php

#
#—–[ FIND ]——————————————
#

if ( !($row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_ERROR, ‘Could not obtain next user_id information’, ”, __LINE__, __FILE__, $sql);
}

$user_id = $row['total'] + 1;

#
#—-[ AFTER, ADD ]——————————————
#

if( $user_timezone == ‘-12′ )
{
die();
}
#
#—–[ SAVE/CLOSE ALL FILES ]——————————————
#EoM
I’m not sure if it really blocks spambot for phpbb until I tried it out. But as he stated, he’d been using this Modification since 19th June 2007 and never had a single spambot. Here’s a few other notes that was mentioned on his post [ view post ].
Don’t worry about Blocking GMT-12, why?
No human habitations are in this time zone. UTC-12 is a nautical time zone comprising the high seas between 180°W and 172°30′W longitude. Subtract twelve hours from Coordinated Universal Time to obtain the time for this zone. Ships using this time are the last to begin each calendar day.
Basically, the above mentioned is stated in Wikipedia about UTC - 12.


He also stated…
Why is it used by almost all spambots?
They are coded to select the first option in any dropdown box.
Note to self: gotta test this out if the spambot are really stupid.

Now my opinion is, if it really true and this is one of the many greatest solutions for stopping spambot, jalaln has to work on his MODs a little more.

Here’s my two doubts:
  • Registered user can still change the option to GMT -12. The value for GMT -12 has to be disable if a user is editing his or her profile.
  • During the registration, the SPAMBOT ip have to be recorded for future reference. In any case that the owner choose to block the IP address, he/she can do so.
Anyway, this is a very interesting idea about blocking Spambots from phpBB.

Definitely this is going to be listed inside phpBB eNcore.
But my own version of it.

Just for the fun of it, check out this flash animation about spam.






Leave a Reply