[DEV] - Simple but effective anti-spambot (2 lines only)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
JohnnyMalaria
Registered User
Posts: 5
Joined: Thu Jul 13, 2006 6:31 pm

[DEV] - Simple but effective anti-spambot (2 lines only)

Post by JohnnyMalaria » Mon Sep 17, 2007 3:00 am

MOD Title: Visual Confirmation Code Reversal
MOD Description: The user is required to enter the visual confirmation code in reverse.
MOD Version: 0.0.1

MOD Download: Not applicable
Last Stable version: Not applicable

Demo Board: http://www.enosoft.net/phpBB2
Demo Username: <anything>_phpbb2 (i.e., please put _phpbb2 on the end. This is a live forum and this will make it easier for me to identify tests from here so I can remove them.
Demo Password: Not applicable

Note: This has been implemented on phpBB 2.0.22

The forum I run has been plagued with spambot registrations. In a two month period I had over 900. I have tried a number of MODs to help with this but none have proven to be satisfactory.

In a somewhat desperate move, I decided to try a very simple modification that I expected to fail since I thought the spammers would have already come across it elsewhere.

Basically, if visual confirmation is enabled, the user is presented with a code that needs to be entered. All this modification does is require that the code is entered backwards.

Two code changes are required:

In /includes/usercp_register.php:

Change:

Code: Select all

				if ($row['code'] != $confirm_code)
to:

Code: Select all

				if ($row['code'] != strrev($confirm_code))
In /language/lang_english/lang_main.php:

Change:

Code: Select all

$lang['Confirm_code_explain'] = 'Enter the code exactly as you see it. The code is case sensitive and zero has a diagonal line through it.';
to:

Code: Select all

$lang['Confirm_code_explain'] = 'Enter the code that you see <font color="#FF0000"><b>BACKWARDS</b></font>. The code is case sensitive and zero has a diagonal line through it.';
The second change will need localizing for non-English language forums.

This deceptively simple modification has reduced my weekly hit from spambots from approx. 100 to zero.

Sorry if this has been suggested before - I searched and couldn't find anything.

Regards,

John.

jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [DEV] - Simple but effective anti-spambot (2 lines only)

Post by jalaln » Fri Sep 21, 2007 6:01 pm

Nice.
No more spambots for phpBB2 and phpBB3.

Seanie Morris
Registered User
Posts: 61
Joined: Fri Sep 01, 2006 12:05 pm
Location: Offaly, Ireland

Re: [DEV] - Simple but effective anti-spambot (2 lines only)

Post by Seanie Morris » Fri Oct 19, 2007 4:56 pm

I'm getting something I don't like to see! When I try to 'Register' on my forum after adding this mod, I get the following lines on the registration page:

Warning: Missing argument 10 for validate_optional_fields() in /home/content/t/u/l/tullamorelife/html/forum/includes/functions_validate.php on line 169

Warning: Cannot modify header information - headers already sent by (output started at /home/content/t/u/l/tullamorelife/html/forum/includes/functions_validate.php:169) in /home/content/t/u/l/tullamorelife/html/forum/includes/page_header.php on line 483

Warning: Cannot modify header information - headers already sent by (output started at /home/content/t/u/l/tullamorelife/html/forum/includes/functions_validate.php:169) in /home/content/t/u/l/tullamorelife/html/forum/includes/page_header.php on line 485

Warning: Cannot modify header information - headers already sent by (output started at /home/content/t/u/l/tullamorelife/html/forum/includes/functions_validate.php:169) in /home/content/t/u/l/tullamorelife/html/forum/includes/page_header.php on line 486


And I don't know how to solve this! (apart from removing the 'mod' of course)

Seanie.

ayalx
Registered User
Posts: 15
Joined: Fri May 12, 2006 7:58 am

Re: [DEV] - Simple but effective anti-spambot (2 lines only)

Post by ayalx » Fri Oct 19, 2007 11:14 pm

very useful, thanks!
i am going to try it.

bearplanet
Registered User
Posts: 18
Joined: Sun Dec 31, 2006 3:07 pm
Contact:

Re: [DEV] - Simple but effective anti-spambot (2 lines only)

Post by bearplanet » Sun Oct 28, 2007 8:53 am

Sound interesting. Let see it of it works. ;)

big_ass_ham
Registered User
Posts: 3
Joined: Sat Nov 24, 2007 1:07 am

Re: [DEV] - Simple but effective anti-spambot (2 lines only)

Post by big_ass_ham » Sat Nov 24, 2007 1:16 am

getting this wierd empty box...thats got a star like its a mandatory entry field. Except it doesn't say what to enter....and it actually isn't mandatory.

Image

big_ass_ham
Registered User
Posts: 3
Joined: Sat Nov 24, 2007 1:07 am

Re: [DEV] - Simple but effective anti-spambot (2 lines only)

Post by big_ass_ham » Sat Nov 24, 2007 1:17 am

nvrmind...it was my own screwup

JohnnyMalaria
Registered User
Posts: 5
Joined: Thu Jul 13, 2006 6:31 pm

Re: [DEV] - Simple but effective anti-spambot (2 lines only)

Post by JohnnyMalaria » Sun Feb 24, 2008 10:48 pm

Hello,

I just wanted to provide an update now that I have been running this MOD for nearly five months.

I haven't received a single spam registration!

John.

raymondl2
Registered User
Posts: 14
Joined: Thu Apr 13, 2006 5:17 am

Re: [DEV] - Simple but effective anti-spambot (2 lines only)

Post by raymondl2 » Fri Jul 04, 2008 6:20 am

Excellent idea -- I will try it but will change the english description to different wording (avoiding the word "backwards") just in case they start to scan for this! :D

Post Reply

Return to “[2.0.x] MODs in Development”