Author Topic: Anti-Spam Verification Questions for SMF 1.1.7  (Read 47296 times)

Offline Deprecated

  • Simple Machines Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
    • Deprecated's Demo Site
Anti-Spam Verification Questions for SMF 1.1.7
« on: November 23, 2008, 01:37:46 PM »
Link to Mod

Adds SMF 2.0's anti-spam verification questions to SMF 1.1.7. You can add up to 5 questions which must be answered by the applicant before registration is permitted.

Here are some examples of types of questions that could work. I usually put a hint in the question so that humans can easily figure out what to enter. Spambots on the other hand don't understand human hints. :P

Examples:

  • What year is it? (4 digits)
  • Are you a robot? (yes or no)
  • Please leave this answer blank.

I wrote this modification especially just for all of you 1.1.7 forum operators to see if I can solve your spambot problem once and for all. I've been chuckling as I've been writing my codes, thinking about all the probably weeks of effort that the spambot programmers put into their spammer scripts, thinking that with a few days worth of my own labor I may have possibly wiped them out completely! :D

Configuration

The settings for this modificaton are located in Admin -> Members -> Registration -> Settings.

Revision history

Version 1.0 (November 23, 2008) Original release.

Donations

      If you like my modification packages, please donate to support their continued development. Any amount will be greatly appreciated. Thank you!

Offline Deprecated

  • Simple Machines Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
    • Deprecated's Demo Site
Re: Anti-Spam Verification Questions
« Reply #1 on: November 23, 2008, 02:09:26 PM »
Please also be advised that I am working on a Version 2 of this modification to add verification questions and CAPTCHA to guest posting!

I'm on a mission from God to kill the spambots and make the botmasters cry!!! >:D

Offline ThePharaoh

  • Jr. Member
  • **
  • Posts: 137
  • Gender: Male
  • SMF 2.0 RC1.2
    • Classic Winnebagos!
Re: Anti-Spam Verification Questions
« Reply #2 on: November 23, 2008, 02:58:59 PM »
Thank you so much for your pro-active approaches and dedication to the improvement of everyone seeking to enhance not only the enjoyment of our forum members, but even more so to the crews who operate the controls!

Spambots are certainly one of the biggest detractors to peaceful web forum enjoyment.  You go bro... squash those spiders with the heel of your boot!

- Mark
So let it be written; so let it be done!

Offline kyle007

  • Semi-Newbie
  • *
  • Posts: 66
  • Gender: Male
Re: Anti-Spam Verification Questions
« Reply #3 on: November 23, 2008, 03:59:40 PM »
I installed it, i wish it could stop that damn spams... Wait and see :) Thx Deprecated ;)

Offline Deprecated

  • Simple Machines Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
    • Deprecated's Demo Site
Re: Anti-Spam Verification Questions
« Reply #4 on: November 23, 2008, 04:39:11 PM »
You're welcome guys! (and gals!)

I'm totally committed to this modification, and I intend to address any problems, fix any errors, whatever it takes to make sure that every SMF 1.1.7 forum can use this mod if they want to.

Like any mod package I'm sure there will be problems. I hate the botmasters and their spambots so much, and I like you guys 'n gals so much, that I'll do whatever it takes to keep the spambots away from SMF! :D

Bring it on! :P :P :P

Offline GazOutEast

  • Jr. Member
  • **
  • Posts: 276
  • Gender: Male
  • If it's fixed - I can break it
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #5 on: November 23, 2008, 05:18:32 PM »
Although I've just found this thread, I can testify that combining a captcha with a question+answer method works very well and reduces the spam-bot load almost 100%

Will be very interested to see the guest posting verification though - especially if it's available as a standalone mod to supplement existing registration verification

(I like small stand alone mods rather than big all-encompassing ones - much easier to debug if they break something)

Gaz
I have 20:20 vision - I can see anything bigger than 20" x 20"

Offline Deprecated

  • Simple Machines Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
    • Deprecated's Demo Site
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #6 on: November 23, 2008, 05:28:08 PM »
I'm 90% done with the guest posting version of Anti-Spam Verification Questions. It adds CAPTCHA and the exact same verification questions to guest posting too. It will be Version 2.0 of this mod.

The additional changes are to Post.php and Post.template.php. I've got the template work done, but I'm having the devil of a time coding the Post.php changes. Actually, I think I've got the CAPTCHA working there, but my verification questions don't work yet.

I expect to post a Beta test version in the Coding Discussion board because there are so many variations and options to posting (polls, events, etc.) that I can't test them all myself in any reasonable time frame (I don't want to spend 100 hours just testing every combination). For that reason I'm going to request help testing that part of the mod.

I hope I'm not deluding myself, but I think when we put the finishing touches on this mod, including the guest posting, I think the spambots are going to have to go bother forums running other than SMF. :)

Offline NIBOGO

  • Language Moderator
  • Simple Machines Hero
  • *
  • Posts: 3,103
  • Gender: Male
  • FF Fan
    • MUNDO-SE
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #7 on: November 23, 2008, 05:59:29 PM »
Thanks a lot , great modification ;)

Offline splatman

  • Semi-Newbie
  • *
  • Posts: 63
  • Gender: Male
    • Keys to the Magic
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #8 on: November 23, 2008, 08:10:30 PM »
First off - fantastic work creating this feature.  Thank you. 

One small request, and I know it's probably easy enough to add this on my own, but I'm still learning how to edit and work with PHP files....Can you add a comment above the questions telling the users that this is just an anti-bot measure...I just know there are going to be people out there wondering why they need to tell me how many letters are in the word four and if they are human or not.  Some of the people who sign up for my forum are a bit older and don't have a clue about all the spammers and bots out there.

-OR-

Could you mention which file and the approximate location of where I would add this comment?  I figured just above the first question would be great.

Thanks again for your mod -

Jay

Offline Deprecated

  • Simple Machines Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
    • Deprecated's Demo Site
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #9 on: November 23, 2008, 08:40:10 PM »
No, you don't understand. There are no prearranged or pre-installed questions. You have to pick them yourslef. Thats why this mod is so strong. It depends on each forum operator to pick their own questions. My examples were merely examples. They are NOT included in the mod. You must pick your own questions, although of course you can use mine if you like.

This mod requires that you MUST program in at least one of your own questions, or you won't even see it asking any questions when members register. This modification is all about you supplying your own questions. That's why it is so unbeatable, because the bot scripts can never adjust to different questions on every forum they want to attack.

Got it? :)

Offline GazOutEast

  • Jr. Member
  • **
  • Posts: 276
  • Gender: Male
  • If it's fixed - I can break it
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #10 on: November 23, 2008, 09:14:39 PM »
yum yum - looking forward to that - forum relevant verification questions :D

Ooh the possibilities to really have fun with it ;)
I have 20:20 vision - I can see anything bigger than 20" x 20"

Offline Deprecated

  • Simple Machines Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
    • Deprecated's Demo Site
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #11 on: November 23, 2008, 09:17:06 PM »
Gaz, there are no prearranged questions. You pick your own, whatever works for your forum. I'm just the messenger. You have to pick the messages yourself. Whatever you want! Enjoy! :)

Everybody, please let me know (1) if it works, or (2) if it doesn't, and what the problems are.

This is a new mod. I want to get the bugs out as quickly as possible. Please give me feedback!

Offline mashby

  • On Hiatus
  • Simple Machines Hero
  • *
  • Posts: 1,574
  • Gender: Male
  • I love beer and stuff.
    • Choppix
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #12 on: November 23, 2008, 09:28:58 PM »
It's working fine, I'm just seeing this in the Forum Error log:
8: Undefined index: anti_spam_ver_resp_1
File: /home/choppixc/public_html/Sources/Register.php
Line: 164

Line 164 is:
      if (   (!empty($modSettings['anti_spam_ver_ques_1']) && strcmp(strtolower($modSettings['anti_spam_ver_ans_1']), strtolower($_POST['anti_spam_ver_resp_1']))) ||

Based on the errors, I can see every time a bot fails, which I guess is cool
What I never knew, I never will forget.

Offline splatman

  • Semi-Newbie
  • *
  • Posts: 63
  • Gender: Male
    • Keys to the Magic
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #13 on: November 23, 2008, 09:47:23 PM »
No, you don't understand. There are no prearranged or pre-installed questions. You have to pick them yourslef. Thats why this mod is so strong. It depends on each forum operator to pick their own questions. My examples were merely examples. They are NOT included in the mod. You must pick your own questions, although of course you can use mine if you like.

This mod requires that you MUST program in at least one of your own questions, or you won't even see it asking any questions when members register. This modification is all about you supplying your own questions. That's why it is so unbeatable, because the bot scripts can never adjust to different questions on every forum they want to attack.

Got it? :)

No, I do understand...Maybe you misunderstood my comment. 
I know that I need to enter my own questions, and I have...what I was asking about was being able to place some text above where the questions show up saying that "The following questions are for anti-bot measures", etc. 

I realized that I need to create my own questions,  I would just like to explain to the person registering why they are answering silly questions.  A sort of, title to the section.   

Got it?  :)

« Last Edit: November 24, 2008, 06:12:10 PM by splatman »

Offline societyofrobots

  • Jr. Member
  • **
  • Posts: 141
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #14 on: November 24, 2008, 12:29:58 AM »
Hmmmm I am getting this error when trying to install:
3.     Execute Modification     ./Themes/default/Register.template.php     Test failed

I went ahead with the installation anyway, no errors, but its not working.

I also already installed the reCaptcha before this. Thoughts? I attached the file.

Offline Sabre™

  • Simple Machines Hero
  • ******
  • Posts: 2,018
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #15 on: November 24, 2008, 02:38:55 AM »
hahaa
You really are on a mission aren't ya mate!? lol

Good job, you're correct in stating no bot slouch will be able to adjust to the endless variety in questions, because of your mod :)

However, I found that if you have no answer for the answer
eg. "Please leave this answer blank"

You receive this error
Code: [Select]
8: Undefined index: anti_spam_ver_ans_3
File: /****/Sources/Register.php
Line: 231

As you can see, it is my 3rd question.

The line of code the error points to is
Code: [Select]
(!empty($modSettings['anti_spam_ver_ques_3']) && strcmp(strtolower($modSettings['anti_spam_ver_ans_3']), strtolower($_POST['anti_spam_ver_resp_3']))) ||
I suppose that line makes no difference, as if it were answer for question 2, or question 1, then it would point to their respective line in that template.

Anyho, just thought I'd point it out.

Great job Deprecated :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)

[whoop there it iiisss]

Offline forumite

  • Charter Member
  • Jr. Member
  • *
  • Posts: 333
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #16 on: November 24, 2008, 02:42:20 AM »
I see a few of the same errors that mashby reported here. Could someone please confirm that mashby's conclusion is correct? TIA.

(Apologies mashby, don't mean to challenge you; I'm just looking for confirmation.)

Offline Sabre™

  • Simple Machines Hero
  • ******
  • Posts: 2,018
  • Gender: Male
  • IF IT AINT BROKE, I CAN FIX IT TILL IT IS!!
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #17 on: November 24, 2008, 03:16:50 AM »
I would just like to explain to the person registering why they are answering silly questions.  A sot of, title to the section.

Like the image in my attachment yeah?
But obviously your own layout?

You add the text in your  languages/Modifications.english.php, and the other edits in your  Register.template.php  in your default theme.

If you need further assistance, Im sure someone could add code here for the layout you'd prefer, after you've provided the necessary information

Good luck :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)

[whoop there it iiisss]

Offline Deprecated

  • Simple Machines Hero
  • ******
  • Posts: 3,031
  • Gender: Male
  • I tried being reasonable... I didn't like it.
    • Deprecated's Demo Site
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #18 on: November 24, 2008, 07:41:08 AM »
Thanks to mashby, Sabre and forumite for pointing out errors. This modification is pretty complex and I expected to shake out a few errors before we've got it perfect. Fortunately, unless I'm mistaking, other than adding entries to your error log the error is not causing any harm. I don't see any reason you can't continue to use the mod while I fix it, and I hope to fix it later today. Thank you for pointing me to the right problem area.

societyofrobots, please, in the future do not install mod packages when you get test failure warnings. (In some instances you can ignore template errors, but that is only for experts who are planning on doing manual theme edits) Also, do not uninstall mod packages if you get test failure warnings.

I'll add a warning later today: this modification is NOT compatible with the reCAPTCHA modification. They both modify code in the same area. You have to pick one or the other, but the good news is that either mod should be a perfect defense against spambots.

Sabre, yep I am on a mission. I don't even run any 1.1.7 forums myself, but I saw what the spambots were doing to my SMF 1.1.7 brothers, and that pissed me off so much that I spent a couple days writing this mod. I'll be damned if I'll let those spammers mess with my SMF bros! >:D


Offline damnitmike

  • Semi-Newbie
  • *
  • Posts: 72
  • Gender: Male
Re: Anti-Spam Verification Questions for SMF 1.1.7
« Reply #19 on: November 24, 2008, 07:44:54 AM »
Quote
I hate the botmasters and their spambots so much,

Can you make it so if they fail it tars and feathers them?

Just kidding....

How about a box, when checked by the admin, if the registration fails, it immediately slaps their spambotbutts right on the banlist.......

Yeahhhhhh........

Dep....Love your work bro!

High 5's to ya! 8)