Author Topic: Forum Hard Hit Preventer v1.3  (Read 2278 times)

dougiefresh

  • Adminstrator
  • Expert Member
  • *****
  • Posts: 261
Forum Hard Hit Preventer v1.3
« on: Mar 01, 2016, 09:16:00 PM »

FORUM HIT HARD PREVENTER v1.3
By Dougiefresh -> Link to Mod


Introduction
One day, I released yet another mod to my website and noticed that once I published the link to the new thread, I started getting views on the thread.  In just over 15 minutes, 1,100+ views were logged for JUST THAT ONE THREAD!  It took deleting that thread for the attack to pretty much stop.  So I wrote this mod to try to play interference in attempts to bring a forum down....

This mod records all non-action visits (aka board index, individual boards and topics) from an IP address for all members EXCEPT for admin and moderators within the session data.  If the visitor is recorded as having more hits than a specified number of times per minutes, this mod will automatically place a ban in the .htaccess file.  The default (and minimum) is set to 30 (one hit every 2 seconds), which I feel is more than reasonable for most users.

This mod attempts to detect whether CloudFlare servers are being used, and writes the .htaccess accordingly.

Additional Requirements
Because we really don't want to ban our "wonderful" spiders, this mod turns on Search Engine Tracking Level to Standard setting in order to properly detect spiders.  For SMF 2.0.x, the Search Engine core feature is enabled in order to properly detect spiders.

Recommended Mods To Install
o More Spiders - Adds 83 more spiders/crawlers to your Spiders section in SMF!

Admin Settings
There is a new setting under Admin => Configuration => Security and Moderation called:
o Maximum number of visits allowed before automatic ban

Related Discussions
o [TIP/TRICK] How to ban users properly from .htaccess

Compatibility Notes
This mod was tested on SMF 2.0.11 and SMF 2.1 Beta 2, but should work on SMF 2.0 and up.  SMF 1.x is not and will not be supported.  

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
Copyright (c) 2016, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
« Last Edit: Mar 04, 2016, 07:18:38 PM by dougiefresh »

dougiefresh

  • Adminstrator
  • Expert Member
  • *****
  • Posts: 261
Re: [A] Forum Hard Hit Preventer v1.0
« Reply #1 on: Mar 01, 2016, 09:16:37 PM »

Below are some preview images of what the mod looks like when being used

Download Mod


FileName: Forum_Hit_Hard_Preventer_v1.3.zip
Size: 8 kb (8,309 bytes)
MD5: 861859631c3aab2f6b4caf7dd0f42929
Built: Oct 31, 2016, 06:47:08 AM
Downloaded 159 times

Changelog

Uploaded v1.3 - October 30th, 2016
o Fixed multiple undefined index errors in this mod.

Uploaded v1.2 - March 5th, 2016
o Added code to remove URL log from prefetch requests, since they are aborted anyways...
o Added code to allow Subs-HardHit.php to allow spiders to not log URLs...
o Modified installer to turn on Search Engines core feature during install.
o Modified installer to set Search Engine Tracking Level to Standard (or better).

Uploaded v1.1 - March 4th, 2016
o Added support for SMF 2.1 Beta 2.  No changes for SMF 2.0.x branch.

Uploaded v1.0 - March 1st, 2016
o Initial release to the public
« Last Edit: Oct 29, 2016, 08:01:46 PM by dougiefresh »