Rip Prevention Mod
|Downloads of Rip Prevention Mod are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account|
|Rip Prevention Mod|
|Summary||Prevents rapid access to site|
|Validation||V8.1.2a is XHTML compliant.|
|Mod Updated||14 Sept 2018|
|Download stats||See download statistics|
|Homepage||Rip Prevention Mod (This page)|
|Mod Support||TNG Community Forums|
|Min TNG V||7.0.0|
|Max TNG V||12.0.1|
May require customization
Purpose of the mod
This TNG modification includes several features:
- Rip Prevention
- It can help deter some of the automated processes that simply rip (copy) our sites for potential commercial gain. It monitors the time interval between visitor accesses. If the accesses are rapid and repeated, a warning is issued. If the accesses continue rapid and repeatedly, the visitor is temporarily banned and an explanation page is displayed. Warnings and bans are disabled for administrators.
- To view an example of this, you may access my site and simply hit the refresh quickly. A few rapid accesses will result in a warning page. Simply wait a few seconds and operation will return to normal. Repeated rapid access will result in a 60 second ban where an explanation page is displayed.
- To deter those slow automated programs that scrape your site, you may optionally add a Rip Prevention Captcha challenge. If added, you may configure the number of visits within a specified time that you will be allowed before a graphical challenge is presented to confirm the visitor is human and not an automated program. Check here to see an example of the captcha page.
- Site Access Statistics Page
- In addition to the warning and ban pages, a simple access stats page is available on the admin page. The left banner will include an entry (in English) "Show Access" which will display the current stored access information. I have sorted it by Bans, Warnings, Total fast page access, and Total accesses. A button is included to optionally sort the information using alternate columns. A view only version of the access stats may be viewed on my site as well. The delete functions are disabled since you are not logged in. Check it here
- Custom Message to browsing IP address
- Create a custom message to specific IP addresses that are browsing your site. This feature allows selection of the IP/Host that is viewing your site, adding a custom message, and monitoring whether they have viewed it or not. The custom message will be displayed for a selectable (1-9) page views, then disappear. The number of page views left will be displayed in the site statistics page. To view this in action, check the link above to the statistics page, sort by time, and your address should be at the top. Since you are not logged in as administrator, the messaging system will only work for your originating IP address/hostname. A default message (max 1000 characters) is included, but may be customized.
- Specific Host Banning
- Provides a convenient way to permanently ban specific user accesses based upon host name. This feature allows selection of specific host names on the "Show Access" page by using the "B"an button. Banned host names will be displayed with their IP address bolded in a red font. Clicking the "B"an button of a banned host name will remove the ban. Users logged in as admin will not be banned, but be careful. Banning your IP, then logging out will cause you to be banned. (You'll have to log in from an alternate IP and then unban yourself).
The Rip Prevention Mod was developed by Brian McFadyen.
The Rip Prevention Mod was updated for MySQLi support by Brent Hemphill
|126.96.36.199d||22 November 2018||update mod to fix an issue with IPv6.|
|14 September 2018||update mod to fix an issue with the Show Access being unreadable in Templates 9, 13, and 14. Also fixed a possible issue with the Click Counter II Email Notify mod.|
|188.8.131.52a||4 September 2018||update mod to add option for Rip Challenge Mod to only show once per session. Also added notes to options about hits being counted multiple times in instances of redirection.|
|11.0.2||8 June 2017||update mod to be MySQLi compatible. Also fixed some other deprecated functions that were used. Added user to the table. Added the functionality for a renamed extensions folder.|
|10.1||8 June 2017||update mod to be MySQLi compatible. Also fixed some other deprecated functions that were used. Added user to the table.|
|8.1.2a||1 April 2011||update mod to be XHTML compliant provided by Alan Craxford who made rip_ban.html and rip_warning.html XHTML compliant|
|8.1.2||30 May 2010||rip_prevention_v8.1.2 contains More corrections. Looks ok now|
|8.1.1||30 May 2011||Updates to Rip Package, fixed for V8.0 and new file structure|
|v8.1.0||May 28, 2010||updates for TNG V8|
|v1.4||Jun, 2009||misc updates|
|v1.2||Jun 1, 2009||updated with missing genlib modification to support Messaging to visitors|
|v1.1||May 31, 2009||initial release|
- A working TNG installation.
- A backup of your TNG begin.php and admin/leftbanner.php (V7) or admin_leftbanner.php (V8) files.
- An installed current version of the Mod Manager.
- This mod also requires that your admin folder be writeable.
- Download the appropriate mod configuration package as identified in the upper right status box.
- Extract and copy all files in the zip to your ./admin/mod_folder (V7) or ./mods (V8).
- Follow the normal automated installation for Mod Manager mods. This mod also requires that your admin folder be writeable.
- As with most source code modifications, these changes will likely be overwritten during your next TNG revision upgrade and will need to be re-implemented. (Using the Mod Manager greatly simplifies this process).
Although the default values in the check_access.php file generally work well, the parameters may be customized
- visitor access speed detection
- number of fast accesses before a warning is displayed
- number of fast accesses before a ban is displayed
- length of time for a visitor ban
- number of visits within the specified time before a captcha challenge is presented
- number of seconds (specified time) over which the number of visits is monitored
The above parameters may be changed by using the EDIT button in the Mod Manager Status Table for this mod. Additionally, names of the valid search engine indexers may be added by editing the 'check_access.php' script.
How do I use the Messaging Feature
When viewing the site statistics page, locate the particular IP/Hostname of interest. The numbered button in the Host Name column indicates how many views of the message are left. If the number is 0, then clicking on the button will bring up a text edit box with a default message. Edit this, or leave it as is and click ADD. The page will refresh, highlight the Host Name in red, and indicate the number of message views remaining on the button.
If you click a button with a non-zero on it, it will remove the message request.
How do I BAN a specific IP address
If you have one of those pesky browsers that keep returning, and refuses to contact you or contribute, you might choose to BAN them from your site. (This is not my choice of action, but it may suit some) Clicking the 'B' button will result in that address being banned permanently. To "undo" a ban, simply click the 'B' button again. The page will refresh and highlight the IP address in red if it is Banned. Keep in mind that this is simply an IP ban. Your annoying browser can simply go to another address and continue again.
How do I remove old entries, or the very low count accesses
Table maintenance is provided while viewing the access table in the "Show Access" under the admin area. Selecting either of the Date or Page Hit "Sort" buttons will display the "Del" option button to enable record deletions. Clicking the "Del" button will display the access page with an individual button in each of the date or hit cells. These cell buttons will immediately remove all table entries before the date selected, or all table entries with fewer page hits, depending on the "Del" operations that has been activated.
Optional CAPTCHA Challenge page
An additional feature may be added to the Rip Prevention to present a CAPTCHA challenge page after a specific number of page views by non registered users. This is one more attempt to reduce the level of automated ripping. Check out the Rip Challenge Mod if you would like to add this feature.
In the event of a problem with your TNG site
- copy your backup begin.php to your base TNG folder
- copy your backup leftbanner.php file back to the admin sub folder
- all should be well now