Misc Anti Spam

Started by Arantor, April 23, 2013, 12:42:13 AM

Previous topic - Next topic

Arantor

Link to Mod

Misc Anti Spam adds a couple of minor defences to your forum to stop miscreants getting through. They're no magic bullet but every little helps.

* A time gate on registration to prevent overly quick registrations from being accepted.
* Empty field appearing on all places a CAPTCHA would (has two variants, a hidden field that should stay empty, and a field that will be visible that a user has to actively empty out, either way the field needs to be empty before the form will be accepted)

Most of the time, most users won't see anything because it's supposed to work in the background. But if they do get shown the must-be-empty field, the attached screenshot is what they'll see.


Modifies:
Sources/Register.php
Sources/Subs-Editor.php
Themes/default/GenericControls.template.php




Licence: CC-BY-ND 3.0 

(Feel free to use it on whatever SMF install you have but you can't create a derivative work without my specific permission.)

Colin

Quality mod. Cheers, Arantor.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Ricky.

QuoteA time gate on registration to prevent overly quick registrations from being accepted.
This this I was missing in SMF, simple and effective.

DarkPAN

Good work, as expected. Fills a gap.


QuoteI doubt anyone will actually see this comment, and that's cool too.
You'd be surprised how many will read that.

xrunner

Couple of questions:

1. I installed it on my 2.0.4 test forum, and never see the empty box. It seems that is normal? But how often will it appear? How does it work if it doesn't dhow on the screen?

2. I installed it on my spam test forum which is 2.1, using emulation. It installed seemingly OK, do you think it will operate in v2.1? I can't tell because I can't see any box

Thanks!

Arantor

Quote1. I installed it on my 2.0.4 test forum, and never see the empty box. It seems that is normal? But how often will it appear? How does it work if it doesn't dhow on the screen?

Check the source. It should be showing in the source as a CSS-masked input ;)

It will show up for 50% of users. This is determined when the CAPTCHA is generated (so when it would regenerate the normal CAPTCHA text or switch questions, it would re-decide whether to show the text box or not)

Quote2. I installed it on my spam test forum which is 2.1, using emulation. It installed seemingly OK, do you think it will operate in v2.1? I can't tell because I can't see any box

That's no big surprise, though I never tested it in 2.1. Again you can test it by checking the source.

xrunner

OK I found this in the modded forum and it isn't there in the unmodded forum.

<div class="smalltext vv_special">
               This box must be left blank:
               <input type="text" name="guid-value-44bd" autocomplete="off" size="30" value="" />
            </div>

Arantor

That's as it should be, as in absolutely intentional.

There's no need to display it to legitimate users.

xrunner

Quote from: Arantor on April 23, 2013, 11:46:16 AM
That's as it should be, as in absolutely intentional.

There's no need to display it to legitimate users.

I see.

It's also there in the SMF 2.1 page source so I can test it there also (if I get more spammers). I do see the box appear in the 2.1 registration page sometimes now.

Arantor

When it appears, it'll have a number in it that (all) users have to remove. In that situation it's also sort of an intelligence/reading test ;)

xrunner

Quote from: Arantor on April 23, 2013, 11:48:25 AM
When it appears, it'll have a number in it that (all) users have to remove. In that situation it's also sort of an intelligence/reading test ;)

Yes, I must say it's a very inspired idea. :)

Arantor

Thanks :)

It's actually over and above what's in Wedge (Wedge has the timegate and the empty box), while the box-that-has-something-but-needs-emptying is a bit more experimental. If it works, I might add it into Wedge.

Powerbob




My SMF 2.1 Beta test site; http://www.pplb.net/smf21/index.php

xrunner

I tested this mod today and I can say it really works well. I got 100% spam blockage on my forum using this. It's simple and effective!

Arantor

Thanks :)

What amazes me is that the techniques involved are amongst the *simplest* measures that can be used and yet they have proven to be surprisingly effective.

busterone


Arantor


Chalky

It looks great Arantor!  I've installed it on my test site and kept hitting the register page until it showed me the box that needs to be cleared.  Only I have two boxes.  Presumably this is because I have two questions, but is that how it's supposed to be?


Arantor

That's ironic. I already fixed that bug a couple of years ago - since I made the *exact* same bug in Wedge, but in Wedge's case the box was *never* shown to users, so you never saw duplicates.

GenericControls.template.php
if ($verify_context['empty_field'])
replace with:
if ($verify_context['empty_field'] && empty($i))

I'll package it up properly in a minute.

Chalky


Advertisement: