Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-07-27 15:00:26

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

... ask anti-spam question on *contact* form?

I’m using zem_contact_reborn but the help doesn’t mention this kind of input, and a search on this forum yielded no results.

Something simple such as: 1 + 2 =, or a Q & A question.

Is it possible?

Getting lots of email spam as of late :/

Offline

#2 2014-07-27 16:01:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: ... ask anti-spam question on *contact* form?

Hi Ross

did you try zem_prblock? Although the plugin is no longer available in Alex’s site its compressed version is available from the forum thread.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2014-07-27 16:51:22

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: ... ask anti-spam question on *contact* form?

Hi Yannis,

It’s not for comments, it’s for the contact form itself; to stop bot/automated emails.

Offline

#4 2014-07-27 21:39:37

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: ... ask anti-spam question on *contact* form?

adi_contact may be of use

Offline

#5 2014-07-27 21:43:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: ... ask anti-spam question on *contact* form?

Or if you don’t mind a bit of PHP you can roll your own spam trap (which also has a link to the pap_contact_cleaner plugin that works with ZCR’s callbacks to help weed out spambots).

Q&A methods won’t stop human spammers employed by the pharma companies to just fill out forms, who seem to be making an annoying comeback of late…


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2014-07-28 04:07:21

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: ... ask anti-spam question on *contact* form?

rossharvey wrote #282478:

Hi Yannis,

It’s not for comments, it’s for the contact form itself; to stop bot/automated emails.

ops… i had a brain pause there.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 2014-07-28 04:38:18

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: ... ask anti-spam question on *contact* form?

Hi Ross, I just visited your site and the contact form page where I noticed that you do not use the inbuilt spam prevention

<txp:zem_contact_checkbox label="This is not spam" /> after the textarea field should reduce bot generated spam to the minimum. You can of course edit the message which will appear.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#8 2014-07-28 09:53:49

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: ... ask anti-spam question on *contact* form?

Thanks very much for the suggestions!

Very helpful (as always).

Offline

#9 2014-07-28 11:58:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: ... ask anti-spam question on *contact* form?

colak wrote #282490:

<txp:zem_contact_checkbox label="This is not spam" />

I may be a little dim here so please excuse my ignorance, but I’ve seen this tip in a few places and I can’t see how it helps reduce spam. Does it actually work?

From my experience, one thing that differentiates a large chunk of spam bots from humans is that they are greedy. They vacuum up all content and use it, because any field they miss might be the one that generates a sale, or could be the one needed to complete the submission process (e.g. “I agree to the terms of submission”).

Put it this way: if I was writing a noddy spam bot, my first port of call after sniffing out a potential contact form would be to:

  1. Find the message body/subject and insert my annoying content.
  2. Find a name and/or email field and put some fake, yet valid, stuff in there.
  3. Search for all remaining <input> or <select> elements and set them to 1. In other words, check all checkboxes, and choose the first radio/select option, just in case it’s important.

Because my spam bot isn’t very bright, doesn’t understand English, and I want to maximise my chance of the payload reaching its destination, that’s my default modus operandi. So adding an ‘are you human’ (or equivalent) checkbox means my spam bot ticks it by default and thwarts the anti-spam measure; a measure which, incidentally, happens to inconvenience real users who might miss the checkbox and have their message ignored or not delivered.

pap_contact_cleaner (and other custom spam-diminishers I’ve employed) uses the inverse approach. It randomly adds one or two form fields that are hidden via CSS (or even hidden using HTML, but that’s easier to detect automatically without Javascript). It doesn’t matter what field types they are: checkboxes, inputs, anything. Because they’re set as display:none, humans (and hopefully screen readers, but I don’t know) won’t see them so will not even know they exist to fill them out. But bots, being the voracious critters they are, will see the fields and go “om nom nom conteeeent shlurrp yum” and fill in the field(s).

Thus, upon form submission you can safely drop any message that has any content whatsoever in any of the hidden form fields, because it MUST be spam.

Clever bots may of course read the fields better, and if they smell a bit different to the others (e.g. if they detect the field’s visibility) might choose not to complete them. But that’s harder to do, as they won’t necessarily know if the fields are invisible because other fields might ‘trigger’ them to appear (e.g. as part of a form wizard or something). In fact, you can deliberately confound them by doing that very practice: have your legitimate contact form fields only appear after ticking a box, clicking a button, selecting a subject / message type, etc. That way, the bot will have little choice but to touch every inputtable element in the <form> because it won’t know which fields are hidden for spam purposes and which are real, initially-hidden fields that need filling out by humans.

Anyway, as I say, I might have missed something completely obvious in the ‘Are you human’ checkbox approach. Please would someone enlighten me on its effectiveness, and if it works, how it does so. Thanks!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#10 2014-07-28 12:06:51

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: ... ask anti-spam question on *contact* form?

^ Makes sense.

I’m testing it [the simple checkbox] as we speak.

So far it has stopped the barrage (from a singular source).

Offline

#11 2014-07-28 12:35:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: ... ask anti-spam question on *contact* form?

rossharvey wrote #282500:

So far it has stopped the barrage (from a singular source).

Maybe I give spam bots too much credit then! If it works, it works, nice.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#12 2014-07-28 12:57:14

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: ... ask anti-spam question on *contact* form?

Using the little snippet basically stopped all bot spam from my sites. I do get the occasional spam message but they are too few and too sparse to worry about.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB