If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / non-CAPTCHA and Honey-pots

non-CAPTCHA and Honey-pots

Started by davewest on 15 Jun 2018, 3:53 AM · Views: 51,806

Results 61 to 80 of 135
9 Jun 2019, 2:38 PM
#61
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,904
Plugin Contributions:
23

non-CAPTCHA and Honey-pots

dbltoe:

reset around midnight and had dozens by noon today:frusty:My apologies to Dave and the group. I had thrown a copy of one of our sites on to a test server to troubleshoot and never took it down.:blush:

Not until I got an e-mail saying "Hey, yoursite.com!" (not the site's name) did I realize the spam was coming from the wrong copy of a site. Since both were on the same server, just looking at the header gave no clue.

I just knew it had to be something as this mod was working fine on other sites.

Moral of the story? Make sure you know where the UCEs are really coming from.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

10 Jun 2019, 12:23 PM
#62
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: non-CAPTCHA and Honey-pots

DrByte:

Strictly speaking, that's not HTML. It's text containing a URL. The HTML version of it would be something like:```
<a href="http://v.ht.stuff">otherstuff</a>


Okay, so you are saying they will keep trying? If the bot can't do what it wants to and knows it doesn't work, what options does the spammer/developer have? I'm no php guru but I don't see how they can overcome that. Of course it's not a great solution. I didn't write it. I'm only using it. So do you have an alternate solution?

The only mods included in this template is the COWOA. There's no other core file changes. And COWOA does not alter the create account scripting, just adds a bit. I am using the Diva's github version. Haven't looked at Dave's. 

DrByte, I appreciate your attention to this! I have to make a tiny complaint though. A change log would be massively helpful.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

10 Jun 2019, 12:33 PM
#63
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: non-CAPTCHA and Honey-pots

One more question about the new version of the mod. It's still says it works for both 1.5.5 and 1.5.6 but the package only has a folder for 1.5.6. Is this still supposed to work for 1.5.5?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

10 Jun 2019, 2:35 PM
#64
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: non-CAPTCHA and Honey-pots

delia:

One more question about the new version of the mod. It's still says it works for both 1.5.5 and 1.5.6 but the package only has a folder for 1.5.6. Is this still supposed to work for 1.5.5?

Drag and drop for 1.5.6b... compare for 1.5.5 works... I had the code based on php7+, but DrByte fixed that with his edits. I've not had time to test on a 1.5.5 version yet..

Dave
Always forward thinking... Lost my mind!

11 Jun 2019, 2:19 PM
#65
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: non-CAPTCHA and Honey-pots

Thanks for working on this, DrByte.

11 Jun 2019, 7:29 PM
#66
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: non-CAPTCHA and Honey-pots

Here's a simple patch to ignore http URLs in customer names:
https://github.com/zencart/zencart/pull/2436

It does similar to what Delia posted, just in a different way to catch https as well.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

11 Jun 2019, 9:50 PM
#67
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: non-CAPTCHA and Honey-pots

Sent an update in...

Added a function to catch url's in most common fields that I could add url's to, detects, and resets to the success page. For me, this forced a session reset due to the hack I used.

Unfortunately, I was in a rush editing, testing, packaging so the first update I sent in had a reference to my registration success page, I just sent a corrected update to replace it with the correct reference page as

  zen_redirect(zen_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL')); 

Dave
Always forward thinking... Lost my mind!

12 Jun 2019, 12:38 PM
#68
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: non-CAPTCHA and Honey-pots

BTW, Incredibly clever mod, Dave. Thank you for contributing this.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

12 Jun 2019, 3:30 PM
#69
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: non-CAPTCHA and Honey-pots

One very small suggestion would be to enhance the wording on the Slider Question Text setting. Perhaps something like "Please move the slider until you see the word 'Human'. This helps us combat spam."

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

12 Jun 2019, 5:06 PM
#70
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: non-CAPTCHA and Honey-pots

swguy:

One very small suggestion would be to enhance the wording on the Slider Question Text setting. Perhaps something like "Please move the slider until you see the word 'Human'. This helps us combat spam."

I use 'Please slide to the number 21!' on my site, but ether way, I haven't tried a text reader on it yet... comes as default, but easy to change.

One thing I've also been tracking, bots tend to pick the default value in the input field first. The default value is used to position the slider at startup. This value '25' should not be used as your test number. I used a max of 50, however larger numbers can be used, but the higher the number the harder it is to use your finger on a phone!

Dave
Always forward thinking... Lost my mind!

12 Jun 2019, 5:17 PM
#71
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: non-CAPTCHA and Honey-pots

davewest:

One thing I've also been tracking, bots tend to pick the default value in the input field first. The default value is used to position the slider at startup. This value '25' should not be used as your test number.

If you're accepting PRs, I'd like to submit a change to generate these values randomly rather than use static strings and numbers.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

12 Jun 2019, 9:30 PM
#72
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: non-CAPTCHA and Honey-pots

swguy:

If you're accepting PRs, I'd like to submit a change to generate these values randomly rather than use static strings and numbers.

I have some corrections to do before I upload to github, once I do I'll open it for PR's and post back here.

Dave
Always forward thinking... Lost my mind!

13 Jun 2019, 5:58 PM
#73
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: non-CAPTCHA and Honey-pots

davewest:

I have some corrections to do before I upload to github, once I do I'll open it for PR's and post back here.
After adding some suggested edits and increasing the regex line to include some other common strings, its back up on github here..

I have a feeling the regex string may not work below php7x, if you have issues, let me know.. Regex line was created using a regex editor, then tested in a debugger until I got it working the way I wanted.

looking for > ' www. cowboygeek.com http:// www. cowboygeek.com mailto:[email protected] [email protected] www. url-with-querystring.com/?url=has-querystring'

Dave
Always forward thinking... Lost my mind!

13 Jul 2019, 2:22 AM
#74
chrislane avatar

chrislane

New Zenner

Join Date:
Feb 2019
Posts:
18
Plugin Contributions:
0

Re: non-CAPTCHA and Honey-pots

This is a great script! Thank you. I have one issue tho.. I only need the slider on the contact form as I'm getting tons of contact form spam. No spam registrations, etc.

So I uploaded:
/admin/includes/functions/extra_functions/init_noncaptcha.php
/includes/classes/observers/auto.non_captcha_observer.php
/includes/templates/responsive_classic/css/stylesheet_noncaptcha.css
/includes/templates/responsive_classic/templates/tpl_contact_us_default.php
/includes/modules/pages/contact_us/jscript_nonCaptcha.php

And in auto.non_captcha_observer.php I edited this:

    public function __construct()
    {
        $this->attach($this, [
            'NOTIFY_NONCAPTCHA_CHECK',
            'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK',  <-- I REMOVED THIS LINE.
            'NOTIFY_CONTACT_US_CAPTCHA_CHECK',
            'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK', <-- AND I REMOVED THIS LINE.
        ]);
    }

Does that sound good? Any other suggestions?

13 Jul 2019, 5:11 AM
#75
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: non-CAPTCHA and Honey-pots

ChrisLane:

This is a great script! Thank you. I have one issue tho.. I only need the slider on the contact form as I'm getting tons of contact form spam. No spam registrations, etc.

So I uploaded:
/admin/includes/functions/extra_functions/init_noncaptcha.php
/includes/classes/observers/auto.non_captcha_observer.php
/includes/templates/responsive_classic/css/stylesheet_noncaptcha.css
/includes/templates/responsive_classic/templates/tpl_contact_us_default.php
/includes/modules/pages/contact_us/jscript_nonCaptcha.php

And in auto.non_captcha_observer.php I edited this:

public function __construct()
{
    $this->attach($this, [
        'NOTIFY_NONCAPTCHA_CHECK',
        'NOTIFY_CREATE_ACCOUNT_CAPTCHA_CHECK',  <-- I REMOVED THIS LINE.
        'NOTIFY_CONTACT_US_CAPTCHA_CHECK',
        'NOTIFY_REVIEWS_WRITE_CAPTCHA_CHECK', <-- AND I REMOVED THIS LINE.
    ]);
}
> 
> Does that sound good? Any other suggestions?
Not really a good idea.. turns off all test by removing those lines.

To turn off slider for all, theirs a switch for that, to turn off just some of them.. comment out the slider test line and the code chunk in the template file.  This well keep the other fields actively working for you.

Commenting out lines makes it easy to reactivate things later on.  

includes/classes/observers/auto.non_captcha_observer.php
comment out

$this->testSliderFields('create_account');


includes/templates/responsive_classic/templates/tpl_modules_create_account.php
<?php if (SPAM_USE_SLIDER == 'true') { ?> <div class="slidecontainer"> <p><?php echo HUMAN_TEXT_DISPLAYED; ?></p> <?php echo zen_draw_input_field(SPAM_TEST_IQ, '', ' min="0" max="50" value="25" class="slider" id="id1"', 'range'); ?> <br /><br /> <span>Value:</span> <span id="f" style="font-weight:bold;color:red"></span> </div> <script> $(document).ready(function () { var slideCol = document.getElementById("id1"); var y = document.getElementById("f"); y.innerHTML = slideCol.value; // Display the default slider value // Update the current slider value (each time you drag the slider handle) slideCol.oninput = function() { y.innerHTML = this.value; if (this.value == "<?php echo SPAM_TEST; ?>") { y.innerHTML = "<?php echo SPAM_ANSWER; ?>"; } } }); //--></script> <?php } ?>

Dave
Always forward thinking... Lost my mind!

28 Jul 2019, 7:06 PM
#76
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: non-CAPTCHA and Honey-pots

Dave, if you could put this mod on Github there are a few ideas I'd like to submit as PRs.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

29 Jul 2019, 3:26 AM
#78
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: non-CAPTCHA and Honey-pots

Let me know if you have problems with PR's, still learning in's and outs of github...

FYI.. with my site version I placed code to do logs when and where the honey pot is triggered. As such, the regex string is catching URL and email addresses in fields where they shouldn't be. Which is killing bots before the other fields are checked.. :smile:

Dave
Always forward thinking... Lost my mind!

29 Jul 2019, 8:39 AM
#79
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: non-CAPTCHA and Honey-pots

Please let me know (by PM) the tells you're seeing. I'm collecting hints to add to a spam filter contribution to augment what zenNonCAPTCHA does.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

23 Sep 2019, 10:55 PM
#80
mariemeh avatar

mariemeh

New Zenner

Join Date:
Mar 2019
Location:
Montreal
Posts:
39
Plugin Contributions:
0

Re: non-CAPTCHA and Honey-pots

http://myembroideryhaven.com
v156a, php 7.1.32
Column layout grid
Langage Currency Links in Headers
Edit_orders 4.3.5
Canada Post shipping module
Flexible footer Menu
Simplified Social Share
Ip blocker
Ultimate SEO Urls
Newsletter Subscribe
Reward Point Full Suite
Recover Sales Cart

1st question: would my version of php cause issues with this mod?

2nd question: Dave are you using a mod for newsletter?

I'm asking these questions because i'm having a hard time making the mod work on my site and I really need it to work on my website with a mod for newsletter only subscriber. I saw Dr Byte's post referring to adding older files that are no longer in zc, however, I saw a "newsletteronly" class on your tpl_subscribe_default.php and thought maybe it would work if I used the same newsletteronly mod. Right now when I go live with zenNon-Captcha, I get the not a human yet message when creating an account and emails don't get added to the list for the newsletter subscription.