Changeset 3373294
- Timestamp:
- 10/05/2025 11:34:28 PM (6 months ago)
- Location:
- bad-ip-wp/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (2 diffs)
-
assets/js/bad-ip-admin.js (modified) (1 diff)
-
bad-ip-wp.php (modified) (2 diffs)
-
includes/BadIPAdmin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bad-ip-wp/trunk/README.txt
r3359487 r3373294 4 4 Requires at least: 3.0.1 5 5 Tested up to: 6.8.2 6 Stable tag: 2.0. 66 Stable tag: 2.0.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 63 63 64 64 == Changelog == 65 66 = 2.0.7 = 67 * Minor updates 65 68 66 69 = 2.0.6 = -
bad-ip-wp/trunk/assets/js/bad-ip-admin.js
r3353501 r3373294 17 17 18 18 function ipCheck(bad_ip) { 19 window.open('https://bad-ip.iridiumintel.com/ ?ip=' + bad_ip, '_blank');19 window.open('https://bad-ip.iridiumintel.com/ip/' + bad_ip, '_blank'); 20 20 } 21 21 -
bad-ip-wp/trunk/bad-ip-wp.php
r3359487 r3373294 5 5 * Description: Bad IP WP is a lightweight, high-performance WordPress firewall plugin designed to block malicious actors in real time. Includes central server sync, TOR exit node filtering, brute-force protection, and live dashboard control. Built for agencies, sysadmins, and paranoid devs. 6 6 * Centralized logging and real-time firewall control with dashboard integration. 7 * Version: 2.0. 67 * Version: 2.0.7 8 8 * Author: Iridium Intelligence 9 9 * Author URI: https://iridiumintel.com … … 20 20 } 21 21 22 define('BAD_IP_VERSION', '2.0. 6');22 define('BAD_IP_VERSION', '2.0.7'); 23 23 define('BAD_IP_PLUGIN_DIR', plugin_dir_path(__FILE__)); 24 24 define('BAD_IP_PLUGIN_URL', plugin_dir_url(__FILE__)); -
bad-ip-wp/trunk/includes/BadIPAdmin.php
r3359487 r3373294 413 413 { 414 414 // Optional: log successful login 415 $this->report_incident('login_success', $user_login);415 // clear local enforcements if any 416 416 } 417 417 … … 450 450 return; // whitelisted query, skip 451 451 } 452 453 /*454 $payload = [455 'uid' => $settings->token,456 'ip' => $user_ip,457 'origin' => $origin,458 'reporter' => $reporter,459 'action' => $action,460 ];461 $cache_key = 'bad_ip_check_' . md5($user_ip);462 $cached_rsp = get_transient($cache_key);463 if (!$cached_rsp) {464 $response = wp_remote_post(BAD_IP_API_URL . 'bad_ip/check/?uid=' . $settings->token, [465 'headers' => ['Content-Type' => 'application/json'],466 'body' => wp_json_encode($payload),467 'timeout' => 5468 ]);469 $rsp = json_decode(wp_remote_retrieve_body($response));470 if (!is_object($rsp)) {471 return;472 }473 // Cache for 10 minutes (customize as needed)474 set_transient($cache_key, $rsp, 10 * MINUTE_IN_SECONDS);475 } else {476 $rsp = $cached_rsp;477 }478 */479 452 480 453 // Log to local DB
Note: See TracChangeset
for help on using the changeset viewer.