=== Banhammer Pro === Plugin Name: Banhammer Pro Plugin URI: https://plugin-planet.com/banhammer-pro/ Description: Monitor traffic and ban unwanted visitors. Tags: security, ban, block, bots, users, banhammer Author: Jeff Starr Author URI: https://plugin-planet.com/ Donate link: https://monzillamedia.com/donate.html Contributors: specialk Requires at least: 4.6 Tested up to: 6.4 Stable tag: 2.9 Version: 2.9 Requires PHP: 5.6.20 Text Domain: banhammer-pro Domain Path: /languages License: The Banhammer Pro license is comprised of two parts (see "License" section below for details) Monitor traffic and ban unwanted visitors. == Description == > Protect your site from enemy hordes! Banhammer Pro gives you complete control over who and what may access your site. Visit the Armory to monitor traffic and review suspicious visitors. If you find some user or bot that is causing problems, you can ban them with a click. Or if you just want to keep an eye on someone, you can flag them with a warning. Any banned users will be denied access to your site, until you restore access via the Tower. Banhammer Pro gives you many advanced features not available in the free version. https://youtu.be/0t4qBH0TuW0 ### Features ### Visit the [Banhammer Pro Homepage](https://plugin-planet.com/banhammer-pro/) for features, screenshots, and details. For complete documentation, visit the Help tab on any Banhammer screen in the WP Admin Area. ### Getting Started ### The Quick Start Guide is highly recommended: * [Banhammer Pro Quick-Start Guide](https://plugin-planet.com/banhammer-pro-quick-start/) ### Documentation ### Banhammer Pro documentation: * [Banhammer Pro Settings](https://plugin-planet.com/banhammer-pro-settings/) * [Banhammer Pro Armory](https://plugin-planet.com/banhammer-pro-armory/) * [Banhammer Pro Tower](https://plugin-planet.com/banhammer-pro-tower/) ### Privacy ### __User Data:__ Banhammer collects user data to "do its thing". The collected data is temporary and automatically deleted every day, or at whatever time interval is specified in the plugin settings. The only time that any data is "remembered" is when you ban something. For each person/thing that you ban, the plugin stores a minimal amount of data that can be deleted at any time. At any time, all saved data may be deleted permanently via the plugin settings and Armory Tools. __Cookies:__ Banhammer does not set any cookies for regular visitors, but does set a few simple cookies for admin-level users. These simple cookies enable dope effects and interactivity in the Armory and Tower UI. But no cookies are set or used for any other visitor/user or purpose. __Services:__ Banhammer uses a free lookup service for GeoIP information. This happens only for admin-level users when they are viewing data in the Armory or Tower. No other third-party services are used by this plugin. ### Developer ### Banhammer is developed and maintained by [Jeff Starr](https://twitter.com/perishable), 15-year [WordPress developer](https://plugin-planet.com/) and [book author](https://books.perishablepress.com/). ### Resources ### Further resources and information: * [Banhammer Pro Docs](https://plugin-planet.com/docs/banhammer/) * [Banhammer Pro Forum](https://plugin-planet.com/forum/banhammer/) * [Banhammer Pro Tutorials](https://plugin-planet.com/category/tuts+banhammer-pro/) * [Banhammer Pro FAQs](https://plugin-planet.com/banhammer-pro-faqs/) ### Stay Current ### Stay current with Banhammer Pro! * [Banhammer Pro News](https://plugin-planet.com/category/news+banhammer-pro/) * [Grab the News Feed](https://plugin-planet.com/category/news/feed/) * [Grab the Tutorials Feed](https://plugin-planet.com/category/tuts/feed/) ### Getting Help ### There are two channels for getting help: * [Ask a question in the Banhammer Pro Forum](https://plugin-planet.com/forum/banhammer/) ([login required](https://plugin-planet.com/wp/wp-login.php)) * [Send an email via the contact form](https://plugin-planet.com/support/#contact) The contact form is best for direct support, bug reports, and feedback. ### Downloads ### * [Log in to your account for current downloads](https://plugin-planet.com/wp/wp-login.php) To learn more about Banhammer Pro, visit [Plugin-Planet.com](https://plugin-planet.com/banhammer-pro/). For complete documentation, visit the Help tab on any Banhammer screen in the WP Admin Area. == Installation == ### Important: PHP Requirement ### Before installing, make sure your server has either `cURL` or `file_get_contents()` enabled. Banhammer requires at least one of these functions to work properly. ### Installation ### 1. Upload the plugin and activate via the WP Plugins screen 2. Visit Banhammer Pro > License to enter your license Done. Banhammer Pro is now ready for use. For complete documentation, visit the Help tab on any Banhammer screen in the WP Admin Area. [More info on installing WP plugins](https://wordpress.org/support/article/managing-plugins/#installing-plugins). ### Usage ### 1. Configure the plugin settings as desired 2. Visit the Armory to monitor traffic and ban/warn any unwanted visitors 3. Visit the Tower to manage any banned/warned targets Also check out the [Banhammer Pro Quick Start Guide](https://plugin-planet.com/banhammer-pro-quick-start/). For complete documentation, visit the Help tab on any Banhammer screen in the WP Admin Area. ### Caching Plugins ### Banhammer works with any type of caching plugin where "page caching" is not enabled. There are many types of cache plugins. They provide all sorts of different caching mechanisms and features. All caching features work great with Banhammer except for “page caching”. With page caching, the required WP `init` hook may not be fired, which means that plugins like Banhammer are not able to log and ban requests dynamically. Fortunately, some of the most popular caching plugins provide settings that enable full compatibility with Banhammer. For a complete list, check out [this article](https://plugin-planet.com/blackhole-pro-cache-plugins/). Note: that article was written for [Blackhole Pro](https://plugin-planet.com/blackhole-pro/), but the compatibility list and general info apply also to Banhammer. ### With great power.. ### Please be careful not to ban any important IP addresses. Before banning some target, verify the IP and host name. Verifying the IP address is important because you do not want to accidentally ban major search engines and services. A good way to verify any IP address is to do a reverse lookup. The result should match the host name. For an example of how to verify a bot, check out [this article](https://perishablepress.com/spoofed-search-engine-bot/) at Perishable Press. _Pro Tip: In the Armory, you can click on the IP Address or Host Name to do a quick whois lookup._ ### Important! Don’t ban yourself! ### Please be careful not to ban yourself when using Banhammer. The Basic Settings are powerful; use them wisely. Here are some things that can help mitigate any accidents: * Be mindful when monitoring traffic; always know your own IP address and WP username. * Disable the setting "Login Page", so you always have access to the Login Page. * Enable the setting "Ignore Users", so you always can access the Tower, and your own visits will not be logged in the Armory. ### Whoops! How do I get back in? ### It's almost inevitable. Worst-case scenario say you accidentally ban yourself. As site admin, it is easy to restore access. Follow these steps: 1. [Download the Banhammer Unlock plugin](https://plugin-planet.com/wp/addons/banhammer-unlock.zip) 2. Upload the Unlock plugin to your server at: `/wp-content/mu-plugins/` 3. If the mu-plugins directory does not exist, go ahead and create it 4. After uploading the plugin, Banhammer will be disabled, so you can log in and restore access via the Tower 5. Once you have restored access, delete the Banhammer Unlock plugin from the server 6. After deleting the Unlock plugin, Banhammer once again will be enabled Alternately, if you banned yourself by IP address, you can bypass the ban by using a trustworthy proxy service to log in to your site. ### Upgrades ### Your purchase of Banhammer Pro includes free lifetime upgrades, which include new features, bug fixes, and other improvements. When an upgrade is available, WordPress will notify you in the Admin Area. When you see that there is an update available, just click "Update" and WordPress will perform the upgrade automatically. Note that you can [download the latest version of Banhammer Pro at Plugin Planet](https://plugin-planet.com/download-purchased-plugin/) anytime at your convenience. [More info](https://plugin-planet.com/upgrade-plugin/) ### Restore Default Options ### To restore default plugin options, visit "Reset Options" in the plugin settings. ### Uninstalling ### This plugin cleans up after itself. All plugin options and collected data will be removed from your database when the plugin is uninstalled via the Plugins screen. For complete documentation, visit the Help tab on any Banhammer screen in the WP Admin Area. ### License Information ### * [Download purchased plugin](https://plugin-planet.com/download-purchased-plugin/) * [Install purchased plugin](https://plugin-planet.com/install-plugin/) * [Upgrade purchased plugin](https://plugin-planet.com/upgrade-plugin/) * [Get plugin license key](https://plugin-planet.com/get-license-key/) * [Activate plugin license](https://plugin-planet.com/activate-deactivate-plugin-license/) * [Transfer plugin license](https://plugin-planet.com/transfer-plugin-license/) * [Manage licensed domains](https://plugin-planet.com/manage-license/) * [Download purchase receipt](https://plugin-planet.com/download-purchase-receipt/) * [Troubleshooting license activation](https://plugin-planet.com/troubleshooting-license-activation/) ### License for Sound Effects ### Audio used in plugin * [Explosion sound by steveygos93](https://freesound.org/s/80401/): [Attribution 3.0 Unported (CC BY 3.0)](https://creativecommons.org/licenses/by/3.0/) * [Inception Horn sound by Kubatko](https://freesound.org/s/196584/): [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) * [Shield Guard sound by nekoninja](https://freesound.org/s/370203/): [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) * [Lettuce Chopping sound by danloss](https://freesound.org/s/412531/): [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) Audio used in promos * [War Drum Loop by limetoe](https://freesound.org/s/274223/): [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) * [Warrior Drums by Sclolex](https://freesound.org/s/209546/): [CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) ### Like the plugin? ### If you like Banhammer Pro, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/banhammer/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you! == Upgrade Notice == This plugin has been tested and is 100% current with the latest version of WordPress. == Frequently Asked Questions == Check out the [Banhammer Pro FAQs](https://plugin-planet.com/banhammer-pro-faqs/) at Plugin Planet. ### Questions? Feedback? Bugs? ### There are two channels for getting help: * [Ask a question in the Banhammer Pro Forum](https://plugin-planet.com/forum/banhammer/) ([login required](https://plugin-planet.com/wp/wp-login.php)) * [Send an email via the contact form](https://plugin-planet.com/support/#contact) The contact form is best for direct support, bug reports, and feedback. == Screenshots == Screenshots and more available at [Plugin-Planet.com](https://plugin-planet.com/banhammer-pro/#screenshots). == License == The Banhammer Pro license comprises two parts: * __Part 1:__ Its PHP code is licensed under the GPL (v2 or later), like WordPress. [More info](https://www.gnu.org/licenses/). * __Part 2:__ Everything else (e.g., CSS, HTML, JavaScript, images, design) is licensed according to the purchased license. [More info](https://plugin-planet.com/banhammer-pro/). Without prior written consent from Monzilla Media, you must NOT directly or indirectly: license, sub-license, sell, resell, or provide for free any aspect or component of Part 2. Further license information is available in the plugin directory, `/license/`, and [online](https://plugin-planet.com/wp/files/banhammer-pro/license.txt). __Upgrades:__ Your purchase of Banhammer Pro includes free lifetime upgrades, which include new features, bug fixes, and other improvements. Copyright 2023 Monzilla Media. All rights reserved. == More from Jeff Starr == Premium WordPress plugins: * [Banhammer Pro](https://plugin-planet.com/banhammer-pro/) - Monitor traffic and ban bad users and bots * [BBQ Pro](https://plugin-planet.com/bbq-pro/) - Fastest firewall plugin for WordPress * [Blackhole Pro](https://plugin-planet.com/blackhole-pro/) - Block bad bots in a virtual black hole * [GA Pro](https://plugin-planet.com/ga-google-analytics-pro/) - Connect WordPress to Google Analytics * [SAC Pro](https://plugin-planet.com/simple-ajax-chat-pro/) - Unlimited chat rooms for WordPress * [USP Pro](https://plugin-planet.com/usp-pro/) - Advanced front-end forms Quality WordPress books: * [The Tao of WordPress](https://wp-tao.com/) * [Digging into WordPress](https://digwp.com/) * [.htaccess made easy](https://htaccessbook.com/) * [WordPress Themes In Depth](https://wp-tao.com/wordpress-themes-book/) * [Wizard's SQL Recipes for WordPress](https://books.perishablepress.com/downloads/wizards-collection-sql-recipes-wordpress/) More awesome stuff on the way :) == Changelog == If you like Banhammer Pro, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/banhammer/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you! **2.9 (2023/11/03)** * Improves plugin CSS styles * Improves localization function * Replaces `DOING_CRON` with `wp_doing_cron()` * Improves `banhammer_license_status()` * Fixes bug with Font Awesome styles * Adds custom notice on settings page * Updates default translation template * Tests on WordPress 6.4 (beta) **2.8.1 (2023/07/16)** * Fixes "Uncaught TypeError: property_exists()" * Tests on WordPress 6.3 (beta) **2.8 (2023/03/11)** * Improves settings page UI/styles * Improves logic for dates and times * Adds license status message to plugin screens * Improves logic when calling `get_current_screen()` * Improves handling of license activation * Improves handling of license constants * Updates font awesome icons and styles * Generates new translation template * Tests on WordPress 6.1 + 6.2 (beta) * Tests on PHP 8.1 and 8.2 **2.7.1 (2022/11/14)** * Fixes bug with non-Admins unable to log in * Tests on WordPress 6.1 **2.7 (2022/10/09)** * Removes `WPSimpleNonce` functionality * Removes function `banhammer_armory_date()` * Resolves `banhammer-process_` log entries * Fixes bug: PHP Uncaught TypeError: count() * Fixes bug with date formatting in Tower * Increases timeout for `banhammer_get_geo()` * Increases timeout for `banhammer_get_response()` * Adds support for `BANHAMMER_LICENSE` via `wp-config.php` * Adds filter hook `banhammer_get_response_timeout` * Adds filter hook `banhammer_file_get_contents_timeout` * Adds filter hook `banhammer_curl_connecttimeout` * Adds filter hook `banhammer_curl_timeout` * Adds missing image for unknown geoip lookups * Improves logic of `banhammer_get_response()` * Improves function `banhammer_armory_bulk()` * Improves UI/details of Banhammer settings * Adds custom footer text to plugin settings * Updates `EDD_SL_Plugin_Updater` script * Improves contextual help information * Improves plugin documentation * Updates translation template * Tests on WordPress 6.1 **2.6 (2022/05/18)** * Improves plugin License screen * Settings now available without license * Generates new default translation template * Tests on WordPress 6.0 **2.5.3 (2022/03/24)** * Resolves "Call to a member function options() on null" (WP-CLI) * Tests on WordPress 5.9 **2.5.2 (2022/01/31)** * Fixes bug with PHP `date()` * Tests on WordPress 5.9 **2.5.1 (2022/01/25)** * Tests on PHP 8.0 and 8.1 * Tests on WordPress 5.9 **2.5 (2022/01/25)** * Updates license updater script * Improves loading of translations * Improves performance of plugin settings * Updates some links to external resources * Changes minimum required WP version to 4.6 * Tests on WordPress 5.9 **2.4 (2021/07/20)** * Fixes bug with `banhammer-process` requests in Armory * Improves functionality of `banhammer_get_response()` * Tests on WordPress 5.8 **2.3 (2021/02/15)** * Improves performance of IP functionality (Thanks [@danielrufde](https://wordpress.org/support/topic/use-filter_var-instead-of-preg_match-much-better-performance/)) * Fixes bug with Hostname lookups in Armory * Changes GeoIP lookup service * Tests on WordPress 5.7 **2.2 (2020/11/21)** * Improves logic of enqueue functions append version * Updates plugin script to account for changes in jQuery UI * Fixes bug with `removable_query_args` * Updates license updater script * Tests on PHP 7.4 and 8.0 * Tests on WordPress 5.6 **2.1 (2020/08/18)** * Adds French translation (Thanks to Hervé Bouzin) * Updates license updater script * Refines readme/documentation * Tests on WordPress 5.5 **2.0 (2020/03/26)** * Improves appearance of Armory UI * Fixes bug with `count()` in `banhammer-functions.php` line 313 * Tests on WordPress 5.4 **1.9 (2019/11/14)** * Updates styles for plugin settings page * Tests on WordPress 5.3 **1.8 (2019/09/08)** * Updates some links to https * Generates new default translation template * Tests on WordPress 5.3 (alpha) **1.7 (2019/05/02)** * Improves error handling * Bumps [minimum PHP version](https://codex.wordpress.org/Template:Server_requirements) to 5.6.20 * Tweaks plugin settings screen content * Updates default translation template * Tests on WordPress 5.2 **1.6 (2019/04/08)** * Limits Armory rows to 50 (see Notes in Armory Help tab for details) * Works on improving GeoIP lookup timeouts and issues * Generates new default translation template **1.5 (2019/04/02)** * Fixes bug with GeoIP lookups timing out (503/504 errors) * Fixes bug with updating plugins using CLI * Tests on WordPress 5.1 and 5.2 (alpha) **1.4 (2019/03/21)** * Replaces `ipapi.co` with `ip-api.com` for GeoIP lookups * Improves one-click plugin updates * Improves function `action_links()` * Improves function `check_banhammer()` * Improves display of License screen * Refines plugin settings screen and Help UI * Generates new default translation template * Tests on WordPress 5.1 and 5.2 (alpha) **1.3 (2018/11/18)** * Fixes bug with cron not working * Fixes bug with `banhammer-process_` query args * Replaces `geoip.tools` lookup service with `ipapi.co` * Tests on WordPress 5.0 (beta) **1.2 (2018/08/22)** * Replaces `freegeoip.net` with `geoip.tools` for Geo Lookups * Adds `rel="noopener noreferrer"` to all [blank-target links](https://perishablepress.com/wordpress-blank-target-vulnerability/) * Updates contextual Help tab with better infos * Updates `WPSimpleNonce` to support older versions of PHP * Updates GDPR blurb and donate link * Regenerates default translation template * Further tests on WP 4.9 and 5.0 (alpha) **1.1 (2018/05/10)** * Adds feature to manually add targets * Strengthens security protocols in Banhammer core * Improves support for caching plugins * Adds automatic import of Tower data from free version * Updates default set of whitelisted user agents * Updates default set of whitelisted IP addresses * Changes "Previous" to "Prev" on Armory nav button * Replaces `ip-api.com` with `whatismyipaddress.com` * Adds filter hook, `banhammer_armory_mask` * Lightens color of target select menu * Adds sound effects to bulk actions * Generates new translation template * Updates plugin image files * Tests on WordPress 5.0 **1.0 (2018/01/31)** * Initial release