Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Posts
    19
    Plugin Contributions
    2

    Default Contact Us IP Ban [Support Thread]

    Prevents some spam sent using the contact us form by temporarily banning the spammer from using the contact us form by IP.

    By default if more than 3 messages are sent via the contact us form in any 30 minute period from a single IP then the IP is blocked from sending any messages via the contact us form for 30 minutes. If the spammer continues to attempt to send mail from the contact us form their ban period will be reset and their ban period will be extended.

    An admin page Admin->Configuration->IP Ban Setup is added to the Zen Cart admin to allow the number of attempts allowed, the attempt period and the ban period to be set.

    Please report any bugs/issues here

    Thank you,
    sj

  2. #2

    Default Re: Contact Us IP Ban [Support Thread]

    Can this mod be combined w/ captcha_using_ttf addon? The only file that seemed to conflict was contact us/header.php . I wasn't able to combine the 2 mods to make it work.

    Also not sure if checksums.md5 file is supposed to be uploaded into the store root folder?

    Thanks.

  3. #3
    Join Date
    Sep 2008
    Posts
    19
    Plugin Contributions
    2

    Default Re: Contact Us IP Ban [Support Thread]

    This module can be combined with the "CAPTCHA using TTF & GD" module. You are correct in stating that only contact_us/header_php.php conflicts.

    However, please be aware that the version of contact_us/header_php.php used in the CAPTCHA mod is from an earlier version of Zen Cart (presumably 1.3.8) and it is not compatible with php 5.3 and possibly not compatible with Zen Cart 1.3.9.

    In order to combine the two modules I have merged Captcha into the Contact Us IP Ban file. I have not tested this but I imagine it will work, it is attached.

    The files: Checksums.md5, gpl2.txt, install_ip_ban.sql, readme_ip_ban.txt, uninstall_ip_ban.sql should NOT be uploaded to your server.

    install_ip_ban.sql should be pasted into the SQL patch page in your Zen Cart admin as described in the readme.

    ONLY the folder "includes" and its contents, located inside the "package" folder, should be uploaded to your site. The "includes" folder should be uploaded to the store root. The "package" folder itself should not be uploaded.

    I hope this helps,
    sj
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2010
    Posts
    189
    Plugin Contributions
    1

    Default Re: Contact Us IP Ban [Support Thread]

    There is another alternative that I have found very effective at keeping bot spam out. Basically all you do is make the contact us form's action URL be "#", and use JavaScript to modify it to its real value when the page loads. The result is that spam bots cannot submit the form, since they don't know the real action URL (because most spam bots don't evaluate JavaScript).

    In the context of Zen Cart, the modification I used was this. At about line #17 of the file includes/templates/template_default/templates/tpl_contact_us_default.php, replace the line

    Code:
    <?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US, 'action=send')); ?>
    with

    Code:
    <?php echo zen_draw_form('contact_us', '#'); ?>
    And at the bottom of the file, add this:

    Code:
    <script>
    document.forms.contact_us.action = "<?php echo  zen_href_link(FILENAME_CONTACT_US, 'action=send') ?>";
    </script>
    The only downside is that it doesn't work if the user's browser doesn't have JavaScript enabled, but that's usually not a major concern.

    I'd like to know what you folks think of this approach.

    Regards,
    Apsona

  5. #5

    Default Re: Contact Us IP Ban [Support Thread]

    Quote Originally Posted by apsona View Post
    There is another alternative that I have found very effective at keeping bot spam out. Basically all you do is make the contact us form's action URL be "#", and use JavaScript to modify it to its real value when the page loads. The result is that spam bots cannot submit the form, since they don't know the real action URL (because most spam bots don't evaluate JavaScript).


    The only downside is that it doesn't work if the user's browser doesn't have JavaScript enabled, but that's usually not a major concern.

    I'd like to know what you folks think of this approach.

    Regards,
    Apsona
    So Apsona, you don't even use a captcha on your site with this modification? Would it work for the product reviews, account registration, and tell a friend forms too?

  6. #6
    Join Date
    Jan 2010
    Posts
    189
    Plugin Contributions
    1

    Default Re: Contact Us IP Ban [Support Thread]

    cowgirlmodel - Correct, there is no need for any extra CAPTCHA code. And yes, the technique works with any HTML form, although the code sample I provided was intended specifically for the contact us form in Zen Cart.

    There is one case I have found I need to guard against: When I tried this technique with my Wordpress installation, it was failing because the bots know the standard structure of the form submission URL (something like http://mysite/blog/wp-comments-post.php) so they just blindly post to that URL, and I still get spammed. The remedy was to change the name of submission URL as well. This is another minor tweak that might be necessary within Zen Cart, too.

    Apsona
    Last edited by apsona; 2 Aug 2010 at 03:39 PM. Reason: Additional information

  7. #7

    Default Re: Contact Us IP Ban [Support Thread]

    Quote Originally Posted by 1100101 View Post

    The files: Checksums.md5, gpl2.txt, install_ip_ban.sql, readme_ip_ban.txt, uninstall_ip_ban.sql should NOT be uploaded to your server.

    install_ip_ban.sql should be pasted into the SQL patch page in your Zen Cart admin as described in the readme.

    ONLY the folder "includes" and its contents, located inside the "package" folder, should be uploaded to your site. The "includes" folder should be uploaded to the store root. The "package" folder itself should not be uploaded.
    Thanks SJ. I kind of figured that about those files, so didn't upload them - just installed the sql patch. But I did want to make sure.

    Thanks for the heads-up on the TTF & PHP 5.3; I hope they will update the code for that mod soon. It does seem to work great on ZC139, except that it deletes the typed-in message if they get the captcha wrong. Also, I usually don't just overwrite files - I will double check to make sure I compared the TTF header w/ ZC139. Can't remember if that was a changed file or not.

    I will reinstall the IP ban and try the new header this week. Let you know if anything does not appear to work.

    Thanks!
    Last edited by cowgirlmodel; 2 Aug 2010 at 01:14 AM.

  8. #8

    help question Re: Contact Us IP Ban [Support Thread]

    Where do I download the Contact Us IP Ban module? I can't seem to locate a link anywhere. It sounds like a very useful mod.

  9. #9
    Join Date
    Sep 2008
    Posts
    19
    Plugin Contributions
    2

    Default Re: Contact Us IP Ban [Support Thread]

    Hey!

    It is available in the zen cart add on section: http://www.zen-cart.com/index.php?ma...index&cPath=40

    Here is a direct link: http://www.zen-cart.com/index.php?ma...oducts_id=1684

    Hope this helps.

  10. #10
    Join Date
    Oct 2010
    Location
    ireland
    Posts
    23
    Plugin Contributions
    0

    Default Re: Contact Us IP Ban [Support Thread]

    Hi,

    I'm using 1.3.9h

    captcha add_on installed which is
    CAPTCHA User Verification for Zen-Cart 1.3.9

    as per a couple of posts on the install, when i compared it seemed to conflict on the header_php.php...

    regardless in the spirit of things, i installed regardless confident i could reverse if needed...

    everything seemed to install fine, and on my contact page my captcha is working fine...

    however the ip_ban is not working...

    i configured it from admin. to allow 2 tries 3 tries etc. etc. and then proceeded to send plenty of contact messages within the allowed time which i left at 30mins and they all sent...

    there was no message displayed banning me (should there be?)

    the only thing i could think of is that i am working at present on a test site on my localhost...could this be the issue>>>??

    any help would be appreciated...im finally hoping to go live next week and this type of feature working would be a great help methinks...

    thanks

    donal


 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. PO Box Ban [support thread]
    By Steven300 in forum Addon Shipping Modules
    Replies: 34
    Last Post: 21 Sep 2023, 05:47 AM
  3. v150 Contact Us - Add Subject support thread
    By gjh42 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 9 Jan 2019, 06:04 AM
  4. v138a PO Box Ban 1.4 [support thread]
    By mvstudio in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 1 Feb 2018, 07:07 PM
  5. Contact Info Sidebox Support Thread
    By giuly in forum Addon Sideboxes
    Replies: 41
    Last Post: 7 May 2011, 11:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg