Bot-Trap

From TNG_Wiki
Jump to navigation Jump to search
Restricted Downloads of Bot-Trap 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 Restricted
Caution If you have trouble downloading with Google Chrome, Vivaldi, Brave or other Chromium based browser, try using a right-click and select Open in new Window, then F5, or use another browser such as Firefox Caution
NeedSupport The mod Bot-Trap needs a new support person since the original mod developer or subsequent developers are no longer available to support the mod NeedSupport


Bot-Trap
Summary Creates a honeypot or trap to block bots that do not adhere to robots.txt standards
Validation
Mod Updated 10 Jan 2025
Download link For
TNG 14.0.4

Bot-trap_v14.0.4.7.zip
For
TNG 14.0
TNG 13.0
TNG 12.0

Bot-trap_v12.0.0.5.zip
For
TNG 10.1.0
TNG 11.0
TNG 11.1

Bot-trap_v10.1.0.4.zip
Download stats Downloads Stats
Author(s) Bryan S. Larson
Based on the Bot-Trap tool by Daniel M. Webb
Homepage Bot-Trap (This page)
Mod Support TNG Community Forums
Contact Developer TNG Community Forums
Latest Mod 14.0.4.7
Min TNG V 10.1
Max TNG V 14+
Files modified
meta.php
stdsitecredit.php
css/genstyle.css
.htaccess
robots.txt
Files added:
bot-trap/settings.php
bot-trap/.htaccess
bot-trap/forbid.php
bot-trap/functions.php
bot-trap/index.php
bot-trap/pixel.gif
bot-trap/unban.php
Related Mods
Notes

Purpose of the mod

This TNG modification places a link on every page of your site that is invisible to humans, but which machines can see. Clicking on the link automatically blocks the visitor by adding an .htaccess restriction for the offending IP address. If a human is curious enough to find and visit the link, there is an easy mechanism to get removed from the list of banned IP addresses.

The way Bot-Trap works is that it adds an entry to robots.txt (and creates the file if it does not already exist) which instructs bots to avoid the bot-trap directory. If a bot does follow the robots.txt protocol, as good bots do, it will know not to visit the trap. Bad bots that do not follow robots.txt standards will see the link and visit it; thereby getting blocked via an entry to .htaccess.

Developer

This mod was developed by Bryan S. Larson. Beta testing of the original mod was done by Ken Roy and Rick Bisbee. Version 14.0.4 was developed by Steven Davis.

Requirements

  • A working TNG installation.
  • A backup of all affected files (see the list in the summary to the right)
  • An installed current version of the Mod Manager.
  • A server that supports .htaccess 2.2 for TNG 10.1-14.0.3 (most do)
  • A server that supports .htaccess 2.4 for TNG 14.0.4+ (most do)

Revision History

Mod Version TNG Version Date Contents
14.0.4.7 14.0.4 10 Jan 2025 Fixed syntax error in Check Files that caused a blank page on PHP 8.1+.
14.0.4.6 14.0.4 11 Oct 2024 Updated Check Files to avoid inserting multiple Bot-trap anchors if RequireAll tags are used in the Files and/or FilesMatch directives.
14.0.4.5 14.0.4 07 Oct 2024 Changed code so check files must be run first instead of creating missing files automatically.
Updated code to prevent checking permissions echoing code before the header loads in bt_check.php.
14.0.4.4 14.0.4 01 Oct 2024 Fixed unescaped quotations in Dutch and Norwegian languages.
14.0.4.3 14.0.4 20 Sep 2024 Updated code to remove PHP 8 warnings.
14.0.4.2 14.0.4 05 Jul 2024 This update uses the Apache 2.4 directives Require and Require not instead of Allow/Deny. Includes instructional files for upgrading directives.
Uses TNG send email function so email from was removed.
Removed links from log files so admins don't ban themselves accidentally.
Bot-trap link is disabled when a user logs in.
Bot-Trap pages are XHTML compliant.
Updated the Bot-trap link so SEO is not affected.
12.0.0.5 12.0 23 Jul 2018 This update corrects an error in the bot-trap pages as well as some updates for TNG V12 Mod Manager changes.
10.1.0.4 10.1 22 Aug 2017 Small update to better recognize TNG installations that are not in the web root. Also an update for better compatibility with modern versions of php.
10.1.0.3 10.1 30 Nov 2016 Small fix in check file; it was not checking for .htaccess as it should have been. Corrected.
10.1.0.2 10.1 08 Nov 2016 Update to use footer rather than meta.php. This resolves validation problems associated with previous version of mod.
10.1.0.1 10.1 06 Mar 2015 Initial release of the Bot-Trap.

Conflicts and Issues

The End Of Life for Apache 2.2 was January 2018. So Apache created the mod_access_compat_module so 2.2 directives can be used with Apache 2.4.
Trouble is, some servers do not have this module installed. Additionally using mixed directives will cause a Server 500 ERROR in some cases.
If this version of Bot-trap causes issues, uninstall and use an older version.

Installation

  1. Uninstall and delete previous version of this mod (if installed)
  2. Download the appropriate zip file as shown in the mod summary in the upper right corner of the page.
  3. Extract the file from the downloaded zip file into the mods folder or FTP the extracted file to your mods folder.
  4. IMPORTANT: In many cases, the mod manager may give an error indicating that the mod cannot be installed. THIS IS NORMAL.
    • You must click on the "Run Checks" button BEFORE installing the mod. This step creates the files and folders needed for the mod to work if they are not already present.
  5. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the mod.

In the event of a problem

Uninstalling the mod

If you want to completely Remove (uninstall) this mod and any tables if created, you should

  1. click the Uninstall button to uninstall the mod
  2. click the Delete button to delete the config file from the mods folder.
  3. delete the Bot-trap folder from the mods folder.
  4. manually delete the blacklist.dat file from the TNG root folder.
  5. manually delete the robots.txt file from the TNG root folder. (unless you want to keep it)
  6. manually delete the .htaccess file from the TNG root folder. (unless you want to keep it)

Upgrade

  • Uninstall and eventually Delete the current Mod.
  • Proceed as for an installation with the new Mod.

Optional Parameters

This mod has 4 optional parameters which can be modified using the Mod Manager Edit capability.

  1. Send an email alert when a new IP address is ADDED to the bot-trap: When enabled, this option causes an email to be sent to the specified email address any time a new bot is added to the IP block list. This is enabled by default, but will not work unless a valid email address is entered.
  2. Send an email alert when a new IP address is REMOVED to the bot-trap: When enabled, this option causes an email to be sent to the specified email address any time a blocked IP address is removed from the block list via the escape mechanism. This is enabled by default, but will not work unless a valid email address is entered.
  3. Email bot-trap alerts TO the following address: This is the email address where you wish to have bot-trap alerts sent.
  4. Email bot-trap alerts FROM the following address: This is the email address you wish to have bot-trap alerts sent from. Normally, both email addresses would be the same, but in some cases it makes sense to differentiate them.

Sites using this mod

If you download and install this mod, please add your TNG site to the table below:

URL User Note Mod-Version TNG-Version User-language
Our Family Histories Bryan S. Larson Mod developer 12.0.0.5 12.0.3 EN
WMGS Member Trees Roger Moffat Public Site 13.0.0.5 13.1.0 EN
Ryken and Rosenau Famly Tree Paul Ryken Public Site 13.0.0.4 13.0.4 EN
Our Family Links Chuck Filteau Public site 10.1.0.1 10.1.2 EN
Our Roy and Boucher Families Ken Roy Beta tested the mod for Bryan. Now using Steven Davis version 14.0.4.3
TNG 14.0.5
EN,FR
Bobbyfamilytree Bobby 10.1.0.1 10.1.0 EN
Hooley Family Links Rick Hooley Public/Private See here See here EN
A Bisbee Family History Rick Bisbee 10.1.0.1 10.1.0 EN
Kemp(e) Family History Andrew Kemp See here See here EN
MOTYER Family Genealogy John Mark Motyer Public site See here See here EN
Robison and Blythe Genealogy Jeff Robison Public Site 10.1.0.1 10.1.2 EN
Martius Family History Hendrik Martius Half-public site 10.1.0.4* 12.0.1 DE,EN,FR,NL
Kleinmann Genealogy John Kleinmann 12.0.0.5 14.0 EN
R G Strong Family Genealogy Russell G Strong Modified the mod to validate at XHTML 1.0 Transitional 12.0.0.5 14.0.4 EN,DE,FR,NL
Extended Craxford Family Genealogy Magazine Alan D Craxford Using Russell's XHTML1.0 Transitional mod (may interfere with favicon) 10.1.0.1/2 11.0.2 EN
The Duttons of New England Darrin Dutton Pubic / Private 14.0.4.6 14.0.5 EN
Crawford County Genealogy Gateway Frank Bernosky Pubic Site 10.1.0.1 11.1 EN
Our Acadian Family Randal Suire Public/Media Private 10.1.0.4 11.1.2 EN,FR
McCarty-McCoy Family Kelly Booth Public 10.1.0.4 11.0.2 EN
Genealogy of the Weir and Drain Families Beverley Stimpson Public Site 10.1.0.4 11.1.2 EN
tobbes familje sidor Torbjörn Åkerman Public site 10.1.0.4 11.1.2 SV,EN,FI
The Cole / Tanner Family Tree David Cole Public/Private See here See here EN,DE,FR,ES,NL
Racines Luxo-hennuyères Michel Kirsch Public site (registration) 12.0.0.7 14.0.3 FR,EN,DE,NL
Family Trees worldwide Hans Weebers Public, Private Site 10.1.0.4 12.0.1 NL,DE,EN,FR
FAMILY STORY BOURDEAUX / BORDEAUX JPB Public Site See here See here DE,EN,FR
The Severijns / Timmer Familytree Rob Severijns Public / Private See here See here NL, EN
Genealogy of a Dutch Community Losser Peter Heerink Public 14.0.4.2 14.0.5 NL,EN,DE
Familieboekonline Janneke Helling Private 12.0.0.5 13.1 NL,EN
Your Roots are Showing Harold Craswell Public / Private See here See here EN
The Annals of a Humble Race Gerald Apperly Public / Private 12.0.0.5 14.0.1 EN
Osage County Cousins Larry G Banks Public/Private 14.0.4.2 14.0.4 EN
Solem Genealogy Jan-Thore Solem Private 14.0​.4​.6 14.0.5 EN,NO
GénéaKat Katryne Public & Private 12.0.0.5 14.0.4 FR,EN,SP
Carr’s Garage Regis Carr Public 12.0.0.5 14.0.3 EN,DE,NO
Jarocinski Family Database Michał Jarociński Public/Private 12.0.0.5 14.0.3 EN,PL
Stammbaum der Familie Datschetzky Christian Datschetzky Public 12.0.0.5 14.0.3 DE,EN
Jagos and Barron Family History Emily Jagos Public/Private 12.0.0.5 14.0.4 EN
The House of Kings Søren Wendt Public 12.0.0.5 14.0.2 EN,DE,FR,NL,IT
stone/mott genealogy Albert Stone Private 12.0.0.5
TNG 14.0.4
EN
Old Dead Relatives Kate Montressor Public 12.0.0.5 14.0.4 EN
Racine d'Alsace J-Louis Valory Public (registration) 14.0.4.2 14.0.5 FR
Genealogy family van Seeventer and more Sandor van Seeventer Public 14.0.4.2
TNG 14.0.5
NL,EN,DE
Chris Korte's New Zealand Genealogy Project Chris Korte Public / Private 14.0.4.3
TNG 14.0.5
DA,EN,FR,DE
Family HIstories Steven Davis Public 14.0.4.7
TNG 14.0.6