Changeset 1424990
- Timestamp:
- 05/26/2016 10:02:07 PM (10 years ago)
- Location:
- pike-firewall/trunk
- Files:
-
- 2 edited
-
pikefirewall.php (modified) (22 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pike-firewall/trunk/pikefirewall.php
r1419379 r1424990 3 3 * Plugin Name: Pike Firewall 4 4 * Plugin URI: http://pike.hqpeak.com 5 * Description: Block Tor, Proxy, Cloud/Hosting/VPN, Country originating traffic e.g. anonymous/fraudelent traffic 6 * Version: 1. 0.05 * Description: Block Tor, Proxy, Cloud/Hosting/VPN, Country originating traffic e.g. anonymous/fraudelent traffic plus IDS for wordpress 6 * Version: 1.1.0 7 7 * Author: HQPeak 8 8 * Author URI: http://hqpeak.com … … 44 44 $cron_check = isset($pike_firewall_options['cron_check']) ? $pike_firewall_options['cron_check'] : array("cron_check"=>array()); 45 45 $msg = isset($pike_firewall_options['custom_msg']) ? $pike_firewall_options['custom_msg'] : array("custom_msg"=>array("text"=>"")); 46 $intrusion_options = isset($pike_firewall_options['intrusion']) ? $pike_firewall_options['intrusion'] : array(); 46 47 47 48 … … 56 57 } 57 58 } 58 59 59 60 60 61 // Update plugin 61 62 add_action('plugins_loaded', 'update_plugin_check'); 62 63 63 function update_plugin_check() { 64 65 global $pike_firewall_options; 66 67 // if ( PIKEFIREWALL_VERSION >= $pike_firewall_options['version'] ) { 68 // pike_firewall_plugin_deactivate(); 69 // pikefirewall_plugin_activate(); 70 // } 64 if (!function_exists('get_plugins')) { 65 require_once(ABSPATH.'wp-admin/includes/plugin.php' ); 66 } 67 68 global $pike_firewall_options; 69 70 if ( !isset($pike_firewall_options['version']) || PIKEFIREWALL_VERSION != $pike_firewall_options['version'] ) { 71 $pike_firewall_options['version'] = PIKEFIREWALL_VERSION; 72 update_option('pikefirewallsettings', $pike_firewall_options); 73 } 71 74 } 72 75 … … 94 97 } 95 98 96 global $wpdb, $pike_firewall_options, $cron_check, $captcha_check, $checkbox_options, $msg, $stealth_mode ;99 global $wpdb, $pike_firewall_options, $cron_check, $captcha_check, $checkbox_options, $msg, $stealth_mode, $intrusion_options; 97 100 98 101 $active_tab = 'main'; … … 161 164 <label><small>(Anonymous users can send POST requests)</small></label><br /> 162 165 <input type="hidden" name="pikefirewallsettings[services_update_time]" value=<?php echo $pike_firewall_options['services_update_time']; ?> /> 166 </p><br /> 167 <p> 168 <label><big><strong>Intrusion Detection:</strong></big></label><br /> 169 <input type="checkbox" name="pikefirewallsettings[intrusion][]" value="foreign_origin" <?php echo (in_array('foreign_origin', $intrusion_options) ? 'checked' : ''); ?>>POST requests with foreign origin <br /> 170 <input type="checkbox" name="pikefirewallsettings[intrusion][]" value="blank_useragent" <?php echo (in_array('blank_useragent', $intrusion_options) ? 'checked' : ''); ?>>POST requests with blank User Agent <br /> 171 <input type="checkbox" name="pikefirewallsettings[intrusion][]" value="user_enumeration" <?php echo (in_array('user_enumeration', $intrusion_options) ? 'checked' : ''); ?>>Wordpress user enumeration <br /> 172 <!-- <input type="checkbox" name="pikefirewallsettings[intrusion][]" value="invisible_chars" <?php echo (in_array('invisible_chars', $intrusion_options) ? 'checked' : ''); ?>>Detect invisible characters on input <br /> --> 173 <input type="checkbox" name="pikefirewallsettings[intrusion][]" value="proxy_headers" <?php echo (in_array('proxy_headers', $intrusion_options) ? 'checked' : ''); ?>>Detect Proxy Headers <br /> 163 174 </p><br /> 164 175 <p> … … 346 357 </html>"; 347 358 348 $defaults = array("default_tor"=>"http://pike.hqpeak.com/api/tor", "deny"=>"", "check"=>array("visit"), "services_update_time"=>time(), "custom_msg" => array("enabled"=>"enable", "text"=>"$msg_html"), "stealth_mode" => array("Off"), "captcha_check" => array("Off"), "cron_check" => array("Off"), "default_proxy"=>"http://pike.hqpeak.com/api/proxy", " version"=>"1.0.0");359 $defaults = array("default_tor"=>"http://pike.hqpeak.com/api/tor", "deny"=>"", "check"=>array("visit"), "services_update_time"=>time(), "custom_msg" => array("enabled"=>"enable", "text"=>"$msg_html"), "stealth_mode" => array("Off"), "captcha_check" => array("Off"), "cron_check" => array("Off"), "default_proxy"=>"http://pike.hqpeak.com/api/proxy", "intrusion"=>array()); 349 360 $settings = wp_parse_args(get_option('pikefirewallsettings', $defaults), $defaults); 350 361 update_option('pikefirewallsettings', $settings); … … 614 625 $table_name_log = $wpdb->prefix."pike_firewall_log"; 615 626 616 if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name &&617 $wpdb->get_var("SHOW TABLES LIKE '$table_name_iprange'") != $table_name_iprange &&618 $wpdb->get_var("SHOW TABLES LIKE '$table_name_log'") != $table_name_log ) {627 if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name && 628 $wpdb->get_var("SHOW TABLES LIKE '$table_name_iprange'") == $table_name_iprange && 629 $wpdb->get_var("SHOW TABLES LIKE '$table_name_log'") == $table_name_log ) { 619 630 620 631 if ( ($default_tor == 'http://pike.hqpeak.com/api/tor' && $diff >= 1800) || … … 645 656 pike_firewall_fill_table($ip_long_tor); 646 657 $check = true; 647 } elseif (is_array($ip_ arr_proxy) && sizeof($ip_arr_proxy)) {658 } elseif (is_array($ip_long_proxy) && sizeof($ip_long_proxy)>0) { 648 659 $sql = "DELETE FROM $table_name"; 649 660 $wpdb->query($sql); … … 837 848 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 838 849 839 if ( ($long_ip = match_address()) && !in_array('visit', $checkbox_options) && !is_admin()) {850 if ( !in_array('visit', $checkbox_options) && !is_admin() && ($long_ip = match_address()) ) { 840 851 if ( $stealth_mode[0] != "on" ) { 841 852 savelog($long_ip); … … 863 874 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 864 875 865 if ( ($long_ip = match_address()) && !in_array('comment', $checkbox_options) && !empty($_POST['comment'])) {876 if ( !in_array('comment', $checkbox_options) && !empty($_POST['comment']) && ($long_ip = match_address()) ) { 866 877 if ( $stealth_mode[0] != "on" ) { 867 878 savelog($long_ip); … … 889 900 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 890 901 891 if ( ($long_ip = match_address()) && !in_array('register', $checkbox_options)) {902 if ( !in_array('register', $checkbox_options) && ($long_ip = match_address()) ) { 892 903 if ( $stealth_mode[0] != "on" ) { 893 904 savelog($long_ip); … … 917 928 $url_parts = explode('/', $_SERVER['REQUEST_URI']); 918 929 919 if ( ($long_ip = match_address()) && !in_array('subscription', $checkbox_options) && (in_array('feed', array_keys($_REQUEST)) || in_array('feed', $url_parts))) {930 if ( !in_array('subscription', $checkbox_options) && (in_array('feed', array_keys($_REQUEST)) || in_array('feed', $url_parts)) && ($long_ip = match_address()) ) { 920 931 if ( $stealth_mode[0] != "on" ) { 921 932 savelog($long_ip); … … 943 954 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 944 955 945 if ( ($long_ip = match_address()) && !in_array('administration', $checkbox_options)) {956 if ( !in_array('administration', $checkbox_options) && ($long_ip = match_address()) ) { 946 957 if ( $stealth_mode[0] != "on" ) { 947 958 savelog($long_ip); … … 969 980 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 970 981 971 if ( ($long_ip = match_address()) && !in_array('request', $checkbox_options) && $_SERVER['REQUEST_METHOD'] == 'POST') {982 if ( !in_array('request', $checkbox_options) && $_SERVER['REQUEST_METHOD'] == 'POST' && ($long_ip = match_address())) { 972 983 if ( $stealth_mode[0] != "on" ) { 973 984 savelog($long_ip); … … 1000 1011 // changed 1001 1012 foreach ($all_requests as $request){ 1002 if ( ($long_ip = match_address()) && (in_array(trim($request), array_keys($_POST)) || in_array(trim($request), array_keys($_GET)))){1013 if ( (in_array(trim($request), array_keys($_POST)) || in_array(trim($request), array_keys($_GET))) && ($long_ip = match_address()) ){ 1003 1014 if ( $stealth_mode[0] != "on" ) { 1004 1015 savelog($long_ip); … … 1089 1100 // Update ip table 1090 1101 $pike_firewall_options = get_option('pikefirewallsettings'); 1091 $default_tor = isset($pike_firewall_options['default_tor']) ? : "";1102 $default_tor = isset($pike_firewall_options['default_tor']) ? $pike_firewall_options['default_tor'] : ""; 1092 1103 $default_proxy = isset($pike_firewall_options['default_proxy']) ? $pike_firewall_options['default_proxy'] : ""; 1093 1104 … … 1099 1110 $table_name_iprange = $wpdb->prefix."pike_firewall_ip_range"; 1100 1111 $table_name_log = $wpdb->prefix."pike_firewall_log"; 1101 1102 if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name && 1103 $wpdb->get_var("SHOW TABLES LIKE '$table_name_iprange'") != $table_name_iprange && 1104 $wpdb->get_var("SHOW TABLES LIKE '$table_name_log'") != $table_name_log ) { 1105 1112 1113 if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name && 1114 $wpdb->get_var("SHOW TABLES LIKE '$table_name_iprange'") == $table_name_iprange && 1115 $wpdb->get_var("SHOW TABLES LIKE '$table_name_log'") == $table_name_log ) { 1106 1116 1107 1117 if ( $default_tor == 'http://pike.hqpeak.com/api/tor' || … … 1132 1142 pike_firewall_fill_table($ip_long_tor); 1133 1143 $check = true; 1134 } elseif (is_array($ip_ arr_proxy) && sizeof($ip_arr_proxy)) {1144 } elseif (is_array($ip_long_proxy) && sizeof($ip_long_proxy)>0) { 1135 1145 $sql = "DELETE FROM $table_name"; 1136 1146 $wpdb->query($sql); … … 1141 1151 1142 1152 if ( $check ) { 1153 $pike_firewall_options['services_update_time'] = time() ; 1143 1154 update_option("pikefirewallsettings", $pike_firewall_options); 1144 1155 } 1145 1156 } 1146 1157 } 1158 1147 1159 1148 1160 // Update maxmind and plugin database … … 1150 1162 update_database_cron(); 1151 1163 } 1152 1164 1153 1165 add_action('hourly_update_event', 'cron_job_action'); 1154 1166 … … 1173 1185 1174 1186 function pike_firewall_error_notice($msg="", $class="notice-success", $dismissable="is-dismissible") { 1175 ?> 1187 ?> 1176 1188 <div class="<?php echo 'notice '.$class.' '.$dismissable; ?> pike-firewall-notice"> 1177 1189 <p><?php echo __($msg); ?></p> … … 1212 1224 } 1213 1225 } 1226 1227 1228 // POST requests with foreign origin check 1229 add_action('init', 'pike_firewall_foreign_request_check', 15); 1230 function pike_firewall_foreign_request_check() { 1231 $pike_firewall_options = get_option('pikefirewallsettings'); 1232 $intrusion_options = isset($pike_firewall_options['intrusion'])? $pike_firewall_options['intrusion']:array("intrusion"=>array()); 1233 $msg = isset($pike_firewall_options['custom_msg'])?$pike_firewall_options['custom_msg']:array("custom_msg"=>array("text"=>"")); 1234 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 1235 1236 $wphost = parse_url(site_url(), PHP_URL_HOST); 1237 $long_ip = array('address' => '', 'type' => 'Foreign Origin'); 1238 1239 if ( isset( $_SERVER['REMOTE_ADDR'] ) ){ 1240 $user_address = $_SERVER['REMOTE_ADDR']; 1241 $long_ip['address'] = ip2long($user_address); 1242 } 1243 1244 if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ){ 1245 $user_address = $_SERVER['HTTP_X_FORWARDED_FOR']; 1246 $long_ip['address'] = ip2long($user_address); 1247 } 1248 1249 if ( in_array('foreign_origin', $intrusion_options) && !pike_l_check_post_refferer($wphost) ) { 1250 savelog($long_ip); 1251 if ( $msg['enabled'] === "enable" ) { 1252 $custom_msg = tags_replace($msg['text'], $long_ip['address']); 1253 require_once(WP_PLUGIN_DIR.'/pike-firewall/pike-firewall-logo-view.php'); 1254 die(); 1255 } else { 1256 wp_die( __('You have sent request with foreign origin.') ); 1257 } 1258 } 1259 } 1260 1261 1262 // POST requests with strange User Agent check 1263 add_action('init', 'pike_firewall_user_agent_check', 15); 1264 function pike_firewall_user_agent_check() { 1265 $pike_firewall_options = get_option('pikefirewallsettings'); 1266 $intrusion_options = isset($pike_firewall_options['intrusion'])? $pike_firewall_options['intrusion']:array("intrusion"=>array()); 1267 $msg = isset($pike_firewall_options['custom_msg'])?$pike_firewall_options['custom_msg']:array("custom_msg"=>array("text"=>"")); 1268 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 1269 1270 $long_ip = array('address' => '', 'type' => 'Blank User Agent'); 1271 1272 if ( isset( $_SERVER['REMOTE_ADDR'] ) ){ 1273 $user_address = $_SERVER['REMOTE_ADDR']; 1274 $long_ip['address'] = ip2long($user_address); 1275 } 1276 1277 if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ){ 1278 $user_address = $_SERVER['HTTP_X_FORWARDED_FOR']; 1279 $long_ip['address'] = ip2long($user_address); 1280 } 1281 1282 if ( in_array('blank_useragent', $intrusion_options) && !pike_l_check_post_UA() ) { 1283 savelog($long_ip); 1284 if ( $msg['enabled'] === "enable" ) { 1285 $custom_msg = tags_replace($msg['text'], $long_ip['address']); 1286 require_once(WP_PLUGIN_DIR.'/pike-firewall/pike-firewall-logo-view.php'); 1287 die(); 1288 } else { 1289 wp_die( __('You have sent request with blank User Agent.') ); 1290 } 1291 } 1292 } 1293 1294 1295 // WP User Enumeratin check 1296 add_action('init', 'pike_firewall_user_enumeration', 15); 1297 function pike_firewall_user_enumeration() { 1298 $pike_firewall_options = get_option('pikefirewallsettings'); 1299 $intrusion_options = isset($pike_firewall_options['intrusion'])? $pike_firewall_options['intrusion']:array("intrusion"=>array()); 1300 $msg = isset($pike_firewall_options['custom_msg'])?$pike_firewall_options['custom_msg']:array("custom_msg"=>array("text"=>"")); 1301 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 1302 1303 $long_ip = array('address' => '', 'type' => 'User Enumeration'); 1304 1305 if ( isset( $_SERVER['REMOTE_ADDR'] ) ){ 1306 $user_address = $_SERVER['REMOTE_ADDR']; 1307 $long_ip['address'] = ip2long($user_address); 1308 } 1309 1310 if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ){ 1311 $user_address = $_SERVER['HTTP_X_FORWARDED_FOR']; 1312 $long_ip['address'] = ip2long($user_address); 1313 } 1314 1315 if ( in_array('user_enumeration', $intrusion_options) && !pike_l_check_user_enum() ) { 1316 savelog($long_ip); 1317 if ( $msg['enabled'] === "enable" ) { 1318 $custom_msg = tags_replace($msg['text'], $long_ip['address']); 1319 require_once(WP_PLUGIN_DIR.'/pike-firewall/pike-firewall-logo-view.php'); 1320 die(); 1321 } else { 1322 wp_die( __('Wordpress User Enumeration detected.') ); 1323 } 1324 } 1325 } 1326 1327 1328 // Invisible characters check 1329 // add_action('init', 'pike_firewall_invisible_chars_check', 15); 1330 function pike_firewall_invisible_chars_check() { 1331 $pike_firewall_options = get_option('pikefirewallsettings'); 1332 $intrusion_options = isset($pike_firewall_options['intrusion'])? $pike_firewall_options['intrusion']:array("intrusion"=>array()); 1333 $msg = isset($pike_firewall_options['custom_msg'])?$pike_firewall_options['custom_msg']:array("custom_msg"=>array("text"=>"")); 1334 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 1335 1336 $long_ip = array('address' => ip2long("127.0.0.1"), 'type' => 'Invisible Character'); 1337 //if ( in_array('invisible_chars', $intrusion_options) && !test() ) { 1338 if ( in_array('invisible_chars', $intrusion_options) ) { 1339 savelog($long_ip); 1340 if ( $msg['enabled'] === "enable" ) { 1341 $custom_msg = tags_replace($msg['text'], $long_ip['address']); 1342 require_once(WP_PLUGIN_DIR.'/pike-firewall/pike-firewall-logo-view.php'); 1343 die(); 1344 } else { 1345 wp_die( __('Invisible Characters detected in input.') ); 1346 } 1347 } 1348 } 1349 1350 1351 // Proxy Headers check 1352 add_action('init', 'pike_firewall_proxy_headers_check', 15); 1353 function pike_firewall_proxy_headers_check() { 1354 $pike_firewall_options = get_option('pikefirewallsettings'); 1355 $intrusion_options = isset($pike_firewall_options['intrusion'])? $pike_firewall_options['intrusion']:array("intrusion"=>array()); 1356 $msg = isset($pike_firewall_options['custom_msg'])?$pike_firewall_options['custom_msg']:array("custom_msg"=>array("text"=>"")); 1357 $stealth_mode = isset($pike_firewall_options['stealth_mode'])?$pike_firewall_options['stealth_mode']:array("stealth_mode"=>array()); 1358 1359 $long_ip = array('address' => '', 'type' => 'Proxy Headers'); 1360 1361 if ( isset( $_SERVER['REMOTE_ADDR'] ) ){ 1362 $user_address = $_SERVER['REMOTE_ADDR']; 1363 $long_ip['address'] = ip2long($user_address); 1364 } 1365 1366 if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ){ 1367 $user_address = $_SERVER['HTTP_X_FORWARDED_FOR']; 1368 $long_ip['address'] = ip2long($user_address); 1369 } 1370 1371 if ( in_array('proxy_headers', $intrusion_options) && !pike_l_check_proxy_by_headers() ) { 1372 savelog($long_ip); 1373 if ( $msg['enabled'] === "enable" ) { 1374 $custom_msg = tags_replace($msg['text'], $long_ip['address']); 1375 require_once(WP_PLUGIN_DIR.'/pike-firewall/pike-firewall-logo-view.php'); 1376 die(); 1377 } else { 1378 wp_die( __('Proxy Headers detected.') ); 1379 } 1380 } 1381 } 1382 1383 1384 function pike_l_check_post_refferer($host="localhost"){ 1385 if ( isset( $_POST ) && sizeof($_POST) > 0){ 1386 if ( isset( $_SERVER["HTTP_REFERER"] ) && trim($_SERVER["HTTP_REFERER"])!="" ){ 1387 $r = parse_url($_SERVER["HTTP_REFERER"], PHP_URL_HOST); 1388 $host = str_replace("www.", "", strtolower($host)); 1389 $r = str_replace("www.", "", strtolower($r)); 1390 1391 if ($r == $host){ 1392 return TRUE; 1393 }else{ 1394 return FALSE; 1395 } 1396 }else{ 1397 return FALSE; 1398 } 1399 }else{ 1400 return TRUE; 1401 } 1402 } 1403 1404 1405 function pike_l_check_post_UA(){ 1406 if ( isset( $_POST ) && sizeof($_POST) > 0){ 1407 if ( isset( $_SERVER["HTTP_REFERER"] ) && trim($_SERVER["HTTP_REFERER"])!="" ){ 1408 return TRUE; 1409 }else{ 1410 return FALSE; 1411 } 1412 }else{ 1413 return TRUE; 1414 } 1415 } 1416 1417 1418 function pike_l_check_user_enum(){ 1419 if ( !is_admin() ){ 1420 if ( isset( $_SERVER["REQUEST_URI"] ) && trim($_SERVER["REQUEST_URI"])!="" ){ 1421 if (strpos(strtolower($_SERVER["REQUEST_URI"]), "wp-comments-post") !== FALSE){ 1422 if ( is_array($_REQUEST) && sizeof($_REQUEST) >0 ){ 1423 foreach ( $_REQUEST as $key=>$val ){ 1424 if ( strtolower($key) == "author" ) return FALSE; 1425 } 1426 }else{ 1427 if ( is_array($_GET) && sizeof($_GET) > 0 ){ 1428 foreach ( $_GET as $key=>$val ){ 1429 if ( strtolower($key) == "author" ) return FALSE; 1430 } 1431 } 1432 if ( is_array($_POST) && sizeof($_POST)>0 ){ 1433 foreach ( $_POST as $key=>$val ){ 1434 if ( strtolower($key) == "author" ) return FALSE; 1435 } 1436 } 1437 } 1438 } 1439 } 1440 } 1441 if ( isset( $_SERVER["QUERY_STRING"] ) && trim($_SERVER["QUERY_STRING"])!="" && strpos($_SERVER["QUERY_STRING"], "author")!== FALSE ){ 1442 if ( is_array($_GET) && sizeof($_GET)>0 ){ 1443 foreach($_GET as $key=>$val){ 1444 if ( strtolower($key) == "author" ){ 1445 if (is_numeric($_GET[$key])) return FALSE; 1446 } 1447 } 1448 } 1449 } 1450 if ( isset($_SERVER["REQUEST_URI"]) && trim($_SERVER["REQUEST_URI"])!="" ){ 1451 $t = explode("/", $_SERVER["REQUEST_URI"]); 1452 if ( is_array($t) && sizeof($t) > 1 ){ 1453 $f = false; 1454 foreach( $t as $item ){ 1455 if ( strtolower($item) == "author" ) $f = true; 1456 if ( $f && is_numeric($item) ) return FALSE; 1457 } 1458 } 1459 } 1460 return TRUE; 1461 } 1462 1463 1464 function pike_l_check_proxy_by_headers(){ 1465 1466 $p_headers = array( 1467 "CLIENT_IP", 1468 "FORWARDED", 1469 "FORWARDED_FOR", 1470 "FORWARDED_FOR_IP", 1471 "HTTP_CLIENT_IP", 1472 "HTTP_FORWARDED", 1473 "HTTP_FORWARDED_FOR", 1474 "HTTP_FORWARDED_FOR_IP", 1475 "HTTP_PC_REMOTE_ADDR", 1476 "HTTP_PROXY_CONNECTION", 1477 "HTTP_VIA", 1478 "HTTP_X_FORWARDED", 1479 "HTTP_X_FORWARDED_FOR", 1480 "HTTP_X_FORWARDED_FOR_IP", 1481 "HTTP_X_IMFORWARDS", 1482 "HTTP_XROXY_CONNECTION", 1483 "VIA", 1484 "X_FORWARDED", 1485 "X_FORWARDED_FOR" 1486 ); 1487 1488 foreach( $p_headers as $ph ){ 1489 if ( isset( $_SERVER[$ph] ) ) return FALSE; 1490 } 1491 return TRUE; 1492 } 1214 1493 ?> -
pike-firewall/trunk/readme.txt
r1419382 r1424990 5 5 Requires at least: 3.8.1 6 6 Tested up to: 4.5.2 7 Stable tag: 1. 0.07 Stable tag: 1.1.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Pike FIrewall stands for limiting actions to the users that came from anonymous traffic sources .11 Pike FIrewall stands for limiting actions to the users that came from anonymous traffic sources and IDS for wordpress. 12 12 13 13 == Description == … … 31 31 - GeoIP country blocking 32 32 33 Intrusion Detection 33 34 35 We introduce our IDS for wordpress with this release. You can do the following: 36 37 - Block POST requests without set up User Agent 38 - Block POST requests originating from another domain (CSRF) 39 - Stop user enumeration 40 - Identify proxy traffic via HTTP headers 41 42 34 43 == Installation == 35 44 … … 74 83 = 1.0 = 75 84 This is the initial released version. 85 = 1.1 = 86 Announced Intrusion Detection for WP with its first features 76 87 77 88 == Upgrade Notice == … … 79 90 = 1.0 = 80 91 Just released in public. 92 = 1.1 = 93 No database or permissions changes will be required 94
Note: See TracChangeset
for help on using the changeset viewer.