IP Geo Block - Version 3.0.16

Version Description

  • Fix issue: Fix the issue that some functions did not work properly when "Validation timing" was set as "mu-plugins" (ip-geo-block-mu.php) under some conditions before WP 4.0.
  • New feature: Add "Sites list" page at Network admin page to look through the status of the sites if this plugin is network activated on multisite.
  • Improvement: Support Swift Performance Lite cache plugin with "Disk Cashe with PHP" caching mode.
  • Improvement: Apply simulation mode to not only the front-end but also to the back-end.
  • Improvement: Optimize SQL issuing to reduce some queries.
  • See 3.0.16 release note for some details.
Download this release

Release Info

Developer tokkonopapa
Plugin Icon 128x128 IP Geo Block
Version 3.0.16
Comparing to
See all releases

Code changes from version 3.0.15 to 3.0.16

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: security, firewall, brute force, vulnerability, login, wp-admin, admin, ajax, xmlrpc, comment, pingback, trackback, spam, IP address, geo, geolocation, buddypress, bbPress
5
  Requires at least: 3.7
6
  Tested up to: 4.9.8
7
- Stable tag: 3.0.15
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
10
 
@@ -104,7 +104,7 @@ All contributions will always be welcome. Or visit my [development blog](https:/
104
  Please refer to [the document](https://www.ipgeoblock.com/codex/ "Codex | IP Geo Block")
105
  or following descriptions for your best setup.
106
 
107
- = Validation rule settings =
108
 
109
  * **Matching rule**
110
  Choose either `White list` (recommended) or `Black list` to specify the countries from which you want to pass or block.
@@ -242,11 +242,11 @@ or following descriptions for your best setup.
242
 
243
  = Does the site using this plugin comply with GDPR? =
244
 
245
- Using this plugin itself should not be the problem, because from version 3.0.11 IP addresses in logs and cache of this plugin are encrypted by default in preparation for personal data breach. It also not only provides a way to manually erase them but also has the functionality to remove them when those are exceeded a certain amount/time. The option "Privacy friendly" helps you to restrict sending the ip address to the 3rd parties such as geolocation APIs and whois service equipped in this plugin. However, these functions are part of the requirements that GDPR requires and do not guarantee that the site is compliant with GDPR. Refer to [3.0.11 release note](https://www.ipgeoblock.com/changelog/release-3.0.11.html) for details.
246
 
247
  = Does this plugin support multisite? =
248
 
249
- It works on multisite, but there's no network setting at this moment.
250
 
251
  = Does this plugin works well with caching? =
252
 
@@ -254,11 +254,11 @@ The short answer is **YES**, especially for the purpose of security e.g. blockin
254
 
255
  The long answer is as follows:
256
 
257
- For the back-end protection, both blocking malicious access and blocking by country works fine, if you disable caching on the back-end. As for the front-end, there are 2 scenarios.
258
 
259
- The first one is the case that there's no cached page against a request to the specific page. In this scenario, this plugin responds a specific HTTP status code (including redirection) and defines the symbol `DONOTCACHEPAGE` when the request comes from blacklisted countries (or IPs). When the request comes from the whitelisted countries (or IPs), this plugin passes it to the caching plugin in order to generate a new cache.
260
 
261
- The second scenario is the case that there's a cached page. In this case, the response depends on the caching method you are employing. Currently, the following plugins and configurations can be supported if you want to [restrict content by geo-blocking](https://en.wikipedia.org/wiki/Geo-blocking "Geo-blocking - Wikipedia"):
262
 
263
  - [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/ "WP Super Cache — WordPress Plugins")
264
  Select "**Use PHP to serve cache files**" and enable "**Late init**".
@@ -269,6 +269,9 @@ The second scenario is the case that there's a cached page. In this case, the re
269
  - [Vendi Cache](https://wordpress.org/plugins/vendi-cache/ "Vendi Cache — WordPress Plugins")
270
  This plugin was formerly built in Wordfence. Select "**basic caching**" for Vendi Cache and **"mu-plugin" (ip-geo-block-mu.php)** for IP Geo Block.
271
 
 
 
 
272
  Other plugins adopting `mod_rewrite` (e.g. WP Fastest Cache) or `advanced-cache.php` [drop-in](https://make.wordpress.org/core/2016/08/13/global-overloading-in-advanced-cache-php/ "Global overloading in advanced-cache.php – Make WordPress Core") (e.g. Comet Cache) or other caching method at server side might serve a normal page.
273
 
274
  Thus your site would have less risk against the exploiting via vulnerable plugins and themes.
@@ -370,7 +373,7 @@ Please refer to "[How can I fix permission troubles?](https://www.ipgeoblock.com
370
  == Screenshots ==
371
 
372
  1. **IP Geo Plugin** - Settings tab
373
- 2. **IP Geo Plugin** - Validation rule settings
374
  3. **IP Geo Plugin** - Back-end target settings
375
  4. **IP Geo Plugin** - Front-end target settings
376
  5. **IP Geo Plugin** - Geolocation API settings
@@ -382,15 +385,23 @@ Please refer to "[How can I fix permission troubles?](https://www.ipgeoblock.com
382
 
383
  == Changelog ==
384
 
 
 
 
 
 
 
 
 
385
  = 3.0.15 =
386
  * **Fix issue:** Fix the issue that "Can not find Geolocation API libraries" error would always appear when once Geolite2, Maxmind and IP2Location were unselected.
387
  * **Fix issue:** Fix the issue that https in ipstack.com is available only for premiums users.
388
  * **New feature:** Introduce a new filter hook [`ip-geo-block-logs-preset`](https://www.ipgeoblock.com/codex/ip-geo-block-logs-preset.html "ip-geo-block-logs[-preset] | IP Geo Block") that adds an UI of "Preset filters" at "Search in logs".
389
  * **Improvement:** Prevent to make a cached page by WP Fastest Cache on blocking when "Validation timing" is "init" action hook.
390
- * **Improvement:** Make the priofity of "UA string and qualification" is higher than that of "Block badly-behaved bots and crawlers" on public facing pages.
391
  * **Improvement:** Update google charts based on the [release note](https://developers.google.com/chart/interactive/docs/release_notes "Google Charts Release Notes  |  Charts | Google Developers").
392
  * **Improvement:** Always show "Google Maps API key" text box in "Plugin settings" section. If it is saved as empty, Google Maps API will no longer be used and a simple map will appear on "Search" tab.
393
- * **Improvement:** Follow the change the RIPE whois format related to AS number.
394
  * **Improvement:** Add UI to select the number of entries per page on IP address tables.
395
  * **Improvement:** Multiple entries on IP address tables can be selected across the pages for bulk action.
396
  * **Improvement:** Multiple Geolocation APIs can be selected on "Search" tab.
@@ -432,7 +443,7 @@ Please refer to "[How can I fix permission troubles?](https://www.ipgeoblock.com
432
  = 3.0.11 =
433
  * **Improvement:** To comply with GDPR, IP address in logs/cache will be always encrypted. The option of "**Anonymize IP address**" was renamed to "**Privacy friendly**" in "**Privacy and record settings**". It will not only anonymize an IP address but also will restrict on sending to the 3rd parties such as geolocation APIs and whois service.
434
  * **Improvement:** Update geolocation APIs and add a new one.
435
- * **Improvement:** Change the JavaScript compressor from Google Closure Compiler to UglifyJS 2 to prevent "Uncaught TypeError: Cannot read property toLowerCase of undefined" in a certain environment.
436
  * **Fix:** Fix the issue that blocking occurred immediately instead of displaying the login page again when login failed, even the number of times did not exceed the limit.
437
  * See [3.0.11 release note](https://www.ipgeoblock.com/changelog/release-3.0.11.html) for some details.
438
 
@@ -448,9 +459,9 @@ Please refer to "[How can I fix permission troubles?](https://www.ipgeoblock.com
448
  * **Fix:** Validation timing was not proper when redirection happened in admin context. (#36)
449
 
450
  = 3.0.10.1 =
451
- This release is intented to fix the issue reported at forum [here](https://wordpress.org/support/topic/error-on-updating-version-3-0-10/ "Error on updating Versión 3.0.10") and [here](https://wordpress.org/support/topic/error-report-on-latest-update/ "error report on latest update").
452
 
453
- If you still find the error "/plugins/ip-geo-block/classes/class-ip-geo-block-logs.php (837) Unknown column last in field list", please deactivate plugin once and activate again. You will see the same error message again, but the things should be fixed.
454
 
455
  = 3.0.10 =
456
  * **New feature:** Add "Block badly-behaved bots and crawlers" in "Front-end target settings" section that validates the frequency of request.
@@ -706,7 +717,7 @@ This is a maintenance release addressing some issues.
706
  = 2.2.4.1 =
707
  Sorry for frequent updating.
708
 
709
- * **Bug fix:** Fixed the issue of `Warning: strpos(): Empty needle in...` that was reported in [@](https://wordpress.org/support/topic/version-224-produces-warning-message "WordPress › Support » Version 2.2.4 Produces Warning Message") and [@](https://wordpress.org/support/topic/error-after-update-to-newest-version "WordPress Support » Error after Update to newest version").
710
 
711
  = 2.2.4 =
712
  * **Bug fix:** Fixed the issue that some links on network admin of multisite were blocked when WP-ZEP for `admin area` or `admin ajax/post` was enabled.
4
  Tags: security, firewall, brute force, vulnerability, login, wp-admin, admin, ajax, xmlrpc, comment, pingback, trackback, spam, IP address, geo, geolocation, buddypress, bbPress
5
  Requires at least: 3.7
6
  Tested up to: 4.9.8
7
+ Stable tag: 3.0.16
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
10
 
104
  Please refer to [the document](https://www.ipgeoblock.com/codex/ "Codex | IP Geo Block")
105
  or following descriptions for your best setup.
106
 
107
+ = Validation rules and behavior =
108
 
109
  * **Matching rule**
110
  Choose either `White list` (recommended) or `Black list` to specify the countries from which you want to pass or block.
242
 
243
  = Does the site using this plugin comply with GDPR? =
244
 
245
+ Since version 3.0.11, this plugin has been designed based on the principle "Privacy by design" in GDPR so that you can compliantly run it to GDPR. In preparation for personal data breach, IP addresses in this plugin are encrypted by default and also can be anonymized. It also provides some functions not only to manually erase them but also to automatically remove them when those are exceeded a certain amount/time. Refer to [3.0.11 release note](https://www.ipgeoblock.com/changelog/release-3.0.11.html) for more details.
246
 
247
  = Does this plugin support multisite? =
248
 
249
+ Yes. You can synchronize the settings with all the sites on the network when you activate on network and enable "**Network wide settings**" in "**Plugin settings**" section.
250
 
251
  = Does this plugin works well with caching? =
252
 
254
 
255
  The long answer is as follows:
256
 
257
+ For the back-end protection, both blocking malicious access and blocking by country work fine, if you disable caching on the back-end. As for the front-end, there are 2 scenarios.
258
 
259
+ The first one is the case that there's no cached page against a request to the specific page. In this scenario, this plugin responds a specific HTTP status code (including redirection) when the request comes from blacklisted countries (or IPs) and exit telling the caching plugin not to make a cached page. When the request comes from the whitelisted countries (or IPs), this plugin passes it to the caching plugin in order to generate a new cache.
260
 
261
+ The second scenario is the case that there's a cached page. In this case, the response depends on the caching method you are employing. Currently, the following plugins can be supported with specific configurations if you want to [restrict contents by geolocation](https://en.wikipedia.org/wiki/Geo-blocking "Geo-blocking - Wikipedia"):
262
 
263
  - [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/ "WP Super Cache — WordPress Plugins")
264
  Select "**Use PHP to serve cache files**" and enable "**Late init**".
269
  - [Vendi Cache](https://wordpress.org/plugins/vendi-cache/ "Vendi Cache — WordPress Plugins")
270
  This plugin was formerly built in Wordfence. Select "**basic caching**" for Vendi Cache and **"mu-plugin" (ip-geo-block-mu.php)** for IP Geo Block.
271
 
272
+ - [Swift Performance Lite](https://wordpress.org/plugins/swift-performance-lite/ "Swift Performance Lite | WordPress.org")
273
+ Select "Disk Cashe with PHP" caching mode.
274
+
275
  Other plugins adopting `mod_rewrite` (e.g. WP Fastest Cache) or `advanced-cache.php` [drop-in](https://make.wordpress.org/core/2016/08/13/global-overloading-in-advanced-cache-php/ "Global overloading in advanced-cache.php – Make WordPress Core") (e.g. Comet Cache) or other caching method at server side might serve a normal page.
276
 
277
  Thus your site would have less risk against the exploiting via vulnerable plugins and themes.
373
  == Screenshots ==
374
 
375
  1. **IP Geo Plugin** - Settings tab
376
+ 2. **IP Geo Plugin** - Validation rules and behavior
377
  3. **IP Geo Plugin** - Back-end target settings
378
  4. **IP Geo Plugin** - Front-end target settings
379
  5. **IP Geo Plugin** - Geolocation API settings
385
 
386
  == Changelog ==
387
 
388
+ = 3.0.16 =
389
+ * **Fix issue:** Fix the issue that some functions did not work properly when "Validation timing" was set as `"mu-plugins" (ip-geo-block-mu.php)` under some conditions before WP 4.0.
390
+ * **New feature:** Add "**Sites list**" page at Network admin page to look through the status of the sites if this plugin is network activated on multisite.
391
+ * **Improvement:** Support [Swift Performance Lite](https://wordpress.org/plugins/swift-performance-lite/ "Swift Performance Lite | WordPress.org") cache plugin with "Disk Cashe with PHP" caching mode.
392
+ * **Improvement:** Apply simulation mode to not only the front-end but also to the back-end.
393
+ * **Improvement:** Optimize SQL issuing to reduce some queries.
394
+ * See [3.0.16 release note](https://www.ipgeoblock.com/changelog/release-3.0.16.html) for some details.
395
+
396
  = 3.0.15 =
397
  * **Fix issue:** Fix the issue that "Can not find Geolocation API libraries" error would always appear when once Geolite2, Maxmind and IP2Location were unselected.
398
  * **Fix issue:** Fix the issue that https in ipstack.com is available only for premiums users.
399
  * **New feature:** Introduce a new filter hook [`ip-geo-block-logs-preset`](https://www.ipgeoblock.com/codex/ip-geo-block-logs-preset.html "ip-geo-block-logs[-preset] | IP Geo Block") that adds an UI of "Preset filters" at "Search in logs".
400
  * **Improvement:** Prevent to make a cached page by WP Fastest Cache on blocking when "Validation timing" is "init" action hook.
401
+ * **Improvement:** Make the priority of "UA string and qualification" is higher than that of "Block badly-behaved bots and crawlers" on public facing pages.
402
  * **Improvement:** Update google charts based on the [release note](https://developers.google.com/chart/interactive/docs/release_notes "Google Charts Release Notes  |  Charts | Google Developers").
403
  * **Improvement:** Always show "Google Maps API key" text box in "Plugin settings" section. If it is saved as empty, Google Maps API will no longer be used and a simple map will appear on "Search" tab.
404
+ * **Improvement:** Follow the change of RIPE whois format related to AS number.
405
  * **Improvement:** Add UI to select the number of entries per page on IP address tables.
406
  * **Improvement:** Multiple entries on IP address tables can be selected across the pages for bulk action.
407
  * **Improvement:** Multiple Geolocation APIs can be selected on "Search" tab.
443
  = 3.0.11 =
444
  * **Improvement:** To comply with GDPR, IP address in logs/cache will be always encrypted. The option of "**Anonymize IP address**" was renamed to "**Privacy friendly**" in "**Privacy and record settings**". It will not only anonymize an IP address but also will restrict on sending to the 3rd parties such as geolocation APIs and whois service.
445
  * **Improvement:** Update geolocation APIs and add a new one.
446
+ * **Improvement:** Change the JavaScript compressor from Google Closure Compiler to UglifyJS 2 to prevent "Uncaught TypeError: Cannot read property 'toLowerCase' of undefined" in a certain environment.
447
  * **Fix:** Fix the issue that blocking occurred immediately instead of displaying the login page again when login failed, even the number of times did not exceed the limit.
448
  * See [3.0.11 release note](https://www.ipgeoblock.com/changelog/release-3.0.11.html) for some details.
449
 
459
  * **Fix:** Validation timing was not proper when redirection happened in admin context. (#36)
460
 
461
  = 3.0.10.1 =
462
+ This release is intented to fix the issue reported at forum [here](https://wordpress.org/support/topic/error-on-updating-version-3-0-10/ "Error on updating Version 3.0.10") and [here](https://wordpress.org/support/topic/error-report-on-latest-update/ "error report on latest update").
463
 
464
+ If you still find the error "/plugins/ip-geo-block/classes/class-ip-geo-block-logs.php (837) Unknown column 'last' in 'field list'", please deactivate plugin once and activate again. You will see the same error message again, but the things should be fixed.
465
 
466
  = 3.0.10 =
467
  * **New feature:** Add "Block badly-behaved bots and crawlers" in "Front-end target settings" section that validates the frequency of request.
717
  = 2.2.4.1 =
718
  Sorry for frequent updating.
719
 
720
+ * **Bug fix:** Fixed the issue of `Warning: strpos(): Empty needle in...` that was reported in [@](https://wordpress.org/support/topic/version-224-produces-warning-message "WordPress › Support » Version 2.2.4 Produces Warning Message") and [@](https://wordpress.org/support/topic/error-after-update-to-newest-version "WordPress › Support » Error after Update to newest version").
721
 
722
  = 2.2.4 =
723
  * **Bug fix:** Fixed the issue that some links on network admin of multisite were blocked when WP-ZEP for `admin area` or `admin ajax/post` was enabled.
admin/class-ip-geo-block-admin.php CHANGED
@@ -8,7 +8,7 @@
8
  * @link https://www.ipgeoblock.com/
9
  * @copyright 2013-2018 tokkonopapa
10
  */
11
- define( 'IP_GEO_BLOCK_NETWORK', FALSE );
12
 
13
  class IP_Geo_Block_Admin {
14
 
@@ -24,7 +24,7 @@ class IP_Geo_Block_Admin {
24
  *
25
  */
26
  private static $instance = NULL;
27
- private $is_network_admin = NULL;
28
  private $admin_tab = 0;
29
 
30
  /**
@@ -43,7 +43,7 @@ class IP_Geo_Block_Admin {
43
  // add_action( 'admin_init', array( $this, 'add_privacy_policy' ) );
44
 
45
  // Setup a nonce to validate authentication.
46
- add_filter( 'wp_redirect', array( $this, 'add_redirect_nonce' ), 10, 2 );
47
  }
48
 
49
  /**
@@ -64,21 +64,19 @@ class IP_Geo_Block_Admin {
64
  file_exists( $file = IP_Geo_Block_Util::unslashit( $settings['api_dir'] ) . '/drop-in-admin.php' ) and include( $file );
65
 
66
  // Add the options page and menu item.
67
- add_action( 'admin_menu', array( $this, 'setup_admin_page' ) );
68
- add_action( 'admin_post_ip_geo_block', array( $this, 'admin_ajax_callback' ) );
69
- add_action( 'wp_ajax_ip_geo_block', array( $this, 'admin_ajax_callback' ) );
70
  add_filter( 'wp_prepare_revision_for_js', array( $this, 'add_revision_nonce' ), 10, 3 );
71
 
72
  if ( IP_Geo_Block_Util::is_user_logged_in() )
73
  add_filter( IP_Geo_Block::PLUGIN_NAME . '-bypass-admins', array( $this, 'verify_request' ), 10, 2 );
74
 
75
- if ( is_multisite() ) {
76
  $this->is_network_admin = current_user_can( 'manage_network_options' );
77
- add_action( 'network_admin_menu', array( $this, 'setup_admin_page' ) );
78
- if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) { // @since 3.0.0
79
- add_action( 'wpmu_new_blog', array( $this, 'create_blog' ), 10, 6 ); // on creating a new blog @since MU
80
- add_action( 'delete_blog', array( $this, 'delete_blog' ), 10, 2 ); // on deleting an old blog @since 3.0.0
81
- }
82
  }
83
 
84
  // loads a plugin’s translated strings.
@@ -98,6 +96,14 @@ class IP_Geo_Block_Admin {
98
  }
99
  }
100
 
 
 
 
 
 
 
 
 
101
  /**
102
  * Add webview class into the body.
103
  *
@@ -134,7 +140,7 @@ class IP_Geo_Block_Admin {
134
  */
135
  public function add_revision_nonce( $revisions_data, $revision, $post ) {
136
  $revisions_data['restoreUrl'] = add_query_arg(
137
- $nonce = IP_Geo_Block::PLUGIN_NAME . '-auth-nonce',
138
  IP_Geo_Block_Util::create_nonce( $nonce ),
139
  $revisions_data['restoreUrl']
140
  );
@@ -176,7 +182,7 @@ class IP_Geo_Block_Admin {
176
 
177
  // Copy option from main blog.
178
  if ( $this->is_network_admin && $settings['network_wide'] )
179
- update_option( IP_Geo_Block::OPTION_NAME, $settings );
180
 
181
  // Restore the main blog.
182
  restore_current_blog();
@@ -225,7 +231,7 @@ class IP_Geo_Block_Admin {
225
  if ( 4 === $this->admin_tab )
226
  break;
227
 
228
- case 5: /* Site list */
229
  // js for google charts
230
  wp_register_script(
231
  $addon = IP_Geo_Block::PLUGIN_NAME . '-google-chart',
@@ -389,10 +395,10 @@ class IP_Geo_Block_Admin {
389
  echo '<strong>IP Geo Block:</strong> ', IP_Geo_Block_Util::kses( $msg );
390
  echo '</p></div>', "\n";
391
  }
392
- }
393
 
394
- // delete all admin noties
395
- delete_transient( $key );
 
396
  }
397
 
398
  /**
@@ -415,8 +421,8 @@ class IP_Geo_Block_Admin {
415
  * Get the admin url that depends on network multisite.
416
  *
417
  */
418
- public function dashboard_url( $network = NULL ) {
419
- return ( is_null( $network ) ? $this->is_network_admin : $network ) ? network_admin_url( 'admin.php' /*'settings.php'*/ ) : admin_url( 'options-general.php' );
420
  }
421
 
422
  /**
@@ -425,7 +431,6 @@ class IP_Geo_Block_Admin {
425
  */
426
  private function add_plugin_admin_menu( $settings ) {
427
  // Control tab number
428
- // `admin_menu` or `network_admin_menu` @since: 2.5
429
  if ( $admin_menu = ( 'admin_menu' === current_filter() ) ) {
430
  if ( $this->is_network_admin && $settings['network_wide'] )
431
  $this->admin_tab = min( 4, max( 1, $this->admin_tab ) );
@@ -485,7 +490,7 @@ class IP_Geo_Block_Admin {
485
  add_submenu_page(
486
  IP_Geo_Block::PLUGIN_NAME,
487
  __( 'IP Geo Block', 'ip-geo-block' ),
488
- __( 'Site List', 'ip-geo-block' ),
489
  'manage_network_options',
490
  IP_Geo_Block::PLUGIN_NAME . '&amp;tab=5',
491
  array( $this, 'display_plugin_admin_page' )
@@ -510,7 +515,7 @@ class IP_Geo_Block_Admin {
510
  */
511
  private function diagnose_admin_screen( $settings ) {
512
  $updating = get_transient( IP_Geo_Block::CRON_NAME );
513
- $adminurl = $this->dashboard_url( $this->is_network_admin && $settings['network_wide'] );
514
 
515
  // Check version and compatibility
516
  if ( version_compare( get_bloginfo( 'version' ), '3.7.0' ) < 0 )
@@ -547,13 +552,13 @@ class IP_Geo_Block_Admin {
547
  if ( -1 === (int)$settings['matching_rule'] ) {
548
  if ( FALSE !== $updating ) {
549
  self::add_admin_notice( 'notice-warning', sprintf(
550
- __( 'Now downloading geolocation databases in background. After a little while, please check your country code and &#8220;<strong>Matching rule</strong>&#8221; at <a href="%s">Validation rule settings</a>.', 'ip-geo-block' ),
551
  esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME ), $adminurl ) )
552
  ) );
553
  }
554
  else {
555
  self::add_admin_notice( 'error', sprintf(
556
- __( 'The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please confirm it at <a href="%s">Validation rule settings</a>.', 'ip-geo-block' ),
557
  esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME ), $adminurl ) )
558
  ) );
559
  }
@@ -591,11 +596,11 @@ class IP_Geo_Block_Admin {
591
  ) . ' ' .
592
  ( 'ZZ' !== $validate['code'] ?
593
  sprintf(
594
- __( 'Please check your &#8220;%sValidation rule settings%s&#8221;.', 'ip-geo-block' ),
595
  '<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 0 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-0' ) . '">', '</a></strong>'
596
  ) :
597
  sprintf(
598
- __( 'Please confirm your local geolocation databases at &#8220;%sLocal database settings%s&#8221; section and remove your IP address in cache at &#8220;%sStatistics in cache%s&#8221; section.', 'ip-geo-block' ),
599
  '<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 5 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-5' ) . '">', '</a></strong>',
600
  '<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 1, 'sec' => 2 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-2' ) . '">', '</a></strong>'
601
  )
@@ -604,15 +609,7 @@ class IP_Geo_Block_Admin {
604
  break;
605
  }
606
  }
607
- if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
608
- // Check database tables
609
- if ( $settings['cache_hold'] || $settings['validation']['reclogs'] ) {
610
- if ( ( $warn = IP_Geo_Block_Logs::diag_tables() ) &&
611
- ( TRUE !== IP_Geo_Block_Logs::create_tables() ) ) {
612
- self::add_admin_notice( 'notice-warning', $warn );
613
- }
614
- }
615
- endif;
616
  // Check consistency of emergency login link
617
  if ( isset( $settings['login_link'] ) && $settings['login_link']['link'] && ! IP_Geo_Block_Util::verify_link( $settings['login_link']['link'], $settings['login_link']['hash'] ) ) {
618
  self::add_admin_notice( 'error',
@@ -658,7 +655,7 @@ endif;
658
  }
659
 
660
  // Register scripts for admin.
661
- add_action( 'admin_enqueue_scripts', 'IP_Geo_Block::enqueue_nonce', 0 );
662
 
663
  // Show admin notices at the place where it should be. @since 2.5.0
664
  add_action( 'admin_notices', array( $this, 'show_admin_notices' ) );
@@ -738,7 +735,7 @@ endif;
738
  4 => __( 'Logs', 'ip-geo-block' ),
739
  2 => __( 'Search', 'ip-geo-block' ),
740
  3 => __( 'Attribution', 'ip-geo-block' ),
741
- 5 => __( 'Site List', 'ip-geo-block' ),
742
  );
743
 
744
  $settings = IP_Geo_Block::get_option();
@@ -748,21 +745,21 @@ endif;
748
  // Target page that depends on the network multisite or not.
749
  if ( 'options-general.php' === $GLOBALS['pagenow'] ) {
750
  $action = 'options.php';
751
- unset( $tabs[5] ); // Site List
752
  if ( IP_GEO_BLOCK_NETWORK && $this->is_network_admin ) {
753
  if ( $settings['network_wide'] ) {
754
  unset( $tabs[0] ); // Settings
755
  }
756
  $title .= ' <span class="ip-geo-block-menu-link">';
757
- $title .= ' [ <a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME ), $this->dashboard_url( TRUE ) ) ) . '" target="_self">' . __( 'Network wide', 'ip-geo-block' ) . '</a> ]';
758
  $title .= '</span>';
759
  }
760
  }
761
 
762
  // '/wp-admin/network/admin.php'
763
  else {
764
- // `edit.php` is an action handler for Multisite administration panels.
765
- // `edit.php` ==> do action `network_admin_edit_IP_GEO_BLOCK` ==> `validate_network_settings()`
766
  $action = 'edit.php?action=' . IP_Geo_Block::PLUGIN_NAME;
767
  if ( $this->is_network_admin ) {
768
  if ( ! $settings['network_wide'] ) {
@@ -770,7 +767,7 @@ endif;
770
  }
771
  unset( $tabs[1], $tabs[4], $tabs[2], $tabs[3] ); // Statistics, Logs, Search, Attribution
772
  $title .= ' <span class="ip-geo-block-menu-link">';
773
- $title .= '[ ' . __( 'Network wide', 'ip-geo-block' ) . ' ]';
774
  $title .= '</span>';
775
  }
776
  }
@@ -788,7 +785,7 @@ endif;
788
  <input id="ip-geo-block-live-update" type="checkbox"<?php checked( isset( $cookie[4][1] ) && 'o' === $cookie[4][1] ); disabled( $settings['validation']['reclogs'] && extension_loaded( 'pdo_sqlite' ), FALSE ); ?> /><label for="ip-geo-block-live-update">
789
  <dfn title="<?php _e( 'Independent of &#8220;Privacy and record settings&#8221;, you can see all the requests validated by this plugin in almost real time.', 'ip-geo-block' ); ?>"><?php _e( 'Live update', 'ip-geo-block' ); ?></dfn>
790
  </label>
791
- <?php } elseif (5 === $tab ) { /* Site List tab */ ?>
792
  <input id="ip-geo-block-open-new" type="checkbox"<?php checked( isset( $cookie[5][1] ) && 'o' === $cookie[5][1] );?> /><label for="ip-geo-block-open-new">
793
  <dfn title="<?php _e( 'Open a new window on clicking the link in the chart.', 'ip-geo-block' ); ?>"><?php _e( 'Open a new window', 'ip-geo-block' ); ?></dfn>
794
  </label>
@@ -892,13 +889,13 @@ endif;
892
  foreach ( $args['list'] as $key => $val ) { ?>
893
  <li>
894
  <input type="checkbox" id="<?php echo $id, $sub_id, '_', $key; ?>" name="<?php echo $name, $sub_name, '[', $key, ']'; ?>" value="<?php echo $key; ?>"<?php
895
- checked( is_array( $args['value'] ) ? ! empty( $args['value'][ $key ] ) : ( $key & $args['value'] ? TRUE : FALSE ) ); ?> />
896
- <label for="<?php echo $id, $sub_id, '_', $key; ?>"><?php
897
  if ( isset( $args['desc'][ $key ] ) )
898
  echo '<dfn title="', $args['desc'][ $key ], '">', $val, '</dfn>';
899
  else
900
- echo $val; ?>
901
- </label>
902
  </li>
903
  <?php
904
  }
@@ -908,12 +905,12 @@ endif;
908
  case 'checkbox': ?>
909
  <input type="checkbox" id="<?php echo $id, $sub_id; ?>" name="<?php echo $name, $sub_name; ?>" value="1"<?php
910
  checked( esc_attr( $args['value'] ) );
911
- disabled( ! empty( $args['disabled'] ), TRUE ); ?> />
912
- <label for="<?php echo $id, $sub_id; ?>"><?php
913
  if ( isset( $args['text'] ) ) echo esc_attr( $args['text'] );
914
  else if ( isset( $args['html'] ) ) echo $args['html'];
915
- else _e( 'Enable', 'ip-geo-block' ); ?>
916
- </label>
917
  <?php
918
  break;
919
 
@@ -1130,7 +1127,7 @@ endif;
1130
  // Initialize not on the form (mainly unchecked checkbox)
1131
  public function preprocess_options( $output, $default ) {
1132
  // initialize checkboxes not in the form (added after 2.0.0, just in case)
1133
- foreach ( array( 'providers', 'save_statistics', 'cache_hold', 'anonymize', 'restrict_api', 'network_wide', 'clean_uninstall' ) as $key ) {
1134
  $output[ $key ] = is_array( $default[ $key ] ) ? array() : 0;
1135
  }
1136
 
@@ -1153,7 +1150,7 @@ endif;
1153
  }
1154
 
1155
  // keep disabled checkboxes not in the form
1156
- foreach ( array( 'target_pages', 'target_posts', 'target_cates', 'target_tags', 'simulate', 'dnslkup', 'behavior' ) as $key ) {
1157
  $output['public'][ $key ] = is_array( $default['public'][ $key ] ) ? array() : FALSE;
1158
  }
1159
 
@@ -1339,7 +1336,7 @@ endif;
1339
  $settings = IP_Geo_Block::get_option();
1340
  if ( ( $ajax and $settings['validation']['ajax' ] & 2 ) ||
1341
  ( ! $ajax and $settings['validation']['admin'] & 2 ) ) {
1342
- $action = IP_Geo_Block::PLUGIN_NAME . '-auth-nonce';
1343
  $nonce &= IP_Geo_Block_Util::verify_nonce( IP_Geo_Block_Util::retrieve_nonce( $action ), $action );
1344
  }
1345
 
@@ -1428,9 +1425,9 @@ endif;
1428
 
1429
  foreach ( $blog_ids as $id ) {
1430
  switch_to_blog( $id );
1431
- $map = IP_Geo_Block::get_option();
1432
  $settings['api_key']['GoogleMap'] = $map['api_key']['GoogleMap'];
1433
- $ret &= update_option( IP_Geo_Block::OPTION_NAME, $settings );
1434
  restore_current_blog();
1435
  }
1436
 
@@ -1519,7 +1516,7 @@ endif;
1519
  case 'gmap-error': // Reset Google Maps API key
1520
  if ( $settings['api_key']['GoogleMap'] === 'default' ) {
1521
  $settings['api_key']['GoogleMap'] = NULL;
1522
- update_option( IP_Geo_Block::OPTION_NAME, $settings );
1523
  $res = array(
1524
  'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME,
1525
  'tab' => 'tab=2'
@@ -1528,11 +1525,11 @@ endif;
1528
  break;
1529
 
1530
  case 'generate-link': // Generate new link
1531
- $res = array( 'link' => IP_Geo_Block_Util::generate_link() );
1532
  break;
1533
 
1534
  case 'delete-link': // Delete existing link
1535
- IP_Geo_Block_Util::delete_link();
1536
  break;
1537
 
1538
  case 'show-info': // Show system and debug information
@@ -1588,7 +1585,7 @@ endif;
1588
  if ( $this->is_network_admin && $settings['network_wide'] )
1589
  $this->update_multisite_settings( $settings );
1590
  else
1591
- update_option( IP_Geo_Block::OPTION_NAME, $settings );
1592
 
1593
  $res = array( 'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME );
1594
  break;
@@ -1627,10 +1624,9 @@ endif;
1627
  $res = IP_Geo_Block_Admin_Ajax::find_exceptions( $cmd );
1628
  break;
1629
 
1630
- case 'init-table':
1631
- // Need to define `IP_GEO_BLOCK_DEBUG` to true
1632
- IP_Geo_Block_Logs::delete_tables();
1633
- IP_Geo_Block_Logs::create_tables();
1634
  $res = array( 'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME );
1635
  break;
1636
  }
8
  * @link https://www.ipgeoblock.com/
9
  * @copyright 2013-2018 tokkonopapa
10
  */
11
+ define( 'IP_GEO_BLOCK_NETWORK', TRUE );
12
 
13
  class IP_Geo_Block_Admin {
14
 
24
  *
25
  */
26
  private static $instance = NULL;
27
+ private $is_network_admin = FALSE;
28
  private $admin_tab = 0;
29
 
30
  /**
43
  // add_action( 'admin_init', array( $this, 'add_privacy_policy' ) );
44
 
45
  // Setup a nonce to validate authentication.
46
+ add_filter( 'wp_redirect', array( $this, 'add_redirect_nonce' ), 10, 2 ); // @since 2.1.0
47
  }
48
 
49
  /**
64
  file_exists( $file = IP_Geo_Block_Util::unslashit( $settings['api_dir'] ) . '/drop-in-admin.php' ) and include( $file );
65
 
66
  // Add the options page and menu item.
67
+ add_action( 'admin_menu', array( $this, 'setup_admin_page' ) ); // @since: 2.5.0
68
+ add_action( 'admin_post_ip_geo_block', array( $this, 'admin_ajax_callback' ) ); // @since: 2.6.0
69
+ add_action( 'wp_ajax_ip_geo_block', array( $this, 'admin_ajax_callback' ) ); // @since: 2.1.0
70
  add_filter( 'wp_prepare_revision_for_js', array( $this, 'add_revision_nonce' ), 10, 3 );
71
 
72
  if ( IP_Geo_Block_Util::is_user_logged_in() )
73
  add_filter( IP_Geo_Block::PLUGIN_NAME . '-bypass-admins', array( $this, 'verify_request' ), 10, 2 );
74
 
75
+ if ( is_multisite() && is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) { // @since: 3.0.0
76
  $this->is_network_admin = current_user_can( 'manage_network_options' );
77
+ add_action( 'network_admin_menu', array( $this, 'setup_admin_page' ) ); // @since: 2.5
78
+ add_action( 'wpmu_new_blog', array( $this, 'create_blog' ), 10, 6 ); // on creating a new blog @since MU
79
+ add_action( 'delete_blog', array( $this, 'delete_blog' ), 10, 2 ); // on deleting an old blog @since 3.0.0
 
 
80
  }
81
 
82
  // loads a plugin’s translated strings.
96
  }
97
  }
98
 
99
+ /**
100
+ * Whether this plugin activated by network or not.
101
+ *
102
+ */
103
+ public function is_network_admin() {
104
+ return $this->is_network_admin;
105
+ }
106
+
107
  /**
108
  * Add webview class into the body.
109
  *
140
  */
141
  public function add_revision_nonce( $revisions_data, $revision, $post ) {
142
  $revisions_data['restoreUrl'] = add_query_arg(
143
+ $nonce = IP_Geo_Block::get_auth_key(),
144
  IP_Geo_Block_Util::create_nonce( $nonce ),
145
  $revisions_data['restoreUrl']
146
  );
182
 
183
  // Copy option from main blog.
184
  if ( $this->is_network_admin && $settings['network_wide'] )
185
+ IP_Geo_Block::update_option( $settings, FALSE );
186
 
187
  // Restore the main blog.
188
  restore_current_blog();
231
  if ( 4 === $this->admin_tab )
232
  break;
233
 
234
+ case 5: /* Sites list */
235
  // js for google charts
236
  wp_register_script(
237
  $addon = IP_Geo_Block::PLUGIN_NAME . '-google-chart',
395
  echo '<strong>IP Geo Block:</strong> ', IP_Geo_Block_Util::kses( $msg );
396
  echo '</p></div>', "\n";
397
  }
 
398
 
399
+ // delete all admin noties
400
+ delete_transient( $key );
401
+ }
402
  }
403
 
404
  /**
421
  * Get the admin url that depends on network multisite.
422
  *
423
  */
424
+ public function dashboard_url( $network_wide = FALSE ) {
425
+ return ( $network_wide ? $this->is_network_admin : $network_wide ) ? network_admin_url( 'admin.php' /*'settings.php'*/ ) : admin_url( 'options-general.php' );
426
  }
427
 
428
  /**
431
  */
432
  private function add_plugin_admin_menu( $settings ) {
433
  // Control tab number
 
434
  if ( $admin_menu = ( 'admin_menu' === current_filter() ) ) {
435
  if ( $this->is_network_admin && $settings['network_wide'] )
436
  $this->admin_tab = min( 4, max( 1, $this->admin_tab ) );
490
  add_submenu_page(
491
  IP_Geo_Block::PLUGIN_NAME,
492
  __( 'IP Geo Block', 'ip-geo-block' ),
493
+ __( 'Sites list', 'ip-geo-block' ),
494
  'manage_network_options',
495
  IP_Geo_Block::PLUGIN_NAME . '&amp;tab=5',
496
  array( $this, 'display_plugin_admin_page' )
515
  */
516
  private function diagnose_admin_screen( $settings ) {
517
  $updating = get_transient( IP_Geo_Block::CRON_NAME );
518
+ $adminurl = $this->dashboard_url( $settings['network_wide'] );
519
 
520
  // Check version and compatibility
521
  if ( version_compare( get_bloginfo( 'version' ), '3.7.0' ) < 0 )
552
  if ( -1 === (int)$settings['matching_rule'] ) {
553
  if ( FALSE !== $updating ) {
554
  self::add_admin_notice( 'notice-warning', sprintf(
555
+ __( 'Now downloading geolocation databases in background. After a little while, please check your country code and &#8220;<strong>Matching rule</strong>&#8221; at <a href="%s">Validation rules and behavior</a>.', 'ip-geo-block' ),
556
  esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME ), $adminurl ) )
557
  ) );
558
  }
559
  else {
560
  self::add_admin_notice( 'error', sprintf(
561
+ __( 'The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please confirm it at <a href="%s">Validation rules and behavior</a>.', 'ip-geo-block' ),
562
  esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME ), $adminurl ) )
563
  ) );
564
  }
596
  ) . ' ' .
597
  ( 'ZZ' !== $validate['code'] ?
598
  sprintf(
599
+ __( 'Please check your &#8220;%sValidation rules and behavior%s&#8221;.', 'ip-geo-block' ),
600
  '<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 0 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-0' ) . '">', '</a></strong>'
601
  ) :
602
  sprintf(
603
+ __( 'Please confirm your local geolocation database files exist at &#8220;%sLocal database settings%s&#8221; section, or remove your IP address in cache at &#8220;%sStatistics in cache%s&#8221; section.', 'ip-geo-block' ),
604
  '<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 5 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-5' ) . '">', '</a></strong>',
605
  '<strong><a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 1, 'sec' => 2 ), $adminurl ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-2' ) . '">', '</a></strong>'
606
  )
609
  break;
610
  }
611
  }
612
+
 
 
 
 
 
 
 
 
613
  // Check consistency of emergency login link
614
  if ( isset( $settings['login_link'] ) && $settings['login_link']['link'] && ! IP_Geo_Block_Util::verify_link( $settings['login_link']['link'], $settings['login_link']['hash'] ) ) {
615
  self::add_admin_notice( 'error',
655
  }
656
 
657
  // Register scripts for admin.
658
+ add_action( 'admin_enqueue_scripts', array( 'IP_Geo_Block', 'enqueue_nonce' ), 0 );
659
 
660
  // Show admin notices at the place where it should be. @since 2.5.0
661
  add_action( 'admin_notices', array( $this, 'show_admin_notices' ) );
735
  4 => __( 'Logs', 'ip-geo-block' ),
736
  2 => __( 'Search', 'ip-geo-block' ),
737
  3 => __( 'Attribution', 'ip-geo-block' ),
738
+ 5 => __( 'Sites list', 'ip-geo-block' ),
739
  );
740
 
741
  $settings = IP_Geo_Block::get_option();
745
  // Target page that depends on the network multisite or not.
746
  if ( 'options-general.php' === $GLOBALS['pagenow'] ) {
747
  $action = 'options.php';
748
+ unset( $tabs[5] ); // Sites list
749
  if ( IP_GEO_BLOCK_NETWORK && $this->is_network_admin ) {
750
  if ( $settings['network_wide'] ) {
751
  unset( $tabs[0] ); // Settings
752
  }
753
  $title .= ' <span class="ip-geo-block-menu-link">';
754
+ $title .= ' [ <a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME ), $this->dashboard_url( TRUE ) ) ) . '" target="_self">' . __( 'Network', 'ip-geo-block' ) . '</a> ]';
755
  $title .= '</span>';
756
  }
757
  }
758
 
759
  // '/wp-admin/network/admin.php'
760
  else {
761
+ // `edit.php` is an action handler for Multisite administration dashboard.
762
+ // `edit.php` ==> do action `network_admin_edit_ip-geo-block` ==> `validate_network_settings()`
763
  $action = 'edit.php?action=' . IP_Geo_Block::PLUGIN_NAME;
764
  if ( $this->is_network_admin ) {
765
  if ( ! $settings['network_wide'] ) {
767
  }
768
  unset( $tabs[1], $tabs[4], $tabs[2], $tabs[3] ); // Statistics, Logs, Search, Attribution
769
  $title .= ' <span class="ip-geo-block-menu-link">';
770
+ $title .= '[ ' . __( 'Network', 'ip-geo-block' ) . ' ]';
771
  $title .= '</span>';
772
  }
773
  }
785
  <input id="ip-geo-block-live-update" type="checkbox"<?php checked( isset( $cookie[4][1] ) && 'o' === $cookie[4][1] ); disabled( $settings['validation']['reclogs'] && extension_loaded( 'pdo_sqlite' ), FALSE ); ?> /><label for="ip-geo-block-live-update">
786
  <dfn title="<?php _e( 'Independent of &#8220;Privacy and record settings&#8221;, you can see all the requests validated by this plugin in almost real time.', 'ip-geo-block' ); ?>"><?php _e( 'Live update', 'ip-geo-block' ); ?></dfn>
787
  </label>
788
+ <?php } elseif (5 === $tab ) { /* Sites list tab */ ?>
789
  <input id="ip-geo-block-open-new" type="checkbox"<?php checked( isset( $cookie[5][1] ) && 'o' === $cookie[5][1] );?> /><label for="ip-geo-block-open-new">
790
  <dfn title="<?php _e( 'Open a new window on clicking the link in the chart.', 'ip-geo-block' ); ?>"><?php _e( 'Open a new window', 'ip-geo-block' ); ?></dfn>
791
  </label>
889
  foreach ( $args['list'] as $key => $val ) { ?>
890
  <li>
891
  <input type="checkbox" id="<?php echo $id, $sub_id, '_', $key; ?>" name="<?php echo $name, $sub_name, '[', $key, ']'; ?>" value="<?php echo $key; ?>"<?php
892
+ checked( is_array( $args['value'] ) ? ! empty( $args['value'][ $key ] ) : ( $key & $args['value'] ? TRUE : FALSE ) ); ?> /><label for="<?php
893
+ echo $id, $sub_id, '_', $key; ?>"><?php
894
  if ( isset( $args['desc'][ $key ] ) )
895
  echo '<dfn title="', $args['desc'][ $key ], '">', $val, '</dfn>';
896
  else
897
+ echo $val;
898
+ ?></label>
899
  </li>
900
  <?php
901
  }
905
  case 'checkbox': ?>
906
  <input type="checkbox" id="<?php echo $id, $sub_id; ?>" name="<?php echo $name, $sub_name; ?>" value="1"<?php
907
  checked( esc_attr( $args['value'] ) );
908
+ disabled( ! empty( $args['disabled'] ), TRUE ); ?> /><label for="<?php
909
+ echo $id, $sub_id; ?>"><?php
910
  if ( isset( $args['text'] ) ) echo esc_attr( $args['text'] );
911
  else if ( isset( $args['html'] ) ) echo $args['html'];
912
+ else _e( 'Enable', 'ip-geo-block' );
913
+ ?></label>
914
  <?php
915
  break;
916
 
1127
  // Initialize not on the form (mainly unchecked checkbox)
1128
  public function preprocess_options( $output, $default ) {
1129
  // initialize checkboxes not in the form (added after 2.0.0, just in case)
1130
+ foreach ( array( 'providers', 'save_statistics', 'cache_hold', 'anonymize', 'restrict_api', 'network_wide', 'clean_uninstall', 'simulate' ) as $key ) {
1131
  $output[ $key ] = is_array( $default[ $key ] ) ? array() : 0;
1132
  }
1133
 
1150
  }
1151
 
1152
  // keep disabled checkboxes not in the form
1153
+ foreach ( array( 'target_pages', 'target_posts', 'target_cates', 'target_tags', 'dnslkup', 'behavior' ) as $key ) {
1154
  $output['public'][ $key ] = is_array( $default['public'][ $key ] ) ? array() : FALSE;
1155
  }
1156
 
1336
  $settings = IP_Geo_Block::get_option();
1337
  if ( ( $ajax and $settings['validation']['ajax' ] & 2 ) ||
1338
  ( ! $ajax and $settings['validation']['admin'] & 2 ) ) {
1339
+ $action = IP_Geo_Block::get_auth_key();
1340
  $nonce &= IP_Geo_Block_Util::verify_nonce( IP_Geo_Block_Util::retrieve_nonce( $action ), $action );
1341
  }
1342
 
1425
 
1426
  foreach ( $blog_ids as $id ) {
1427
  switch_to_blog( $id );
1428
+ $map = IP_Geo_Block::get_option( FALSE );
1429
  $settings['api_key']['GoogleMap'] = $map['api_key']['GoogleMap'];
1430
+ $ret &= IP_Geo_Block::update_option( $settings, FALSE );
1431
  restore_current_blog();
1432
  }
1433
 
1516
  case 'gmap-error': // Reset Google Maps API key
1517
  if ( $settings['api_key']['GoogleMap'] === 'default' ) {
1518
  $settings['api_key']['GoogleMap'] = NULL;
1519
+ IP_Geo_Block::update_option( $settings );
1520
  $res = array(
1521
  'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME,
1522
  'tab' => 'tab=2'
1525
  break;
1526
 
1527
  case 'generate-link': // Generate new link
1528
+ $res = array( 'link' => IP_Geo_Block_Util::generate_link( $this ) );
1529
  break;
1530
 
1531
  case 'delete-link': // Delete existing link
1532
+ IP_Geo_Block_Util::delete_link( $this );
1533
  break;
1534
 
1535
  case 'show-info': // Show system and debug information
1585
  if ( $this->is_network_admin && $settings['network_wide'] )
1586
  $this->update_multisite_settings( $settings );
1587
  else
1588
+ IP_Geo_Block::update_option( $settings );
1589
 
1590
  $res = array( 'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME );
1591
  break;
1624
  $res = IP_Geo_Block_Admin_Ajax::find_exceptions( $cmd );
1625
  break;
1626
 
1627
+ case 'diag-tables':
1628
+ // Check database tables
1629
+ IP_Geo_Block_Logs::diag_tables() or IP_Geo_Block_Logs::create_tables();
 
1630
  $res = array( 'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME );
1631
  break;
1632
  }
admin/css/admin-icons.css CHANGED
@@ -94,6 +94,7 @@
94
  content: "\e900";
95
  }
96
 
 
97
  #toplevel_page_ip-geo-block .dashicons-admin-generic:before {
98
  font-family: 'icomoon';
99
  content: "\e62f";
94
  content: "\e900";
95
  }
96
 
97
+ /* Dashicons is the official icon font of the WordPress admin as of 3.8+. */
98
  #toplevel_page_ip-geo-block .dashicons-admin-generic:before {
99
  font-family: 'icomoon';
100
  content: "\e62f";
admin/css/admin.css CHANGED
@@ -144,6 +144,13 @@ fieldset.ip-geo-block-field textarea.regular-text {
144
  font-size: 95%;
145
  }
146
 
 
 
 
 
 
 
 
147
  /* Plugins/Themes area, Geolocation API settings */
148
  input[id*="ip_geo_block_settings_rewrite_"] + label {
149
  margin-left: 0.25em;
144
  font-size: 95%;
145
  }
146
 
147
+ /* Checkbox / Radio */
148
+ p.ip-geo-block-navi-link input[type="checkbox"],
149
+ fieldset.ip-geo-block-field input[type="checkbox"],
150
+ fieldset.ip-geo-block-field input[type="radio"] {
151
+ margin-right: 0.4em;
152
+ }
153
+
154
  /* Plugins/Themes area, Geolocation API settings */
155
  input[id*="ip_geo_block_settings_rewrite_"] + label {
156
  margin-left: 0.25em;
admin/css/admin.min.css CHANGED
@@ -3,4 +3,4 @@
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
- dfn{cursor:help;border-bottom:1px dotted #888}fieldset,legend{padding:0;margin:0;border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}fieldset{min-width:0}legend{display:block;line-height:inherit;width:100%}label{display:inline-block;max-width:100%}.panel{border-color:#888;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#f5f5f5}.panel-heading{float:left!important;background:#fff}.panel-default>.panel-heading{border-color:inherit}.panel-body{width:100%;padding:0 1em;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-body:after{clear:both}.ip-geo-block-navi-link{text-align:left}.ip-geo-block-help-link{float:right;font-size:90%;font-weight:400}.ip-geo-block-help-link a{box-shadow:none}fieldset label{vertical-align:text-middle}fieldset input[type=checkbox]{margin:1px 2px 0}fieldset.ip-geo-block-field{margin:1em 0}fieldset.ip-geo-block-field h2,fieldset.ip-geo-block-field h3{padding:0;margin:0;font-size:14px!important}fieldset.ip-geo-block-field h4{margin:.75em 0 .5em 0}fieldset.ip-geo-block-field legend.panel-heading{padding:10px}fieldset.ip-geo-block-field .ip-geo-block-dropdown,fieldset.ip-geo-block-field .ip-geo-block-dropup{cursor:pointer;position:relative;padding-left:1em}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before,fieldset.ip-geo-block-field .ip-geo-block-dropup:before{content:'';height:0;width:0;border:.4em solid transparent;position:absolute}fieldset.ip-geo-block-field .ip-geo-block-dropup:before{border-left:.4em solid #555;left:2px;top:18%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:-2px;top:38%}fieldset.ip-geo-block-field .form-table .ip-geo-block-dropdown,fieldset.ip-geo-block-field .form-table .ip-geo-block-dropup{margin-top:.75em}fieldset.ip-geo-block-field ul.ip-geo-block-dropup:before{top:.25em}fieldset.ip-geo-block-field ul.ip-geo-block-dropdown:before{top:.5em}fieldset.ip-geo-block-field table.form-table{margin:0 0 .5em;width:100%}textarea.regular-text{width:25em}fieldset.ip-geo-block-field input.regular-text,fieldset.ip-geo-block-field textarea.regular-text{font-size:95%}input[id*=ip_geo_block_settings_rewrite_]+label{margin-left:.25em}input[id*=ip_geo_block_settings_providers]+label{min-width:7em}.ip-geo-block-settings-folding{margin:.5em 0}.ip-geo-block-settings-folding ul{margin-bottom:0}.ip-geo-block-settings-folding li{margin:.5em 0}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-float li{display:inline-block;width:18em;margin-top:0}.ip-geo-block-checked{list-style-type:disc}.ip-geo-block-ip-addr{display:inline-block;padding-top:5px}.ip-geo-block-hide{display:none}.ip-geo-block-sup{margin-left:.2em;display:inline-block}.ip-geo-block-note{margin-top:1em;list-style:disc inside}.ip-geo-block-note li{text-indent:-1em;padding-left:1em}.ip-geo-block-border{border-top:inherit}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px;display:inline-block}.ip-geo-block-result{color:#2786c2;display:inline-block}.ip-geo-block-primary{color:#fff!important;background:#00838f!important;border-color:#00707a!important;text-shadow:none}.ip-geo-block-primary:hover{background-color:#00919e!important;border-color:#00525a!important}ul#ip-geo-block-logs-preset{margin:.25em 0}ul#ip-geo-block-logs-preset li{float:left;margin-right:1em}#ip-geo-block-live-loading,.ip-geo-block-loading{height:16px;width:16px;background-size:16px 16px;background-position:center center;background-repeat:no-repeat;margin-left:1em;margin-top:.2em;display:inline-block;vertical-align:top}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPYCAKqqqsbGxlZWVsrKyvr6+ubm5tDQ0K6urmZmZmJiYuzs7IaGhvT09JycnLq6us7Ozurq6o6OjtbW1tra2vDw8CgoKCYmJvz8/NLS0kJCQlJSUqysrPLy8vb29pqamra2tm5ubujo6Kampvj4+IiIiMjIyEhISNzc3OLi4rKysj4+PlBQULi4uJKSkmRkZODg4KKiou7u7iQkJB4eHlpaWhISErCwsHh4eMDAwDIyMi4uLqSkpIKCgr6+vt7e3n5+fggICJCQkAwMDEpKSmBgYHZ2dhgYGBYWFnx8fF5eXk5OTiIiIjAwMIyMjISEhDQ0NJaWltTU1AQEBBwcHGpqaoqKiuTk5CoqKlhYWAoKCtjY2Hp6ehAQEJ6ensLCwkxMTJSUlCwsLAYGBnR0dDg4OFxcXLy8vKCgoA4ODsTExMzMzDw8PERERDY2NqioqHJycrS0tGhoaBQUFEZGRjo6OkBAQICAgHBwcFRUVCAgIGxsbP///wAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgACACwAAAAAEAAQAEAHjIACgoOEhYJsbTGGghcPGIJRbFNNhgQKCheDDkllDQYMHSc4MAcvhTB0aFliggQjmYNEFQ6LAh0+VoIwbFW1GGamhCgfUE5NbgMKtQYLc0a1gjsyR3E2IYwMFASDYDJvtRRWFIJ1TMq1ElqCICpetQoBEoInVCsAhhI2XhyEPUgIIG7waALlwAloCAMBACH5BAkKAAIALAEAAQAOAA4AAAeDgAKCEmBYYRVKJAaCjAcrVzIzRjVoTw2MKRk5Ww4KECkuWTWCE0Rrl4yCTow7bAupsBcCW19psKkjBEQaFLeMHBwINBy+ggoxVQkPxSMFMXBUMMUQPhRWVUU9tyFRLwQCA048cCcjIyFaJQYxjA8NEVBnAClmahCwEANwbjYBJwyMAgEAIfkECQoABQAsAQABAA4ADgAAB4OABYInO29DbC5QUYKMZiBfbCptTBUmIow4LgJBaTExZkVLFTAFKD8JB4yMQUZrBixUXaqqVFwkUG8Ys4wpQiZOWwy7ghBiRk08HcOqblUTy4wlLWbLBCMFCgBdurMjFMoFE24ADxAXFwwKITEEjD5mH2YBDxI+IdeqHCcGAxgv7IwCAQAh+QQJCgAAACwBAAEADgAOAAAHhYAAglYfTVQJSCITgowDVSAISQJKJgkpjA8LWyIGHBQBJCoZBwAQDU44jIxdTxoSAxEfqqpbFWApUCezjA5LWCJdI7uCClNXGyLCwxBHFl4HBcMAKVxfEx8Y0glZCxwlOCjDUkwPACElAygMghftAB6MClpRJygQFB0EuyMKBQUKDPQxCgQAIfkECQoAAAAsAQABAA4ADgAAB4SAAIIKahstTQ0OVoKMJzYeLVU8W29OXowvBztePh0dUTtxVD0AHDgHEoyMKWVvPj4sBqqqLUoiGDgQs4wBJmNqARe7gjEqXxgPwsMxbWw+UQzDAGY6LjEnusNjFmAEBVbRs00zc1EAHRAKHYw2CHIyO4wEHAwjgmJCZDC7F8psC7IEBQIAIfkECQoARwAsAQABAA4ADgAAB4OAR4IMPgMfNg4PCoKMEA84LCkAMB47GIwxBiUTEAQjKD0REQ9HBD4YIYyMATwtBRQnqaqMG0UOEC8ds4wYIEEQBbuMHC4gMYvCRxw0CAwcF8kBGj8EHdDCJCYiRxfXsw0qCROqRDYQECw3ORkpqjpAQjVGMxYrB7MPC0MyFQItEowCAQAh+QQJCgACACwBAAEADgAOAAAHgIACghcUVhIYEigMgowjEC8nUQ8BOGkojAQxITEdAhcxEh9wPoIMFCOMjBMAKTEXHaipjGldDxcEsqkvUAe5sh1NLb6pHTxNbGK9vlE3DU5ZLsNnIA4GbTVVuQcJdpdnS0Z3LAoxXhF4LjiMMBl5FjptKiZ6ZrJRLUkqbCAwJ4yBACH5BAUKAAEALAEAAQAOAA4AAAd/gAGCARcjHDExHASDjAQdHAoFLy8Ugw2MgiMKWhIKAQ9MYpiCEA8YHQtZCaOCJ14vX2g2rAEKZgMyNRC0BCksFUa7rCMANgIzH7QvZw4tMmO0DlAPUV9hHqNeVTC7G2tkTmkUHA8iSFUGgzZlGSYaNC4gTWqYEzA3SQhVH1aDgQA7)}#ip-geo-block-map{height:400px;margin:1em auto}#ip-geo-block-apis div.nav-tab-wrapper{padding-top:0;margin-bottom:1em}#ip-geo-block-geoinfo{white-space:normal;word-wrap:break-word;word-break:break-all}#ip-geo-block-geoinfo ul{margin-top:0;margin-left:1em}.gm-style-iw{width:18em;height:auto!important;height:100%;min-height:100%:}.gm-style-iw ul{margin:.1em}.gm-style-iw li{margin:.2em}svg a{cursor:pointer}svg a:hover>text{fill:#0096dd}svg a>text{fill:#0073aa;text-decoration:underline}table.ip-geo-block-statistics-table{float:right}table.ip-geo-block-statistics-table td,table.ip-geo-block-statistics-table th{width:12em;margin:0;padding:.2em;text-align:right;line-height:1.5em;word-wrap:break-word}table.ip-geo-block-statistics-table tr:nth-child(even){background-color:#eee}table.ip-geo-block-table{margin:1em 0;white-space:normal;word-wrap:break-word;word-break:break-all}table.ip-geo-block-table td:first-child{min-width:4.3em}@media screen and (max-width:782px){#ip-geo-block-whois .panel-body{padding:0 .5em}}#ip-geo-block-scan-code{vertical-align:middle}#ip-geo-block-code-list{display:none;margin-bottom:0}#ip-geo-block-chart-countries{height:200px}#ip-geo-block-chart-daily{height:240px}#ip_geo_block_settings_validation_mimetype+label{padding-top:.25em}#ip_geo_block_settings_validation_mimetype+label+ul{margin-top:.7em}#ip_geo_block_settings_create_user{margin-bottom:.5em}#ip-geo-block-back-to-top a,#ip-geo-block-toggle-sections{box-shadow:none}#ip-geo-block-wp-info textarea{margin-top:.5em;overflow:auto;width:100%;word-wrap:normal;word-break:normal;white-space:pre}#ip-geo-block-back-to-top{margin:0;text-align:right}#ip-geo-block-live-update,#ip-geo-block-open-new{margin-left:1em}.ip-geo-block-menu-link{font-size:13px!important}dfn~.ip-geo-block-icon{margin-left:.4em}.ip-geo-block-icon{position:relative;cursor:pointer;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.ip-geo-block-icon:active{top:1px}.ip-geo-block-icon span{height:16px;width:16px;margin:0;border:none;display:inline-block;vertical-align:middle;background-size:16px 16px;background-position:center center;background-repeat:no-repeat}.ip-geo-block-icon-cycle span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAh1BMVEUAda2otLp+rsSHprWHr8IBd7EpfKRGhaNajqeUqrRymKuKoq5yo7prlKgAcqoVe6w8gqQmgq5Tj6wIdqsVdKIshrEMea1Uhp+Anqw0hawDdq4gfKhljqE7hqoLdKYbgbM4jLQygKUGeK8CdawQd6gVeKcad6NKkrSerrZAj7UAc6sAc6rc3NySrVGQAAAALXRSTlP//////////////////////////////////////////////////////////wCl7wv9AAACOklEQVR4Ae2W15rzKgxF9xTZzhTX9B7S/gN6/9ebYqzzGZsw/S7LV3FZgCSIwD/kQ8FVcBU8xatZUczy8luC/ABNOn0DSHEsvyZ4PgLatNCYR3efFxyhTQ8g+qQgJxgv2JefERzJXATRh4LHOUwAHD4S7OGEztRJaN86hAUxtaNWDUf/bRdDBbQMWVDAO8jn89WUhag1MeyCAh6hHofyrliLgZKggDMYgzF3eVAwFq0uCZq5KY0TezjIHDDzC0qqmkwe2ctGDOQVLMkgu+F3/rGXwb4xIPcJ6P3JgkM8wFjmfcFAWfeKQywaAz33BJVuHsUcAt09gVbuLDThAJkdR687ggLmf4gDJLIGV7BydtB8yn3u+fbtuj/LS7G9wZAd1AKK+yxJ1x+aBmibTtgCcEHGHsh0wdbOgNLek4L7lI5BigY8nWuZUQ3qGEXes9JzOKGJztPaGtLslu3lIXJirdxCWkASHGDTMqg7V1DKPplygDG61YJukLHjEErGSXqCSos6xNSOgzP3BDmsQBcchNwkoV8oiNnPA78zIefUgCdJeGIfE7LmFWXsFTCFdzTJ/RlfEMRiSGnFXXbkC7AIeqcKDu4ynseozeouKJiSEYBDwkJyIC1nRUjgblkNWp/e/1vXc2gjoAoLksYgjrrFMi0oDgjEEIDij1scBXMJSH6DAj6RNl7o8MkuLak8Co15/Pk+MRmT0xilQJV/sdWNKg2kTaeroudvNNsDjmejYjSL+e6v2/2r4Cp4BXNajr0H7hRfAAAAAElFTkSuQmCC)}.ip-geo-block-icon-lock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3Ny3y9Zzq8dRmb7M1dlXnsIFdK0AcawAcqwphrYAcKvZ29wAb6oJd680jrqlw9MBcqxmo8MUfbJLl75eoMI7kbzX2ttqp8VSmL1YnL8NeK+Tu89DlL1ImMEOebBNmL4OkqMoAAAAAXRSTlMAQObYZgAAAPlJREFUeAG9kAWyhTAQBIPOsCzufv9TPnf4Ll0CSbpmxXwNy3Yc23rz2fV8kPA99433AIQIiGDTCD0lojiOQPXCDSFJIbF16CMWItkQMkF+inZzSLYhFKLl+a9UKTZaqJTZJYtarZuo40chrv9CqJTN+behVi+Cm7RdDgRld6AMgLxrE/dxBz0BEjwBEmD/uIsWPAOAF9A+CE56ufSryr8oqfOYcBbQJ8YkES7COkFOYzTypqCDOTDo2wljaEw4vp1APYyWKd8WMBozylvCpcvmXeHQ5fCegHia4s1FgZcIVeVFeFx1M4MvYG4eBHdYWufC+addBtf8E3vdjBNhWnVQqAAAAABJRU5ErkJggg==)}.ip-geo-block-icon-unlock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NyzydRzq8dRmb7I09hYnsEFdK0AcawAcqzP1toqhrYAcKvZ29wAb6oMeK8zjbqrxtQBcazBz9Zko8MVfbLF0thMmL07kbtpp8WjwtJSmL1YnL+Tu89DlL1JmMEPebBFV++UAAAAAXRSTlMAQObYZgAAAONJREFUeAG9kAWChDAMAIMmJaTFXf7/ynXflvMbnE5j8DU8Pwh8D1yEUYxEGEchWFEJEjEflESBhTQSQm2MRpIotQhZTmgKgMIg5ZlFKBmrGg7UFXJpEQKW8qIKN7YeikJdBJI2BTtXwfyx0L3XoPphvBEliNU49OoxqEa6g4cTST/OYshvi3hV8+FxSNfluG3jqxG8C6h7gF6jU+AODnTsFGSCA5O4I8wpQDq7I5CUAKWQW+AZYOYtoQPoGDeECWDaioBmWQxeBduoWURso+5WpBdw7R4ENTVDcGE435tJwT+xB+vMEnZRNB0YAAAAAElFTkSuQmCC)}.ip-geo-block-icon-find span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NzS19rD0NWHtMpGk7kYfbAGda0Req+WtcTT1temwM4AcasAcqwAc6wAcKydvMt1pr8Ab6pqpcLX2doggrKoxdNYm7yzw8u/y9HO1tkKdq4th7Td3t6DrcLL0taxyNPGe/YhAAAAAXRSTlMAQObYZgAAARVJREFUeAGtkkeiwyAMRP2xDfxoRjElvd3/lOkNUlZ5u0GPruan/Bnz96Xadr21rvP/7+ujXsAjom78rj4ApCoERIipqfGB1H7wPmYhw1DXjZI6nOel1oJhVAmdUP0tTEDkVC4AYvqIbaDOCqFV6vwRF0tIeYoo6J/X7ICuPAJl9ZynwiIfB5DXxZlRChulbh8xZci0EHZK3TziJFDL504rEOZ+iR5cVj82DoS7XtSshLJpKqaB0Dg3ZjcsQWKaKiF1gVQlITwh/bw2pgKeEeURhE29yKSzUFF03p1V7Wqj2Y7GfrY9X/NirJsPxKsxfBLSSs5GmH8yjAWPSNd8Yoez4f4/G1nIsksqFtGK1i9e39o0P+EAqaoRLlQ+r94AAAAASUVORK5CYII=)}.ip-geo-block-icon-alert span,span.ip-geo-block-icon-alert{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAkFBMVEXc3Nzc2trWl5DHRDTFOyvOgXfc1tXCLBrEMiHEMyLNcmfaxMLDMSDDLx7bu7jRiYHDLhzDMB/LX1PaxsTDLh3YtrHMY1bWmpPJVknSjYXUkYnZuLTMZVnENCPWlI3QhXzENiXXrqrDLRzXsa3Oal7Pe3Hc2NjVn5nNbmPayMbbwb7ay8rUj4fc09Lbw8Db0dDBbRUDAAAAAXRSTlMAQObYZgAAAPVJREFUeAG9ktXWwyAQBonC12brFvff5f2frr4nBredK2DnTFS8Gst2XM8XZmypIGeWcT4PFABaGIXlClfWG1NiC4Ubu705oKRcY32wTAHl2MdTYEqEK8hIiHgHSnSJeaogMyEWO4BijZCvwII2MS9UJ2BXTh+hQidoEttboBOwq3WBnkCNpQlA2iyAhol2hRu71n97p4fw0Z9/ugoPHCfFA+o/iLfCkyBglRJdICBas7uuey+R56fF14wNanj+/QjwY3aX23cBFn6EiHmHNT/ICYxystv/wJy4UHWGlN2cuPB72tFqAq3dP/Hk3zs0E5LZVryGC/hqGNnUa0SVAAAAAElFTkSuQmCC);vertical-align:bottom}table.form-table th .ip-geo-block-cycle span{vertical-align:text-bottom}.ip-geo-block-list{margin-top:0;margin-bottom:.7em}@media screen and (min-width:782px){ul.ip-geo-block-list .code{width:15em}}.ip-geo-block-list-exceptions label{display:inline-block}.ip-geo-block-list-exceptions dfn{border:none}.ip-geo-block-list-exceptions span.dashicons{font-size:14px}.ip-geo-block-list-exceptions a.ip-geo-block-icon{margin-left:.3em;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.form-table td p.ip-geo-block-desc,.form-table td p.ip-geo-block-find-desc{color:#666;font-size:13px!important;margin:4px 0 .5em .5em}.ip-geo-block-find-desc{display:none}.ip-geo-block-admin-post{color:#c43322;margin-left:.25em}.ip-geo-block-warn{color:#c43322;font-weight:700}input#ip_geo_block_settings_behavior_time,input#ip_geo_block_settings_behavior_view{width:3.5em}.ip-geo-block-top-list{display:inline-table;list-style-position:outside;margin:0 2em .5em 1.75em}.ip-geo-block-top-list h4{margin:1em 0}.ip-geo-block-top-list li code{background:0 0}.ip-geo-block-network{margin-bottom:1em}.ip-geo-block-container{margin:0 auto;padding:0 1em;position:relative;width:100%}.ip-geo-block-row{display:flex;flex-direction:column;align-items:flex-start;align-items:stretch;padding:0;width:100%}.ip-geo-block-row .ip-geo-block-column{display:block;flex:1 1 auto;align-self:flex-start;margin-left:0;max-width:100%;width:100%}.ip-geo-block-row .ip-geo-block-column.column-20{flex:0 0 20%;max-width:20%}.ip-geo-block-row .ip-geo-block-column.column-25{flex:0 0 25%;max-width:25%}.ip-geo-block-row .ip-geo-block-column.column-33{flex:0 0 33.3333%;max-width:33.3333%}.ip-geo-block-row .ip-geo-block-column.column-50{flex:0 0 50%;max-width:50%}@media (min-width:40rem){.ip-geo-block-row{flex-direction:row;margin-left:-2em;width:calc(100% + 2em)}.ip-geo-block-row .ip-geo-block-column{margin-bottom:inherit;padding:0 1em}}table.ip-geo-block-dataTable{clear:none!important}table.ip-geo-block-dataTable td,table.ip-geo-block-dataTable th{text-align:right}table.ip-geo-block-dataTable td:nth-child(n+2),table.ip-geo-block-dataTable th:nth-child(n+2){padding-left:0!important}table.ip-geo-block-dataTable th{white-space:nowrap}table.ip-geo-block-dataTable>thead>tr{line-height:1.8em}table.ip-geo-block-dataTable>tbody>tr{cursor:pointer}table.ip-geo-block-dataTable.no-footer,table.ip-geo-block-dataTable>thead>tr>td,table.ip-geo-block-dataTable>thead>tr>th{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable thead td,table.ip-geo-block-dataTable thead th{padding:10px 16px}#ip-geo-block-statistics-cache td:nth-child(3),#ip-geo-block-validation-logs td:nth-child(4){min-width:1.6em}div[class*=ip-geo-block] .dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable.nowrap td,table.ip-geo-block-dataTable>tbody>tr>td span{white-space:normal!important;word-wrap:break-word!important;word-break:break-all!important}table.ip-geo-block-dataTable>tbody>tr>td span{display:inline-block}.ip-geo-block-settings-folding input[type=checkbox]{margin-right:.5em}table.ip-geo-block-dataTable input[type=checkbox]{max-height:16px;max-width:16px;margin:0}table.ip-geo-block-dataTable>tbody>tr>td:first-child,table.ip-geo-block-dataTable>thead>tr>th:first-child{padding:8px 4px 8px 1.4em;text-align:left}table.collapsed>tbody>tr>td.dataTables_empty:first-child::before,table.ip-geo-block-dataTable>tbody>tr>td.dataTables_empty{border:none;text-align:center}table.ip-geo-block-dataTable thead>tr>th:first-child.sorting_asc{background-image:none!important}table.ip-geo-block-dataTable.display tbody tr.even>.sorting_1,table.ip-geo-block-dataTable.display tbody tr.odd>.sorting_1,table.ip-geo-block-dataTable.display tbody tr:hover>.sorting_1{background-color:inherit!important}table.ip-geo-block-dataTable.collapsed>tbody>tr>td:first-child{padding:8px 4px 8px 8px!important}table.collapsed>tbody>tr.parent>td:first-child::before,table.collapsed>tbody>tr>td:first-child::before{content:'';height:0;width:0;display:inline-block;border-radius:0;border:5px solid transparent;box-shadow:none;position:relative;background-color:transparent}table.collapsed>tbody>tr>td:first-child::before{border-left:5px solid #555;top:1px;left:-2px}table.collapsed>tbody>tr.parent>td:first-child::before{border-top:5px solid #555;top:4px;left:-4px}table.collapsed>tbody>tr.child>td:first-child::before{border:none}table.collapsed>tbody>tr.child>td.child>ul li{border:none;padding:0;margin:0;line-height:1.8em}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data,table.collapsed>tbody>tr.child>td.child>ul li span.dtr-title{font-size:13px!important;display:block;white-space:normal;word-wrap:break-word;word-break:break-all}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data{margin-left:1.25em;margin-right:.3em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{padding-top:.15em;margin:.5em 0 0 .3em;position:relative;display:inline-block}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length:after{content:'';width:6px;height:6px;border:0;border-bottom:solid 2px #999;border-right:solid 2px #999;-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);position:absolute;top:50%;right:10px;margin-top:-4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select{padding-top:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:13px!important;line-height:1.4em;width:100%;height:2.05em!important;background:0 0;position:relative;z-index:1;padding:.125em 1.5em .125em .25em;border:1px solid #ddd;border-radius:4px;box-shadow:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select::-ms-expand{display:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{float:none;text-align:center;margin-bottom:1em;margin-top:0!important}@media screen and (min-width:640px){div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{margin:.5em 0 0 .6em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{position:relative;left:-2.25em}}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{min-width:2em;background:inherit;border-color:#ddd;border-radius:0;border-image:none;border-style:solid;border-width:1px 1px 1px 0;box-shadow:none;margin:.5em 0 0 0;padding:.25em 0;display:inline-block;text-decoration:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:first-child{border-left-width:1px;border-bottom-left-radius:4px;border-top-left-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:last-child{border-bottom-right-radius:4px;border-top-right-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button{color:#0073aa!important}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover{color:#0096dd!important;background-color:#fff}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{cursor:default;color:#999!important;background-color:transparent}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover{cursor:default;color:#444!important;background-color:#fff!important}#ip-geo-block-1 #ip-geo-block-section-2 .panel-body,#ip-geo-block-4 #ip-geo-block-section-0 .panel-body{padding:0}#ip-geo-block-1 #ip-geo-block-section-2 table.form-table,#ip-geo-block-4 #ip-geo-block-section-0 table.form-table{margin-left:1em;max-width:95%}#ip-geo-block-select-duration,#ip-geo-block-select-layout,#ip-geo-block-select-target{margin:0}#ip-geo-block-select-duration li,#ip-geo-block-select-layout li,#ip-geo-block-select-target li{float:left;margin-right:1.5em}#ip-geo-block-select-duration li label,#ip-geo-block-select-target li label{cursor:pointer}#ip_geo_block_settings_search_filter{width:16em;padding-top:3px}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-passed{background-color:#edf6ff!important}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-blocked{background-color:#ffefef!important}.ip-geo-block-new-passed{animation:ip-geo-block-flash-passed 1s ease-out 0s 1 normal both running}.ip-geo-block-new-blocked{animation:ip-geo-block-flash-blocked 1s ease-out 0s 1 normal both running}@keyframes ip-geo-block-flash-passed{0%{background-color:gold}100%{background-color:#edf6ff}}@keyframes ip-geo-block-flash-blocked{0%{background-color:gold}100%{background-color:#ffefef}}mark{padding:0;background:gold}// Gold #ip-geo-block-live-log{margin:0}#ip-geo-block-live-log li{float:left;margin-right:3em}#ip-geo-block-live-log li:last-child{margin-right:0}#ip-geo-block-live-log li input[type=radio]{visibility:hidden;position:absolute}#ip-geo-block-live-log li input[type=radio]+label{display:inline-block;margin:-2px;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);border-bottom-color:#b3b3b3;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}#ip-geo-block-live-log li input[type=radio]:checked+label{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#e0e0e0}.ip-geo-block-live-timer{height:1em;width:1em;margin:0;position:relative;top:0;left:0}.ip-geo-block-live-timer:before{content:"";display:block;height:1em;width:1em;background:#0073aa;border-radius:50%;position:absolute;top:0;left:0}.ip-geo-block-live-timer:after{display:none}.ip-geo-block-live-timer>div{position:absolute;width:1em;height:1em;clip:rect(0,1em,1em,.5em)}.ip-geo-block-live-timer>div:before{content:" ";position:absolute;width:1em;height:1em;border-radius:.5em;clip:rect(0,.5em,1em,0);background-color:#f1f1f1;transform:rotate(0)}.ip-geo-block-live-timer>div:first-child:before{animation:30s spin-timer linear forwards}.ip-geo-block-live-timer>div:last-child{transform:rotate(180deg)}.ip-geo-block-live-timer>div:last-child:before{transform:rotate(0);animation:30s spin-timer linear 30s forwards}@keyframes spin-timer{0%{transform:rotate(0)}100%{transform:rotate(180deg)}}.ip-geo-block-subitem{margin-left:1.7em}.ip-geo-block-subitem:before{content:"\00bb";position:absolute;left:2em}.ip-geo-block-subitem dfn{vertical-align:middle}.ip-geo-block-subitem-parent td,.ip-geo-block-subitem-parent th{padding-top:0}:placeholder-shown{color:#888}::-webkit-input-placeholder{color:#888}:-moz-placeholder{color:#888;opacity:1}::-moz-placeholder{color:#888;opacity:1}:-ms-input-placeholder{color:#888}
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
+ dfn{cursor:help;border-bottom:1px dotted #888}fieldset,legend{padding:0;margin:0;border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}fieldset{min-width:0}legend{display:block;line-height:inherit;width:100%}label{display:inline-block;max-width:100%}.panel{border-color:#888;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#f5f5f5}.panel-heading{float:left!important;background:#fff}.panel-default>.panel-heading{border-color:inherit}.panel-body{width:100%;padding:0 1em;display:inline-block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-body:after{clear:both}.ip-geo-block-navi-link{text-align:left}.ip-geo-block-help-link{float:right;font-size:90%;font-weight:400}.ip-geo-block-help-link a{box-shadow:none}fieldset label{vertical-align:text-middle}fieldset input[type=checkbox]{margin:1px 2px 0}fieldset.ip-geo-block-field{margin:1em 0}fieldset.ip-geo-block-field h2,fieldset.ip-geo-block-field h3{padding:0;margin:0;font-size:14px!important}fieldset.ip-geo-block-field h4{margin:.75em 0 .5em 0}fieldset.ip-geo-block-field legend.panel-heading{padding:10px}fieldset.ip-geo-block-field .ip-geo-block-dropdown,fieldset.ip-geo-block-field .ip-geo-block-dropup{cursor:pointer;position:relative;padding-left:1em}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before,fieldset.ip-geo-block-field .ip-geo-block-dropup:before{content:'';height:0;width:0;border:.4em solid transparent;position:absolute}fieldset.ip-geo-block-field .ip-geo-block-dropup:before{border-left:.4em solid #555;left:2px;top:18%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:-2px;top:38%}fieldset.ip-geo-block-field .form-table .ip-geo-block-dropdown,fieldset.ip-geo-block-field .form-table .ip-geo-block-dropup{margin-top:.75em}fieldset.ip-geo-block-field ul.ip-geo-block-dropup:before{top:.25em}fieldset.ip-geo-block-field ul.ip-geo-block-dropdown:before{top:.5em}fieldset.ip-geo-block-field table.form-table{margin:0 0 .5em;width:100%}textarea.regular-text{width:25em}fieldset.ip-geo-block-field input.regular-text,fieldset.ip-geo-block-field textarea.regular-text{font-size:95%}fieldset.ip-geo-block-field input[type=checkbox],fieldset.ip-geo-block-field input[type=radio],p.ip-geo-block-navi-link input[type=checkbox]{margin-right:.4em}input[id*=ip_geo_block_settings_rewrite_]+label{margin-left:.25em}input[id*=ip_geo_block_settings_providers]+label{min-width:7em}.ip-geo-block-settings-folding{margin:.5em 0}.ip-geo-block-settings-folding ul{margin-bottom:0}.ip-geo-block-settings-folding li{margin:.5em 0}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-float li{display:inline-block;width:18em;margin-top:0}.ip-geo-block-checked{list-style-type:disc}.ip-geo-block-ip-addr{display:inline-block;padding-top:5px}.ip-geo-block-hide{display:none}.ip-geo-block-sup{margin-left:.2em;display:inline-block}.ip-geo-block-note{margin-top:1em;list-style:disc inside}.ip-geo-block-note li{text-indent:-1em;padding-left:1em}.ip-geo-block-border{border-top:inherit}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px;display:inline-block}.ip-geo-block-result{color:#2786c2;display:inline-block}.ip-geo-block-primary{color:#fff!important;background:#00838f!important;border-color:#00707a!important;text-shadow:none}.ip-geo-block-primary:hover{background-color:#00919e!important;border-color:#00525a!important}ul#ip-geo-block-logs-preset{margin:.25em 0}ul#ip-geo-block-logs-preset li{float:left;margin-right:1em}#ip-geo-block-live-loading,.ip-geo-block-loading{height:16px;width:16px;background-size:16px 16px;background-position:center center;background-repeat:no-repeat;margin-left:1em;margin-top:.2em;display:inline-block;vertical-align:top}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPYCAKqqqsbGxlZWVsrKyvr6+ubm5tDQ0K6urmZmZmJiYuzs7IaGhvT09JycnLq6us7Ozurq6o6OjtbW1tra2vDw8CgoKCYmJvz8/NLS0kJCQlJSUqysrPLy8vb29pqamra2tm5ubujo6Kampvj4+IiIiMjIyEhISNzc3OLi4rKysj4+PlBQULi4uJKSkmRkZODg4KKiou7u7iQkJB4eHlpaWhISErCwsHh4eMDAwDIyMi4uLqSkpIKCgr6+vt7e3n5+fggICJCQkAwMDEpKSmBgYHZ2dhgYGBYWFnx8fF5eXk5OTiIiIjAwMIyMjISEhDQ0NJaWltTU1AQEBBwcHGpqaoqKiuTk5CoqKlhYWAoKCtjY2Hp6ehAQEJ6ensLCwkxMTJSUlCwsLAYGBnR0dDg4OFxcXLy8vKCgoA4ODsTExMzMzDw8PERERDY2NqioqHJycrS0tGhoaBQUFEZGRjo6OkBAQICAgHBwcFRUVCAgIGxsbP///wAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgACACwAAAAAEAAQAEAHjIACgoOEhYJsbTGGghcPGIJRbFNNhgQKCheDDkllDQYMHSc4MAcvhTB0aFliggQjmYNEFQ6LAh0+VoIwbFW1GGamhCgfUE5NbgMKtQYLc0a1gjsyR3E2IYwMFASDYDJvtRRWFIJ1TMq1ElqCICpetQoBEoInVCsAhhI2XhyEPUgIIG7waALlwAloCAMBACH5BAkKAAIALAEAAQAOAA4AAAeDgAKCEmBYYRVKJAaCjAcrVzIzRjVoTw2MKRk5Ww4KECkuWTWCE0Rrl4yCTow7bAupsBcCW19psKkjBEQaFLeMHBwINBy+ggoxVQkPxSMFMXBUMMUQPhRWVUU9tyFRLwQCA048cCcjIyFaJQYxjA8NEVBnAClmahCwEANwbjYBJwyMAgEAIfkECQoABQAsAQABAA4ADgAAB4OABYInO29DbC5QUYKMZiBfbCptTBUmIow4LgJBaTExZkVLFTAFKD8JB4yMQUZrBixUXaqqVFwkUG8Ys4wpQiZOWwy7ghBiRk08HcOqblUTy4wlLWbLBCMFCgBdurMjFMoFE24ADxAXFwwKITEEjD5mH2YBDxI+IdeqHCcGAxgv7IwCAQAh+QQJCgAAACwBAAEADgAOAAAHhYAAglYfTVQJSCITgowDVSAISQJKJgkpjA8LWyIGHBQBJCoZBwAQDU44jIxdTxoSAxEfqqpbFWApUCezjA5LWCJdI7uCClNXGyLCwxBHFl4HBcMAKVxfEx8Y0glZCxwlOCjDUkwPACElAygMghftAB6MClpRJygQFB0EuyMKBQUKDPQxCgQAIfkECQoAAAAsAQABAA4ADgAAB4SAAIIKahstTQ0OVoKMJzYeLVU8W29OXowvBztePh0dUTtxVD0AHDgHEoyMKWVvPj4sBqqqLUoiGDgQs4wBJmNqARe7gjEqXxgPwsMxbWw+UQzDAGY6LjEnusNjFmAEBVbRs00zc1EAHRAKHYw2CHIyO4wEHAwjgmJCZDC7F8psC7IEBQIAIfkECQoARwAsAQABAA4ADgAAB4OAR4IMPgMfNg4PCoKMEA84LCkAMB47GIwxBiUTEAQjKD0REQ9HBD4YIYyMATwtBRQnqaqMG0UOEC8ds4wYIEEQBbuMHC4gMYvCRxw0CAwcF8kBGj8EHdDCJCYiRxfXsw0qCROqRDYQECw3ORkpqjpAQjVGMxYrB7MPC0MyFQItEowCAQAh+QQJCgACACwBAAEADgAOAAAHgIACghcUVhIYEigMgowjEC8nUQ8BOGkojAQxITEdAhcxEh9wPoIMFCOMjBMAKTEXHaipjGldDxcEsqkvUAe5sh1NLb6pHTxNbGK9vlE3DU5ZLsNnIA4GbTVVuQcJdpdnS0Z3LAoxXhF4LjiMMBl5FjptKiZ6ZrJRLUkqbCAwJ4yBACH5BAUKAAEALAEAAQAOAA4AAAd/gAGCARcjHDExHASDjAQdHAoFLy8Ugw2MgiMKWhIKAQ9MYpiCEA8YHQtZCaOCJ14vX2g2rAEKZgMyNRC0BCksFUa7rCMANgIzH7QvZw4tMmO0DlAPUV9hHqNeVTC7G2tkTmkUHA8iSFUGgzZlGSYaNC4gTWqYEzA3SQhVH1aDgQA7)}#ip-geo-block-map{height:400px;margin:1em auto}#ip-geo-block-apis div.nav-tab-wrapper{padding-top:0;margin-bottom:1em}#ip-geo-block-geoinfo{white-space:normal;word-wrap:break-word;word-break:break-all}#ip-geo-block-geoinfo ul{margin-top:0;margin-left:1em}.gm-style-iw{width:18em;height:auto!important;height:100%;min-height:100%:}.gm-style-iw ul{margin:.1em}.gm-style-iw li{margin:.2em}svg a{cursor:pointer}svg a:hover>text{fill:#0096dd}svg a>text{fill:#0073aa;text-decoration:underline}table.ip-geo-block-statistics-table{float:right}table.ip-geo-block-statistics-table td,table.ip-geo-block-statistics-table th{width:12em;margin:0;padding:.2em;text-align:right;line-height:1.5em;word-wrap:break-word}table.ip-geo-block-statistics-table tr:nth-child(even){background-color:#eee}table.ip-geo-block-table{margin:1em 0;white-space:normal;word-wrap:break-word;word-break:break-all}table.ip-geo-block-table td:first-child{min-width:4.3em}@media screen and (max-width:782px){#ip-geo-block-whois .panel-body{padding:0 .5em}}#ip-geo-block-scan-code{vertical-align:middle}#ip-geo-block-code-list{display:none;margin-bottom:0}#ip-geo-block-chart-countries{height:200px}#ip-geo-block-chart-daily{height:240px}#ip_geo_block_settings_validation_mimetype+label{padding-top:.25em}#ip_geo_block_settings_validation_mimetype+label+ul{margin-top:.7em}#ip_geo_block_settings_create_user{margin-bottom:.5em}#ip-geo-block-back-to-top a,#ip-geo-block-toggle-sections{box-shadow:none}#ip-geo-block-wp-info textarea{margin-top:.5em;overflow:auto;width:100%;word-wrap:normal;word-break:normal;white-space:pre}#ip-geo-block-back-to-top{margin:0;text-align:right}#ip-geo-block-live-update,#ip-geo-block-open-new{margin-left:1em}.ip-geo-block-menu-link{font-size:13px!important}dfn~.ip-geo-block-icon{margin-left:.4em}.ip-geo-block-icon{position:relative;cursor:pointer;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.ip-geo-block-icon:active{top:1px}.ip-geo-block-icon span{height:16px;width:16px;margin:0;border:none;display:inline-block;vertical-align:middle;background-size:16px 16px;background-position:center center;background-repeat:no-repeat}.ip-geo-block-icon-cycle span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAh1BMVEUAda2otLp+rsSHprWHr8IBd7EpfKRGhaNajqeUqrRymKuKoq5yo7prlKgAcqoVe6w8gqQmgq5Tj6wIdqsVdKIshrEMea1Uhp+Anqw0hawDdq4gfKhljqE7hqoLdKYbgbM4jLQygKUGeK8CdawQd6gVeKcad6NKkrSerrZAj7UAc6sAc6rc3NySrVGQAAAALXRSTlP//////////////////////////////////////////////////////////wCl7wv9AAACOklEQVR4Ae2W15rzKgxF9xTZzhTX9B7S/gN6/9ebYqzzGZsw/S7LV3FZgCSIwD/kQ8FVcBU8xatZUczy8luC/ABNOn0DSHEsvyZ4PgLatNCYR3efFxyhTQ8g+qQgJxgv2JefERzJXATRh4LHOUwAHD4S7OGEztRJaN86hAUxtaNWDUf/bRdDBbQMWVDAO8jn89WUhag1MeyCAh6hHofyrliLgZKggDMYgzF3eVAwFq0uCZq5KY0TezjIHDDzC0qqmkwe2ctGDOQVLMkgu+F3/rGXwb4xIPcJ6P3JgkM8wFjmfcFAWfeKQywaAz33BJVuHsUcAt09gVbuLDThAJkdR687ggLmf4gDJLIGV7BydtB8yn3u+fbtuj/LS7G9wZAd1AKK+yxJ1x+aBmibTtgCcEHGHsh0wdbOgNLek4L7lI5BigY8nWuZUQ3qGEXes9JzOKGJztPaGtLslu3lIXJirdxCWkASHGDTMqg7V1DKPplygDG61YJukLHjEErGSXqCSos6xNSOgzP3BDmsQBcchNwkoV8oiNnPA78zIefUgCdJeGIfE7LmFWXsFTCFdzTJ/RlfEMRiSGnFXXbkC7AIeqcKDu4ynseozeouKJiSEYBDwkJyIC1nRUjgblkNWp/e/1vXc2gjoAoLksYgjrrFMi0oDgjEEIDij1scBXMJSH6DAj6RNl7o8MkuLak8Co15/Pk+MRmT0xilQJV/sdWNKg2kTaeroudvNNsDjmejYjSL+e6v2/2r4Cp4BXNajr0H7hRfAAAAAElFTkSuQmCC)}.ip-geo-block-icon-lock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3Ny3y9Zzq8dRmb7M1dlXnsIFdK0AcawAcqwphrYAcKvZ29wAb6oJd680jrqlw9MBcqxmo8MUfbJLl75eoMI7kbzX2ttqp8VSmL1YnL8NeK+Tu89DlL1ImMEOebBNmL4OkqMoAAAAAXRSTlMAQObYZgAAAPlJREFUeAG9kAWyhTAQBIPOsCzufv9TPnf4Ll0CSbpmxXwNy3Yc23rz2fV8kPA99433AIQIiGDTCD0lojiOQPXCDSFJIbF16CMWItkQMkF+inZzSLYhFKLl+a9UKTZaqJTZJYtarZuo40chrv9CqJTN+behVi+Cm7RdDgRld6AMgLxrE/dxBz0BEjwBEmD/uIsWPAOAF9A+CE56ufSryr8oqfOYcBbQJ8YkES7COkFOYzTypqCDOTDo2wljaEw4vp1APYyWKd8WMBozylvCpcvmXeHQ5fCegHia4s1FgZcIVeVFeFx1M4MvYG4eBHdYWufC+addBtf8E3vdjBNhWnVQqAAAAABJRU5ErkJggg==)}.ip-geo-block-icon-unlock span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NyzydRzq8dRmb7I09hYnsEFdK0AcawAcqzP1toqhrYAcKvZ29wAb6oMeK8zjbqrxtQBcazBz9Zko8MVfbLF0thMmL07kbtpp8WjwtJSmL1YnL+Tu89DlL1JmMEPebBFV++UAAAAAXRSTlMAQObYZgAAAONJREFUeAG9kAWChDAMAIMmJaTFXf7/ynXflvMbnE5j8DU8Pwh8D1yEUYxEGEchWFEJEjEflESBhTQSQm2MRpIotQhZTmgKgMIg5ZlFKBmrGg7UFXJpEQKW8qIKN7YeikJdBJI2BTtXwfyx0L3XoPphvBEliNU49OoxqEa6g4cTST/OYshvi3hV8+FxSNfluG3jqxG8C6h7gF6jU+AODnTsFGSCA5O4I8wpQDq7I5CUAKWQW+AZYOYtoQPoGDeECWDaioBmWQxeBduoWURso+5WpBdw7R4ENTVDcGE435tJwT+xB+vMEnZRNB0YAAAAAElFTkSuQmCC)}.ip-geo-block-icon-find span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAYFBMVEXc3NzS19rD0NWHtMpGk7kYfbAGda0Req+WtcTT1temwM4AcasAcqwAc6wAcKydvMt1pr8Ab6pqpcLX2doggrKoxdNYm7yzw8u/y9HO1tkKdq4th7Td3t6DrcLL0taxyNPGe/YhAAAAAXRSTlMAQObYZgAAARVJREFUeAGtkkeiwyAMRP2xDfxoRjElvd3/lOkNUlZ5u0GPruan/Bnz96Xadr21rvP/7+ujXsAjom78rj4ApCoERIipqfGB1H7wPmYhw1DXjZI6nOel1oJhVAmdUP0tTEDkVC4AYvqIbaDOCqFV6vwRF0tIeYoo6J/X7ICuPAJl9ZynwiIfB5DXxZlRChulbh8xZci0EHZK3TziJFDL504rEOZ+iR5cVj82DoS7XtSshLJpKqaB0Dg3ZjcsQWKaKiF1gVQlITwh/bw2pgKeEeURhE29yKSzUFF03p1V7Wqj2Y7GfrY9X/NirJsPxKsxfBLSSs5GmH8yjAWPSNd8Yoez4f4/G1nIsksqFtGK1i9e39o0P+EAqaoRLlQ+r94AAAAASUVORK5CYII=)}.ip-geo-block-icon-alert span,span.ip-geo-block-icon-alert{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAkFBMVEXc3Nzc2trWl5DHRDTFOyvOgXfc1tXCLBrEMiHEMyLNcmfaxMLDMSDDLx7bu7jRiYHDLhzDMB/LX1PaxsTDLh3YtrHMY1bWmpPJVknSjYXUkYnZuLTMZVnENCPWlI3QhXzENiXXrqrDLRzXsa3Oal7Pe3Hc2NjVn5nNbmPayMbbwb7ay8rUj4fc09Lbw8Db0dDBbRUDAAAAAXRSTlMAQObYZgAAAPVJREFUeAG9ktXWwyAQBonC12brFvff5f2frr4nBredK2DnTFS8Gst2XM8XZmypIGeWcT4PFABaGIXlClfWG1NiC4Ubu705oKRcY32wTAHl2MdTYEqEK8hIiHgHSnSJeaogMyEWO4BijZCvwII2MS9UJ2BXTh+hQidoEttboBOwq3WBnkCNpQlA2iyAhol2hRu71n97p4fw0Z9/ugoPHCfFA+o/iLfCkyBglRJdICBas7uuey+R56fF14wNanj+/QjwY3aX23cBFn6EiHmHNT/ICYxystv/wJy4UHWGlN2cuPB72tFqAq3dP/Hk3zs0E5LZVryGC/hqGNnUa0SVAAAAAElFTkSuQmCC);vertical-align:bottom}table.form-table th .ip-geo-block-cycle span{vertical-align:text-bottom}.ip-geo-block-list{margin-top:0;margin-bottom:.7em}@media screen and (min-width:782px){ul.ip-geo-block-list .code{width:15em}}.ip-geo-block-list-exceptions label{display:inline-block}.ip-geo-block-list-exceptions dfn{border:none}.ip-geo-block-list-exceptions span.dashicons{font-size:14px}.ip-geo-block-list-exceptions a.ip-geo-block-icon{margin-left:.3em;outline:0;box-shadow:none;text-decoration:none;background-color:transparent}.form-table td p.ip-geo-block-desc,.form-table td p.ip-geo-block-find-desc{color:#666;font-size:13px!important;margin:4px 0 .5em .5em}.ip-geo-block-find-desc{display:none}.ip-geo-block-admin-post{color:#c43322;margin-left:.25em}.ip-geo-block-warn{color:#c43322;font-weight:700}input#ip_geo_block_settings_behavior_time,input#ip_geo_block_settings_behavior_view{width:3.5em}.ip-geo-block-top-list{display:inline-table;list-style-position:outside;margin:0 2em .5em 1.75em}.ip-geo-block-top-list h4{margin:1em 0}.ip-geo-block-top-list li code{background:0 0}.ip-geo-block-network{margin-bottom:1em}.ip-geo-block-container{margin:0 auto;padding:0 1em;position:relative;width:100%}.ip-geo-block-row{display:flex;flex-direction:column;align-items:flex-start;align-items:stretch;padding:0;width:100%}.ip-geo-block-row .ip-geo-block-column{display:block;flex:1 1 auto;align-self:flex-start;margin-left:0;max-width:100%;width:100%}.ip-geo-block-row .ip-geo-block-column.column-20{flex:0 0 20%;max-width:20%}.ip-geo-block-row .ip-geo-block-column.column-25{flex:0 0 25%;max-width:25%}.ip-geo-block-row .ip-geo-block-column.column-33{flex:0 0 33.3333%;max-width:33.3333%}.ip-geo-block-row .ip-geo-block-column.column-50{flex:0 0 50%;max-width:50%}@media (min-width:40rem){.ip-geo-block-row{flex-direction:row;margin-left:-2em;width:calc(100% + 2em)}.ip-geo-block-row .ip-geo-block-column{margin-bottom:inherit;padding:0 1em}}table.ip-geo-block-dataTable{clear:none!important}table.ip-geo-block-dataTable td,table.ip-geo-block-dataTable th{text-align:right}table.ip-geo-block-dataTable td:nth-child(n+2),table.ip-geo-block-dataTable th:nth-child(n+2){padding-left:0!important}table.ip-geo-block-dataTable th{white-space:nowrap}table.ip-geo-block-dataTable>thead>tr{line-height:1.8em}table.ip-geo-block-dataTable>tbody>tr{cursor:pointer}table.ip-geo-block-dataTable.no-footer,table.ip-geo-block-dataTable>thead>tr>td,table.ip-geo-block-dataTable>thead>tr>th{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable thead td,table.ip-geo-block-dataTable thead th{padding:10px 16px}#ip-geo-block-statistics-cache td:nth-child(3),#ip-geo-block-validation-logs td:nth-child(4){min-width:1.6em}div[class*=ip-geo-block] .dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #ddd}table.ip-geo-block-dataTable.nowrap td,table.ip-geo-block-dataTable>tbody>tr>td span{white-space:normal!important;word-wrap:break-word!important;word-break:break-all!important}table.ip-geo-block-dataTable>tbody>tr>td span{display:inline-block}.ip-geo-block-settings-folding input[type=checkbox]{margin-right:.5em}table.ip-geo-block-dataTable input[type=checkbox]{max-height:16px;max-width:16px;margin:0}table.ip-geo-block-dataTable>tbody>tr>td:first-child,table.ip-geo-block-dataTable>thead>tr>th:first-child{padding:8px 4px 8px 1.4em;text-align:left}table.collapsed>tbody>tr>td.dataTables_empty:first-child::before,table.ip-geo-block-dataTable>tbody>tr>td.dataTables_empty{border:none;text-align:center}table.ip-geo-block-dataTable thead>tr>th:first-child.sorting_asc{background-image:none!important}table.ip-geo-block-dataTable.display tbody tr.even>.sorting_1,table.ip-geo-block-dataTable.display tbody tr.odd>.sorting_1,table.ip-geo-block-dataTable.display tbody tr:hover>.sorting_1{background-color:inherit!important}table.ip-geo-block-dataTable.collapsed>tbody>tr>td:first-child{padding:8px 4px 8px 8px!important}table.collapsed>tbody>tr.parent>td:first-child::before,table.collapsed>tbody>tr>td:first-child::before{content:'';height:0;width:0;display:inline-block;border-radius:0;border:5px solid transparent;box-shadow:none;position:relative;background-color:transparent}table.collapsed>tbody>tr>td:first-child::before{border-left:5px solid #555;top:1px;left:-2px}table.collapsed>tbody>tr.parent>td:first-child::before{border-top:5px solid #555;top:4px;left:-4px}table.collapsed>tbody>tr.child>td:first-child::before{border:none}table.collapsed>tbody>tr.child>td.child>ul li{border:none;padding:0;margin:0;line-height:1.8em}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data,table.collapsed>tbody>tr.child>td.child>ul li span.dtr-title{font-size:13px!important;display:block;white-space:normal;word-wrap:break-word;word-break:break-all}table.collapsed>tbody>tr.child>td.child>ul li span.dtr-data{margin-left:1.25em;margin-right:.3em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{padding-top:.15em;margin:.5em 0 0 .3em;position:relative;display:inline-block}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length:after{content:'';width:6px;height:6px;border:0;border-bottom:solid 2px #999;border-right:solid 2px #999;-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);position:absolute;top:50%;right:10px;margin-top:-4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select{padding-top:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:13px!important;line-height:1.4em;width:100%;height:2.05em!important;background:0 0;position:relative;z-index:1;padding:.125em 1.5em .125em .25em;border:1px solid #ddd;border-radius:4px;box-shadow:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length select::-ms-expand{display:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{float:none;text-align:center;margin-bottom:1em;margin-top:0!important}@media screen and (min-width:640px){div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{margin:.5em 0 0 .6em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{position:relative;left:-2.25em}}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{min-width:2em;background:inherit;border-color:#ddd;border-radius:0;border-image:none;border-style:solid;border-width:1px 1px 1px 0;box-shadow:none;margin:.5em 0 0 0;padding:.25em 0;display:inline-block;text-decoration:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:first-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:first-child{border-left-width:1px;border-bottom-left-radius:4px;border-top-left-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:active>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:last-child,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate>a.paginate_button:last-child{border-bottom-right-radius:4px;border-top-right-radius:4px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button{color:#0073aa!important}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover{color:#0096dd!important;background-color:#fff}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate span.ellipsis{cursor:default;color:#999!important;background-color:transparent}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover{cursor:default;color:#444!important;background-color:#fff!important}#ip-geo-block-1 #ip-geo-block-section-2 .panel-body,#ip-geo-block-4 #ip-geo-block-section-0 .panel-body{padding:0}#ip-geo-block-1 #ip-geo-block-section-2 table.form-table,#ip-geo-block-4 #ip-geo-block-section-0 table.form-table{margin-left:1em;max-width:95%}#ip-geo-block-select-duration,#ip-geo-block-select-layout,#ip-geo-block-select-target{margin:0}#ip-geo-block-select-duration li,#ip-geo-block-select-layout li,#ip-geo-block-select-target li{float:left;margin-right:1.5em}#ip-geo-block-select-duration li label,#ip-geo-block-select-target li label{cursor:pointer}#ip_geo_block_settings_search_filter{width:16em;padding-top:3px}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-passed{background-color:#edf6ff!important}table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-blocked{background-color:#ffefef!important}.ip-geo-block-new-passed{animation:ip-geo-block-flash-passed 1s ease-out 0s 1 normal both running}.ip-geo-block-new-blocked{animation:ip-geo-block-flash-blocked 1s ease-out 0s 1 normal both running}@keyframes ip-geo-block-flash-passed{0%{background-color:gold}100%{background-color:#edf6ff}}@keyframes ip-geo-block-flash-blocked{0%{background-color:gold}100%{background-color:#ffefef}}mark{padding:0;background:gold}// Gold #ip-geo-block-live-log{margin:0}#ip-geo-block-live-log li{float:left;margin-right:3em}#ip-geo-block-live-log li:last-child{margin-right:0}#ip-geo-block-live-log li input[type=radio]{visibility:hidden;position:absolute}#ip-geo-block-live-log li input[type=radio]+label{display:inline-block;margin:-2px;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);border-bottom-color:#b3b3b3;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}#ip-geo-block-live-log li input[type=radio]:checked+label{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#e0e0e0}.ip-geo-block-live-timer{height:1em;width:1em;margin:0;position:relative;top:0;left:0}.ip-geo-block-live-timer:before{content:"";display:block;height:1em;width:1em;background:#0073aa;border-radius:50%;position:absolute;top:0;left:0}.ip-geo-block-live-timer:after{display:none}.ip-geo-block-live-timer>div{position:absolute;width:1em;height:1em;clip:rect(0,1em,1em,.5em)}.ip-geo-block-live-timer>div:before{content:" ";position:absolute;width:1em;height:1em;border-radius:.5em;clip:rect(0,.5em,1em,0);background-color:#f1f1f1;transform:rotate(0)}.ip-geo-block-live-timer>div:first-child:before{animation:30s spin-timer linear forwards}.ip-geo-block-live-timer>div:last-child{transform:rotate(180deg)}.ip-geo-block-live-timer>div:last-child:before{transform:rotate(0);animation:30s spin-timer linear 30s forwards}@keyframes spin-timer{0%{transform:rotate(0)}100%{transform:rotate(180deg)}}.ip-geo-block-subitem{margin-left:1.7em}.ip-geo-block-subitem:before{content:"\00bb";position:absolute;left:2em}.ip-geo-block-subitem dfn{vertical-align:middle}.ip-geo-block-subitem-parent td,.ip-geo-block-subitem-parent th{padding-top:0}:placeholder-shown{color:#888}::-webkit-input-placeholder{color:#888}:-moz-placeholder{color:#888;opacity:1}::-moz-placeholder{color:#888;opacity:1}:-ms-input-placeholder{color:#888}
admin/includes/class-admin-ajax.php CHANGED
@@ -191,7 +191,7 @@ class IP_Geo_Block_Admin_Ajax {
191
  */
192
  public static function catch_live_log() {
193
  $user = IP_Geo_Block_Util::get_current_user_id();
194
- $auth = get_transient( IP_Geo_Block::PLUGIN_NAME . '-live-log' );
195
 
196
  if ( $auth === FALSE || $user === (int)$auth ) {
197
  set_transient( IP_Geo_Block::PLUGIN_NAME . '-live-log', $user, IP_Geo_Block_Admin::TIMEOUT_LIVE_UPDATE );
@@ -343,11 +343,11 @@ endif;
343
  );
344
 
345
  $time = array(
346
- YEAR_IN_SECONDS, // All
347
- HOUR_IN_SECONDS, // Latest 1 hour
348
- DAY_IN_SECONDS, // Latest 24 hours
349
- WEEK_IN_SECONDS, // Latest 1 week
350
- MONTH_IN_SECONDS, // Latest 1 month
351
  );
352
 
353
  $i = 0;
@@ -523,6 +523,7 @@ endif; // TEST_RESTORE_NETWORK
523
  '[extra_ips][black_list]',
524
  '[anonymize]',
525
  '[restrict_api]', // 3.0.13
 
526
  '[signature]',
527
  '[login_fails]',
528
  '[response_code]',
@@ -572,7 +573,6 @@ endif; // TEST_RESTORE_NETWORK
572
  '[public][target_cates][$]', // 3.0.0
573
  '[public][target_tags][$]', // 3.0.0
574
  '[public][ua_list]', // 3.0.0
575
- '[public][simulate]', // 3.0.0
576
  '[public][dnslkup]', // 3.0.3
577
  '[public][response_code]', // 3.0.3
578
  '[public][response_msg]', // 3.0.3
@@ -826,37 +826,41 @@ endif; // TEST_RESTORE_NETWORK
826
  $dsp = @ini_set( 'display_errors', 0 );
827
  $log = @ini_set( 'error_log', '/' . 'dev' . '/' . 'null' );
828
  $err = @error_reporting( 0 );
829
- global $wpdb;
830
- $ver = $wpdb->get_var( 'SELECT @@GLOBAL.version' );
831
- $bem = $wpdb->get_var( 'SELECT @@GLOBAL.block_encryption_mode' ); // `aes-128-ecb` @since MySQL 5.6.17
832
  @ini_set( 'output_buffering', $buf );
833
  @ini_set( 'display_errors', $dsp );
834
  @ini_set( 'error_log', $log );
835
  @error_reporting( $err );
836
 
837
- // Server, PHP, WordPress
838
- $res = array(
839
- 'Server:' => $_SERVER['SERVER_SOFTWARE'],
840
- 'MySQL:' => $ver . ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG && $bem ? ' (' . $bem . ')' : '' ),
841
- 'PHP:' => PHP_VERSION,
842
- 'PHP SAPI:' => php_sapi_name(),
843
- 'WordPress:' => $GLOBALS['wp_version'],
844
- 'Multisite:' => is_multisite() ? 'yes' : 'no',
845
- 'File system:' => $fs->get_method(),
846
- 'Temp folder:' => get_temp_dir(),
847
- 'Umask:' => sprintf( '%o', umask() ^ 511 /*0777*/ ),
848
- 'Zlib:' => function_exists( 'gzopen' ) ? 'yes' : 'no',
849
- 'ZipArchive:' => class_exists( 'ZipArchive', FALSE ) ? 'yes' : 'no',
850
- 'PECL phar:' => class_exists( 'PharData', FALSE ) ? 'yes' : 'no',
851
- 'BC Math:' => (extension_loaded('gmp') ? 'gmp ' : '') . (function_exists('bcadd') ? 'yes' : 'no'),
852
- 'mb_strcut:' => function_exists( 'mb_strcut' ) ? 'yes' : 'no', // @since PHP 4.0.6
853
- 'OpenSSL:' => defined( 'OPENSSL_RAW_DATA' ) ? 'yes' : 'no', // @since PHP 5.3.3
854
- 'SQLite(PDO):' => extension_loaded( 'pdo_sqlite' ) ? 'yes' : 'no',
855
- 'DNS lookup:' => ('8.8.8.8' !== $val ? 'available' : 'n/a') . sprintf( ' [%.1f msec]', $key * 1000.0 ),
856
- 'User agent:' => $_SERVER['HTTP_USER_AGENT'],
857
- );
858
 
859
- $res = array_map( 'esc_html', $res );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
860
 
861
  // Child and parent themes
862
  $activated = wp_get_theme(); // @since 3.4.0
@@ -887,7 +891,7 @@ endif; // TEST_RESTORE_NETWORK
887
  if ( IP_Geo_Block::is_blocked( $val['result'] ) ) {
888
  // hide port and nonce
889
  $method = preg_replace( '/\[\d+\]/', '', $val['method'] );
890
- $method = preg_replace( '/(' . IP_Geo_Block::PLUGIN_NAME . '-auth-nonce)(?:=|%3D)([\w]+)/', '$1=...', $method );
891
 
892
  // add post data
893
  $query = array();
191
  */
192
  public static function catch_live_log() {
193
  $user = IP_Geo_Block_Util::get_current_user_id();
194
+ $auth = IP_Geo_Block::get_live_log();
195
 
196
  if ( $auth === FALSE || $user === (int)$auth ) {
197
  set_transient( IP_Geo_Block::PLUGIN_NAME . '-live-log', $user, IP_Geo_Block_Admin::TIMEOUT_LIVE_UPDATE );
343
  );
344
 
345
  $time = array(
346
+ YEAR_IN_SECONDS, // All
347
+ HOUR_IN_SECONDS, // Latest 1 hour
348
+ DAY_IN_SECONDS, // Latest 24 hours
349
+ WEEK_IN_SECONDS, // Latest 1 week
350
+ 30 * DAY_IN_SECONDS // Latest 1 month (MONTH_IN_SECONDS is since WP 4.4+)
351
  );
352
 
353
  $i = 0;
523
  '[extra_ips][black_list]',
524
  '[anonymize]',
525
  '[restrict_api]', // 3.0.13
526
+ '[simulate]', // 3.0.14
527
  '[signature]',
528
  '[login_fails]',
529
  '[response_code]',
573
  '[public][target_cates][$]', // 3.0.0
574
  '[public][target_tags][$]', // 3.0.0
575
  '[public][ua_list]', // 3.0.0
 
576
  '[public][dnslkup]', // 3.0.3
577
  '[public][response_code]', // 3.0.3
578
  '[public][response_msg]', // 3.0.3
826
  $dsp = @ini_set( 'display_errors', 0 );
827
  $log = @ini_set( 'error_log', '/' . 'dev' . '/' . 'null' );
828
  $err = @error_reporting( 0 );
829
+ $ver = $GLOBALS['wpdb']->get_var( 'SELECT @@GLOBAL.version' );
830
+ $bem = $GLOBALS['wpdb']->get_var( 'SELECT @@GLOBAL.block_encryption_mode' ); // `aes-128-ecb` @since MySQL 5.6.17
 
831
  @ini_set( 'output_buffering', $buf );
832
  @ini_set( 'display_errors', $dsp );
833
  @ini_set( 'error_log', $log );
834
  @error_reporting( $err );
835
 
836
+ // Proces owner
837
+ // https://secure.php.net/manual/function.get-current-user.php#57624
838
+ // https://secure.php.net/manual/function.posix-getpwuid.php#82387
839
+ $usr = function_exists( 'posix_getpwuid' ) ? posix_getpwuid( posix_geteuid() ) : array( 'name' => getenv( 'USERNAME' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
840
 
841
+ // Server, PHP, WordPress
842
+ $res = array_map( 'esc_html', array(
843
+ 'Server:' => $_SERVER['SERVER_SOFTWARE'],
844
+ 'MySQL:' => $ver . ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG && $bem ? ' (' . $bem . ')' : '' ),
845
+ 'PHP:' => PHP_VERSION,
846
+ 'PHP SAPI:' => php_sapi_name(),
847
+ 'WordPress:' => $GLOBALS['wp_version'],
848
+ 'Multisite:' => is_multisite() ? 'yes' : 'no',
849
+ 'File system:' => $fs->get_method(),
850
+ 'Temp folder:' => get_temp_dir(),
851
+ 'Process owner:' => $usr['name'],
852
+ 'File owner:' => get_current_user(), // Gets the name of the owner of the current PHP script
853
+ 'Umask:' => sprintf( '%o', umask() ^ 511 /* 0777 */ ),
854
+ 'Zlib:' => function_exists( 'gzopen' ) ? 'yes' : 'no',
855
+ 'ZipArchive:' => class_exists( 'ZipArchive', FALSE ) ? 'yes' : 'no',
856
+ 'PECL phar:' => class_exists( 'PharData', FALSE ) ? 'yes' : 'no',
857
+ 'BC Math:' => (extension_loaded('gmp') ? 'gmp ' : '') . (function_exists('bcadd') ? 'yes' : 'no'),
858
+ 'mb_strcut:' => function_exists( 'mb_strcut' ) ? 'yes' : 'no', // @since PHP 4.0.6
859
+ 'OpenSSL:' => defined( 'OPENSSL_RAW_DATA' ) ? 'yes' : 'no', // @since PHP 5.3.3
860
+ 'SQLite(PDO):' => extension_loaded( 'pdo_sqlite' ) ? 'yes' : 'no',
861
+ 'DNS lookup:' => ('8.8.8.8' !== $val ? 'available' : 'n/a') . sprintf( ' [%.1f msec]', $key * 1000.0 ),
862
+ 'User agent:' => $_SERVER['HTTP_USER_AGENT'],
863
+ ) );
864
 
865
  // Child and parent themes
866
  $activated = wp_get_theme(); // @since 3.4.0
891
  if ( IP_Geo_Block::is_blocked( $val['result'] ) ) {
892
  // hide port and nonce
893
  $method = preg_replace( '/\[\d+\]/', '', $val['method'] );
894
+ $method = preg_replace( '/(' . IP_Geo_Block::get_auth_key() . ')(?:=|%3D)([\w]+)/', '$1=...', $method );
895
 
896
  // add post data
897
  $query = array();
admin/includes/class-admin-rewrite.php CHANGED
@@ -396,7 +396,7 @@ class IP_Geo_Block_Admin_Rewrite {
396
  *
397
  */
398
  private function show_message( $msg ) {
399
- if ( class_exists( 'IP_Geo_Block_Admin' ) )
400
  IP_Geo_Block_Admin::add_admin_notice( 'error', $msg );
401
  }
402
 
396
  *
397
  */
398
  private function show_message( $msg ) {
399
+ if ( class_exists( 'IP_Geo_Block_Admin', FALSE ) )
400
  IP_Geo_Block_Admin::add_admin_notice( 'error', $msg );
401
  }
402
 
admin/includes/tab-accesslog.php CHANGED
@@ -183,13 +183,18 @@ endif; // $options['validation']['reclogs']
183
  * Function that fills the section with the desired content.
184
  *
185
  */
 
 
 
 
 
 
186
  public static function validation_logs() {
187
  echo '<table id="', IP_Geo_Block::PLUGIN_NAME, '-validation-logs" class="', IP_Geo_Block::PLUGIN_NAME, '-dataTable display" cellspacing="0" width="100%">', "\n", '<thead></thead><tbody></tbody></table>', "\n";
188
  }
189
 
190
  public static function warn_accesslog() {
191
- $context = IP_Geo_Block_Admin::get_instance();
192
- $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
193
  echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
194
  echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
195
  }
183
  * Function that fills the section with the desired content.
184
  *
185
  */
186
+ private static function dashboard_url() {
187
+ $options = IP_Geo_Block::get_option();
188
+ $context = IP_Geo_Block_Admin::get_instance();
189
+ return $context->dashboard_url( $options['network_wide'] );
190
+ }
191
+
192
  public static function validation_logs() {
193
  echo '<table id="', IP_Geo_Block::PLUGIN_NAME, '-validation-logs" class="', IP_Geo_Block::PLUGIN_NAME, '-dataTable display" cellspacing="0" width="100%">', "\n", '<thead></thead><tbody></tbody></table>', "\n";
194
  }
195
 
196
  public static function warn_accesslog() {
197
+ $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), self::dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
 
198
  echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
199
  echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
200
  }
admin/includes/tab-settings.php CHANGED
@@ -47,11 +47,11 @@ class IP_Geo_Block_Admin_Tab {
47
  * @since 2.7.0
48
  */
49
  /*----------------------------------------*
50
- * Validation rule settings
51
  *----------------------------------------*/
52
  add_settings_section(
53
  $section = $plugin_slug . '-validation-rule',
54
- array( __( 'Validation rule settings', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/validation-rule-settings.html" title="Validation rule settings | IP Geo Block">' . $common[4] . '</a>' ),
55
  NULL,
56
  $option_slug
57
  );
@@ -192,6 +192,24 @@ endif;
192
  )
193
  );
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  // White list of extra IP addresses prior to country code (CIDR, ASN)
196
  add_settings_field(
197
  $option_name.'_extra_ips_white_list',
@@ -234,24 +252,6 @@ endif;
234
  )
235
  );
236
 
237
- // $_SERVER keys to retrieve extra IP addresses
238
- add_settings_field(
239
- $option_name.'_validation_proxy',
240
- __( '<dfn title="If your server is placed behind the proxy server or the load balancing server, you need to put the appropriate key such as &#8220;HTTP_X_FORWARDED_FOR&#8221;, &#8220;HTTP_X_REAL_IP&#8221; or something like that to retrieve the client IP address.">$_SERVER keys to retrieve extra IP addresses</dfn>', 'ip-geo-block' ),
241
- array( $context, 'callback_field' ),
242
- $option_slug,
243
- $section,
244
- array(
245
- 'type' => 'text',
246
- 'option' => $option_name,
247
- 'field' => 'validation',
248
- 'sub-field' => 'proxy',
249
- 'value' => $options['validation']['proxy'],
250
- 'placeholder' => IP_Geo_Block_Util::get_proxy_var(),
251
- 'after' => $common[0],
252
- )
253
- );
254
-
255
  // Bad signatures
256
  add_settings_field(
257
  $option_name.'_signature',
@@ -397,6 +397,21 @@ endif;
397
  )
398
  );
399
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  /*----------------------------------------*
401
  * Back-end target settings
402
  *----------------------------------------*/
@@ -408,7 +423,7 @@ endif;
408
  );
409
 
410
  // same as in tab-accesslog.php
411
- $dfn = __( '<dfn title="Validate request to %s.">%s</dfn>', 'ip-geo-block' );
412
  $target = array(
413
  'comment' => sprintf( $dfn, 'wp-comments-post.php', __( 'Comment post', 'ip-geo-block' ) ),
414
  'xmlrpc' => sprintf( $dfn, 'xmlrpc.php', __( 'XML-RPC', 'ip-geo-block' ) ),
@@ -797,7 +812,7 @@ endif;
797
  'field' => 'public',
798
  'sub-field' => 'matching_rule',
799
  'value' => $options['public']['matching_rule'],
800
- 'list' => array( -1 => __( 'Follow &#8220;Validation rule settings&#8221;', 'ip-geo-block' ) ) + $rule,
801
  )
802
  );
803
 
@@ -1052,22 +1067,6 @@ endif;
1052
  )
1053
  );
1054
 
1055
- // Simulation mode
1056
- add_settings_field(
1057
- $option_name.'_public_simulate',
1058
- '<dfn title="' . __( 'It enables to simulate validation without deployment. The results can be found as &#8220;public&#8221; in Logs.', 'ip-geo-block' ) . '">' . __( 'Simulation mode', 'ip-geo-block' ) . '</dfn>',
1059
- array( $context, 'callback_field' ),
1060
- $option_slug,
1061
- $section,
1062
- array(
1063
- 'type' => 'checkbox',
1064
- 'option' => $option_name,
1065
- 'field' => 'public',
1066
- 'sub-field' => 'simulate',
1067
- 'value' => $options['public']['simulate'],
1068
- )
1069
- );
1070
-
1071
  /*----------------------------------------*
1072
  * Privacy and record settings
1073
  *----------------------------------------*/
@@ -1108,39 +1107,6 @@ endif;
1108
  )
1109
  );
1110
 
1111
- // Record Statistics of validation
1112
- add_settings_field(
1113
- $option_name.'_save_statistics',
1114
- __( '<dfn title="This option enables to record the number blocked countries and the number of blocked requests per day.">Record &#8220;Statistics of validation&#8221;</dfn>', 'ip-geo-block' ),
1115
- array( $context, 'callback_field' ),
1116
- $option_slug,
1117
- $section,
1118
- array(
1119
- 'type' => 'checkbox',
1120
- 'option' => $option_name,
1121
- 'field' => 'save_statistics',
1122
- 'value' => $options['save_statistics'],
1123
- )
1124
- );
1125
-
1126
- if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1127
- add_settings_field(
1128
- $option_name.'_validation_recdays',
1129
- '<div class="ip-geo-block-subitem">' . __( 'Maximum period for &#8220;Statistics&#8221; [days]', 'ip-geo-block' ) . '</div>',
1130
- array( $context, 'callback_field' ),
1131
- $option_slug,
1132
- $section,
1133
- array(
1134
- 'type' => 'text',
1135
- 'option' => $option_name,
1136
- 'field' => 'validation',
1137
- 'sub-field' => 'recdays',
1138
- 'value' => $options['validation']['recdays'],
1139
- 'class' => 'ip-geo-block-subitem-parent',
1140
- )
1141
- );
1142
- endif;
1143
-
1144
  // Record IP address cache
1145
  add_settings_field(
1146
  $option_name.'_cache_hold',
@@ -1302,7 +1268,7 @@ endif;
1302
  // Interval [sec] to cleanup expired entries of IP address
1303
  add_settings_field(
1304
  $option_name.'_cache_time_gc',
1305
- __( '<dfn title="This option enables to schedule the WP-Cron event to remove the expired entries in &#8220;IP address cache&#8221; and &#8220;Logs&#8221;.">Interval [sec] to cleanup expired entries of IP address</dfn>', 'ip-geo-block' ),
1306
  array( $context, 'callback_field' ),
1307
  $option_slug,
1308
  $section,
@@ -1315,6 +1281,39 @@ endif;
1315
  )
1316
  );
1317
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1318
  // Remove all settings and records at uninstallation
1319
  add_settings_field(
1320
  $option_name.'_clean_uninstall',
@@ -1347,8 +1346,9 @@ endif;
1347
  // Disable 3rd parties API
1348
  if ( ! empty( $options['restrict_api'] ) ) {
1349
  foreach ( array_keys( $provider ) as $key ) {
1350
- if ( ! in_array( $key, $providers, TRUE ) )
1351
  $provider[ $key ] = is_string( $provider[ $key ] ) ? '-1' : -1;
 
1352
  }
1353
  }
1354
 
@@ -1470,9 +1470,9 @@ endif;
1470
  NULL,
1471
  $option_slug
1472
  );
1473
- if ( IP_GEO_BLOCK_NETWORK ):
1474
  // @see https://vedovini.net/2015/10/using-the-wordpress-settings-api-with-network-admin-pages/
1475
- if ( is_main_site() && is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) {
1476
  add_action( 'network_admin_edit_' . IP_Geo_Block::PLUGIN_NAME, array( $context, 'validate_network_settings' ) );
1477
 
1478
  // Network wide configuration
@@ -1487,7 +1487,7 @@ if ( IP_GEO_BLOCK_NETWORK ):
1487
  'option' => $option_name,
1488
  'field' => 'network_wide',
1489
  'value' => $options['network_wide'],
1490
- 'disabled' => ! current_user_can( 'manage_network_options' ),
1491
  )
1492
  );
1493
  }
@@ -1512,7 +1512,7 @@ endif;
1512
  // Google Maps API key
1513
  add_settings_field(
1514
  $option_name.'_api_key',
1515
- __( '<dfn title="Valid key for Google Maps JavaScript API. A free tier has limit even if it\'s &#8220;default&#8221;. Maps Embed API without key can be available in case of empty.">Google Maps API key</dfn>', 'ip-geo-block' ),
1516
  array( $context, 'callback_field' ),
1517
  $option_slug,
1518
  $section,
@@ -1560,16 +1560,16 @@ endif;
1560
  if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1561
  // DB tables for this plugin
1562
  add_settings_field(
1563
- $option_name.'_init_table',
1564
- __( 'DB tables for this plugin', 'ip-geo-block' ),
1565
  array( $context, 'callback_field' ),
1566
  $option_slug,
1567
  $section,
1568
  array(
1569
  'type' => 'button',
1570
  'option' => $option_name,
1571
- 'field' => 'init_table',
1572
- 'value' => __( 'Initialize now', 'ip-geo-block' ),
1573
  'after' => '<div id="ip-geo-block-init-table"></div>',
1574
  )
1575
  );
@@ -1618,6 +1618,10 @@ endif;
1618
  }
1619
 
1620
  public static function note_public() {
 
 
 
 
1621
  }
1622
 
1623
  public static function note_privacy() {
47
  * @since 2.7.0
48
  */
49
  /*----------------------------------------*
50
+ * Validation rules and behavior
51
  *----------------------------------------*/
52
  add_settings_section(
53
  $section = $plugin_slug . '-validation-rule',
54
+ array( __( 'Validation rules and behavior', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/validation-rule-settings.html" title="Validation rules and behavior | IP Geo Block">' . $common[4] . '</a>' ),
55
  NULL,
56
  $option_slug
57
  );
192
  )
193
  );
194
 
195
+ // $_SERVER keys to retrieve extra IP addresses
196
+ add_settings_field(
197
+ $option_name.'_validation_proxy',
198
+ __( '<dfn title="If your server is placed behind the proxy server or the load balancing server, you need to put the appropriate key such as &#8220;HTTP_X_FORWARDED_FOR&#8221;, &#8220;HTTP_X_REAL_IP&#8221; or something like that to retrieve the client IP address.">$_SERVER keys to retrieve extra IP addresses</dfn>', 'ip-geo-block' ),
199
+ array( $context, 'callback_field' ),
200
+ $option_slug,
201
+ $section,
202
+ array(
203
+ 'type' => 'text',
204
+ 'option' => $option_name,
205
+ 'field' => 'validation',
206
+ 'sub-field' => 'proxy',
207
+ 'value' => $options['validation']['proxy'],
208
+ 'placeholder' => IP_Geo_Block_Util::get_proxy_var(),
209
+ 'after' => $common[0],
210
+ )
211
+ );
212
+
213
  // White list of extra IP addresses prior to country code (CIDR, ASN)
214
  add_settings_field(
215
  $option_name.'_extra_ips_white_list',
252
  )
253
  );
254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  // Bad signatures
256
  add_settings_field(
257
  $option_name.'_signature',
397
  )
398
  );
399
 
400
+ // Simulation mode
401
+ add_settings_field(
402
+ $option_name.'_simulate',
403
+ '<dfn title="' . __( 'It enables to simulate the validation rules without actual blocking in order to check the behavior of this plugin. The results can be found on &#8220;Logs&#8221; tab.', 'ip-geo-block' ) . '">' . __( 'Simulation mode', 'ip-geo-block' ) . '</dfn>',
404
+ array( $context, 'callback_field' ),
405
+ $option_slug,
406
+ $section,
407
+ array(
408
+ 'type' => 'checkbox',
409
+ 'option' => $option_name,
410
+ 'field' => 'simulate',
411
+ 'value' => isset( $options['simulate'] ) ? $options['simulate'] : FALSE,
412
+ )
413
+ );
414
+
415
  /*----------------------------------------*
416
  * Back-end target settings
417
  *----------------------------------------*/
423
  );
424
 
425
  // same as in tab-accesslog.php
426
+ $dfn = __( '<dfn title="It enables to validate requests to %s.">%s</dfn>', 'ip-geo-block' );
427
  $target = array(
428
  'comment' => sprintf( $dfn, 'wp-comments-post.php', __( 'Comment post', 'ip-geo-block' ) ),
429
  'xmlrpc' => sprintf( $dfn, 'xmlrpc.php', __( 'XML-RPC', 'ip-geo-block' ) ),
812
  'field' => 'public',
813
  'sub-field' => 'matching_rule',
814
  'value' => $options['public']['matching_rule'],
815
+ 'list' => array( -1 => __( 'Follow &#8220;Validation rules and behavior&#8221;', 'ip-geo-block' ) ) + $rule,
816
  )
817
  );
818
 
1067
  )
1068
  );
1069
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1070
  /*----------------------------------------*
1071
  * Privacy and record settings
1072
  *----------------------------------------*/
1107
  )
1108
  );
1109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1110
  // Record IP address cache
1111
  add_settings_field(
1112
  $option_name.'_cache_hold',
1268
  // Interval [sec] to cleanup expired entries of IP address
1269
  add_settings_field(
1270
  $option_name.'_cache_time_gc',
1271
+ __( '<dfn title="This option enables to schedule the WP-Cron event to remove the expired entries from &#8220;IP address cache&#8221; and &#8220;Validation logs&#8221;.">Interval [sec] to cleanup expired entries of IP address</dfn>', 'ip-geo-block' ),
1272
  array( $context, 'callback_field' ),
1273
  $option_slug,
1274
  $section,
1281
  )
1282
  );
1283
 
1284
+ // Record Statistics of validation
1285
+ add_settings_field(
1286
+ $option_name.'_save_statistics',
1287
+ __( '<dfn title="This option enables to record the number blocked countries and the number of blocked requests per day.">Record &#8220;Statistics of validation&#8221;</dfn>', 'ip-geo-block' ),
1288
+ array( $context, 'callback_field' ),
1289
+ $option_slug,
1290
+ $section,
1291
+ array(
1292
+ 'type' => 'checkbox',
1293
+ 'option' => $option_name,
1294
+ 'field' => 'save_statistics',
1295
+ 'value' => $options['save_statistics'],
1296
+ )
1297
+ );
1298
+
1299
+ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1300
+ add_settings_field(
1301
+ $option_name.'_validation_recdays',
1302
+ '<div class="ip-geo-block-subitem">' . __( 'Maximum period for &#8220;Statistics&#8221; [days]', 'ip-geo-block' ) . '</div>',
1303
+ array( $context, 'callback_field' ),
1304
+ $option_slug,
1305
+ $section,
1306
+ array(
1307
+ 'type' => 'text',
1308
+ 'option' => $option_name,
1309
+ 'field' => 'validation',
1310
+ 'sub-field' => 'recdays',
1311
+ 'value' => $options['validation']['recdays'],
1312
+ 'class' => 'ip-geo-block-subitem-parent',
1313
+ )
1314
+ );
1315
+ endif;
1316
+
1317
  // Remove all settings and records at uninstallation
1318
  add_settings_field(
1319
  $option_name.'_clean_uninstall',
1346
  // Disable 3rd parties API
1347
  if ( ! empty( $options['restrict_api'] ) ) {
1348
  foreach ( array_keys( $provider ) as $key ) {
1349
+ if ( ! in_array( $key, $providers, TRUE ) ) {
1350
  $provider[ $key ] = is_string( $provider[ $key ] ) ? '-1' : -1;
1351
+ }
1352
  }
1353
  }
1354
 
1470
  NULL,
1471
  $option_slug
1472
  );
1473
+ if ( IP_GEO_BLOCK_NETWORK && FALSE ):
1474
  // @see https://vedovini.net/2015/10/using-the-wordpress-settings-api-with-network-admin-pages/
1475
+ if ( $context->is_network_admin() ) {
1476
  add_action( 'network_admin_edit_' . IP_Geo_Block::PLUGIN_NAME, array( $context, 'validate_network_settings' ) );
1477
 
1478
  // Network wide configuration
1487
  'option' => $option_name,
1488
  'field' => 'network_wide',
1489
  'value' => $options['network_wide'],
1490
+ 'disabled' => ! is_main_site(),
1491
  )
1492
  );
1493
  }
1512
  // Google Maps API key
1513
  add_settings_field(
1514
  $option_name.'_api_key',
1515
+ __( '<dfn title="Valid key for Google Maps JavaScript API. Maps Embed API in iframe can be available without key in case it\'s empty.">Google Maps API key</dfn>', 'ip-geo-block' ),
1516
  array( $context, 'callback_field' ),
1517
  $option_slug,
1518
  $section,
1560
  if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1561
  // DB tables for this plugin
1562
  add_settings_field(
1563
+ $option_name.'_diag_tables',
1564
+ __( 'Diagnose all DB tables', 'ip-geo-block' ),
1565
  array( $context, 'callback_field' ),
1566
  $option_slug,
1567
  $section,
1568
  array(
1569
  'type' => 'button',
1570
  'option' => $option_name,
1571
+ 'field' => 'diag_tables',
1572
+ 'value' => __( 'Diagnose now', 'ip-geo-block' ),
1573
  'after' => '<div id="ip-geo-block-init-table"></div>',
1574
  )
1575
  );
1618
  }
1619
 
1620
  public static function note_public() {
1621
+ echo
1622
+ '<ul class="ip-geo-block-note">', "\n",
1623
+ '<li>', sprintf( __( 'Please refer to "%sLiving with cache plugin%s" for compatibility with cache plugins.', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/living-with-caching-plugin.html" title="Living with caching plugin | IP Geo Block">', '</a>' ), '</li>', "\n",
1624
+ '</ul>', "\n";
1625
  }
1626
 
1627
  public static function note_privacy() {
admin/includes/tab-statistics.php CHANGED
@@ -3,7 +3,6 @@ class IP_Geo_Block_Admin_Tab {
3
 
4
  public static function tab_setup( $context, $tab ) {
5
  $options = IP_Geo_Block::get_option();
6
- $statistics = IP_Geo_Block_Logs::restore_stat( TRUE );
7
  $plugin_slug = IP_Geo_Block::PLUGIN_NAME;
8
 
9
  register_setting(
@@ -25,6 +24,7 @@ class IP_Geo_Block_Admin_Tab {
25
  );
26
 
27
  if ( $options['save_statistics'] ) :
 
28
 
29
  // Number of blocked access
30
  add_settings_field(
@@ -309,39 +309,32 @@ endif;
309
  $key = $log['method'] . ' ' . $log['data'];
310
 
311
  // <methodName>...</methodName>
312
- if ( preg_match( '#<methodName>(.*?)</methodName>#', $key, $matches ) ) {
313
  $log['slug'] = '/xmlrpc.php ' . $matches[1];
314
- }
315
 
316
  // /wp-content/(plugins|themes)/...
317
- elseif ( preg_match( '#(/wp-content/(?:plugins|themes)/.*?/)#', $key, $matches ) ) {
318
  $log['slug'] = $matches[1];
319
- }
320
 
321
  // /wp-admin/admin*.php?action=...
322
- elseif ( preg_match( '#(/wp-admin/admin.*?\.php).*((?:page|action)=[-\w]+)#', $key, $matches ) ) {
323
  $log['slug'] = $matches[1] . ' ' . $matches[2];
324
- }
325
 
326
  // /wp-admin/*.php
327
- elseif ( preg_match( '#(/wp-admin/(?!admin).*?\.php)#', $key, $matches ) ) {
328
  $log['slug'] = $matches[1];
329
- }
330
 
331
  // file uploading *.(zip|tar|rar|gz|php|...)
332
- elseif ( preg_match( '#(\[name\]\s*?=>\s*?[^\s]+)#', $key, $matches ) ) {
333
  $log['slug'] = $matches[1];
334
- }
335
 
336
  // other *.php file with or without query string
337
- elseif ( preg_match( '#(/[^/]*\.php)[^/\w]#', $key, $matches ) && FALSE === strpos( $key, '/wp-admin/' ) ) {
338
  $log['slug'] = $matches[1];
339
- }
340
 
341
  foreach ( array_keys( $keys ) as $key ) {
342
- if ( ! empty( $log[ $key ] ) ) {
343
  $count[ $key ][] = $log[ $key ];
344
- }
345
  }
346
  }
347
 
@@ -400,23 +393,26 @@ endif;
400
  * Function that fills the section with the desired content.
401
  *
402
  */
403
- public static function warn_statistics() {
 
404
  $context = IP_Geo_Block_Admin::get_instance();
405
- $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
 
 
 
 
406
  echo '<p>', sprintf( __( '[ %sRecord &#8220;Statistics of validation&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
407
  echo '<p>', __( 'Please set the proper condition to record and analyze the validation statistics.', 'ip-geo-block' ), '</p>', "\n";
408
  }
409
 
410
  public static function warn_validation() {
411
- $context = IP_Geo_Block_Admin::get_instance();
412
- $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
413
  echo '<p>', sprintf( __( '[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
414
  echo '<p>', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
415
  }
416
 
417
  public static function warn_ipadr_cache() {
418
- $context = IP_Geo_Block_Admin::get_instance();
419
- $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
420
  echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
421
  echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record IP address in cache.', 'ip-geo-block' ), '</p>', "\n";
422
  }
3
 
4
  public static function tab_setup( $context, $tab ) {
5
  $options = IP_Geo_Block::get_option();
 
6
  $plugin_slug = IP_Geo_Block::PLUGIN_NAME;
7
 
8
  register_setting(
24
  );
25
 
26
  if ( $options['save_statistics'] ) :
27
+ $statistics = IP_Geo_Block_Logs::restore_stat();
28
 
29
  // Number of blocked access
30
  add_settings_field(
309
  $key = $log['method'] . ' ' . $log['data'];
310
 
311
  // <methodName>...</methodName>
312
+ if ( preg_match( '#<methodName>(.*?)</methodName>#', $key, $matches ) )
313
  $log['slug'] = '/xmlrpc.php ' . $matches[1];
 
314
 
315
  // /wp-content/(plugins|themes)/...
316
+ elseif ( preg_match( '#(/wp-content/(?:plugins|themes)/.*?/)#', $key, $matches ) )
317
  $log['slug'] = $matches[1];
 
318
 
319
  // /wp-admin/admin*.php?action=...
320
+ elseif ( preg_match( '#(/wp-admin/admin.*?\.php).*((?:page|action)=[-\w]+)#', $key, $matches ) )
321
  $log['slug'] = $matches[1] . ' ' . $matches[2];
 
322
 
323
  // /wp-admin/*.php
324
+ elseif ( preg_match( '#(/wp-admin/(?!admin).*?\.php)#', $key, $matches ) )
325
  $log['slug'] = $matches[1];
 
326
 
327
  // file uploading *.(zip|tar|rar|gz|php|...)
328
+ elseif ( preg_match( '#(\[name\]\s*?=>\s*?[^\s]+)#', $key, $matches ) )
329
  $log['slug'] = $matches[1];
 
330
 
331
  // other *.php file with or without query string
332
+ elseif ( preg_match( '#(/[^/]*\.php)[^/\w]#', $key, $matches ) && FALSE === strpos( $key, '/wp-admin/' ) )
333
  $log['slug'] = $matches[1];
 
334
 
335
  foreach ( array_keys( $keys ) as $key ) {
336
+ if ( ! empty( $log[ $key ] ) )
337
  $count[ $key ][] = $log[ $key ];
 
338
  }
339
  }
340
 
393
  * Function that fills the section with the desired content.
394
  *
395
  */
396
+ private static function dashboard_url() {
397
+ $options = IP_Geo_Block::get_option();
398
  $context = IP_Geo_Block_Admin::get_instance();
399
+ return $context->dashboard_url( $options['network_wide'] );
400
+ }
401
+
402
+ public static function warn_statistics() {
403
+ $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), self::dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
404
  echo '<p>', sprintf( __( '[ %sRecord &#8220;Statistics of validation&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
405
  echo '<p>', __( 'Please set the proper condition to record and analyze the validation statistics.', 'ip-geo-block' ), '</p>', "\n";
406
  }
407
 
408
  public static function warn_validation() {
409
+ $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), self::dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
 
410
  echo '<p>', sprintf( __( '[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
411
  echo '<p>', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
412
  }
413
 
414
  public static function warn_ipadr_cache() {
415
+ $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), self::dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
 
416
  echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
417
  echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record IP address in cache.', 'ip-geo-block' ), '</p>', "\n";
418
  }
admin/js/admin.js CHANGED
@@ -5,7 +5,7 @@
5
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
6
  * This software is released under the MIT License.
7
  */
8
- (function ($, window, document) {
9
  // External variables
10
  var skip_error = false,
11
  timer_stack = [],
@@ -22,7 +22,7 @@
22
  '%': 'ip_geo_block_',
23
  '!': 'ip_geo_block_settings_'
24
  };
25
- return 'undefined' !== typeof id ? keys[selector] + id : keys.$ + selector;
26
  }
27
 
28
  function escapeHTML(str) {
@@ -37,10 +37,6 @@
37
  }).replace(/&amp;(#\d{2,4}|\w{4,7});/g, "&$1;"); // revert html character entity
38
  }
39
 
40
- function is_blocked( result ) {
41
- return -1 === result.indexOf('pass');
42
- }
43
-
44
  function stripTag(str) {
45
  return str ? escapeHTML(str.toString().replace(/(<([^>]+)>)/ig, '')) : '';
46
  }
@@ -49,7 +45,7 @@
49
  var w = $(window).width();
50
  if (w !== window_width) {
51
  window_width = w;
52
- if ('undefined' === typeof timer_stack[name]) {
53
  timer_stack[name] = {id: false, callback: callback};
54
  }
55
  $(window).off('resize').on('resize', function (/*event*/) {
@@ -86,7 +82,7 @@
86
 
87
  function redirect(page, tab) {
88
  if (-1 !== window.location.href.indexOf(page)) {
89
- window.location = stripTag(page) + (tab ? '&' + stripTag(tab) : '') + '&ip-geo-block-auth-nonce=' + ip_geo_block_auth.nonce;
90
  }
91
  }
92
 
@@ -265,6 +261,10 @@
265
  }
266
  }
267
 
 
 
 
 
268
  /**
269
  * jQuery deserialize plugin based on https://gist.github.com/nissuk/835256
270
  *
@@ -279,8 +279,8 @@
279
  for (key in json) {
280
  if(json.hasOwnProperty(key)) {
281
  try {
282
- name = decodeURIComponent(key); // URIError: malformed URI sequence
283
- value = decodeURIComponent(json[key]);
284
 
285
  if (!data.hasOwnProperty(name)) { // !(name in data)
286
  data[name] = [];
@@ -377,7 +377,7 @@
377
  viewPie: [],
378
  drawPie: function (id) {
379
  var i, data;
380
- if ('undefined' === typeof chart.dataPie[id]) {
381
  i = chart.dataPie[id] = new window.google.visualization.DataTable();
382
  i.addColumn('string', 'Country');
383
  i.addColumn('number', 'Requests');
@@ -385,14 +385,14 @@
385
  chart.dataPie[id].addRows(data);
386
  }
387
 
388
- if ('undefined' === typeof chart.viewPie[id]) {
389
  chart.viewPie[id] = new window.google.visualization.PieChart(
390
  document.getElementById(id)
391
  );
392
  }
393
 
394
- if ('undefined' !== typeof chart.dataPie[id] &&
395
- 'undefined' !== typeof chart.viewPie[id] &&
396
  0 < (i = $('#' + id).width())) {
397
  chart.viewPie[id].draw(chart.dataPie[id], {
398
  backgroundColor: { fill: 'transparent' },
@@ -412,7 +412,7 @@
412
  viewLine: [],
413
  drawLine: function (id, datetype) {
414
  var i, n, data;
415
- if ('undefined' === typeof chart.dataLine[id]) {
416
  i = chart.dataLine[id] = new window.google.visualization.DataTable();
417
  i.addColumn(datetype, 'Date' );
418
  i.addColumn('number', 'comment');
@@ -428,14 +428,14 @@
428
  chart.dataLine[id].addRows(data);
429
  }
430
 
431
- if ('undefined' === typeof chart.viewLine[id]) {
432
  chart.viewLine[id] = new window.google.visualization.LineChart(
433
  document.getElementById(id)
434
  );
435
  }
436
 
437
- if ('undefined' !== typeof chart.dataLine[id] &&
438
- 'undefined' !== typeof chart.viewLine[id] &&
439
  0 < (i = $('#' + id).width())) {
440
  chart.viewLine[id].draw(chart.dataLine[id], {
441
  legend: { position: 'bottom' },
@@ -456,9 +456,9 @@
456
  dataStacked: [],
457
  viewStacked: [],
458
  drawStacked: function (id) {
459
- var i, w, data, range, $id = $('#' + id);
460
 
461
- if ('undefined' === typeof chart.dataStacked[id]) {
462
  data = $.parseJSON($id.attr('data-' + id));
463
  if (data) {
464
  data.unshift(['site', 'comment', 'xmlrpc', 'login', 'admin', 'poblic', { role: 'link' } ]);
@@ -466,7 +466,7 @@
466
  }
467
  }
468
 
469
- if ('undefined' === typeof chart.viewStacked[id]) {
470
  chart.viewStacked[id] = new window.google.visualization.BarChart(
471
  document.getElementById(id)
472
  );
@@ -506,8 +506,8 @@
506
  }
507
 
508
  if (0 < (w = $id.width()) &&
509
- 'undefined' !== typeof chart.dataStacked[id] &&
510
- 'undefined' !== typeof chart.viewStacked[id]) {
511
 
512
  i = ID('range');
513
  range = $.parseJSON($('.' + i).attr('data-' + i));
@@ -555,7 +555,7 @@
555
  data = array_chunk(data, row);
556
 
557
  $(ID('.', 'network')).each(function (index, obj) {
558
- if ('undefined' !== typeof data[index]) {
559
  id = $(obj).attr('id');
560
  dt = chart.dataStacked[id];
561
  n = Math.min(row, data[index].length);
@@ -609,7 +609,7 @@
609
 
610
  // Load / Save cookie using wpCookies in wp-includes/js/utils.js
611
  function loadCookie(tabNo) {
612
- var i, cookie = ('undefined' !== typeof wpCookies && wpCookies.getHash('ip-geo-block')) || [];
613
 
614
  for (i in cookie) {
615
  if(cookie.hasOwnProperty(i)) {
@@ -617,7 +617,7 @@
617
  }
618
  }
619
 
620
- if ('undefined' === typeof cookie[tabNo]) {
621
  cookie[tabNo] = [];
622
  }
623
 
@@ -630,7 +630,7 @@
630
 
631
  $.each(cookie, function(i, obj) {
632
  c[i] = '';
633
- if ('undefined' !== typeof obj) {
634
  n = obj.length;
635
  if (n) {
636
  c[i] = (obj[0] || 'o').toString();
@@ -642,7 +642,7 @@
642
  });
643
 
644
  // setHash( name, value, expires, path, domain, secure )
645
- if ('undefined' !== typeof wpCookies) {
646
  wpCookies.setHash(
647
  'ip-geo-block', c, new Date(Date.now() + 2592000000), ip_geo_block_auth.home + ip_geo_block_auth.admin
648
  );
@@ -902,7 +902,7 @@
902
  cmd: cmd,
903
  which: data
904
  }, function (data) {
905
- if ('undefined' !== typeof data.page) {
906
  redirect(data.page, 'tab=' + tabNo);
907
  } else if (data) {
908
  table.ajax.reload();
@@ -997,9 +997,9 @@
997
  // Name of base class
998
  var name = ID('%', 'settings');
999
 
1000
- /*---------------------------
1001
- * Validation rule settings
1002
- *---------------------------*/
1003
  // Scan your country code
1004
  $('[id^="' + ID('scan-') + '"]').on('click', function (/*event*/) {
1005
  var $this = $(this),
@@ -1373,7 +1373,7 @@
1373
 
1374
  // Export settings
1375
  $(ID('#', 'export')).on('click', function (/*event*/) {
1376
- if ('undefined' === typeof JSON) {
1377
  notice_html5();
1378
  return false;
1379
  }
@@ -1394,7 +1394,7 @@
1394
 
1395
  // Import settings
1396
  $(ID('#', 'file-dialog')).on('change', function (event) {
1397
- if ('undefined' === typeof window.FileReader) {
1398
  notice_html5();
1399
  return false;
1400
  }
@@ -1404,7 +1404,7 @@
1404
  readfile(file, function (data) {
1405
  data = JSON.parse(data);
1406
  id = name + '[signature]';
1407
- if ('undefined' !== typeof data[id]) {
1408
  data[id] = encode_str(data[id]);
1409
  }
1410
  ajax_post('export-import', {
@@ -1475,7 +1475,7 @@
1475
  confirm(ip_geo_block.msg[0], function () {
1476
  ajax_post('login-loading', {
1477
  cmd: 'delete-link'
1478
- }, function (data) {
1479
  $this.text(ip_geo_block.msg[2]);
1480
  $this.addClass(type).nextAll(ID('.', 'desc')).remove();
1481
  });
@@ -1485,9 +1485,9 @@
1485
  });
1486
 
1487
  // Manipulate DB table for validation logs
1488
- $(ID('@', 'init_table')).on('click', function (/*event*/) {
1489
  confirm(ip_geo_block.msg[0], function () {
1490
- ajax_table('init-table');
1491
  });
1492
  return false;
1493
  });
@@ -1563,8 +1563,7 @@
1563
 
1564
  // Submit
1565
  $('#submit').on('click', function (/*event*/) {
1566
- var elm = $(ID('@', 'signature')),
1567
- str = elm.val();
1568
  if (str.indexOf(',') !== -1) {
1569
  elm.val(encode_str(str));
1570
  }
5
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
6
  * This software is released under the MIT License.
7
  */
8
+ (function ($, window, document, undefined) {
9
  // External variables
10
  var skip_error = false,
11
  timer_stack = [],
22
  '%': 'ip_geo_block_',
23
  '!': 'ip_geo_block_settings_'
24
  };
25
+ return id !== undefined ? keys[selector] + id : keys.$ + selector;
26
  }
27
 
28
  function escapeHTML(str) {
37
  }).replace(/&amp;(#\d{2,4}|\w{4,7});/g, "&$1;"); // revert html character entity
38
  }
39
 
 
 
 
 
40
  function stripTag(str) {
41
  return str ? escapeHTML(str.toString().replace(/(<([^>]+)>)/ig, '')) : '';
42
  }
45
  var w = $(window).width();
46
  if (w !== window_width) {
47
  window_width = w;
48
+ if (timer_stack[name] === undefined) {
49
  timer_stack[name] = {id: false, callback: callback};
50
  }
51
  $(window).off('resize').on('resize', function (/*event*/) {
82
 
83
  function redirect(page, tab) {
84
  if (-1 !== window.location.href.indexOf(page)) {
85
+ window.location = stripTag(page) + (tab ? '&' + stripTag(tab) : '') + '&' + (ip_geo_block_auth.key ? (ip_geo_block_auth.key + '=' + ip_geo_block_auth.nonce) : '');
86
  }
87
  }
88
 
261
  }
262
  }
263
 
264
+ function is_blocked(result) {
265
+ return -1 === result.indexOf('pass');
266
+ }
267
+
268
  /**
269
  * jQuery deserialize plugin based on https://gist.github.com/nissuk/835256
270
  *
279
  for (key in json) {
280
  if(json.hasOwnProperty(key)) {
281
  try {
282
+ name = stripTag(decodeURIComponent(key)); // URIError: malformed URI sequence
283
+ value = stripTag(decodeURIComponent(json[key]));
284
 
285
  if (!data.hasOwnProperty(name)) { // !(name in data)
286
  data[name] = [];
377
  viewPie: [],
378
  drawPie: function (id) {
379
  var i, data;
380
+ if (chart.dataPie[id] === undefined) {
381
  i = chart.dataPie[id] = new window.google.visualization.DataTable();
382
  i.addColumn('string', 'Country');
383
  i.addColumn('number', 'Requests');
385
  chart.dataPie[id].addRows(data);
386
  }
387
 
388
+ if (chart.viewPie[id] === undefined) {
389
  chart.viewPie[id] = new window.google.visualization.PieChart(
390
  document.getElementById(id)
391
  );
392
  }
393
 
394
+ if (chart.dataPie[id] !== undefined &&
395
+ chart.viewPie[id] !== undefined &&
396
  0 < (i = $('#' + id).width())) {
397
  chart.viewPie[id].draw(chart.dataPie[id], {
398
  backgroundColor: { fill: 'transparent' },
412
  viewLine: [],
413
  drawLine: function (id, datetype) {
414
  var i, n, data;
415
+ if (chart.dataLine[id] === undefined) {
416
  i = chart.dataLine[id] = new window.google.visualization.DataTable();
417
  i.addColumn(datetype, 'Date' );
418
  i.addColumn('number', 'comment');
428
  chart.dataLine[id].addRows(data);
429
  }
430
 
431
+ if (chart.viewLine[id] === undefined) {
432
  chart.viewLine[id] = new window.google.visualization.LineChart(
433
  document.getElementById(id)
434
  );
435
  }
436
 
437
+ if (chart.dataLine[id] !== undefined &&
438
+ chart.viewLine[id] !== undefined &&
439
  0 < (i = $('#' + id).width())) {
440
  chart.viewLine[id].draw(chart.dataLine[id], {
441
  legend: { position: 'bottom' },
456
  dataStacked: [],
457
  viewStacked: [],
458
  drawStacked: function (id) {
459
+ var i, w, data, range, $id = $('#' + stripTag(id));
460
 
461
+ if (chart.dataStacked[id] === undefined) {
462
  data = $.parseJSON($id.attr('data-' + id));
463
  if (data) {
464
  data.unshift(['site', 'comment', 'xmlrpc', 'login', 'admin', 'poblic', { role: 'link' } ]);
466
  }
467
  }
468
 
469
+ if (chart.viewStacked[id] === undefined) {
470
  chart.viewStacked[id] = new window.google.visualization.BarChart(
471
  document.getElementById(id)
472
  );
506
  }
507
 
508
  if (0 < (w = $id.width()) &&
509
+ chart.dataStacked[id] !== undefined &&
510
+ chart.viewStacked[id] !== undefined) {
511
 
512
  i = ID('range');
513
  range = $.parseJSON($('.' + i).attr('data-' + i));
555
  data = array_chunk(data, row);
556
 
557
  $(ID('.', 'network')).each(function (index, obj) {
558
+ if (data[index] !== undefined) {
559
  id = $(obj).attr('id');
560
  dt = chart.dataStacked[id];
561
  n = Math.min(row, data[index].length);
609
 
610
  // Load / Save cookie using wpCookies in wp-includes/js/utils.js
611
  function loadCookie(tabNo) {
612
+ var i, cookie = (wpCookies !== undefined && wpCookies.getHash('ip-geo-block')) || [];
613
 
614
  for (i in cookie) {
615
  if(cookie.hasOwnProperty(i)) {
617
  }
618
  }
619
 
620
+ if (cookie[tabNo] === undefined) {
621
  cookie[tabNo] = [];
622
  }
623
 
630
 
631
  $.each(cookie, function(i, obj) {
632
  c[i] = '';
633
+ if (obj !== undefined) {
634
  n = obj.length;
635
  if (n) {
636
  c[i] = (obj[0] || 'o').toString();
642
  });
643
 
644
  // setHash( name, value, expires, path, domain, secure )
645
+ if (wpCookies !== undefined) {
646
  wpCookies.setHash(
647
  'ip-geo-block', c, new Date(Date.now() + 2592000000), ip_geo_block_auth.home + ip_geo_block_auth.admin
648
  );
902
  cmd: cmd,
903
  which: data
904
  }, function (data) {
905
+ if (data.page !== undefined) {
906
  redirect(data.page, 'tab=' + tabNo);
907
  } else if (data) {
908
  table.ajax.reload();
997
  // Name of base class
998
  var name = ID('%', 'settings');
999
 
1000
+ /*--------------------------------
1001
+ * Validation rules and behavior
1002
+ *--------------------------------*/
1003
  // Scan your country code
1004
  $('[id^="' + ID('scan-') + '"]').on('click', function (/*event*/) {
1005
  var $this = $(this),
1373
 
1374
  // Export settings
1375
  $(ID('#', 'export')).on('click', function (/*event*/) {
1376
+ if (JSON === undefined) {
1377
  notice_html5();
1378
  return false;
1379
  }
1394
 
1395
  // Import settings
1396
  $(ID('#', 'file-dialog')).on('change', function (event) {
1397
+ if (window.FileReader === undefined) {
1398
  notice_html5();
1399
  return false;
1400
  }
1404
  readfile(file, function (data) {
1405
  data = JSON.parse(data);
1406
  id = name + '[signature]';
1407
+ if (data[id] !== undefined) {
1408
  data[id] = encode_str(data[id]);
1409
  }
1410
  ajax_post('export-import', {
1475
  confirm(ip_geo_block.msg[0], function () {
1476
  ajax_post('login-loading', {
1477
  cmd: 'delete-link'
1478
+ }, function (/*data*/) {
1479
  $this.text(ip_geo_block.msg[2]);
1480
  $this.addClass(type).nextAll(ID('.', 'desc')).remove();
1481
  });
1485
  });
1486
 
1487
  // Manipulate DB table for validation logs
1488
+ $(ID('@', 'diag_tables')).on('click', function (/*event*/) {
1489
  confirm(ip_geo_block.msg[0], function () {
1490
+ ajax_table('diag-tables');
1491
  });
1492
  return false;
1493
  });
1563
 
1564
  // Submit
1565
  $('#submit').on('click', function (/*event*/) {
1566
+ var elm = $(ID('@', 'signature')), str = elm.val();
 
1567
  if (str.indexOf(',') !== -1) {
1568
  elm.val(encode_str(str));
1569
  }
admin/js/admin.min.js CHANGED
@@ -3,4 +3,4 @@
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
- !function(e,t,n){var i=!1,a=[],o=e(t).width(),r=IP_GEO_BLOCK,l=IP_GEO_BLOCK_AUTH;function c(e,t){var n={".":".ip-geo-block-","#":"#ip-geo-block-","@":"#ip_geo_block_settings_",$:"ip-geo-block-","%":"ip_geo_block_","!":"ip_geo_block_settings_"};return void 0!==t?n[e]+t:n.$+e}function s(e){return e?function(e){return e.toString().replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]}).replace(/&amp;(#\d{2,4}|\w{4,7});/g,"&$1;")}(e.toString().replace(/(<([^>]+)>)/gi,"")):""}function d(n,i){var r=e(t).width();r!==o&&(o=r,void 0===a[n]&&(a[n]={id:!1,callback:i}),e(t).off("resize").on("resize",function(){return!1!==a[n].id&&t.clearTimeout(a[n].id),a[n].time=t.setTimeout(a[n].callback,200),!1}))}function u(t,n){n?e(c("#",t)).addClass(c("loading")):e(c("#",t)).removeClass(c("loading"))}function p(e,n){t.confirm(s(e))&&n()}function h(e,n,i){t.alert(s(n||r.msg[11].replace("%s",i)+" ("+e+")"))}function f(){h(null,s(r.msg[9]))}function g(e,n){-1!==t.location.href.indexOf(e)&&(t.location=s(e)+(n?"&"+s(n):"")+"&ip-geo-block-auth-nonce="+l.nonce)}function v(t,n,a,o){t&&u(t,!0),n.action=r.action,n.nonce=r.nonce,e.post(r.url,n).done(function(e){a&&a(e)}).fail(function(e){i||h(e.status,e.responseText,n.action)}).always(function(){t&&("object"==typeof o?e.when.apply(e,o).then(function(){u(t,!1)}):u(t,!1))})}function m(e,t){v(e,{cmd:"clear-"+e,which:t},function(e){g(e.page,e.tab)})}function b(e){return e.stopImmediatePropagation(),!1}function k(e,t){t?e.removeClass("folding-disable"):(e.children(c(".","hide")).hide(),e.addClass("folding-disable"),e.removeClass(c("dropdown")).addClass(c("dropup")))}function w(t,n,i){var a=t.prop("type")||"",o=0===a.indexOf("checkbox")&&t.is(":checked")||0===a.indexOf("select")&&"0"!==t.val();t.siblings('input[name^="'+c("%","settings")+'"]:checkbox').prop("disabled",!o),e.isArray(n)?e.each(n,function(t,n){e(n).nextAll(c(".","settings-folding")).each(function(n,a){k(e(a),o&&i[t])})}):n.nextAll(c(".","settings-folding")).each(function(t,n){k(e(n),o&&i)})}function x(t){var n=c("@","validation_ajax_");k(t.closest("ul").next(),e(n+"1").is(":checked")||e(n+"2").is(":checked"))}function y(e){return String(e).replace(/[a-z]/gi,function(e){return String.fromCharCode(e.charCodeAt(0)+(e.toLowerCase()<"n"?13:-13))})}function _(e){return function(e){return t.btoa(e)}(y(e))}function C(e){return y(function(e){return t.atob(e)}(e))}function P(t){var n=t.is(":checked"),i=e(c("@","public_target_rule")),a=e(c("@","public_behavior")),o=t.closest("tr").nextAll("tr");o.find('[name^="'+c("%","settings")+'"]').prop("disabled",!n),o.find(c(".","desc")).css("opacity",n?1:.5),w(t,[i,a],["1"===i.val(),a.val()]),n&&a.change()}function S(t,n){t&&("string"==typeof t&&(t=JSON.parse(t)),n&&(e('input[type="checkbox"]').prop("checked",!1).change(),e("input[name*=providers]").prop("disabled",!1).change()),e(c("#","import")).closest("form").deserialize(t),e(c("@","exception_admin")+","+c("@","validation_mimetype")).change(),e('select[name*="'+c("%","settings")+'"]').change(),e(c("@","validation_login")).change(),P(e(c("@","validation_public"))),x(e(c("@","validation_ajax_1"))),n&&(n=c("%","settings[providers][IPInfoDB]"),e(c("@","providers_IPInfoDB")).prop("checked",!!t[n])))}e.fn.deserialize=function(t){return this.each(function(){var n,i,a,o=this,r={};for(n in t)if(t.hasOwnProperty(n))try{i=decodeURIComponent(n),a=decodeURIComponent(t[n]),r.hasOwnProperty(i)||(r[i]=[]),r[i].push(a)}catch(e){}e.each(r,function(t,i){"hidden"!==(n=e('[name="'+t+'"]:input',o).val(i)).attr("type")&&n.before('<span style="color:red">*</span>')})})};var A={dataPie:[],viewPie:[],drawPie:function(i){var a,o;void 0===A.dataPie[i]&&((a=A.dataPie[i]=new t.google.visualization.DataTable).addColumn("string","Country"),a.addColumn("number","Requests"),o=e.parseJSON(e("#"+i).attr("data-"+i)),A.dataPie[i].addRows(o)),void 0===A.viewPie[i]&&(A.viewPie[i]=new t.google.visualization.PieChart(n.getElementById(i))),void 0!==A.dataPie[i]&&void 0!==A.viewPie[i]&&0<(a=e("#"+i).width())&&A.viewPie[i].draw(A.dataPie[i],{backgroundColor:{fill:"transparent"},chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:[],viewLine:[],drawLine:function(i,a){var o,r,l;if(void 0===A.dataLine[i]){for((o=A.dataLine[i]=new t.google.visualization.DataTable).addColumn(a,"Date"),o.addColumn("number","comment"),o.addColumn("number","xmlrpc"),o.addColumn("number","login"),o.addColumn("number","admin"),o.addColumn("number","public"),r=(l=e.parseJSON(e("#"+i).attr("data-"+i))).length,o=0;o<r;++o)l[o][0]=new Date(1e3*l[o][0]);A.dataLine[i].addRows(l)}void 0===A.viewLine[i]&&(A.viewLine[i]=new t.google.visualization.LineChart(n.getElementById(i))),void 0!==A.dataLine[i]&&void 0!==A.viewLine[i]&&0<(o=e("#"+i).width())&&A.viewLine[i].draw(A.dataLine[i],{legend:{position:"bottom"},backgroundColor:{fill:"transparent"},hAxis:{format:"MM/dd"+("datetime"===a?" HH:mm":"")},vAxis:{textPosition:o>320?"out":"in"},chartArea:{left:o>320?"10%":0,top:"5%",width:"100%",height:"75%"}})},dataStacked:[],viewStacked:[],drawStacked:function(i){var a,o,r,l,s=e("#"+i);void 0===A.dataStacked[i]&&(r=e.parseJSON(s.attr("data-"+i)))&&(r.unshift(["site","comment","xmlrpc","login","admin","poblic",{role:"link"}]),A.dataStacked[i]=t.google.visualization.arrayToDataTable(r)),void 0===A.viewStacked[i]&&(A.viewStacked[i]=new t.google.visualization.BarChart(n.getElementById(i)),t.google.visualization.events.addListener(A.viewStacked[i],"animationfinish",function(){var t,a,o,r=[],l=A.dataStacked[i],d=l.getNumberOfRows(),u=e(c("#","open-new")).prop("checked");for(t=0;t<d;t++)r.push({label:l.getValue(t,0),link:l.getValue(t,6)});d="http://www.w3.org/1999/xlink",s.find("text").each(function(e,t){"g"===(o=t.parentNode).tagName.toLowerCase()&&-1!==(e=function(e,t){var n,i=t.length;for(e=e.replace("…",""),n=0;n<i;++n)if(t.hasOwnProperty(n)&&0===t[n].label.indexOf(e))return n;return-1}(t.textContent,r))&&((a=n.createElementNS("http://www.w3.org/2000/svg","a")).setAttributeNS(d,"xlink:href",r[e].link),a.setAttributeNS(d,"title",r[e].label),a.setAttribute("target",u?"_blank":"_self"),a.setAttribute("class","site"),a.appendChild(o.removeChild(t)),o.appendChild(a),r.splice(e,1))})})),0<(o=s.width())&&void 0!==A.dataStacked[i]&&void 0!==A.viewStacked[i]&&(a=c("range"),l=e.parseJSON(e("."+a).attr("data-"+a)),a=40*(r=A.dataStacked[i]).getNumberOfRows(),A.viewStacked[i].draw(r,{width:o,height:a+80,allowHtml:!0,isStacked:!0,legend:{position:"top"},chartArea:{top:50,left:90,width:"100%",height:a},hAxis:{minValue:0,maxValue:l[1]},backgroundColor:{fill:"transparent"},animation:{startup:!0,duration:200,easing:"out"}}))},ajaxStacked:function(t,n,i,a){v(null,{cmd:"restore-network",which:t=Math.max(0,Math.min(4,t)),offset:(n=5*Math.max(1,Math.min(5,n)))*i*a,length:n},function(t){var i,a,o,r,l;t=function(e,t){var n,i,a=Math.ceil(e.length/t),o=[];for(n=0;n<a;++n)i=n*t,o.push(e.slice(i,i+t));return o}(t,n),e(c(".","network")).each(function(c,s){if(void 0!==t[c]){for(r=e(s).attr("id"),l=A.dataStacked[r],o=Math.min(n,t[c].length),i=0;i<o;++i)for(a=1;a<=5;a++)l.setValue(i,a,t[c][i][a]);A.drawStacked(r)}})})}};function O(n){"object"==typeof t.google&&(1===n?e(c("#","chart-countries")).length&&(A.drawPie(c("chart-countries")),A.drawLine(c("chart-daily"),"date")):5===n&&e(c(".","network")).each(function(t,n){A.drawStacked(e(n).attr("id"))}))}function I(e){if("object"==typeof t.google){var n=["corechart"];5===e&&n.push("bar"),t.google.charts.load("current",{packages:n,callback:function(){O(e)}}),d("draw-chart."+e,function(){O(e)})}}function N(t){var n,i,a=[];e.each(t,function(e,t){if(a[e]="",void 0!==t&&(i=t.length))for(a[e]=(t[0]||"o").toString(),n=1;n<i;++n)a[e]+=(t[n]||"o").toString()}),"undefined"!=typeof wpCookies&&wpCookies.setHash("ip-geo-block",a,new Date(Date.now()+2592e6),l.home+l.admin)}function D(t){var i=function(e){var t,n="undefined"!=typeof wpCookies&&wpCookies.getHash("ip-geo-block")||[];for(t in n)n.hasOwnProperty(t)&&(n[t]=n[t].replace(/[^ox\d]/gi,"").split(""));return void 0===n[e]&&(n[e]=[]),n}(t);return e(n).on("click","form>h2,h3",function(){return function(e,t,n){var i,a=e.closest("fieldset").data("section"),o=e.parent().nextAll(".panel-body").toggle();e.toggleClass(c("dropup")).toggleClass(c("dropdown")),(i=e.hasClass(c("dropdown")))?o.addClass(c("border")).trigger(c("show-body")):o.removeClass(c("border")),n[t][a]=i?"o":"x",N(n),O(t)}(e(this),t,i),!1}),e(c("#","toggle-sections")).on("click",function(){var n,a=e(c(".","field")).find("h2,h3"),o=[c("dropdown"),c("dropup")],r=a.filter("."+o[0]).length;return a.each(function(a){(n=e(this)).removeClass(o.join(" ")).addClass(r?o[1]:o[0]),n=n.parent().nextAll(".panel-body").toggle(!r),r?n.removeClass(c("border")):n.addClass(c("border")).trigger("show-body"),i[t][a]=r?"x":"o"}),N(i),O(t),!1}),i}function j(t){e("body").append('<div style="display:none"><form method="POST" id="'+c("export-form")+'" action="'+r.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+r.action+'" /><input type="hidden" name="nonce" value="'+r.nonce+'" /><input type="hidden" name="cmd" value="'+t+'" /><input type="hidden" name="data" value="" id="'+c("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+c("file-dialog")+'" /></div>')}function T(e,t,n,i){var a,o;return(a=e.cloneNode(!1)).setAttribute("title",s(n)),(o=t.cloneNode(!1)).setAttribute("class","dashicons dashicons-"+i),a.appendChild(o),a}function L(n,i,a,o){var l=Number(o[n][1===n?3:2])||0;l=[10,25,50,100][l],e.extend(!0,e.fn.dataTable.defaults,a,{dom:"tlp",serverSide:!1,autoWidth:!1,processing:!0,deferRender:!0,language:{emptyTable:r.i18n[1],loadingRecords:r.i18n[0],processing:r.i18n[0],zeroRecords:r.i18n[2],lengthMenu:"_MENU_",paginate:{first:"&laquo;",last:"&raquo;",next:"&rsaquo;",previous:"&lsaquo;"}},responsive:{details:{type:"column",target:"td:nth-child(n+2)"}},columnDefs:[{width:"1.25em",targets:0},{orderable:!1,targets:0},{searchable:!1,targets:0},{targets:[0],data:null,defaultContent:'<input type="checkbox">'}],pagingType:"full_numbers",lengthMenu:[10,25,50,100],pageLength:l,scroller:!0,scrollY:1e4,scrollCollapse:!0,drawCallback:function(t){var n=e(c("#",i.tableID)).find("td.dataTables_empty"),a="restore-logs"===i.ajaxCMD?3:2;a>t.iDraw?n.html(r.i18n[0]):a===t.iDraw&&(n.html(r.i18n[1]),(n=e(c("@","search_filter"))).val()&&n.trigger("keyup"))}});var s=e(c("#",i.tableID)).DataTable({ajax:{url:r.url,type:"POST",data:{cmd:i.ajaxCMD,action:r.action,nonce:r.nonce}},mark:!0}),u=function(){s.columns.adjust().responsive.recalc().draw(!1)};return d("draw-table."+n,u),e(c("#",i.sectionID)).find(".panel-body").off(c("show-body")).on(c("show-body"),function(){return u(),!1}).off("change").on("change",'th>input[type="checkbox"]',function(){var t=e(this).prop("checked");return e(c("#",i.tableID)).find('td>input[type="checkbox"]').prop("checked",t),!1}),e(c("#","select-target")).off("change").on("change",function(){var t=e(this).find('input[name="'+c("target")+'"]:checked').val();return s.columns(i.targetColumn).search("all"!==t?t:"").draw(),!1}).trigger("change"),e(c("#","bulk-action")).off("click").on("click",function(){var t,a,o=e(this).prev().val(),l=/(<([^>]+)>)/gi,d=/data-hash=[\W]([\w]+)[\W]/i,u={IP:[],AS:[]},p=s.$("input:checked");return!!o&&(p.length?(p.each(function(){a=s.cell(this.parentNode).data(),t=("bulk-action-remove"===o||"bulk-action-ip-erase"===o)&&(t=a[i.columnIP].match(d))?","+t[1]:"",u.IP.push(a[i.columnIP].replace(l,"")+t),u.AS.push(a[i.columnAS].replace(l,""))}),u.IP.length&&v("loading",{cmd:o,which:u},function(t){void 0!==t.page?g(t.page,"tab="+n):t&&(s.ajax.reload(),e(c("#",i.tableID)).find('th input[type="checkbox"]').prop("checked",!1))}),!1):(h(null,r.msg[10]),!1))}),e(c("@","search_filter")).off("keyup").on("keyup",function(){return s.search(this.value,!1,!0,!/[A-Z]/.test(this.value)).draw(),!1}),e(c("#","reset-filter")).off("click").on("click",function(){return e(c("@","search_filter")).val(""),s.search("").draw(),!1}),e(c("@","clear_all")).off("click").on("click",function(){return p(r.msg[0],function(){m(1===n?"cache":"logs",null)}),!1}),e("table"+c(".","dataTable")+" tbody").on("click","a",function(){var i,a,o=t.location.search.slice(1).split("&"),r=o.length,l={};for(i=0;i<r;++i)l[(a=o[i].split("="))[0]]=a[1];for(i in l.tab=1===n?4:2,l.s=e(this).text().replace(/[^\w\.\:\*]/,""),a=[],l)l.hasOwnProperty(i)&&a.push(i+"="+l[i]);return t.open(t.location.pathname+"?"+a.join("&"),"_blank"),!1}),e(c("#",i.tableID)).on("length.dt",function(e,t,i){o[n][1===n?3:2]={10:0,25:1,50:2,100:3}[i]||0,N(o)}),s}e(function(){var a=Number(r.tab)||0,o=D(a);switch(e(c(".","inhibit")).on("submit",function(){return!1}),e(t).on("beforeunload",function(){i=!0}),a){case 0:var d=c("%","settings");e('[id^="'+c("scan-")+'"]').on("click",function(){var t=e(this),n=t.attr("id"),i=t.parent();return v(n.replace(/^.*(?:scan)/,"scanning"),{cmd:"scan-code",which:n.replace(c("scan-"),"")},function(e){var t,n;for(t in i.children("ul").length||i.append('<ul id="'+c("code-list")+'"></ul>'),i=i.children("ul").empty(),e)e.hasOwnProperty(t)&&("string"==typeof e[t=s(t)]?n=s(e[t]):(n=s(e[t].code),t='<abbr title="'+s(e[t].type)+'">'+t+"</abbr>"),i.append("<li>"+t+' : <span class="'+c("notice")+'">'+n+"</span></li>"));i.show("slow")}),!1}),e(c("@","matching_rule")).on("change",function(){var t=this.value;return e(c("@","white_list")).closest("tr").toggle("0"===t),e(c("@","black_list")).closest("tr").toggle("1"===t),!1}).change(),e(c(".","icon-cidr")).on("click",function(){var n=e(c("#","admin-styles-css")).get(0).href,i=t.open("about:blank","","width=560,height=170");return n=n.slice(0,n.lastIndexOf("css/")),i.document.write('<!DOCTYPE html><html lang=en><meta charset=utf-8><title>CIDR calculator for IPv4 / IPv6</title><link href="'+n+'css/cidr.min.css?v=.1" rel=stylesheet><div class="row container"><div class=row id=i><fieldset class="col span_11"><legend>Range <input id=a type=button value=Clear tabindex=1></legend><textarea id=c name=range placeholder="192.168.0.0 - 192.168.255.255" rows=5 wrap=off tabindex=2></textarea></fieldset><ul class="col span_2" id=h><li class=row><input id=e type=button value=&rarr; class="col span_24" tabindex=3><li class=row><input id=f type=button value=&larr; class="col span_24" tabindex=6></ul><fieldset class="col span_11"><legend>CIDR <input id=b type=button value=Clear tabindex=4></legend><textarea id=d name=cidr placeholder=192.168.0.0/16 rows=5 wrap=off tabindex=5></textarea></fieldset></div><div class=row id=j><span class=col id=g> </span></div></div><script src="'+n+'js/cidr.min.js?v=.1"><\/script>'),i.document.close(),!1}),e(c("@","validation_mimetype")).on("change",function(t){var n=e(this),i=Number(n.val());return n.nextAll(c(".","settings-folding")).each(function(t,n){k(e(n),i===t+1||i&&2===t)}),b(t)}).change(),e('select[name*="response_code"]').on("change",function(t){var n=e(this),i=parseInt(n.val()/100,10),a=n.closest("tr").nextAll("tr");return 0<=n.attr("name").indexOf("public")&&-1===Number(e(c("@","public_matching_rule")).val())?(a.each(function(t){1>=t&&e(this).hide()}),b(t)):(i<=3?a.each(function(t){0===t?e(this).show():1===t&&e(this).hide()}):a.each(function(t){0===t?e(this).hide():1===t&&e(this).show()}),b(t))}).change(),e(c("#","decode")).on("click",function(){var t=e(c("@","signature")),n=t.val();return-1===n.search(/,/)?t.val(C(n)):t.val(_(n)),!1}),e(c("@","validation_login")).on("change",function(t){var n=e(this);return w(n,n,d),b(t)}).change(),v(null,{cmd:"get-actions"},function(t){var i,a,o,d,u=e(c("#","list-admin")),p=n.createElement("li"),h=n.createElement("input"),f=n.createElement("label"),g=n.createElement("dfn"),m=n.createElement("span");for(d in t)t.hasOwnProperty(d)&&(d=s(d),u.find("#"+(o=c("!","exception_admin_"+d))).size()||((i=h.cloneNode(!1)).setAttribute("id",o),i.setAttribute("value",d),i.setAttribute("type","checkbox"),(a=p.cloneNode(!1)).appendChild(i),(i=f.cloneNode(!1)).setAttribute("for",o),i.appendChild(n.createTextNode(d)),a.appendChild(i),1&t[d]&&a.appendChild(T(g,m,r.msg[5],"lock")),2&t[d]&&a.appendChild(T(g,m,r.msg[6],"unlock")),u.append(a)));e(c(".","icon-unlock")).on("click",function(){return e(c("#","list-admin")+">li").filter(function(){return!e(this).find(".dashicons-unlock").length}).toggle(),!1}),e(c("@","exception_admin")).on("change",function(t){var n=e.grep(e(this).val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});return e(c("#","list-admin")).find("input").each(function(){var t=e(this),i=t.val();t.prop("checked",-1!==e.inArray(i,n))}),b(t)}).change(),e(c("#","list-admin")).on("click","input",function(){var t,n=e(this),i=e(c("@","exception_admin")),a=n.val(),o=e.grep(i.val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});-1===(t=e.inArray(a,o))?o.push(a):o.splice(t,1),i.val(o.join(",")).change()}),e(c(".","icon-find")).on("click",function(){var t,n,i,a,o=e(this),d=[],u=0,p=s(r.msg[8]),h=s(o.data("target"));return e(c("#","find-"+h)).empty(),o.next().children(c(".","find-desc")).show(),(o=e(c("#","list-"+h))).children("li").each(function(t,n){d.push(e(n).find("input").val())}),v("find-"+h,{cmd:"find-"+h},function(f){var g;for(g in f)f.hasOwnProperty(g)&&(++u,t=s(f[g]),g=s(g),n=e.inArray(g,d),i=c("!","exception_"+h+"_"+g),a="admin"===h?t+"="+g:"/"+t+"/"+g+"/",a='<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="'+l.sites[0]+l.admin+"options-general.php?page=ip-geo-block&tab=4&s="+encodeURIComponent(a)+'" title="'+p.replace("%s",a)+'" target="_blank"><span></span></a>',n<0?(d.push(g),o.prepend('<li><input id="'+i+'" value="'+g+'" type="checkbox" '+("admin"===h?"/>":"name=ip_geo_block_settings[exception]["+h+"]["+g+"] />")+'<label for="'+i+'">'+g+"</lable>"+a+"</li>")):(i=o.find("#"+i).parent()).find("a").length||i.append(a));e(c("@","exception_"+h)).trigger("change"),e(c("#","find-"+h)).append(' <span class="ip-geo-block-warn">'+s(r.msg[7].replace("%d",u))+"</span>")}),!1})}),e('input[id^="'+c("!","validation_ajax_")+'"]').on("change",function(){x(e(this))}).change(),e(c("@","validation_public")).on("change",function(t){return P(e(this)),b(t)}).change(),e(c("@","public_matching_rule")).on("change",function(t){var n=this.value;return e(c("@","public_white_list")).closest("tr").toggle("0"===n),e(c("@","public_black_list")).closest("tr").toggle("1"===n),e(c("@","public_response_code")).change().closest("tr").toggle("-1"!==n),b(t)}).change(),e(c("@","public_behavior")).on("change",function(t){var n=e(this);return k(n.siblings("ul"),n.prop("checked")),b(t)}).change(),e(c("@","update")).on("click",function(){return v("download",{cmd:"download"},function(t){var n,i,a;for(n in t)if(t.hasOwnProperty(n))for(i in a=t[n])a.hasOwnProperty(i)&&(a[i=s(i)].filename&&e(c("@",n+"_"+i+"_path")).val(s(a[i].filename)),a[i].message&&e(c("#",n+"-"+i)).text(s(a[i].message)))}),!1}),e(c("@","restrict_api")).on("change",function(){e('input[class*="remote"]').prop("disabled",e(this).prop("checked"))}).trigger("change"),e(c("@","save_statistics")).on("change",function(){return e(c("@","validation_recdays")).prop("disabled",!e(this).prop("checked")),!1}).trigger("change"),e(c("@","validation_reclogs")).on("change",function(){var t=e(this);t.parent().parent().nextAll().find('input[id*="validation"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),e(c("@","cache_hold")).on("change",function(){var t=e(this).prop("checked");e('input[name*="[cache_time]"]').prop("disabled",!t),e('select[id*="login_fails"]').prop("disabled",!t)}).trigger("change"),e(c("@","comment_pos")).on("change",function(){var t=e(this);t.nextAll('input[type="text"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),j("validate"),e(c("#","export")).on("click",function(){if("undefined"==typeof JSON)return f(),!1;var t=d,n={};return e.each(e(this).closest("form").serializeArray(),function(e,i){-1!==i.name.indexOf(t)&&(n[i.name]=i.value)}),n[t+="[signature]"]=_(n[t]),e(c("#","export-data")).val(JSON.stringify(n)),e(c("#","export-form")).submit(),!1}),e(c("#","file-dialog")).on("change",function(e){if(void 0===t.FileReader)return f(),!1;var n,i=e.target.files[0];return i&&function(e,n){var i=new t.FileReader;i.onload=function(e){n&&n(e.target.result)},i.onerror=function(e){h("Error",e.target.error.code)},i.readAsText(e)}(i,function(e){void 0!==(e=JSON.parse(e))[n=d+"[signature]"]&&(e[n]=_(e[n])),v("export-import",{cmd:"validate",data:JSON.stringify(e)},function(e){S(e,!0)})}),!1}),e(c("#","import")).on("click",function(){return e(c("#","file-dialog")).click(),!1}),e(c("#","default")).on("click",function(){return p(r.msg[0],function(){v("pre-defined",{cmd:"import-default"},function(e){S(e,!0)})}),!1}),e(c("#","preferred")).on("click",function(){return p(r.msg[0],function(){v("pre-defined",{cmd:"import-preferred"},function(e){S(e,!1)})}),!1}),e(c("@","reset_live")).on("click",function(){return v("reset-live",{cmd:"reset-live"}),!1}),e(c("#","login-link")).on("click",function(){var t=e(this),n=c("$","primary");return t.hasClass(n)?v("login-loading",{cmd:"generate-link"},function(i){t.text(r.msg[3]),t.removeClass(n).nextAll(c(".","desc")).remove(),e('<p class="ip-geo-block-desc"></p>').appendTo(t.parent()).append(r.msg[4],'<a href="'+i.link+'" title="'+r.msg[1]+'" target=_blank>'+i.link+"</a></p>")}):p(r.msg[0],function(){v("login-loading",{cmd:"delete-link"},function(e){t.text(r.msg[2]),t.addClass(n).nextAll(c(".","desc")).remove()})}),!1}),e(c("@","init_table")).on("click",function(){return p(r.msg[0],function(){var e;v(e="init-table",{cmd:e},function(e){g(e.page,e.tab)})}),!1}),e(c("#","show-info")).on("click",function(){e(c("#","wp-info")).empty(),v("wp-info",{cmd:"show-info"},function(t){var n,i=[];for(n in t)t.hasOwnProperty(n)&&i.push("- "+n+" "+t[n]);return e(c("#","wp-info")).html('<textarea class="regular-text code" rows="'+i.length+'">'+i.join("\n")+"</textarea>").find("textarea").select(),!1})}),e('select[name^="'+d+'"]').on("change",function(){var t,n,i,a=e(this);return t=a,i=c(".","desc"),t.next(i).empty(),(n=t.children("option:selected").data("desc"))&&t.next(i).html(e.parseHTML(n)),w(a,a,d),!1}).change(),e(c(".","icon-cycle")).on("click",function(){var t,n=e(this).nextAll("li"),i=n.find(c("@","exception_admin")),a=n.find("input:checkbox").filter(":visible"),o=a.filter(":checked").length;return a.prop("checked",!o),i.length&&(o?i.val(""):(t=[],a.each(function(n,i){t.push(e(i).val())}),i.val(t.join(",")))),e(this).blur(),!1}),e(c(".","settings-folding>dfn")).on("click",function(){var t=c("drop"),n=e(this).parent();return n.children(c(".","hide")).toggle(),n.toggleClass(t+"up").toggleClass(t+"down"),n.hasClass(t+"up")&&n.children("div").hide(),!1}),e("#submit").on("click",function(){var t=e(c("@","signature")),n=t.val();return-1!==n.indexOf(",")&&t.val(_(n)),!0});break;case 1:I(a);var u=0;e(c("#","sort-slug")).on("click",function(){var t=e(this).closest("ol"),n=t.children("li");(u=!u)?n.sort(function(t,n){return e(t).text()>e(n).text()}):n.sort(function(t,n){return Number(e(t).text().replace(/^.*\((\d+)\)$/,"$1"))<=Number(e(n).text().replace(/^.*\((\d+)\)$/,"$1"))}),t.children("li").remove(),n.appendTo(t)}),e(c("@","clear_statistics")).on("click",function(){return p(r.msg[0],function(){m("statistics",null)}),!1}),e(c("@","clear_logs")).on("click",function(){return p(r.msg[0],function(){m("logs",null)}),!1}),L(a,{tableID:"statistics-cache",ajaxCMD:"restore-cache",sectionID:"section-2",targetColumn:4,columnIP:1,columnAS:3},{columns:[{title:'<input type="checkbox">'},{title:r.i18n[3]},{title:r.i18n[4]},{title:r.i18n[5]},{title:r.i18n[6]},{title:r.i18n[7]},{title:r.i18n[8]},{title:r.i18n[9]}],columnDefs:[{responsivePriority:0,targets:0},{responsivePriority:1,targets:1},{responsivePriority:2,targets:2},{responsivePriority:6,targets:3},{responsivePriority:7,targets:4},{responsivePriority:3,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{className:"all",targets:[0,1,2,5]}]},o),j("export-cache"),e(c("#","export-cache")).on("click",function(){return e(c("#","export-form")).submit(),!1});break;case 4:var y={tableID:"validation-logs",sectionID:"section-0",targetColumn:6,columnIP:3,columnAS:5},O={columns:[{title:'<input type="checkbox">'},{title:""},{title:r.i18n[10]},{title:r.i18n[3]},{title:r.i18n[4]},{title:r.i18n[5]},{title:r.i18n[7]},{title:r.i18n[11]},{title:r.i18n[12]},{title:r.i18n[13]},{title:r.i18n[14]},{title:r.i18n[15]}],columnDefs:[{responsivePriority:11,targets:0},{responsivePriority:0,targets:1},{responsivePriority:1,targets:2},{responsivePriority:2,targets:3},{responsivePriority:3,targets:4},{responsivePriority:6,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{responsivePriority:7,targets:8},{responsivePriority:8,targets:9},{responsivePriority:9,targets:10},{responsivePriority:10,targets:11},{visible:!1,targets:1},{className:"all",targets:[0,2,3,4]},{className:"none",targets:[8,9,10,11]}]},R=null,M=null,z=e(c("#","live-loading")),E=null,$=function(){R&&(t.clearTimeout(R),R=null),M&&(z.removeClass(c("live-timer")),t.clearTimeout(M),M=null)},J=function(){$(),v("live-loading",{cmd:"live-start"},function(e){if(e.error)h(null,e.error);else if(e.data.length){var n,i=e.data.length;for(n=0;n<i;n++)E.row.add(e.data[n]);E.draw(!1)}R=t.setTimeout(J,1e3*r.interval)})},B=function(e,t){$(),v(null,{cmd:e||"live-stop",callback:t})},q=c(""),H=function(t,n,i){-1===n[7].indexOf("pass")?e(t).addClass(q+i+"blocked"):e(t).addClass(q+i+"passed")},V=e(c("#","live-log")),G=e(c("#","live-update"));e(c("#","validation-logs")).on("animationend",function(){return e(this).find('tr[class*="'+q+'new"]').each(function(){var t=e(this);-1!==t.prop("class").indexOf("passed")?t.addClass(q+"passed").removeClass(q+"new-passed"):t.addClass(q+"blocked").removeClass(q+"new-blocked")}),!1}),V.on("change",function(){switch(e('input[name="'+c("live-log")+'"]:checked').val()){case"start":J();break;case"pause":B("live-pause",function(){z.addClass(c("live-timer")),M=t.setTimeout(function(){$(),e(c("#","live-log-stop")).prop("checked",!0)},1e3*r.timeout)});break;case"stop":B()}}),G.on("change",function(){var t=V.closest("tr"),n=G.prop("checked");return o[a][1]=n?"o":"x",N(o),E&&E.clear().destroy(),n?(t.show().next().next().next().nextAll().hide(),y.ajaxCMD="live-stop",O.order=[1,"desc"],O.createdRow=function(e,t){H(e,t,"new-")}):(t.hide().next().next().next().nextAll().show(),y.ajaxCMD="restore-logs",O.order=[0,""],O.createdRow=function(e,t){H(e,t,"")}),e(c("#","live-log-stop")).trigger("click"),E=L(a,y,O,o),!1}).trigger("change"),e(c("#","logs-preset")).on("click","a",function(){var t=e(this).data("value");return e(c("@","search_filter")).val(t),E.search(t,!1,!0,!/[A-Z]/.test(t)).draw(),!1}),j("export-logs"),e(c("#","export-logs")).on("click",function(){return e(c("#","export-form")).submit(),!1});break;case 2:e(t).on(c("gmap-error"),function(){v(null,{cmd:"gmap-error"},function(e){g(e.page,e.tab)})});var U=e(c("#","map"));"object"==typeof t.google?U.each(function(){e(this).GmapRS()}):U.each(function(){e(this).empty().html('<iframe src="'+r.altgmap+'?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')});O=[];e('select[id^="'+c("!","service")+'"]').on("change",function(){e(this).children("option").each(function(t,n){O[e(n).text()]=t,o[a][3+t]=e(n).prop("selected")?"o":"x"}),"o"!==o[a][3+(Number(o[a][2])||0)]&&(o[a][2]=e(this).prop("selectedIndex")),N(o)}).change(),e(c("@","get_location")).on("click",function(){var n,i=e(c("#","whois")),l=e(c("#","apis")),d=e(c("@","service")).val(),u=e.trim(e(c("@","ip_address")).val());if(u&&d){if(e(c("@","anonymize")).prop("checked")){if(/[^0-9a-f\.:]/.test(u))return h(null,"illegal format."),!1;-1!==u.indexOf(".")?u=u.replace(/\.\w+$/,".0"):(-1===(u=(u=u.split(":")).splice(0,4).join(":")).indexOf("::")&&(u+="::"),u=u.replace(/:{3,}/,"::")),e(c("@","ip_address")).val(u)}i.hide().empty(),l.hide().empty(),n=e.whois(u,function(t){var n,r="";for(n=0;n<t.length;++n)r+="<tr><td>"+t[n].name+"</td><td>"+t[n].value+"</td></tr>";i.html('<fieldset id="'+c("section-1")+'" class="'+c("field")+' panel panel-default" data-section="1"><legend class="panel-heading"><h3 id="'+c("whois-title")+'" class="'+c("dropdown")+'">Whois</h3></legend><div class="panel-body '+c("border")+'"><table class="'+c("table")+'">'+r+"</table></div></fieldset>").fadeIn("slow"),"x"===o[a][1]&&e(c("#","whois-title")).trigger("click")}),v("loading",{cmd:"search",ip:u,which:d},function(n){var i,d="",p=Number(o[a][2])||0;for(i in n)n.hasOwnProperty(i)&&(d+='<a href="#!" class="nav-tab'+(O[i]===p?" nav-tab-active":"")+'" data-index="'+O[i]+"\" data-api='"+s(JSON.stringify(n[i]))+"'>"+i+"</a>");l.html('<div class="nav-tab-wrapper">'+d+'</div><div id="ip-geo-block-geoinfo"></div>').fadeIn("slow").on("click","a",function(){var n,i=e(this),l=e(this).data("api"),d="",p=s(l.latitude||"0"),h=s(l.longitude||"0"),f=l.latitude||l.longitude?7:2;for(n in i.parent().children("a").removeClass("nav-tab-active"),i.addClass("nav-tab-active"),o[a][2]=i.data("index"),N(o),l)l.hasOwnProperty(n)&&(n=s(n),d+='<li><span class="'+c("title")+'">'+n+' : </span><span class="'+c("result")+'">'+s(l[n])+"</span></li>");"object"==typeof t.google?U.GmapRS("deleteMarkers").GmapRS("addMarker",{latitude:p,longitude:h,title:u,content:"<ul>"+d+"</ul>",show:!0,zoom:f}):(U.empty().html('<iframe src="'+r.altgmap+"?q="+p+","+h+"&z="+f+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>'),e(c("#","geoinfo")).html("<ul>"+d+"</ul>"))}).find(".nav-tab-active").trigger("click")},[n])}return!1}),e(c("@","ip_address")).on("keypress",function(t){if(t.which&&13===t.which||t.keyCode&&13===t.keyCode)return e(c("@","get_location")).click(),!1}),e(c("@","ip_address")).val()&&e(c("@","get_location")).click();break;case 5:I(a),e("input[name="+c("duration")+"]:radio").on("click",function(){var t=e('div[class*="paginate"]').find('a[class*="current"]').text();o[a][2]=e(this).val()||0,o[a][3]=o[a][3]||2,o[a][4]=o[a][4]||1,N(o),A.ajaxStacked(o[a][2],o[a][3],o[a][4],t-1)}),e(c("#","open-new")).on("change",function(){var t=e(this).prop("checked");o[a][1]=t?"o":"x",N(o),e(c("#","section-0 svg")).find("a").each(function(){this.setAttribute("target",t?"_blank":"_self")})}),e(c("#","apply-layout")).on("click",function(){var t=e(c("#","select-layout"));o[a][3]=t.find('select[name="rows"] option:selected').val(),o[a][4]=t.find('select[name="cols"] option:selected').val(),N(o)}),e("ul.wp-submenu>li.wp-first-item").removeClass("current").next().addClass("current")}})}(jQuery,window,document);
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
+ !function(e,t,n,i){var a=!1,o=[],r=e(t).width(),l=IP_GEO_BLOCK,c=IP_GEO_BLOCK_AUTH;function s(e,t){var n={".":".ip-geo-block-","#":"#ip-geo-block-","@":"#ip_geo_block_settings_",$:"ip-geo-block-","%":"ip_geo_block_","!":"ip_geo_block_settings_"};return t!==i?n[e]+t:n.$+e}function d(e){return e?function(e){return e.toString().replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]}).replace(/&amp;(#\d{2,4}|\w{4,7});/g,"&$1;")}(e.toString().replace(/(<([^>]+)>)/gi,"")):""}function u(n,a){var l=e(t).width();l!==r&&(r=l,o[n]===i&&(o[n]={id:!1,callback:a}),e(t).off("resize").on("resize",function(){return!1!==o[n].id&&t.clearTimeout(o[n].id),o[n].time=t.setTimeout(o[n].callback,200),!1}))}function p(t,n){n?e(s("#",t)).addClass(s("loading")):e(s("#",t)).removeClass(s("loading"))}function h(e,n){t.confirm(d(e))&&n()}function f(e,n,i){t.alert(d(n||l.msg[11].replace("%s",i)+" ("+e+")"))}function g(){f(null,d(l.msg[9]))}function m(e,n){-1!==t.location.href.indexOf(e)&&(t.location=d(e)+(n?"&"+d(n):"")+"&"+(c.key?c.key+"="+c.nonce:""))}function v(t,n,i,o){t&&p(t,!0),n.action=l.action,n.nonce=l.nonce,e.post(l.url,n).done(function(e){i&&i(e)}).fail(function(e){a||f(e.status,e.responseText,n.action)}).always(function(){t&&("object"==typeof o?e.when.apply(e,o).then(function(){p(t,!1)}):p(t,!1))})}function b(e,t){v(e,{cmd:"clear-"+e,which:t},function(e){m(e.page,e.tab)})}function k(e){return e.stopImmediatePropagation(),!1}function w(e,t){t?e.removeClass("folding-disable"):(e.children(s(".","hide")).hide(),e.addClass("folding-disable"),e.removeClass(s("dropdown")).addClass(s("dropup")))}function x(t,n,i){var a=t.prop("type")||"",o=0===a.indexOf("checkbox")&&t.is(":checked")||0===a.indexOf("select")&&"0"!==t.val();t.siblings('input[name^="'+s("%","settings")+'"]:checkbox').prop("disabled",!o),e.isArray(n)?e.each(n,function(t,n){e(n).nextAll(s(".","settings-folding")).each(function(n,a){w(e(a),o&&i[t])})}):n.nextAll(s(".","settings-folding")).each(function(t,n){w(e(n),o&&i)})}function y(t){var n=s("@","validation_ajax_");w(t.closest("ul").next(),e(n+"1").is(":checked")||e(n+"2").is(":checked"))}function _(e){return String(e).replace(/[a-z]/gi,function(e){return String.fromCharCode(e.charCodeAt(0)+(e.toLowerCase()<"n"?13:-13))})}function C(e){return function(e){return t.btoa(e)}(_(e))}function P(e){return _(function(e){return t.atob(e)}(e))}function S(t){var n=t.is(":checked"),i=e(s("@","public_target_rule")),a=e(s("@","public_behavior")),o=t.closest("tr").nextAll("tr");o.find('[name^="'+s("%","settings")+'"]').prop("disabled",!n),o.find(s(".","desc")).css("opacity",n?1:.5),x(t,[i,a],["1"===i.val(),a.val()]),n&&a.change()}function A(t,n){t&&("string"==typeof t&&(t=JSON.parse(t)),n&&(e('input[type="checkbox"]').prop("checked",!1).change(),e("input[name*=providers]").prop("disabled",!1).change()),e(s("#","import")).closest("form").deserialize(t),e(s("@","exception_admin")+","+s("@","validation_mimetype")).change(),e('select[name*="'+s("%","settings")+'"]').change(),e(s("@","validation_login")).change(),S(e(s("@","validation_public"))),y(e(s("@","validation_ajax_1"))),n&&(n=s("%","settings[providers][IPInfoDB]"),e(s("@","providers_IPInfoDB")).prop("checked",!!t[n])))}e.fn.deserialize=function(t){return this.each(function(){var n,i,a,o=this,r={};for(n in t)if(t.hasOwnProperty(n))try{i=d(decodeURIComponent(n)),a=d(decodeURIComponent(t[n])),r.hasOwnProperty(i)||(r[i]=[]),r[i].push(a)}catch(e){}e.each(r,function(t,i){"hidden"!==(n=e('[name="'+t+'"]:input',o).val(i)).attr("type")&&n.before('<span style="color:red">*</span>')})})};var O={dataPie:[],viewPie:[],drawPie:function(a){var o,r;O.dataPie[a]===i&&((o=O.dataPie[a]=new t.google.visualization.DataTable).addColumn("string","Country"),o.addColumn("number","Requests"),r=e.parseJSON(e("#"+a).attr("data-"+a)),O.dataPie[a].addRows(r)),O.viewPie[a]===i&&(O.viewPie[a]=new t.google.visualization.PieChart(n.getElementById(a))),O.dataPie[a]!==i&&O.viewPie[a]!==i&&0<(o=e("#"+a).width())&&O.viewPie[a].draw(O.dataPie[a],{backgroundColor:{fill:"transparent"},chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:[],viewLine:[],drawLine:function(a,o){var r,l,c;if(O.dataLine[a]===i){for((r=O.dataLine[a]=new t.google.visualization.DataTable).addColumn(o,"Date"),r.addColumn("number","comment"),r.addColumn("number","xmlrpc"),r.addColumn("number","login"),r.addColumn("number","admin"),r.addColumn("number","public"),l=(c=e.parseJSON(e("#"+a).attr("data-"+a))).length,r=0;r<l;++r)c[r][0]=new Date(1e3*c[r][0]);O.dataLine[a].addRows(c)}O.viewLine[a]===i&&(O.viewLine[a]=new t.google.visualization.LineChart(n.getElementById(a))),O.dataLine[a]!==i&&O.viewLine[a]!==i&&0<(r=e("#"+a).width())&&O.viewLine[a].draw(O.dataLine[a],{legend:{position:"bottom"},backgroundColor:{fill:"transparent"},hAxis:{format:"MM/dd"+("datetime"===o?" HH:mm":"")},vAxis:{textPosition:r>320?"out":"in"},chartArea:{left:r>320?"10%":0,top:"5%",width:"100%",height:"75%"}})},dataStacked:[],viewStacked:[],drawStacked:function(a){var o,r,l,c,u=e("#"+d(a));O.dataStacked[a]===i&&(l=e.parseJSON(u.attr("data-"+a)))&&(l.unshift(["site","comment","xmlrpc","login","admin","poblic",{role:"link"}]),O.dataStacked[a]=t.google.visualization.arrayToDataTable(l)),O.viewStacked[a]===i&&(O.viewStacked[a]=new t.google.visualization.BarChart(n.getElementById(a)),t.google.visualization.events.addListener(O.viewStacked[a],"animationfinish",function(){var t,i,o,r=[],l=O.dataStacked[a],c=l.getNumberOfRows(),d=e(s("#","open-new")).prop("checked");for(t=0;t<c;t++)r.push({label:l.getValue(t,0),link:l.getValue(t,6)});c="http://www.w3.org/1999/xlink",u.find("text").each(function(e,t){"g"===(o=t.parentNode).tagName.toLowerCase()&&-1!==(e=function(e,t){var n,i=t.length;for(e=e.replace("…",""),n=0;n<i;++n)if(t.hasOwnProperty(n)&&0===t[n].label.indexOf(e))return n;return-1}(t.textContent,r))&&((i=n.createElementNS("http://www.w3.org/2000/svg","a")).setAttributeNS(c,"xlink:href",r[e].link),i.setAttributeNS(c,"title",r[e].label),i.setAttribute("target",d?"_blank":"_self"),i.setAttribute("class","site"),i.appendChild(o.removeChild(t)),o.appendChild(i),r.splice(e,1))})})),0<(r=u.width())&&O.dataStacked[a]!==i&&O.viewStacked[a]!==i&&(o=s("range"),c=e.parseJSON(e("."+o).attr("data-"+o)),o=40*(l=O.dataStacked[a]).getNumberOfRows(),O.viewStacked[a].draw(l,{width:r,height:o+80,allowHtml:!0,isStacked:!0,legend:{position:"top"},chartArea:{top:50,left:90,width:"100%",height:o},hAxis:{minValue:0,maxValue:c[1]},backgroundColor:{fill:"transparent"},animation:{startup:!0,duration:200,easing:"out"}}))},ajaxStacked:function(t,n,a,o){v(null,{cmd:"restore-network",which:t=Math.max(0,Math.min(4,t)),offset:(n=5*Math.max(1,Math.min(5,n)))*a*o,length:n},function(t){var a,o,r,l,c;t=function(e,t){var n,i,a=Math.ceil(e.length/t),o=[];for(n=0;n<a;++n)i=n*t,o.push(e.slice(i,i+t));return o}(t,n),e(s(".","network")).each(function(s,d){if(t[s]!==i){for(l=e(d).attr("id"),c=O.dataStacked[l],r=Math.min(n,t[s].length),a=0;a<r;++a)for(o=1;o<=5;o++)c.setValue(a,o,t[s][a][o]);O.drawStacked(l)}})})}};function I(n){"object"==typeof t.google&&(1===n?e(s("#","chart-countries")).length&&(O.drawPie(s("chart-countries")),O.drawLine(s("chart-daily"),"date")):5===n&&e(s(".","network")).each(function(t,n){O.drawStacked(e(n).attr("id"))}))}function N(e){if("object"==typeof t.google){var n=["corechart"];5===e&&n.push("bar"),t.google.charts.load("current",{packages:n,callback:function(){I(e)}}),u("draw-chart."+e,function(){I(e)})}}function D(t){var n,a,o=[];e.each(t,function(e,t){if(o[e]="",t!==i&&(a=t.length))for(o[e]=(t[0]||"o").toString(),n=1;n<a;++n)o[e]+=(t[n]||"o").toString()}),wpCookies!==i&&wpCookies.setHash("ip-geo-block",o,new Date(Date.now()+2592e6),c.home+c.admin)}function j(t){var a=function(e){var t,n=wpCookies!==i&&wpCookies.getHash("ip-geo-block")||[];for(t in n)n.hasOwnProperty(t)&&(n[t]=n[t].replace(/[^ox\d]/gi,"").split(""));return n[e]===i&&(n[e]=[]),n}(t);return e(n).on("click","form>h2,h3",function(){return function(e,t,n){var i,a=e.closest("fieldset").data("section"),o=e.parent().nextAll(".panel-body").toggle();e.toggleClass(s("dropup")).toggleClass(s("dropdown")),(i=e.hasClass(s("dropdown")))?o.addClass(s("border")).trigger(s("show-body")):o.removeClass(s("border")),n[t][a]=i?"o":"x",D(n),I(t)}(e(this),t,a),!1}),e(s("#","toggle-sections")).on("click",function(){var n,i=e(s(".","field")).find("h2,h3"),o=[s("dropdown"),s("dropup")],r=i.filter("."+o[0]).length;return i.each(function(i){(n=e(this)).removeClass(o.join(" ")).addClass(r?o[1]:o[0]),n=n.parent().nextAll(".panel-body").toggle(!r),r?n.removeClass(s("border")):n.addClass(s("border")).trigger("show-body"),a[t][i]=r?"x":"o"}),D(a),I(t),!1}),a}function T(t){e("body").append('<div style="display:none"><form method="POST" id="'+s("export-form")+'" action="'+l.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+l.action+'" /><input type="hidden" name="nonce" value="'+l.nonce+'" /><input type="hidden" name="cmd" value="'+t+'" /><input type="hidden" name="data" value="" id="'+s("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+s("file-dialog")+'" /></div>')}function L(e,t,n,i){var a,o;return(a=e.cloneNode(!1)).setAttribute("title",d(n)),(o=t.cloneNode(!1)).setAttribute("class","dashicons dashicons-"+i),a.appendChild(o),a}function R(n,a,o,r){var c=Number(r[n][1===n?3:2])||0;c=[10,25,50,100][c],e.extend(!0,e.fn.dataTable.defaults,o,{dom:"tlp",serverSide:!1,autoWidth:!1,processing:!0,deferRender:!0,language:{emptyTable:l.i18n[1],loadingRecords:l.i18n[0],processing:l.i18n[0],zeroRecords:l.i18n[2],lengthMenu:"_MENU_",paginate:{first:"&laquo;",last:"&raquo;",next:"&rsaquo;",previous:"&lsaquo;"}},responsive:{details:{type:"column",target:"td:nth-child(n+2)"}},columnDefs:[{width:"1.25em",targets:0},{orderable:!1,targets:0},{searchable:!1,targets:0},{targets:[0],data:null,defaultContent:'<input type="checkbox">'}],pagingType:"full_numbers",lengthMenu:[10,25,50,100],pageLength:c,scroller:!0,scrollY:1e4,scrollCollapse:!0,drawCallback:function(t){var n=e(s("#",a.tableID)).find("td.dataTables_empty"),i="restore-logs"===a.ajaxCMD?3:2;i>t.iDraw?n.html(l.i18n[0]):i===t.iDraw&&(n.html(l.i18n[1]),(n=e(s("@","search_filter"))).val()&&n.trigger("keyup"))}});var d=e(s("#",a.tableID)).DataTable({ajax:{url:l.url,type:"POST",data:{cmd:a.ajaxCMD,action:l.action,nonce:l.nonce}},mark:!0}),p=function(){d.columns.adjust().responsive.recalc().draw(!1)};return u("draw-table."+n,p),e(s("#",a.sectionID)).find(".panel-body").off(s("show-body")).on(s("show-body"),function(){return p(),!1}).off("change").on("change",'th>input[type="checkbox"]',function(){var t=e(this).prop("checked");return e(s("#",a.tableID)).find('td>input[type="checkbox"]').prop("checked",t),!1}),e(s("#","select-target")).off("change").on("change",function(){var t=e(this).find('input[name="'+s("target")+'"]:checked').val();return d.columns(a.targetColumn).search("all"!==t?t:"").draw(),!1}).trigger("change"),e(s("#","bulk-action")).off("click").on("click",function(){var t,o,r=e(this).prev().val(),c=/(<([^>]+)>)/gi,u=/data-hash=[\W]([\w]+)[\W]/i,p={IP:[],AS:[]},h=d.$("input:checked");return!!r&&(h.length?(h.each(function(){o=d.cell(this.parentNode).data(),t=("bulk-action-remove"===r||"bulk-action-ip-erase"===r)&&(t=o[a.columnIP].match(u))?","+t[1]:"",p.IP.push(o[a.columnIP].replace(c,"")+t),p.AS.push(o[a.columnAS].replace(c,""))}),p.IP.length&&v("loading",{cmd:r,which:p},function(t){t.page!==i?m(t.page,"tab="+n):t&&(d.ajax.reload(),e(s("#",a.tableID)).find('th input[type="checkbox"]').prop("checked",!1))}),!1):(f(null,l.msg[10]),!1))}),e(s("@","search_filter")).off("keyup").on("keyup",function(){return d.search(this.value,!1,!0,!/[A-Z]/.test(this.value)).draw(),!1}),e(s("#","reset-filter")).off("click").on("click",function(){return e(s("@","search_filter")).val(""),d.search("").draw(),!1}),e(s("@","clear_all")).off("click").on("click",function(){return h(l.msg[0],function(){b(1===n?"cache":"logs",null)}),!1}),e("table"+s(".","dataTable")+" tbody").on("click","a",function(){var i,a,o=t.location.search.slice(1).split("&"),r=o.length,l={};for(i=0;i<r;++i)l[(a=o[i].split("="))[0]]=a[1];for(i in l.tab=1===n?4:2,l.s=e(this).text().replace(/[^\w\.\:\*]/,""),a=[],l)l.hasOwnProperty(i)&&a.push(i+"="+l[i]);return t.open(t.location.pathname+"?"+a.join("&"),"_blank"),!1}),e(s("#",a.tableID)).on("length.dt",function(e,t,i){r[n][1===n?3:2]={10:0,25:1,50:2,100:3}[i]||0,D(r)}),d}e(function(){var o=Number(l.tab)||0,r=j(o);switch(e(s(".","inhibit")).on("submit",function(){return!1}),e(t).on("beforeunload",function(){a=!0}),o){case 0:var u=s("%","settings");e('[id^="'+s("scan-")+'"]').on("click",function(){var t=e(this),n=t.attr("id"),i=t.parent();return v(n.replace(/^.*(?:scan)/,"scanning"),{cmd:"scan-code",which:n.replace(s("scan-"),"")},function(e){var t,n;for(t in i.children("ul").length||i.append('<ul id="'+s("code-list")+'"></ul>'),i=i.children("ul").empty(),e)e.hasOwnProperty(t)&&("string"==typeof e[t=d(t)]?n=d(e[t]):(n=d(e[t].code),t='<abbr title="'+d(e[t].type)+'">'+t+"</abbr>"),i.append("<li>"+t+' : <span class="'+s("notice")+'">'+n+"</span></li>"));i.show("slow")}),!1}),e(s("@","matching_rule")).on("change",function(){var t=this.value;return e(s("@","white_list")).closest("tr").toggle("0"===t),e(s("@","black_list")).closest("tr").toggle("1"===t),!1}).change(),e(s(".","icon-cidr")).on("click",function(){var n=e(s("#","admin-styles-css")).get(0).href,i=t.open("about:blank","","width=560,height=170");return n=n.slice(0,n.lastIndexOf("css/")),i.document.write('<!DOCTYPE html><html lang=en><meta charset=utf-8><title>CIDR calculator for IPv4 / IPv6</title><link href="'+n+'css/cidr.min.css?v=.1" rel=stylesheet><div class="row container"><div class=row id=i><fieldset class="col span_11"><legend>Range <input id=a type=button value=Clear tabindex=1></legend><textarea id=c name=range placeholder="192.168.0.0 - 192.168.255.255" rows=5 wrap=off tabindex=2></textarea></fieldset><ul class="col span_2" id=h><li class=row><input id=e type=button value=&rarr; class="col span_24" tabindex=3><li class=row><input id=f type=button value=&larr; class="col span_24" tabindex=6></ul><fieldset class="col span_11"><legend>CIDR <input id=b type=button value=Clear tabindex=4></legend><textarea id=d name=cidr placeholder=192.168.0.0/16 rows=5 wrap=off tabindex=5></textarea></fieldset></div><div class=row id=j><span class=col id=g> </span></div></div><script src="'+n+'js/cidr.min.js?v=.1"><\/script>'),i.document.close(),!1}),e(s("@","validation_mimetype")).on("change",function(t){var n=e(this),i=Number(n.val());return n.nextAll(s(".","settings-folding")).each(function(t,n){w(e(n),i===t+1||i&&2===t)}),k(t)}).change(),e('select[name*="response_code"]').on("change",function(t){var n=e(this),i=parseInt(n.val()/100,10),a=n.closest("tr").nextAll("tr");return 0<=n.attr("name").indexOf("public")&&-1===Number(e(s("@","public_matching_rule")).val())?(a.each(function(t){1>=t&&e(this).hide()}),k(t)):(i<=3?a.each(function(t){0===t?e(this).show():1===t&&e(this).hide()}):a.each(function(t){0===t?e(this).hide():1===t&&e(this).show()}),k(t))}).change(),e(s("#","decode")).on("click",function(){var t=e(s("@","signature")),n=t.val();return-1===n.search(/,/)?t.val(P(n)):t.val(C(n)),!1}),e(s("@","validation_login")).on("change",function(t){var n=e(this);return x(n,n,u),k(t)}).change(),v(null,{cmd:"get-actions"},function(t){var i,a,o,r,u=e(s("#","list-admin")),p=n.createElement("li"),h=n.createElement("input"),f=n.createElement("label"),g=n.createElement("dfn"),m=n.createElement("span");for(r in t)t.hasOwnProperty(r)&&(r=d(r),u.find("#"+(o=s("!","exception_admin_"+r))).size()||((i=h.cloneNode(!1)).setAttribute("id",o),i.setAttribute("value",r),i.setAttribute("type","checkbox"),(a=p.cloneNode(!1)).appendChild(i),(i=f.cloneNode(!1)).setAttribute("for",o),i.appendChild(n.createTextNode(r)),a.appendChild(i),1&t[r]&&a.appendChild(L(g,m,l.msg[5],"lock")),2&t[r]&&a.appendChild(L(g,m,l.msg[6],"unlock")),u.append(a)));e(s(".","icon-unlock")).on("click",function(){return e(s("#","list-admin")+">li").filter(function(){return!e(this).find(".dashicons-unlock").length}).toggle(),!1}),e(s("@","exception_admin")).on("change",function(t){var n=e.grep(e(this).val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});return e(s("#","list-admin")).find("input").each(function(){var t=e(this),i=t.val();t.prop("checked",-1!==e.inArray(i,n))}),k(t)}).change(),e(s("#","list-admin")).on("click","input",function(){var t,n=e(this),i=e(s("@","exception_admin")),a=n.val(),o=e.grep(i.val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});-1===(t=e.inArray(a,o))?o.push(a):o.splice(t,1),i.val(o.join(",")).change()}),e(s(".","icon-find")).on("click",function(){var t,n,i,a,o=e(this),r=[],u=0,p=d(l.msg[8]),h=d(o.data("target"));return e(s("#","find-"+h)).empty(),o.next().children(s(".","find-desc")).show(),(o=e(s("#","list-"+h))).children("li").each(function(t,n){r.push(e(n).find("input").val())}),v("find-"+h,{cmd:"find-"+h},function(f){var g;for(g in f)f.hasOwnProperty(g)&&(++u,t=d(f[g]),g=d(g),n=e.inArray(g,r),i=s("!","exception_"+h+"_"+g),a="admin"===h?t+"="+g:"/"+t+"/"+g+"/",a='<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="'+c.sites[0]+c.admin+"options-general.php?page=ip-geo-block&tab=4&s="+encodeURIComponent(a)+'" title="'+p.replace("%s",a)+'" target="_blank"><span></span></a>',n<0?(r.push(g),o.prepend('<li><input id="'+i+'" value="'+g+'" type="checkbox" '+("admin"===h?"/>":"name=ip_geo_block_settings[exception]["+h+"]["+g+"] />")+'<label for="'+i+'">'+g+"</lable>"+a+"</li>")):(i=o.find("#"+i).parent()).find("a").length||i.append(a));e(s("@","exception_"+h)).trigger("change"),e(s("#","find-"+h)).append(' <span class="ip-geo-block-warn">'+d(l.msg[7].replace("%d",u))+"</span>")}),!1})}),e('input[id^="'+s("!","validation_ajax_")+'"]').on("change",function(){y(e(this))}).change(),e(s("@","validation_public")).on("change",function(t){return S(e(this)),k(t)}).change(),e(s("@","public_matching_rule")).on("change",function(t){var n=this.value;return e(s("@","public_white_list")).closest("tr").toggle("0"===n),e(s("@","public_black_list")).closest("tr").toggle("1"===n),e(s("@","public_response_code")).change().closest("tr").toggle("-1"!==n),k(t)}).change(),e(s("@","public_behavior")).on("change",function(t){var n=e(this);return w(n.siblings("ul"),n.prop("checked")),k(t)}).change(),e(s("@","update")).on("click",function(){return v("download",{cmd:"download"},function(t){var n,i,a;for(n in t)if(t.hasOwnProperty(n))for(i in a=t[n])a.hasOwnProperty(i)&&(a[i=d(i)].filename&&e(s("@",n+"_"+i+"_path")).val(d(a[i].filename)),a[i].message&&e(s("#",n+"-"+i)).text(d(a[i].message)))}),!1}),e(s("@","restrict_api")).on("change",function(){e('input[class*="remote"]').prop("disabled",e(this).prop("checked"))}).trigger("change"),e(s("@","save_statistics")).on("change",function(){return e(s("@","validation_recdays")).prop("disabled",!e(this).prop("checked")),!1}).trigger("change"),e(s("@","validation_reclogs")).on("change",function(){var t=e(this);t.parent().parent().nextAll().find('input[id*="validation"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),e(s("@","cache_hold")).on("change",function(){var t=e(this).prop("checked");e('input[name*="[cache_time]"]').prop("disabled",!t),e('select[id*="login_fails"]').prop("disabled",!t)}).trigger("change"),e(s("@","comment_pos")).on("change",function(){var t=e(this);t.nextAll('input[type="text"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),T("validate"),e(s("#","export")).on("click",function(){if(JSON===i)return g(),!1;var t=u,n={};return e.each(e(this).closest("form").serializeArray(),function(e,i){-1!==i.name.indexOf(t)&&(n[i.name]=i.value)}),n[t+="[signature]"]=C(n[t]),e(s("#","export-data")).val(JSON.stringify(n)),e(s("#","export-form")).submit(),!1}),e(s("#","file-dialog")).on("change",function(e){if(t.FileReader===i)return g(),!1;var n,a=e.target.files[0];return a&&function(e,n){var i=new t.FileReader;i.onload=function(e){n&&n(e.target.result)},i.onerror=function(e){f("Error",e.target.error.code)},i.readAsText(e)}(a,function(e){(e=JSON.parse(e))[n=u+"[signature]"]!==i&&(e[n]=C(e[n])),v("export-import",{cmd:"validate",data:JSON.stringify(e)},function(e){A(e,!0)})}),!1}),e(s("#","import")).on("click",function(){return e(s("#","file-dialog")).click(),!1}),e(s("#","default")).on("click",function(){return h(l.msg[0],function(){v("pre-defined",{cmd:"import-default"},function(e){A(e,!0)})}),!1}),e(s("#","preferred")).on("click",function(){return h(l.msg[0],function(){v("pre-defined",{cmd:"import-preferred"},function(e){A(e,!1)})}),!1}),e(s("@","reset_live")).on("click",function(){return v("reset-live",{cmd:"reset-live"}),!1}),e(s("#","login-link")).on("click",function(){var t=e(this),n=s("$","primary");return t.hasClass(n)?v("login-loading",{cmd:"generate-link"},function(i){t.text(l.msg[3]),t.removeClass(n).nextAll(s(".","desc")).remove(),e('<p class="ip-geo-block-desc"></p>').appendTo(t.parent()).append(l.msg[4],'<a href="'+i.link+'" title="'+l.msg[1]+'" target=_blank>'+i.link+"</a></p>")}):h(l.msg[0],function(){v("login-loading",{cmd:"delete-link"},function(){t.text(l.msg[2]),t.addClass(n).nextAll(s(".","desc")).remove()})}),!1}),e(s("@","diag_tables")).on("click",function(){return h(l.msg[0],function(){var e;v(e="diag-tables",{cmd:e},function(e){m(e.page,e.tab)})}),!1}),e(s("#","show-info")).on("click",function(){e(s("#","wp-info")).empty(),v("wp-info",{cmd:"show-info"},function(t){var n,i=[];for(n in t)t.hasOwnProperty(n)&&i.push("- "+n+" "+t[n]);return e(s("#","wp-info")).html('<textarea class="regular-text code" rows="'+i.length+'">'+i.join("\n")+"</textarea>").find("textarea").select(),!1})}),e('select[name^="'+u+'"]').on("change",function(){var t,n,i,a=e(this);return t=a,i=s(".","desc"),t.next(i).empty(),(n=t.children("option:selected").data("desc"))&&t.next(i).html(e.parseHTML(n)),x(a,a,u),!1}).change(),e(s(".","icon-cycle")).on("click",function(){var t,n=e(this).nextAll("li"),i=n.find(s("@","exception_admin")),a=n.find("input:checkbox").filter(":visible"),o=a.filter(":checked").length;return a.prop("checked",!o),i.length&&(o?i.val(""):(t=[],a.each(function(n,i){t.push(e(i).val())}),i.val(t.join(",")))),e(this).blur(),!1}),e(s(".","settings-folding>dfn")).on("click",function(){var t=s("drop"),n=e(this).parent();return n.children(s(".","hide")).toggle(),n.toggleClass(t+"up").toggleClass(t+"down"),n.hasClass(t+"up")&&n.children("div").hide(),!1}),e("#submit").on("click",function(){var t=e(s("@","signature")),n=t.val();return-1!==n.indexOf(",")&&t.val(C(n)),!0});break;case 1:N(o);var p=0;e(s("#","sort-slug")).on("click",function(){var t=e(this).closest("ol"),n=t.children("li");(p=!p)?n.sort(function(t,n){return e(t).text()>e(n).text()}):n.sort(function(t,n){return Number(e(t).text().replace(/^.*\((\d+)\)$/,"$1"))<=Number(e(n).text().replace(/^.*\((\d+)\)$/,"$1"))}),t.children("li").remove(),n.appendTo(t)}),e(s("@","clear_statistics")).on("click",function(){return h(l.msg[0],function(){b("statistics",null)}),!1}),e(s("@","clear_logs")).on("click",function(){return h(l.msg[0],function(){b("logs",null)}),!1}),R(o,{tableID:"statistics-cache",ajaxCMD:"restore-cache",sectionID:"section-2",targetColumn:4,columnIP:1,columnAS:3},{columns:[{title:'<input type="checkbox">'},{title:l.i18n[3]},{title:l.i18n[4]},{title:l.i18n[5]},{title:l.i18n[6]},{title:l.i18n[7]},{title:l.i18n[8]},{title:l.i18n[9]}],columnDefs:[{responsivePriority:0,targets:0},{responsivePriority:1,targets:1},{responsivePriority:2,targets:2},{responsivePriority:6,targets:3},{responsivePriority:7,targets:4},{responsivePriority:3,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{className:"all",targets:[0,1,2,5]}]},r),T("export-cache"),e(s("#","export-cache")).on("click",function(){return e(s("#","export-form")).submit(),!1});break;case 4:var _={tableID:"validation-logs",sectionID:"section-0",targetColumn:6,columnIP:3,columnAS:5},I={columns:[{title:'<input type="checkbox">'},{title:""},{title:l.i18n[10]},{title:l.i18n[3]},{title:l.i18n[4]},{title:l.i18n[5]},{title:l.i18n[7]},{title:l.i18n[11]},{title:l.i18n[12]},{title:l.i18n[13]},{title:l.i18n[14]},{title:l.i18n[15]}],columnDefs:[{responsivePriority:11,targets:0},{responsivePriority:0,targets:1},{responsivePriority:1,targets:2},{responsivePriority:2,targets:3},{responsivePriority:3,targets:4},{responsivePriority:6,targets:5},{responsivePriority:4,targets:6},{responsivePriority:5,targets:7},{responsivePriority:7,targets:8},{responsivePriority:8,targets:9},{responsivePriority:9,targets:10},{responsivePriority:10,targets:11},{visible:!1,targets:1},{className:"all",targets:[0,2,3,4]},{className:"none",targets:[8,9,10,11]}]},M=null,z=null,E=e(s("#","live-loading")),$=null,J=function(){M&&(t.clearTimeout(M),M=null),z&&(E.removeClass(s("live-timer")),t.clearTimeout(z),z=null)},B=function(){J(),v("live-loading",{cmd:"live-start"},function(e){if(e.error)f(null,e.error);else if(e.data.length){var n,i=e.data.length;for(n=0;n<i;n++)$.row.add(e.data[n]);$.draw(!1)}M=t.setTimeout(B,1e3*l.interval)})},q=function(e,t){J(),v(null,{cmd:e||"live-stop",callback:t})},H=s(""),V=function(t,n,i){-1===n[7].indexOf("pass")?e(t).addClass(H+i+"blocked"):e(t).addClass(H+i+"passed")},G=e(s("#","live-log")),U=e(s("#","live-update"));e(s("#","validation-logs")).on("animationend",function(){return e(this).find('tr[class*="'+H+'new"]').each(function(){var t=e(this);-1!==t.prop("class").indexOf("passed")?t.addClass(H+"passed").removeClass(H+"new-passed"):t.addClass(H+"blocked").removeClass(H+"new-blocked")}),!1}),G.on("change",function(){switch(e('input[name="'+s("live-log")+'"]:checked').val()){case"start":B();break;case"pause":q("live-pause",function(){E.addClass(s("live-timer")),z=t.setTimeout(function(){J(),e(s("#","live-log-stop")).prop("checked",!0)},1e3*l.timeout)});break;case"stop":q()}}),U.on("change",function(){var t=G.closest("tr"),n=U.prop("checked");return r[o][1]=n?"o":"x",D(r),$&&$.clear().destroy(),n?(t.show().next().next().next().nextAll().hide(),_.ajaxCMD="live-stop",I.order=[1,"desc"],I.createdRow=function(e,t){V(e,t,"new-")}):(t.hide().next().next().next().nextAll().show(),_.ajaxCMD="restore-logs",I.order=[0,""],I.createdRow=function(e,t){V(e,t,"")}),e(s("#","live-log-stop")).trigger("click"),$=R(o,_,I,r),!1}).trigger("change"),e(s("#","logs-preset")).on("click","a",function(){var t=e(this).data("value");return e(s("@","search_filter")).val(t),$.search(t,!1,!0,!/[A-Z]/.test(t)).draw(),!1}),T("export-logs"),e(s("#","export-logs")).on("click",function(){return e(s("#","export-form")).submit(),!1});break;case 2:e(t).on(s("gmap-error"),function(){v(null,{cmd:"gmap-error"},function(e){m(e.page,e.tab)})});var W=e(s("#","map"));"object"==typeof t.google?W.each(function(){e(this).GmapRS()}):W.each(function(){e(this).empty().html('<iframe src="'+l.altgmap+'?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')});I=[];e('select[id^="'+s("!","service")+'"]').on("change",function(){e(this).children("option").each(function(t,n){I[e(n).text()]=t,r[o][3+t]=e(n).prop("selected")?"o":"x"}),"o"!==r[o][3+(Number(r[o][2])||0)]&&(r[o][2]=e(this).prop("selectedIndex")),D(r)}).change(),e(s("@","get_location")).on("click",function(){var n,i=e(s("#","whois")),a=e(s("#","apis")),c=e(s("@","service")).val(),u=e.trim(e(s("@","ip_address")).val());if(u&&c){if(e(s("@","anonymize")).prop("checked")){if(/[^0-9a-f\.:]/.test(u))return f(null,"illegal format."),!1;-1!==u.indexOf(".")?u=u.replace(/\.\w+$/,".0"):(-1===(u=(u=u.split(":")).splice(0,4).join(":")).indexOf("::")&&(u+="::"),u=u.replace(/:{3,}/,"::")),e(s("@","ip_address")).val(u)}i.hide().empty(),a.hide().empty(),n=e.whois(u,function(t){var n,a="";for(n=0;n<t.length;++n)a+="<tr><td>"+t[n].name+"</td><td>"+t[n].value+"</td></tr>";i.html('<fieldset id="'+s("section-1")+'" class="'+s("field")+' panel panel-default" data-section="1"><legend class="panel-heading"><h3 id="'+s("whois-title")+'" class="'+s("dropdown")+'">Whois</h3></legend><div class="panel-body '+s("border")+'"><table class="'+s("table")+'">'+a+"</table></div></fieldset>").fadeIn("slow"),"x"===r[o][1]&&e(s("#","whois-title")).trigger("click")}),v("loading",{cmd:"search",ip:u,which:c},function(n){var i,c="",p=Number(r[o][2])||0;for(i in n)n.hasOwnProperty(i)&&(c+='<a href="#!" class="nav-tab'+(I[i]===p?" nav-tab-active":"")+'" data-index="'+I[i]+"\" data-api='"+d(JSON.stringify(n[i]))+"'>"+i+"</a>");a.html('<div class="nav-tab-wrapper">'+c+'</div><div id="ip-geo-block-geoinfo"></div>').fadeIn("slow").on("click","a",function(){var n,i=e(this),a=e(this).data("api"),c="",p=d(a.latitude||"0"),h=d(a.longitude||"0"),f=a.latitude||a.longitude?7:2;for(n in i.parent().children("a").removeClass("nav-tab-active"),i.addClass("nav-tab-active"),r[o][2]=i.data("index"),D(r),a)a.hasOwnProperty(n)&&(n=d(n),c+='<li><span class="'+s("title")+'">'+n+' : </span><span class="'+s("result")+'">'+d(a[n])+"</span></li>");"object"==typeof t.google?W.GmapRS("deleteMarkers").GmapRS("addMarker",{latitude:p,longitude:h,title:u,content:"<ul>"+c+"</ul>",show:!0,zoom:f}):(W.empty().html('<iframe src="'+l.altgmap+"?q="+p+","+h+"&z="+f+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>'),e(s("#","geoinfo")).html("<ul>"+c+"</ul>"))}).find(".nav-tab-active").trigger("click")},[n])}return!1}),e(s("@","ip_address")).on("keypress",function(t){if(t.which&&13===t.which||t.keyCode&&13===t.keyCode)return e(s("@","get_location")).click(),!1}),e(s("@","ip_address")).val()&&e(s("@","get_location")).click();break;case 5:N(o),e("input[name="+s("duration")+"]:radio").on("click",function(){var t=e('div[class*="paginate"]').find('a[class*="current"]').text();r[o][2]=e(this).val()||0,r[o][3]=r[o][3]||2,r[o][4]=r[o][4]||1,D(r),O.ajaxStacked(r[o][2],r[o][3],r[o][4],t-1)}),e(s("#","open-new")).on("change",function(){var t=e(this).prop("checked");r[o][1]=t?"o":"x",D(r),e(s("#","section-0 svg")).find("a").each(function(){this.setAttribute("target",t?"_blank":"_self")})}),e(s("#","apply-layout")).on("click",function(){var t=e(s("#","select-layout"));r[o][3]=t.find('select[name="rows"] option:selected').val(),r[o][4]=t.find('select[name="cols"] option:selected').val(),D(r)}),e("ul.wp-submenu>li.wp-first-item").removeClass("current").next().addClass("current")}})}(jQuery,window,document);
admin/js/authenticate.js CHANGED
@@ -5,9 +5,10 @@
5
  * This software is released under the MIT License.
6
  */
7
  (function ($, window, document) {
 
8
  var auth = IP_GEO_BLOCK_AUTH, wpzep = {
9
  init: false,
10
- name: 'ip-geo-block-auth-nonce'
11
  },
12
 
13
  // regular expression to find target for is_admin()
@@ -15,14 +16,14 @@
15
  '^(?:' + (auth.home || '') + auth.admin
16
  + '|' + (auth.home || '') + auth.plugins
17
  + '|' + (auth.home || '') + auth.themes
18
- + ')(?:.*\.php|.*\/)?$'
19
  ),
20
 
21
  // `theme-install.php` eats the query and set it to `request[browse]` as a parameter
22
  theme_featured = function (data) {
23
- var i = data.length;
24
  while (i-- > 0) {
25
- if (data[i].indexOf('request%5Bbrowse%5D=ip-geo-block-auth') !== -1) {
26
  data[i] = 'request%5Bbrowse%5D=featured'; // correct the parameter
27
  break;
28
  }
@@ -32,9 +33,9 @@
32
 
33
  // `upload.php` eats the query and set it to `query[ip-geo-block-auth-nonce]` as a parameter
34
  media_library = function (data) {
35
- var i = data.length;
36
  while (i-- > 0) {
37
- if (data[i].indexOf('query%5Bip-geo-block-auth-nonce%5D=') !== -1) {
38
  delete data[i];
39
  break;
40
  }
@@ -62,7 +63,7 @@
62
  html = elem.innerHTML.replace(/["']/g, function (match) {
63
  return {
64
  '"': '&quot;',
65
- "'": '&#39;'
66
  }[match];
67
  });
68
  elem = '';
@@ -201,17 +202,18 @@
201
  }
202
 
203
  var data = uri.query ? uri.query.split('&') : [],
204
- i = data.length;
 
205
 
206
  // remove an old nonce
207
  while (i-- > 0) {
208
- if (data[i].indexOf(wpzep.name) === 0) {
209
  data.splice(i, 1);
210
  break;
211
  }
212
  }
213
 
214
- data.push(wpzep.name + '=' + encodeURIComponent(nonce));//RFC3986
215
  uri.query = data.join('&');
216
 
217
  return compose_uri(uri);
@@ -261,7 +263,7 @@
261
 
262
  // Check if current page is admin area and the target of wp-zep
263
  function is_backend() {
264
- return (is_admin(window.location.pathname) === 1 || window.location.search.indexOf(wpzep.name) >= 0);
265
  }
266
 
267
  // Check if url belongs to multisite
@@ -269,7 +271,7 @@
269
  var i, j, n = auth.sites.length;
270
 
271
  for (i = 0; i < n; ++i) {
272
- j = url.indexOf(auth.sites[i] + '/')
273
  if (0 <= j && j <= 6) { // from `//` to `https://`
274
  return true;
275
  }
@@ -314,7 +316,7 @@
314
  // multipart/form-data (XMLHttpRequest Level 2)
315
  // IE10+, Firefox 4+, Safari 5+, Android 3+
316
  if (typeof window.FormData !== 'undefined' && settings.data instanceof FormData) {
317
- settings.data.append(wpzep.name, auth.nonce);
318
  }
319
 
320
  // application/x-www-form-urlencoded
@@ -333,7 +335,7 @@
333
  if (callback) {
334
  data = callback(data);
335
  }
336
- data.push(wpzep.name + '=' + encodeURIComponent(auth.nonce));//RFC3986
337
  settings.data = data.join('&');
338
  }
339
  }
@@ -369,8 +371,7 @@
369
 
370
  if (typeof $.fn.onFirst === 'undefined') {
371
  $.fn.onFirst = function(types, selector) {
372
- var type, $el = $(this),
373
- isDelegated = typeof selector === 'string';
374
 
375
  $.fn.on.apply($el, arguments);
376
 
@@ -406,9 +407,9 @@
406
  if (check_uri(uri)) {
407
  admin = is_admin(href);
408
  }
409
- /*
410
- console.log('href:' + href, uri, 'admin:' + admin, 'is_backend:' + is_backend(), 'is_multisite:' + is_multisite(href));
411
- //*/
412
  // if context menu then continue and should be checked in check_nonce()
413
  if ('click' !== event.type) {
414
  return;
@@ -455,15 +456,15 @@
455
  });
456
 
457
  elem.onFirst('submit', 'form', function (/*event*/) {
458
- var $this = $(this),
459
- action = $this.attr('action'); // possibly 'undefined'
460
 
461
  // if admin area then add the nonce
462
  if (is_admin(action) === 1) {
463
  if ('post' === ($this.attr('method') || '').toLowerCase()) {
464
  $this.attr('action', add_query_nonce(action, auth.nonce));
465
  } else {
466
- $this.append('<input type="hidden" name="' + wpzep.name + '" value="' + auth.nonce + '">');
 
467
  }
468
  }
469
  });
@@ -487,11 +488,10 @@
487
 
488
  // Restore post revisions (wp-admin/revisions.php @since 2.6.0)
489
  if ('undefined' !== typeof window._wpRevisionsSettings) {
490
- var i, data = window._wpRevisionsSettings.revisionData,
491
- n = data.length;
492
 
493
  for (i = 0; i < n; ++i) {
494
- if (-1 === data[i].restoreUrl.indexOf(wpzep.name)) {
495
  window._wpRevisionsSettings.revisionData[i].restoreUrl = add_query_nonce(data[i].restoreUrl, auth.nonce);
496
  }
497
  }
5
  * This software is released under the MIT License.
6
  */
7
  (function ($, window, document) {
8
+ // https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Description
9
  var auth = IP_GEO_BLOCK_AUTH, wpzep = {
10
  init: false,
11
+ regexp: new RegExp(auth.key + '(?:=|%3D)\\w+')
12
  },
13
 
14
  // regular expression to find target for is_admin()
16
  '^(?:' + (auth.home || '') + auth.admin
17
  + '|' + (auth.home || '') + auth.plugins
18
  + '|' + (auth.home || '') + auth.themes
19
+ + ')(?:.*\\.php|.*\\/)?$'
20
  ),
21
 
22
  // `theme-install.php` eats the query and set it to `request[browse]` as a parameter
23
  theme_featured = function (data) {
24
+ var i = data.length, q = 'request%5Bbrowse%5D=' + auth.key;
25
  while (i-- > 0) {
26
+ if (data[i].indexOf(q) !== -1) {
27
  data[i] = 'request%5Bbrowse%5D=featured'; // correct the parameter
28
  break;
29
  }
33
 
34
  // `upload.php` eats the query and set it to `query[ip-geo-block-auth-nonce]` as a parameter
35
  media_library = function (data) {
36
+ var i = data.length, q = 'query%5B' + auth.key + '%5D=';
37
  while (i-- > 0) {
38
+ if (data[i].indexOf(q) !== -1) {
39
  delete data[i];
40
  break;
41
  }
63
  html = elem.innerHTML.replace(/["']/g, function (match) {
64
  return {
65
  '"': '&quot;',
66
+ "'": '&#39;' //"
67
  }[match];
68
  });
69
  elem = '';
202
  }
203
 
204
  var data = uri.query ? uri.query.split('&') : [],
205
+ i = data.length,
206
+ q = auth.key + '=';
207
 
208
  // remove an old nonce
209
  while (i-- > 0) {
210
+ if (data[i].indexOf(q) === 0) { // or `wpzep.regexp.test(data[i])`
211
  data.splice(i, 1);
212
  break;
213
  }
214
  }
215
 
216
+ data.push(auth.key + '=' + encodeURIComponent(nonce)); //RFC3986
217
  uri.query = data.join('&');
218
 
219
  return compose_uri(uri);
263
 
264
  // Check if current page is admin area and the target of wp-zep
265
  function is_backend() {
266
+ return (is_admin(window.location.pathname) === 1 || wpzep.regexp(window.location.search));
267
  }
268
 
269
  // Check if url belongs to multisite
271
  var i, j, n = auth.sites.length;
272
 
273
  for (i = 0; i < n; ++i) {
274
+ j = url.indexOf(auth.sites[i] + '/');
275
  if (0 <= j && j <= 6) { // from `//` to `https://`
276
  return true;
277
  }
316
  // multipart/form-data (XMLHttpRequest Level 2)
317
  // IE10+, Firefox 4+, Safari 5+, Android 3+
318
  if (typeof window.FormData !== 'undefined' && settings.data instanceof FormData) {
319
+ settings.data.append(auth.key, auth.nonce);
320
  }
321
 
322
  // application/x-www-form-urlencoded
335
  if (callback) {
336
  data = callback(data);
337
  }
338
+ data.push(auth.key + '=' + encodeURIComponent(auth.nonce)); //RFC3986
339
  settings.data = data.join('&');
340
  }
341
  }
371
 
372
  if (typeof $.fn.onFirst === 'undefined') {
373
  $.fn.onFirst = function(types, selector) {
374
+ var type, $el = $(this), isDelegated = (typeof selector === 'string');
 
375
 
376
  $.fn.on.apply($el, arguments);
377
 
407
  if (check_uri(uri)) {
408
  admin = is_admin(href);
409
  }
410
+
411
+ // console.log('href:' + href, uri, 'admin:' + admin, 'is_backend:' + is_backend(), 'is_multisite:' + is_multisite(href));
412
+
413
  // if context menu then continue and should be checked in check_nonce()
414
  if ('click' !== event.type) {
415
  return;
456
  });
457
 
458
  elem.onFirst('submit', 'form', function (/*event*/) {
459
+ var $this = $(this), action = $this.attr('action'); // possibly 'undefined'
 
460
 
461
  // if admin area then add the nonce
462
  if (is_admin(action) === 1) {
463
  if ('post' === ($this.attr('method') || '').toLowerCase()) {
464
  $this.attr('action', add_query_nonce(action, auth.nonce));
465
  } else {
466
+ // https://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-name
467
+ $this.append('<input type="hidden" name="' + auth.key + '" value="' + auth.nonce + '">');
468
  }
469
  }
470
  });
488
 
489
  // Restore post revisions (wp-admin/revisions.php @since 2.6.0)
490
  if ('undefined' !== typeof window._wpRevisionsSettings) {
491
+ var i, data = window._wpRevisionsSettings.revisionData, n = data.length;
 
492
 
493
  for (i = 0; i < n; ++i) {
494
+ if (!wpzep.regexp.test(data[i].restoreUrl)) {
495
  window._wpRevisionsSettings.revisionData[i].restoreUrl = add_query_nonce(data[i].restoreUrl, auth.nonce);
496
  }
497
  }
admin/js/authenticate.min.js CHANGED
@@ -3,7 +3,7 @@
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
- !function(e,t,n){var r=IP_GEO_BLOCK_AUTH,o={init:!1,name:"ip-geo-block-auth-nonce"},a=new RegExp("^(?:"+(r.home||"")+r.admin+"|"+(r.home||"")+r.plugins+"|"+(r.home||"")+r.themes+")(?:.*.php|.*/)?$"),i=function(e){for(var t=e.length;t-- >0;)if(-1!==e[t].indexOf("request%5Bbrowse%5D=ip-geo-block-auth")){e[t]="request%5Bbrowse%5D=featured";break}return e},h={"upload.php":function(e){for(var t=e.length;t-- >0;)if(-1!==e[t].indexOf("query%5Bip-geo-block-auth-nonce%5D=")){delete e[t];break}return e},"theme-install.php":i,"network/theme-install.php":i};function c(e){var t=(e=e?e.toString():"").match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:t[1]||"",relative:t[2]||"",authority:t[3]||"",path:t[4]||"",query:t[5]||"",fragment:t[6]||""}}var s,l=function(){var e=null;try{new URL("/","http://example.com/")}catch(t){try{e=(new DOMParser).parseFromString("<html><head></head><body></body></html>","text/html")}catch(t){e=n.implementation.createHTMLDocument("")}}return function(r,o){var a,i,h,c=n;if(r=void 0!==r?r:t.location.href,null===e){void 0===o&&(o=t.location.href);try{h=new URL(r,o)}catch(e){h=new URL(r,t.location.href)}}else{if(void 0!==o){for(c=e;c.head.firstChild;)c.head.removeChild(c.head.firstChild);(a=c.createElement("base")).setAttribute("href",o),c.head.appendChild(a)}(i=c.createElement("a")).setAttribute("href",r),i.setAttribute("href",i.href),"http:"===(h={protocol:i.protocol,host:i.host,hostname:i.hostname,port:i.port,pathname:i.pathname,search:i.search,hash:i.hash,href:i.href,username:"",password:"",origin:i.origin||null}).protocol&&"80"===h.port?(h.port="",h.host=h.host.replace(/:80$/,"")):"https:"===h.protocol&&"443"===h.port&&(h.port="",h.host=h.host.replace(/:443$/,"")),"http:"!==h.protocol&&"https:"!==h.protocol||(h.pathname&&"/"!==h.pathname.charAt(0)&&(h.pathname="/"+h.pathname),h.origin||(h.origin=h.protocol+"//"+h.hostname+(h.port?":"+h.port:"")))}if(h.username||h.password)throw new URIError(h.username+":"+h.password);return h}}();function p(e,n){"object"!=typeof e&&(e=c(e||t.location.href));for(var r=e.query?e.query.split("&"):[],a=r.length;a-- >0;)if(0===r[a].indexOf(o.name)){r.splice(a,1);break}return r.push(o.name+"="+encodeURIComponent(n)),e.query=r.join("&"),function(e){return(e.scheme?e.scheme+":":"")+(e.relative+e.path)+(e.query?"?"+e.query:"")+(e.fragment?"#"+e.fragment:"")}(e)}function f(e){return(!e.scheme||/^https?$/.test(e.scheme))&&(e.path||e.query)}function u(e){try{e=e||t.location.pathname||""}catch(t){e=""}var n=c(e.toLowerCase());if(f(n)){if((n=l(e)).origin!==t.location.origin)return-1;if((e=a.exec(n.pathname))&&(0<=e[0].indexOf(r.admin+"admin-")||0<=e[0].indexOf(r.admin)||0<=e[0].indexOf(r.plugins)||0<=e[0].indexOf(r.themes)))return 1}return 0}function m(e){return/\/$/.test(e.path)}function d(e){return-1!==(e.attr("rel")||"").indexOf("nofollow")}
7
  /*
8
  * jQuery.bind-first library v0.2.3 (jquery >= 1.7)
9
  * Copyright (c) 2013 Vladimir Zhuravlev
@@ -13,4 +13,4 @@
13
  *
14
  * Date: Thu Feb 6 10:13:59 ICT 2014
15
  */
16
- function v(t,n,r){var o=e._data(t[0]).events[n],a=r?o.splice(o.delegateCount-1,1)[0]:o.pop();o.splice(r?0:o.delegateCount||0,0,a)}function g(t,n,r){var o=n.split(/\s+/);t.each(function(t){for(t=0;t<o.length;++t){var n=e.trim(o[t]).match(/[^\.]+/i)[0];v(e(this),n,r)}})}function w(){if(!o.init){if(o.init=!0,e("img").each(function(){var t=e(this).attr("src");1===u(t)&&e(this).attr("src",p(t,r.nonce))}),void 0!==t._wpRevisionsSettings){var n,a=t._wpRevisionsSettings.revisionData,i=a.length;for(n=0;n<i;++n)-1===a[n].restoreUrl.indexOf(o.name)&&(t._wpRevisionsSettings.revisionData[n].restoreUrl=p(a[n].restoreUrl,r.nonce))}e("#toplevel_page_ip-geo-block li.wp-first-item").each(function(){var t=e(this);t.css("display","IP Geo Block"===t.children("a").text()?"none":"block")})}}e.ajaxPrefilter(function(e){if(1===u(e.url)&&!e.url.match(/async-upload\.php$/))if(void 0!==t.FormData&&e.data instanceof FormData)e.data.append(o.name,r.nonce);else{var n,a,i=c(e.url);void 0===e.data||i.query?e.url=p(i,r.nonce):(n=e.data?e.data.split("&"):[],s=(s=t.location.pathname).replace(r.home+r.admin,""),(a=h.hasOwnProperty(s)?h[s]:null)&&(n=a(n)),n.push(o.name+"="+encodeURIComponent(r.nonce)),e.data=n.join("&"))}var s}),void 0===e.fn.onFirst&&(e.fn.onFirst=function(t,n){var r,o=e(this),a="string"==typeof n;if(e.fn.on.apply(o,arguments),"object"==typeof t)for(r in t)t.hasOwnProperty(r)&&g(o,r,a);else"string"==typeof t&&g(o,t,a);return o}),e(t).on("error",function(){w()}),e(function(){w()}),(s=e(n)).onFirst("click contextmenu","a",function(a){var i,h,s=0,l=e(this),v=l.attr("href")||"",g=c(v);if(f(g)&&(s=u(v)),"click"===a.type)if(1===s)l.attr("href",m(g)?v:p(v,d(l)?"nofollow":r.nonce));else if(-1===s&&(1===u(t.location.pathname)||t.location.search.indexOf(o.name)>=0))if("_self"===l.attr("target")||function(e){var t,n,o=r.sites.length;for(t=0;t<o;++t)if(0<=(n=e.indexOf(r.sites[t]+"/"))&&n<=6)return!0;return!1}(v))l.attr("href",m(g)?v:p(v,d(l)?"nofollow":r.nonce));else if(!this.hasAttribute("onClick"))return v=v.split(";",2).shift(),i=decodeURIComponent(this.href),(h=n.createElement("div")).appendChild(n.createTextNode(i)),i=h.innerHTML.replace(/["']/g,function(e){return{'"':"&quot;","'":"&#39;"}[e]}),h="",v=i,(s=t.open()).document.write('<!DOCTYPE html><html><head><meta name="referrer" content="never" /><meta name="referrer" content="no-referrer" /><meta http-equiv="refresh" content="0; url='+v+'" />'+(e("body").hasClass("webview")?'<script>window.location.replace("'+v+'")<\/script>':"")+"</head></html>"),s.document.close(),a.stopImmediatePropagation(),!1}),s.onFirst("submit","form",function(){var t=e(this),n=t.attr("action");1===u(n)&&("post"===(t.attr("method")||"").toLowerCase()?t.attr("action",p(n,r.nonce)):t.append('<input type="hidden" name="'+o.name+'" value="'+r.nonce+'">'))})}(jQuery,window,document);
3
  * Copyright (c) 2013-2018 tokkonopapa (tokkonopapa@yahoo.com)
4
  * This software is released under the MIT License.
5
  */
6
+ !function(e,t,n){var r=IP_GEO_BLOCK_AUTH,o={init:!1,regexp:new RegExp(r.key+"(?:=|%3D)\\w+")},a=new RegExp("^(?:"+(r.home||"")+r.admin+"|"+(r.home||"")+r.plugins+"|"+(r.home||"")+r.themes+")(?:.*\\.php|.*\\/)?$"),i=function(e){for(var t=e.length,n="request%5Bbrowse%5D="+r.key;t-- >0;)if(-1!==e[t].indexOf(n)){e[t]="request%5Bbrowse%5D=featured";break}return e},h={"upload.php":function(e){for(var t=e.length,n="query%5B"+r.key+"%5D=";t-- >0;)if(-1!==e[t].indexOf(n)){delete e[t];break}return e},"theme-install.php":i,"network/theme-install.php":i};function s(e){var t=(e=e?e.toString():"").match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:t[1]||"",relative:t[2]||"",authority:t[3]||"",path:t[4]||"",query:t[5]||"",fragment:t[6]||""}}var c,p=function(){var e=null;try{new URL("/","http://example.com/")}catch(t){try{e=(new DOMParser).parseFromString("<html><head></head><body></body></html>","text/html")}catch(t){e=n.implementation.createHTMLDocument("")}}return function(r,o){var a,i,h,s=n;if(r=void 0!==r?r:t.location.href,null===e){void 0===o&&(o=t.location.href);try{h=new URL(r,o)}catch(e){h=new URL(r,t.location.href)}}else{if(void 0!==o){for(s=e;s.head.firstChild;)s.head.removeChild(s.head.firstChild);(a=s.createElement("base")).setAttribute("href",o),s.head.appendChild(a)}(i=s.createElement("a")).setAttribute("href",r),i.setAttribute("href",i.href),"http:"===(h={protocol:i.protocol,host:i.host,hostname:i.hostname,port:i.port,pathname:i.pathname,search:i.search,hash:i.hash,href:i.href,username:"",password:"",origin:i.origin||null}).protocol&&"80"===h.port?(h.port="",h.host=h.host.replace(/:80$/,"")):"https:"===h.protocol&&"443"===h.port&&(h.port="",h.host=h.host.replace(/:443$/,"")),"http:"!==h.protocol&&"https:"!==h.protocol||(h.pathname&&"/"!==h.pathname.charAt(0)&&(h.pathname="/"+h.pathname),h.origin||(h.origin=h.protocol+"//"+h.hostname+(h.port?":"+h.port:"")))}if(h.username||h.password)throw new URIError(h.username+":"+h.password);return h}}();function l(e,n){"object"!=typeof e&&(e=s(e||t.location.href));for(var o=e.query?e.query.split("&"):[],a=o.length,i=r.key+"=";a-- >0;)if(0===o[a].indexOf(i)){o.splice(a,1);break}return o.push(r.key+"="+encodeURIComponent(n)),e.query=o.join("&"),function(e){return(e.scheme?e.scheme+":":"")+(e.relative+e.path)+(e.query?"?"+e.query:"")+(e.fragment?"#"+e.fragment:"")}(e)}function f(e){return(!e.scheme||/^https?$/.test(e.scheme))&&(e.path||e.query)}function u(e){try{e=e||t.location.pathname||""}catch(t){e=""}var n=s(e.toLowerCase());if(f(n)){if((n=p(e)).origin!==t.location.origin)return-1;if((e=a.exec(n.pathname))&&(0<=e[0].indexOf(r.admin+"admin-")||0<=e[0].indexOf(r.admin)||0<=e[0].indexOf(r.plugins)||0<=e[0].indexOf(r.themes)))return 1}return 0}function m(e){return/\/$/.test(e.path)}function d(e){return-1!==(e.attr("rel")||"").indexOf("nofollow")}
7
  /*
8
  * jQuery.bind-first library v0.2.3 (jquery >= 1.7)
9
  * Copyright (c) 2013 Vladimir Zhuravlev
13
  *
14
  * Date: Thu Feb 6 10:13:59 ICT 2014
15
  */
16
+ function v(t,n,r){var o=e._data(t[0]).events[n],a=r?o.splice(o.delegateCount-1,1)[0]:o.pop();o.splice(r?0:o.delegateCount||0,0,a)}function g(t,n,r){var o=n.split(/\s+/);t.each(function(t){for(t=0;t<o.length;++t){var n=e.trim(o[t]).match(/[^\.]+/i)[0];v(e(this),n,r)}})}function y(){if(!o.init){if(o.init=!0,e("img").each(function(){var t=e(this).attr("src");1===u(t)&&e(this).attr("src",l(t,r.nonce))}),void 0!==t._wpRevisionsSettings){var n,a=t._wpRevisionsSettings.revisionData,i=a.length;for(n=0;n<i;++n)o.regexp.test(a[n].restoreUrl)||(t._wpRevisionsSettings.revisionData[n].restoreUrl=l(a[n].restoreUrl,r.nonce))}e("#toplevel_page_ip-geo-block li.wp-first-item").each(function(){var t=e(this);t.css("display","IP Geo Block"===t.children("a").text()?"none":"block")})}}e.ajaxPrefilter(function(e){if(1===u(e.url)&&!e.url.match(/async-upload\.php$/))if(void 0!==t.FormData&&e.data instanceof FormData)e.data.append(r.key,r.nonce);else{var n,o,a=s(e.url);void 0===e.data||a.query?e.url=l(a,r.nonce):(n=e.data?e.data.split("&"):[],i=(i=t.location.pathname).replace(r.home+r.admin,""),(o=h.hasOwnProperty(i)?h[i]:null)&&(n=o(n)),n.push(r.key+"="+encodeURIComponent(r.nonce)),e.data=n.join("&"))}var i}),void 0===e.fn.onFirst&&(e.fn.onFirst=function(t,n){var r,o=e(this),a="string"==typeof n;if(e.fn.on.apply(o,arguments),"object"==typeof t)for(r in t)t.hasOwnProperty(r)&&g(o,r,a);else"string"==typeof t&&g(o,t,a);return o}),e(t).on("error",function(){y()}),e(function(){y()}),(c=e(n)).onFirst("click contextmenu","a",function(a){var i,h,c=0,p=e(this),v=p.attr("href")||"",g=s(v);if(f(g)&&(c=u(v)),"click"===a.type)if(1===c)p.attr("href",m(g)?v:l(v,d(p)?"nofollow":r.nonce));else if(-1===c&&(1===u(t.location.pathname)||o.regexp(t.location.search)))if("_self"===p.attr("target")||function(e){var t,n,o=r.sites.length;for(t=0;t<o;++t)if(0<=(n=e.indexOf(r.sites[t]+"/"))&&n<=6)return!0;return!1}(v))p.attr("href",m(g)?v:l(v,d(p)?"nofollow":r.nonce));else if(!this.hasAttribute("onClick"))return v=v.split(";",2).shift(),i=decodeURIComponent(this.href),(h=n.createElement("div")).appendChild(n.createTextNode(i)),i=h.innerHTML.replace(/["']/g,function(e){return{'"':"&quot;","'":"&#39;"}[e]}),h="",v=i,(c=t.open()).document.write('<!DOCTYPE html><html><head><meta name="referrer" content="never" /><meta name="referrer" content="no-referrer" /><meta http-equiv="refresh" content="0; url='+v+'" />'+(e("body").hasClass("webview")?'<script>window.location.replace("'+v+'")<\/script>':"")+"</head></html>"),c.document.close(),a.stopImmediatePropagation(),!1}),c.onFirst("submit","form",function(){var t=e(this),n=t.attr("action");1===u(n)&&("post"===(t.attr("method")||"").toLowerCase()?t.attr("action",l(n,r.nonce)):t.append('<input type="hidden" name="'+r.key+'" value="'+r.nonce+'">'))})}(jQuery,window,document);
admin/js/cidr.min.js CHANGED
@@ -1,11 +1,11 @@
1
- /*
2
- Project: IP address range - CIDR converter
3
- Copyright (c) 2018 tokkonopapa (tokkonopapa@yahoo.com)
4
- The following libraries are ported to this program.
5
- - S1lentium/IPTools (https://github.com/S1lentium/IPTools)
6
- - kvz/locutus (https://github.com/kvz/locutus)
7
- - MikeMcl/big.js (https://github.com/MikeMcl/big.js/)
8
- - jQuery (https://jquery.com/)
9
- This software is released under the MIT License.
10
- */
11
  (function(B,S,y){function aa(){function a(c){if(!(this instanceof a))return void 0===c?aa():new a(c);if(c instanceof a)this.s=c.s,this.e=c.e,this.c=c.c.slice();else{var b,e;if(0===c&&0>1/c)c="-0";else if(!ia.test(c+=""))throw Error("Invalid number");"-"==c.charAt(0)?(c=c.slice(1),this.s=-1):this.s=1;-1<(b=c.indexOf("."))&&(c=c.replace(".",""));0<(e=c.search(/e/i))?(0>b&&(b=e),b+=+c.slice(e+1),c=c.substring(0,e)):0>b&&(b=c.length);var f=c.length;for(e=0;e<f&&"0"==c.charAt(e);++e);if(e===f)this.c=[this.e=0];else{for(;0<f&&"0"==c.charAt(--f););this.e=b-e-1;this.c=[];for(b=0;e<=f;)this.c[b++]=+c.charAt(e++)}}this.constructor=a}a.prototype=n;a.DP=20;a.RM=1;a.NE=-7;a.PE=21;a.version="5.0.2";return a}function N(a,c,b,e){var f=a.c,g=a.e+c+1;if(g<f.length){if(1===b)e=5<=f[g];else if(2===b)e=5<f[g]||5==f[g]&&(e||0>g||void 0!==f[g+1]||f[g-1]&1);else if(3===b)e=e||void 0!==f[g]||0>g;else if(e=!1,0!==b)throw Error("Invalid rounding mode");if(1>g)f.length=1,e?(a.e=-c,f[0]=1):f[0]=a.e=0;else{f.length=g--;if(e)for(;9<++f[g];)f[g]=0,g--||(++a.e,f.unshift(1));for(g=f.length;!f[--g];)f.pop()}}else if(0>b||3<b||b!==~~b)throw Error("Invalid rounding mode");return a}function J(a,c,b,e){var f=a.constructor,g=!a.c[0];if(void 0!==b){if(b!==~~b||b<(3===c)||1E6<b)throw Error(3===c?"Invalid precision":"Invalid decimal places");a=new f(a);b=e-a.e;a.c.length>++e&&N(a,b,f.RM);for(2===c&&(e=a.e+b+1);a.c.length<e;)a.c.push(0)}var h=a.e;var k=a.c.join("");b=k.length;if(2!==c&&(1===c||3===c&&e<=h||h<=f.NE||h>=f.PE))k=k.charAt(0)+(1<b?"."+k.slice(1):"")+(0>h?"e":"e+")+h;else if(0>h){for(;++h;)k="0"+k;k="0."+k}else if(0<h)if(++h>b)for(h-=b;h--;)k+="0";else h<b&&(k=k.slice(0,h)+"."+k.slice(h));else 1<b&&(k=k.charAt(0)+"."+k.slice(1));return 0>a.s&&(!g||4===c)?"-"+k:k}function ba(a){var c=Object.getPrototypeOf,b={},e=b.toString,f=b.hasOwnProperty;b=f.toString;if(!a||"[object Object]"!==e.call(a))return!1;a=c(a);if(!a)return!0;a=f.call(a,"constructor")&&a.constructor;return"function"===typeof a&&b.call(a)===b.call(Object)}function H(){var a,c,b,e=arguments[0]||{},f=1,g=arguments.length,h=!1;"boolean"===typeof e&&(h=e,e=arguments[f]||{},f++);"object"===typeof e||"function"===typeof e&&"number"!==typeof e.nodeType||(e={});f===g&&(e=this,f--);for(;f<g;f++)if(null!=(a=arguments[f]))for(c in a){var k=e[c];var m=a[c];e!==m&&(h&&m&&(ba(m)||(b=Array.isArray(m)))?(b?(b=!1,k=k&&Array.isArray(k)?k:[]):k=k&&ba(k)?k:{},e[c]=H(h,k,m)):m!==y&&(e[c]=m))}return e}function O(a,c){return p(a).plus(c)}function ca(){var a=/%%|%(?:(\d+)\$)?((?:[-+#0 ]|'[\s\S])*)(\d+)?(?:\.(\d*))?([\s\S])/g,c=arguments,b=0,e=c[b++],f=function(a,b,c,e){c||(c=" ");b=a.length>=b?"":Array(1+b-a.length>>>0).join(c);return e?a+b:b+a},g=function(a,b,c,e,g){var h=e-a.length;0<h&&(a=c||"0"!==g?f(a,e,g,c):[a.slice(0,b.length),f("",h,"0",!0),a.slice(b.length)].join(""));return a},h=function(a,b,c,e,h,k){a=f((a>>>0).toString(b),h||0,"0",!1);return g(a,"",c,e,k)},k=function(a,b,c,e,f){null!==e&&e!==y&&(a=a.slice(0,e));return g(a,"",b,c,f)},m=function(a,e,m,l,n,t){if("%%"===a)return"%";a=" ";var D=!1;var p="";var u;var F=0;for(u=m.length;F<u;F++)switch(m.charAt(F)){case " ":case "0":a=m.charAt(F);break;case "+":p="+";break;case "-":D=!0;break;case "'":F+1<u&&(a=m.charAt(F+1),F++)}l=l?+l:0;if(!isFinite(l))throw Error("Width must be finite");n=n?+n:"d"===t?0:-1<"fFeE".indexOf(t)?6:y;if(e&&0===+e)throw Error("Argument number must be greater than zero");if(e&&+e>=c.length)throw Error("Too few arguments");e=e?c[+e]:c[b++];switch(t){case "%":return"%";case "s":return k(e+"",D,l,n,a);case "c":return k(String.fromCharCode(+e),D,l,n,a);case "b":return h(e,2,D,l,n,a);case "o":return h(e,8,D,l,n,a);case "x":return h(e,16,D,l,n,a);case "X":return h(e,16,D,l,n,a).toUpperCase();case "u":return h(e,10,D,l,n,a);case "i":case "d":return e=+e||0,e=Math.round(e-e%1),p=0>e?"-":p,e=p+f(String(Math.abs(e)),n,"0",!1),D&&"0"===a&&(a=" "),g(e,p,D,l,a);case "e":case "E":case "f":case "F":case "g":case "G":return e=+e,p=0>e?"-":p,m=["toExponential","toFixed","toPrecision"]["efg".indexOf(t.toLowerCase())],t=["toString","toUpperCase"]["eEfFgG".indexOf(t)%2],e=p+Math.abs(e)[m](n),g(e,p,D,l,a)[t]();default:return""}};try{return e.replace(a,m)}catch(D){return!1}}function da(){var a=arguments,c=a.length,b=0;if(0===c)throw Error("Empty isset");for(;b!==c;){if(a[b]===y||null===a[b])return!1;b++}return!0}function ea(a){return("number"===typeof a||"string"===typeof a&&-1===" \n\r\t\f\x0B\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000".indexOf(a.slice(-1)))&&""!==a&&!isNaN(a)}function v(a,c){return a===c?0:a>c?1:-1}function E(a,c,b){a=(a+"").indexOf(c,b||0);return-1===a?!1:a}function K(a,c,b){a+="";var e=a.length;0>c&&(c+=e);b!==y&&(e=0>b?b+e:b+c);return c>=a.length||0>c||c>e?!1:a.slice(c,e)}function T(a,c){var b,e=0;if(null===a||a===y)return 0;if(a.constructor!==Array&&a.constructor!==Object)return 1;"COUNT_RECURSIVE"===c&&(c=1);1!==c&&(c=0);for(b in a)a.hasOwnProperty(b)&&(e++,1!==c||!a[b]||a[b].constructor!==Array&&a[b].constructor!==Object||(e+=T(a[b],1)));return e}function U(a,c){var b="",e="",f="";1===arguments.length&&(c=a,a="");if("object"===typeof c){if("[object Array]"===Object.prototype.toString.call(c))return c.join(a);for(b in c)e+=f+c[b],f=a;return e}return c}function P(a,c,b){if(2>arguments.length||a===y||c===y)return null;if(""===a||!1===a||null===a)return!1;if("function"===typeof a||"object"===typeof a||"function"===typeof c||"object"===typeof c)return{0:""};!0===a&&(a="1");a+="";var e=(c+"").split(a);if(b===y)return e;0===b&&(b=1);if(0<b)return b>=e.length?e:e.slice(0,b-1).concat([e.slice(b-1).join(a)]);if(-b>=e.length)return[];e.splice(e.length+b);return e}function fa(a,c){null===c&&(c=1);if(null===a||1>c)return!1;a+="";for(var b=[],e=0,f=a.length;e<f;)b.push(a.slice(e,e+=c));return b}function G(a,c,b,e){var f="",g=function(a,b){for(var c="";c.length<b;)c+=a;return c=c.substr(0,b)};a+="";b=b!==y?b:" ";0!==e&&1!==e&&2!==e&&(e=1);0<(f=c-a.length)&&(0===e?a=g(b,f)+a:1===e?a+=g(b,f):2===e&&(f=g(b,Math.ceil(f/2)),a=(f+a+f).substr(0,c)));return a}function ja(a){var c="",b="";if(a.hasOwnProperty("length"))return a.length?a.pop():null;for(c in a)a.hasOwnProperty(c)&&(b=c);return b?(c=a[b],delete a[b],c):null}function ka(a){for(var c=arguments.length,b=arguments,e=null,f=a,g=b[1].length,h=0,k=1,m=0,l=[],n=[];h<g;){for(;k<c;)l[m++]=b[k++][h];m=0;k=1;if(a){if("string"===typeof a)f=B[a];else if("object"===typeof a&&a.length){e="string"===typeof a[0]?B[a[0]]:a[0];if(e===y)throw Error("Object not found: "+a[0]);f="string"===typeof a[1]?e[a[1]]:a[1]}n[h++]=f.apply(e,l)}else n[h++]=l;l=[]}return n}function V(a,c){var b="[object Array]"===Object.prototype.toString.call(a),e=c?{}:[];if(b&&!c)return a.slice(0).reverse();if(c){var f=[];for(g in a)f.push(g);for(b=f.length;b--;){var g=f[b];e[g]=a[g]}}else for(g in a)e.unshift(a[g]);return e}function la(a){a=(a+"").replace(/[^01]/gi,"");return parseInt(a,2)}function ma(a){0>a&&(a=4294967295+a+1);return parseInt(a,10).toString(2)}function W(a){var c,b="";a+="";var e=0;for(c=a.length;e<c;e++){var f=a.charCodeAt(e).toString(16);b+=2>f.length?"0"+f:f}return b}function X(a){a+="";var c=[],b=0,e;for(e=a.length;b<e;b+=2){var f=parseInt(a.substr(b,1),16);var g=parseInt(a.substr(b+1,1),16);if(isNaN(f)||isNaN(g))return!1;c.push(f<<4|g)}return String.fromCharCode.apply(String,c)}function L(a){for(var c=0,b=1,e="",f,g,h,k,m,l,n,p,t,v,w,C,B,u,x,A,z;c<a.length;){k=a.charAt(c);m="";for(c++;c<a.length&&null!==a.charAt(c).match(/[\d*]/);)m+=a.charAt(c),c++;""===m&&(m="1");switch(k){case "a":case "A":if(arguments[b]===y)throw Error("pack(): Type "+k+": not enough arguments");f=String(arguments[b]);"*"===m&&(m=f.length);for(g=0;g<m;g++)e=f[g]===y?"a"===k?e+String.fromCharCode(0):e+" ":e+f[g];b++;break;case "h":case "H":if(arguments[b]===y)throw Error("pack(): Type "+k+": not enough arguments");f=arguments[b];"*"===m&&(m=f.length);if(m>f.length)throw Error("pack(): Type "+k+": not enough characters in string");for(g=0;g<m;g+=2)l=f[g],l=g+1>=m||f[g+1]===y?l+"0":l+f[g+1],"h"===k&&(l=l[1]+l[0]),e+=String.fromCharCode(parseInt(l,16));b++;break;case "c":case "C":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]),b++;break;case "s":case "S":case "v":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]&255),e+=String.fromCharCode(arguments[b]>>8&255),b++;break;case "n":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]>>8&255),e+=String.fromCharCode(arguments[b]&255),b++;break;case "i":case "I":case "l":case "L":case "V":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]&255),e+=String.fromCharCode(arguments[b]>>8&255),e+=String.fromCharCode(arguments[b]>>16&255),e+=String.fromCharCode(arguments[b]>>24&255),b++;break;case "N":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]>>24&255),e+=String.fromCharCode(arguments[b]>>16&255),e+=String.fromCharCode(arguments[b]>>8&255),e+=String.fromCharCode(arguments[b]&255),b++;break;case "f":case "d":l=23;n=8;"d"===k&&(l=52,n=11);"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++){f=arguments[b];k=Math.pow(2,n-1)-1;h=-k+1;p=k;t=isNaN(u=parseFloat(f))||-Infinity===u||Infinity===u?u:0;v=0;w=2*k+1+l+3;C=Array(w);B=0>(u=0!==t?0:u);u=Math.abs(u);x=Math.floor(u);u-=x;for(f=w;f;)C[--f]=0;for(f=k+2;x&&f;)C[--f]=x%2,x=Math.floor(x/2);for(f=k+1;0<u&&f;--u)C[++f]=(1<=(u*=2))-0;for(f=-1;++f<w&&!C[f];);z=(u=l-1+(f=(v=k+1-f)>=h&&v<=p?f+1:k+1-(v=h-1)))+1;if(C[z]){if(!(A=C[u]))for(z=u+2;!A&&z<w;A=C[z++]);for(z=u+1;A&&0<=--z;(C[z]=!C[z]-0)&&(A=0));}for(f=0>f-2?-1:f-3;++f<w&&!C[f];);(v=k+1-f)>=h&&v<=p?++f:v<h&&(f=k+1-(v=h-1));if(x||0!==t)v=p+1,f=k+2,-Infinity===t?B=1:isNaN(t)&&(C[f]=1);u=Math.abs(v+k);k="";for(z=n+1;--z;)k=u%2+k,u=u>>=1;z=u=0;f=(k=(B?"1":"0")+k+C.slice(f,f+l).join("")).length;for(h=[];f;)u+=(1<<z)*k.charAt(--f),7===z&&(h[h.length]=String.fromCharCode(u),u=0),z=(z+1)%8;h[h.length]=u?String.fromCharCode(u):"";e+=h.join("");b++}break;case "x":if("*"===m)throw Error("pack(): Type x: '*' ignored");for(g=0;g<m;g++)e+=String.fromCharCode(0);break;case "X":if("*"===m)throw Error("pack(): Type X: '*' ignored");for(g=0;g<m;g++){if(0===e.length)throw Error("pack(): Type X: outside of string");e=e.substring(0,e.length-1)}break;case "@":if("*"===m)throw Error("pack(): Type X: '*' ignored");if(m>e.length)for(l=m-e.length,g=0;g<l;g++)e+=String.fromCharCode(0);m<e.length&&(e=e.substring(0,m));break;default:throw Error("pack(): Type "+k+": unknown format code");}}if(b<arguments.length)throw Error("pack(): "+(arguments.length-b)+" arguments unused");return e}function M(a,c){c+="";var b,e=c.length,f=[];if("C*"===a){for(b=0;b<e;b++)f[b+1]=c.charCodeAt(b);return f}if("H*hex"===a){f.hex=[];for(b=0;b<e;b++)f.hex[b+1]=((c.charCodeAt(b++)<<8)+c.charCodeAt(b)).toString(16);return f}}function Q(a,c,b){return y===b?a.test(c):c.match(a)}function Y(a,c){var b,e=null,f=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;"string"===typeof a?"function"===typeof B[a]?b=B[a]:a.match(f)&&(b=(new Function(null,"return "+a))()):"[object Array]"===Object.prototype.toString.call(a)?("string"===typeof a[0]?a[0].match(f)&&(b=eval(a[0]+"['"+a[1]+"']")):b=a[0][a[1]],"string"===typeof a[0]?"function"===typeof B[a[0]]?e=B[a[0]]:a[0].match(f)&&(e=eval(a[0])):"object"===typeof a[0]&&(e=a[0])):"function"===typeof a&&(b=a,e=B);if("function"!==typeof b)throw Error(b+" is not a valid function");return b.apply(e,c)}function Z(a,c,b){var e=/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/;switch(c){case 275:return b===y?e.test(a):1048576===b?!1!==E(a,"."):!0}return!1}function w(a){a+="";var c=0,b="",e=[];if(4===a.length)return[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)].join(".");if(16===a.length){for(c=0;16>c;c++)e.push(((a.charCodeAt(c++)<<8)+a.charCodeAt(c)).toString(16));return e.join(":").replace(/((^|:)0(?=:|$))+:?/g,function(a){b=a.length>b.length?a:b;return a}).replace(b||" ","::")}return!1}function na(a){a+="";var c,b;var e=String.fromCharCode;if(c=a.match(/^(?:\d{1,3}(?:\.|$)){4}/))return c=c[0].split("."),c=e(c[0])+e(c[1])+e(c[2])+e(c[3]),4===c.length?c:!1;if(c=a.match(/^((?:[\da-f]{1,4}(?::|)){0,8})(::)?((?:[\da-f]{1,4}(?::|)){0,8})$/)){for(b=1;4>b;b++)if(2!==b&&0!==c[b].length){c[b]=c[b].split(":");for(a=0;a<c[b].length;a++){c[b][a]=parseInt(c[b][a],16);if(isNaN(c[b][a]))return!1;c[b][a]=e(c[b][a]>>8)+e(c[b][a]&255)}c[b]=c[b].join("")}e=c[1].length+c[3].length;if(16===e)return c[1]+c[3];if(16>e&&0<c[2].length)return c[1]+Array(16-e+1).join("\x00")+c[3]}return!1}function oa(a){var c;a=a.match(/^([1-9]\d*|0[0-7]*|0x[\da-f]+)(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?$/i);if(!a)return!1;a[0]=0;for(c=1;5>c;c+=1)a[0]+=!!(a[c]||"").length,a[c]=parseInt(a[c])||0;a.push(256,256,256,256);a[4+a[0]]*=Math.pow(256,4-a[0]);return a[1]>=a[5]||a[2]>=a[6]||a[3]>=a[7]||a[4]>=a[8]?!1:a[1]*(1===a[0]||16777216)+a[2]*(2>=a[0]||65536)+a[3]*(3>=a[0]||256)+1*a[4]}function l(a){this.__construct(a)}function A(a,c){this.__construct(a,c)}function x(a,c){this.__construct(a,c)}function R(a,c,b){var e=[].slice.call(arguments).slice(3);a&&a.addEventListener?a.addEventListener(c,function(){b.apply(a,e)},!1):a&&a.attachEvent&&a.attachEvent("on"+c,function(){b.apply(a,e)})}function ha(a){return a.trim().replace(",","\n").split("\n").map(function(a){return a.trim()})}function I(a){for(;t.g.firstChild;)t.g.removeChild(t.g.firstChild);t.g.appendChild(a?S.createTextNode(a+""):pa)}"function"!==typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(a,c){if(null==a)throw Error("Cannot convert undefined or null to object");var b,e,f=Object(a);for(e=1;e<arguments.length;e++){var g=arguments[e];if(null!=g)for(b in g)Object.prototype.hasOwnProperty.call(g,b)&&(f[b]=g[b])}return f},writable:!0,configurable:!0});Array.prototype.forEach||(Array.prototype.forEach=function(a,c){if(null==this)throw Error("this is null or not defined");var b,e,f=Object(this);var g=f.length>>>0;if("[object Function]"!=={}.toString.call(a))throw Error(a+" is not a function");c&&(b=c);for(e=0;e<g;){if(e in f){var h=f[e];a.call(b,h,e,f)}e++}});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});var n={},ia=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;n.abs=function(){var a=new this.constructor(this);a.s=1;return a};n.cmp=function(a){var c=this.c,b=(a=new this.constructor(a)).c,e=this.s,f=a.s,g=this.e,h=a.e;if(!c[0]||!b[0])return c[0]?e:b[0]?-f:0;if(e!==f)return e;a=0>e;if(g!==h)return g>h^a?1:-1;f=(g=c.length)<(h=b.length)?g:h;for(e=-1;++e<f;)if(c[e]!==b[e])return c[e]>b[e]^a?1:-1;return g===h?0:g>h^a?1:-1};n.div=function(a){var c=this.constructor,b=this.c,e=(a=new c(a)).c,f=this.s==a.s?1:-1,g=c.DP;if(g!==~~g||0>g||1E6<g)throw Error("Invalid decimal places");if(!e[0])throw Error("Division by zero");if(!b[0])return new c(0*f);var h,k=e.slice(),l=e.length,n=e.length;al=b.length;r=b.slice(0,n);rl=r.length;q=a;qc=q.c=[];qi=0;d=g+(q.e=this.e-a.e)+1;q.s=f;f=0>d?0:d;for(k.unshift(0);rl++<n;)r.push(0);do{for(h=0;10>h;h++){if(n!=(rl=r.length))var t=n>rl?1:-1;else{var p=-1;for(t=0;++p<n;)if(e[p]!=r[p]){t=e[p]>r[p]?1:-1;break}}if(0>t){for(a=rl==n?e:k;rl;){if(r[--rl]<a[rl]){for(p=rl;p&&!r[--p];)r[p]=9;--r[p];r[rl]+=10}r[rl]-=a[rl]}for(;!r[0];)r.shift()}else break}qc[qi++]=t?h:++h;r[0]&&t?r[rl]=b[l]||0:r=[b[l]]}while((l++<al||void 0!==r[0])&&f--);qc[0]||1==qi||(qc.shift(),q.e--);qi>d&&N(q,g,c.RM,void 0!==r[0]);return q};n.eq=function(a){return!this.cmp(a)};n.gt=function(a){return 0<this.cmp(a)};n.gte=function(a){return-1<this.cmp(a)};n.lt=function(a){return 0>this.cmp(a)};n.lte=function(a){return 1>this.cmp(a)};n.minus=n.sub=function(a){var c=this.constructor;var b=this.s,e=(a=new c(a)).s;if(b!==e)return a.s=-e,this.plus(a);var f=this.c.slice();var g=this.e;var h=a.c,k=a.e;if(!f[0]||!h[0])return h[0]?(a.s=-e,a):new c(f[0]?this:0);if(b=g-k){c=b;0>b?(b=-b,g=f):(k=g,g=h);g.reverse();for(e=b;e--;)g.push(0);g.reverse()}else for(g=((c=f.length<h.length)?f:h).length,b=e=0;e<g;e++)if(f[e]!=h[e]){c=f[e]<h[e];break}c&&(g=f,f=h,h=g,a.s=-a.s);if(0<(e=(g=h.length)-(c=f.length)))for(;e--;)f[c++]=0;for(e=c;g>b;){if(f[--g]<h[g]){for(c=g;c&&!f[--c];)f[c]=9;--f[c];f[g]+=10}f[g]-=h[g]}for(;0===f[--e];)f.pop();for(;0===f[0];)f.shift(),--k;f[0]||(a.s=1,f=[k=0]);a.c=f;a.e=k;return a};n.mod=function(a){var c=this,b=c.constructor,e=c.s,f=(a=new b(a)).s;if(!a.c[0])throw Error("Division by zero");c.s=a.s=1;var g=1===a.cmp(c);c.s=e;a.s=f;if(g)return new b(c);e=b.DP;f=b.RM;b.DP=b.RM=0;c=c.div(a);b.DP=e;b.RM=f;return this.minus(c.times(a))};n.plus=n.add=function(a){var c=this.constructor;var b=this.s,e=(a=new c(a)).s;if(b!==e)return a.s=-e,this.minus(a);e=this.e;var f=this.c,g=a.e,h=a.c;if(!f[0]||!h[0])return h[0]?a:new c(f[0]?this:0*b);f=f.slice();if(b=e-g){0<b?(g=e,c=h):(b=-b,c=f);for(c.reverse();b--;)c.push(0);c.reverse()}0>f.length-h.length&&(c=h,h=f,f=c);b=h.length;for(e=0;b;f[b]%=10)e=(f[--b]=f[b]+h[b]+e)/10|0;e&&(f.unshift(e),++g);for(b=f.length;0===f[--b];)f.pop();a.c=f;a.e=g;return a};n.pow=function(a){var c=this,b=new c.constructor(1),e=b,f=0>a;for(f&&(a=-a);;){a&1&&(e=e.times(c));a>>=1;if(!a)break;c=c.times(c)}return f?b.div(e):e};n.round=function(a,c){var b=this.constructor;if(void 0===a)a=0;else if(a!==~~a||0>a||1E6<a)throw Error("Invalid decimal places");return N(new b(this),a,void 0===c?b.RM:c)};n.sqrt=function(){var a=this.constructor;var c=this.s;var b=this.e,e=new a(.5);if(!this.c[0])return new a(this);if(0>c)throw Error("No square root");c=Math.sqrt(this.toString());0===c||c===1/0?(c=this.c.join(""),c.length+b&1||(c+="0"),c=new a(Math.sqrt(c).toString()),c.e=((b+1)/2|0)-(0>b||b&1)):c=new a(c.toString());b=c.e+(a.DP+=4);do{var f=c;c=e.times(f.plus(this.div(f)))}while(f.c.slice(0,b).join("")!==c.c.slice(0,b).join(""));return N(c,a.DP-=4,a.RM)};n.times=n.mul=function(a){var c=this.constructor;var b=this.c,e=(a=new c(a)).c,f=b.length,g=e.length,h=this.e,k=a.e;a.s=this.s===a.s?1:-1;if(!b[0]||!e[0])return new c(0*a.s);a.e=h+k;f<g&&(c=b,b=e,e=c,k=f,f=g,g=k);for(c=Array(k=f+g);k--;)c[k]=0;for(h=g;h--;){g=0;for(k=f+h;k>h;)g=c[k]+e[h]*b[k-h-1]+g,c[k--]=g%10,g=g/10|0;c[k]=(c[k]+g)%10}g?++a.e:c.shift();for(h=c.length;!c[--h];)c.pop();a.c=c;return a};n.toExponential=function(a){return J(this,1,a,a)};n.toFixed=function(a){return J(this,2,a,this.e+a)};n.toPrecision=function(a){return J(this,3,a,a-1)};n.toString=function(){return J(this)};n.valueOf=n.toJSON=function(){return J(this,4)};var p=aa();p["default"]=p.Big=p;B.Big=p;l.prototype={IP_V4:"IPv4",IP_V6:"IPv6",IP_V4_MAX_PREFIX_LENGTH:32,IP_V6_MAX_PREFIX_LENGTH:128,IP_V4_OCTETS:4,IP_V6_OCTETS:16,$in_addr:null,__construct:function(a){if(!Z(a,275))throw Error("Invalid IP address format: "+a);this.$in_addr=na(a)},toString:function(){return w(this.$in_addr)},parse:function(a){return 0===E(a,"0x")?(a=K(a,2),this.parseHex(a)):0===E(a,"0b")?(a=K(a,2),this.parseBin(a)):ea(a)?this.parseLong(a):new l(a)},parseBin:function(a){if(!Q(/^([0-1]{32}|[0-1]{128})$/,a))throw Error("Invalid binary IP address format: "+a);var c="";ka(la,fa(a,8)).forEach(function(a){c+=L("C*",a)});return new l(w(c))},parseHex:function(a){if(!Q(/^([0-9a-fA-F]{8}|[0-9a-fA-F]{32})$/,a))throw Error("Invalid hexadecimal IP address format: "+a);return new l(w(L("H*",a)))},parseLong:function(a,c){if(c===this.IP_V4){var b=a;b=isFinite(b)?[b>>>24,b>>>16&255,b>>>8&255,b&255].join("."):!1;b=new this(b)}else{var e=[];for(b=0;b<this.IP_V6_OCTETS;b++)e.push(p(a).mod(256)),a=p(a).div(256);e=V(e);e[0]="C*";b=new l(w(Y(L,e)))}return b},parseInAddr:function(a){return new l(w(a))},getVersion:function(){return Z(w(this.$in_addr),275,1048576)?this.IP_V4:Z(w(this.$in_addr),275,2097152)?this.IP_V6:!1},getMaxPrefixLength:function(){return this.getVersion()===this.IP_V4?this.IP_V4_MAX_PREFIX_LENGTH:this.IP_V6_MAX_PREFIX_LENGTH},getOctetsCount:function(){return this.getVersion()===this.IP_V4?this.IP_V4_OCTETS:this.IP_V6_OCTETS},getReversePointer:function(){if(this.getVersion()===this.IP_V4){var a=V(P(".",this.toString()));a=U(".",a)+".in-addr.arpa"}else a=M("H*hex",this.$in_addr),a=V(fa(a.hex)),a=U(".",a)+".ip6.arpa";return a},inAddr:function(){return this.$in_addr},toBin:function(){var a=[];M("C*",this.$in_addr).forEach(function(c){a.push(G(ma(c),8,"0",0))});return U(a)},toHex:function(){return W(this.$in_addr)},toLong:function(){var a=0;if(this.getVersion()===this.IP_V4)a=ca("%u",oa(w(this.$in_addr)));else{var c=this.IP_V6_OCTETS-1;var b=M("C*",this.$in_addr);b.forEach(function(b){var e=a;var g=c--;g=p(256).pow(g);b=p(b).times(g);a=O(e,b,1)})}return a},next:function(a){a=a||1;if(0>a)throw Error("Number must be greater than 0");var c,b,e=M("C*",this.$in_addr);for(c=0;c<a;c++)for(b=T(e);0<=b;--b)if(255>e[b]){e[b]++;break}else e[b]=0;e[0]="C*";return new l(w(Y(L,e)))},prev:function(a){a=a||1;if(0>a)throw Error("Number must be greater than 0");var c,b,e=M("C*",this.$in_addr);for(c=0;c<a;c++)for(b=T(e);0<=b;--b)if(0==e[b])e[b]=255;else{e[b]--;break}e[0]="C*";return new l(w(Y(L,e)))}};A.prototype={$ip:null,$netmask:null,$position:0,__construct:function(a,c){this.setIP(a);this.setNetmask(c)},toString:function(){return this.getCIDR()},parse:function(a){if(E(a,"/")){var c=P("/",a,2);a=c[0];c=c[1];a=l.prototype.parse(a);c=this.prefix2netmask(parseInt(c,10),a.getVersion())}else E(a," ")?(c=P(" ",a,2),a=c[0],c=c[1],a=l.prototype.parse(a),c=l.prototype.parse(c)):(a=l.prototype.parse(a),c=this.prefix2netmask(a.getMaxPrefixLength(),a.getVersion()));return new A(a,c)},prefix2netmask:function(a,c){a:{var b=[l.prototype.IP_V4,l.prototype.IP_V6];var e="";for(e in b)if(b.hasOwnProperty(e)&&b[e]==c){b=!0;break a}b=!1}if(!b)throw Error("Wrong IP version");b=c===l.prototype.IP_V4?l.prototype.IP_V4_MAX_PREFIX_LENGTH:l.prototype.IP_V6_MAX_PREFIX_LENGTH;if(!(ea(a)&&0<=a&&a<=b))throw Error("Invalid prefix length");b=G(G("",parseInt(a,10),"1"),b,"0");return l.prototype.parseBin(b)},netmask2prefix:function(a){a=a.toBin();var c="0";c=c?(c+"").replace(/([[\]().?/*{}+$^:])/g,"\\$1"):" \\s\u00a0";return((a+"").replace(new RegExp("["+c+"]+$","g"),"")+"").length},setIP:function(a){if(da(this.$netmask)&&this.$netmask.getVersion()!==a.getVersion())throw Error("IP version is not same as Netmask version");this.$ip=a},setNetmask:function(a){if(!Q(/^1*0*$/,a.toBin()))throw Error("Invalid Netmask address format");if(da(this.$ip)&&a.getVersion()!==this.$ip.getVersion())throw Error("Netmask version is not same as IP version");this.$netmask=a},setPrefixLength:function(a){this.setNetmask(this.prefix2netmask(parseInt(a,10),this.$ip.getVersion()))},getIP:function(){return this.$ip},getNetmask:function(){return this.$netmask},getNetwork:function(){var a=this.getIP().inAddr()+"",c=this.getNetmask().inAddr()+"",b,e=a.length,f=[];for(b=0;b<e;b++)f.push(G((a.charCodeAt(b)&c.charCodeAt(b)).toString(16),2,"0",0));return new l(w(X(f.join(""))))},getPrefixLength:function(){return this.netmask2prefix(this.getNetmask())},getCIDR:function(){return ca("%s/%s",this.getNetwork(),this.getPrefixLength())},getWildcard:function(){return new l(w(~this.getNetmask().inAddr()))},getBroadcast:function(){var a=this.getNetwork().inAddr()+"",c=this.getNetmask().inAddr()+"",b,e=a.length,f=[];for(b=0;b<e;b++)f.push(G((a.charCodeAt(b)|~c.charCodeAt(b)&255).toString(16),2,"0",0));return new l(w(X(f.join(""))))},getFirstIP:function(){return this.getNetwork()},getLastIP:function(){return this.getBroadcast()},getBlockSize:function(){var a=this.$ip.getMaxPrefixLength(),c=this.getPrefixLength();return this.$ip.getVersion()===l.prototype.IP_V6?(a=a-c+"",p("2").pow(a)):Math.pow(2,a-c)},getHosts:function(){var a=this.getNetwork(),c=this.getBroadcast();this.$ip.getVersion()===l.prototype.IP_V4&&2<this.getBlockSize()&&(a=l.prototype.parseBin(K(a.toBin(),0,a.getMaxPrefixLength()-1)+"1"),c=l.prototype.parseBin(K(c.toBin(),0,c.getMaxPrefixLength()-1)+"0"));return new x(a,c)},exclude:function(a){a=this.parse(a);if(0<v(a.getFirstIP().inAddr(),this.getLastIP().inAddr())||0>v(a.getLastIP().inAddr(),this.getFirstIP().inAddr()))throw Error("Exclude subnet not within target network");var c=[],b=this.getPrefixLength()+1;var e=H(!0,{},this);e.setPrefixLength(b);var f=H(!0,{},e);for(f.setIP(e.getLastIP().next());b<=a.getPrefixLength();){var g=new x(e.getFirstIP(),e.getLastIP());if(g.contains(a)){g=e;var h=f}else g=f,h=e;c.push(H(!0,{},h));if(++b>this.getNetwork().getMaxPrefixLength())break;g.setPrefixLength(b);h.setPrefixLength(b);h.setIP(g.getLastIP().next())}return A.prototype.sort(c)},moveTo:function(a){var c=this.$ip.getMaxPrefixLength();if(a<=this.getPrefixLength()||a>c)throw Error("Invalid prefix length");c=this.prefix2netmask(a,this.$ip.getVersion());var b=[];var e=H(!0,{},this);for(e.setPrefixLength(a);e.$ip.inAddr()<this.getLastIP().inAddr();)b.push(e),e=new A(e.getLastIP().next(),c);return b},sort:function(a){return a.sort(function(a,b){a=l.prototype.parse((a+"").split("/").shift()).toHex();b=l.prototype.parse((b+"").split("/").shift()).toHex();return v(a,b)})},current:function(){return this.getFirstIP().next(this.$position)},key:function(){return this.$position},next:function(){++this.$position},rewind:function(){this.$position=0},valid:function(){return 0>=v(this.getFirstIP().next(this.$position).inAddr(),this.getLastIP().inAddr())},count:function(){return parseInt(this.getBlockSize())}};x.prototype={$firstIP:null,$lastIP:null,$position:0,__construct:function(a,c){this.setFirstIP(a);this.setLastIP(c)},parse:function(a){if(E(a,"/")||E(a," ")){a=A.prototype.parse(a);var c=a.getFirstIP();a=a.getLastIP()}else E(a,"*")?(c=l.prototype.parse(a.replace("*","0")),a=l.prototype.parse(a.replace("*","255"))):E(a,"-")?(a=P("-",a,2),c=l.prototype.parse(a[0]),a=l.prototype.parse(a[1])):(c=l.prototype.parse(a),a=H(!0,{},c));return new x(c,a)},contains:function(a){if(a instanceof l)a=0<=v(a.inAddr(),this.$firstIP.inAddr())&&0>=v(a.inAddr(),this.$lastIP.inAddr());else if(a instanceof x||a instanceof A)a=0<=v(a.getFirstIP().inAddr(),this.$firstIP.inAddr())&&0>=v(a.getLastIP().inAddr(),this.$lastIP.inAddr());else throw Error("Invalid type");return a},setFirstIP:function(a){if(this.$lastIP&&0<v(a.inAddr(),this.$lastIP.inAddr()))throw Error("First IP is grater than second");this.$firstIP=a},setLastIP:function(a){if(this.$firstIP&&0>v(a.inAddr(),this.$firstIP.inAddr()))throw Error("Last IP is less than first");this.$lastIP=a},getFirstIP:function(){return this.$firstIP},getLastIP:function(){return this.$lastIP},getNetworks:function(){var a=this.getSpanNetwork(),c=[];if(a.getFirstIP().inAddr()===this.$firstIP.inAddr()&&a.getLastIP().inAddr()===this.$lastIP.inAddr())c.push(a);else{if(a.getFirstIP().inAddr()!==this.$firstIP.inAddr()){var b=a.exclude(this.$firstIP.prev());var e=this.$firstIP.inAddr();b.forEach(function(a){0<=v(a.getFirstIP().inAddr(),e)&&c.push(a)})}a.getLastIP().inAddr()!==this.$lastIP.inAddr()&&(c.length?(b=ja(c),b=b.exclude(this.$lastIP.next())):b=a.exclude(this.$lastIP.next()),e=this.$lastIP.inAddr(),b.forEach(function(a){a.getLastIP().inAddr()<=e&&c.push(a)}))}return A.prototype.sort(c)},getSpanNetwork:function(){var a=this.getFirstIP().inAddr()+"",c=this.getLastIP().inAddr()+"",b,e=a.length,f=[];for(b=0;b<e;b++)f.push(G((a.charCodeAt(b)^c.charCodeAt(b)).toString(16),2,"0",0));c=l.prototype.parseInAddr(X(f.join("")));a=(Q(/^(0*)/,c.toBin(),!0)[1]+"").length;c=l.prototype.parseBin(G(K(this.getFirstIP().toBin(),0,a),c.getMaxPrefixLength(),"0"));return new A(c,A.prototype.prefix2netmask(a,c.getVersion()))},sort:function(a){return a.sort(function(a,b){var c=v(a.getFirstIP().inAddr(),b.getFirstIP().inAddr());return c?c:v(a.getLastIP().inAddr(),b.getLastIP().inAddr())})},merge:function(a){a=x.prototype.sort(a);for(var c=0;c<a.length-1;)0<=v(a[c].getLastIP().next().inAddr(),a[c+1].getFirstIP().inAddr())?(a[c].setLastIP(a[c+1].getLastIP()),a.splice(c+1,1)):++c;return a},current:function(){return this.$firstIP.next(this.$position)},key:function(){return this.$position},next:function(){++this.$position},rewind:function(){this.$position=0},valid:function(){return 0>=v(W(this.$firstIP.next(this.$position).inAddr()),W(this.$lastIP.inAddr()))},count:function(){var a=this.$lastIP.toLong();var c=this.$firstIP.toLong();a=p(a).minus(c);return O(a,1)}};B.IP=l;B.Network=A;B.Range=x;var t={};"abcdefg".split("").map(function(a){t[a]=S.getElementById(a)});var pa=t.g?t.g.firstChild.cloneNode(!1):null;R(t.a,"click",function(a){a.value="";I()},t.c);R(t.b,"click",function(a){a.value="";I()},t.d);R(t.e,"click",function(a,c){var b=ha(a.value);console.log(b);if(b[0])try{var e,f=[];var g=0;for(e=b.length;g<e;++g)b[g]&&(b[g]=b[g].split("-").map(function(a){return a.trim()}),1===b[g].length&&b[g].push(b[g][0]),2===b[g].length&&(b[g][1]=b[g][1]||b[g][0],b[g][0]=b[g][0]||b[g][1],b[g][0]&&b[g][1]&&f.push(new x(new l(b[g][0]),new l(b[g][1])))));f=x.prototype.merge(f);var h=p(0);c.value="";g=0;for(e=f.length;g<e;++g)h=O(h,f[g].count(),1),f[g].getNetworks().forEach(function(a){c.value+=a+"\n"});I(h.gt(p(0))?h:null)}catch(k){I(k.message)}},t.c,t.d);R(t.f,"click",function(a,c){var b=ha(a.value);console.log(b);if(b[0])try{var e,f=[];var g=0;for(e=b.length;g<e;++g)b[g]&&f.push(x.prototype.parse(b[g]));f=x.prototype.merge(f);var h=p(0);c.value="";g=0;for(e=f.length;g<e;++g)h=O(h,f[g].count(),1),c.value+=f[g].getFirstIP()+" - "+f[g].getLastIP()+"\n";I(h.gt(p(0))?h:null)}catch(k){I(k.message)}},t.d,t.c);S.getElementById("c").focus()})(window,document);
1
+ /*
2
+ Project: IP address range - CIDR converter
3
+ Copyright (c) 2018 tokkonopapa (tokkonopapa@yahoo.com)
4
+ The following libraries are ported to this program.
5
+ - S1lentium/IPTools (https://github.com/S1lentium/IPTools)
6
+ - kvz/locutus (https://github.com/kvz/locutus)
7
+ - MikeMcl/big.js (https://github.com/MikeMcl/big.js/)
8
+ - jQuery (https://jquery.com/)
9
+ This software is released under the MIT License.
10
+ */
11
  (function(B,S,y){function aa(){function a(c){if(!(this instanceof a))return void 0===c?aa():new a(c);if(c instanceof a)this.s=c.s,this.e=c.e,this.c=c.c.slice();else{var b,e;if(0===c&&0>1/c)c="-0";else if(!ia.test(c+=""))throw Error("Invalid number");"-"==c.charAt(0)?(c=c.slice(1),this.s=-1):this.s=1;-1<(b=c.indexOf("."))&&(c=c.replace(".",""));0<(e=c.search(/e/i))?(0>b&&(b=e),b+=+c.slice(e+1),c=c.substring(0,e)):0>b&&(b=c.length);var f=c.length;for(e=0;e<f&&"0"==c.charAt(e);++e);if(e===f)this.c=[this.e=0];else{for(;0<f&&"0"==c.charAt(--f););this.e=b-e-1;this.c=[];for(b=0;e<=f;)this.c[b++]=+c.charAt(e++)}}this.constructor=a}a.prototype=n;a.DP=20;a.RM=1;a.NE=-7;a.PE=21;a.version="5.0.2";return a}function N(a,c,b,e){var f=a.c,g=a.e+c+1;if(g<f.length){if(1===b)e=5<=f[g];else if(2===b)e=5<f[g]||5==f[g]&&(e||0>g||void 0!==f[g+1]||f[g-1]&1);else if(3===b)e=e||void 0!==f[g]||0>g;else if(e=!1,0!==b)throw Error("Invalid rounding mode");if(1>g)f.length=1,e?(a.e=-c,f[0]=1):f[0]=a.e=0;else{f.length=g--;if(e)for(;9<++f[g];)f[g]=0,g--||(++a.e,f.unshift(1));for(g=f.length;!f[--g];)f.pop()}}else if(0>b||3<b||b!==~~b)throw Error("Invalid rounding mode");return a}function J(a,c,b,e){var f=a.constructor,g=!a.c[0];if(void 0!==b){if(b!==~~b||b<(3===c)||1E6<b)throw Error(3===c?"Invalid precision":"Invalid decimal places");a=new f(a);b=e-a.e;a.c.length>++e&&N(a,b,f.RM);for(2===c&&(e=a.e+b+1);a.c.length<e;)a.c.push(0)}var h=a.e;var k=a.c.join("");b=k.length;if(2!==c&&(1===c||3===c&&e<=h||h<=f.NE||h>=f.PE))k=k.charAt(0)+(1<b?"."+k.slice(1):"")+(0>h?"e":"e+")+h;else if(0>h){for(;++h;)k="0"+k;k="0."+k}else if(0<h)if(++h>b)for(h-=b;h--;)k+="0";else h<b&&(k=k.slice(0,h)+"."+k.slice(h));else 1<b&&(k=k.charAt(0)+"."+k.slice(1));return 0>a.s&&(!g||4===c)?"-"+k:k}function ba(a){var c=Object.getPrototypeOf,b={},e=b.toString,f=b.hasOwnProperty;b=f.toString;if(!a||"[object Object]"!==e.call(a))return!1;a=c(a);if(!a)return!0;a=f.call(a,"constructor")&&a.constructor;return"function"===typeof a&&b.call(a)===b.call(Object)}function H(){var a,c,b,e=arguments[0]||{},f=1,g=arguments.length,h=!1;"boolean"===typeof e&&(h=e,e=arguments[f]||{},f++);"object"===typeof e||"function"===typeof e&&"number"!==typeof e.nodeType||(e={});f===g&&(e=this,f--);for(;f<g;f++)if(null!=(a=arguments[f]))for(c in a){var k=e[c];var m=a[c];e!==m&&(h&&m&&(ba(m)||(b=Array.isArray(m)))?(b?(b=!1,k=k&&Array.isArray(k)?k:[]):k=k&&ba(k)?k:{},e[c]=H(h,k,m)):m!==y&&(e[c]=m))}return e}function O(a,c){return p(a).plus(c)}function ca(){var a=/%%|%(?:(\d+)\$)?((?:[-+#0 ]|'[\s\S])*)(\d+)?(?:\.(\d*))?([\s\S])/g,c=arguments,b=0,e=c[b++],f=function(a,b,c,e){c||(c=" ");b=a.length>=b?"":Array(1+b-a.length>>>0).join(c);return e?a+b:b+a},g=function(a,b,c,e,g){var h=e-a.length;0<h&&(a=c||"0"!==g?f(a,e,g,c):[a.slice(0,b.length),f("",h,"0",!0),a.slice(b.length)].join(""));return a},h=function(a,b,c,e,h,k){a=f((a>>>0).toString(b),h||0,"0",!1);return g(a,"",c,e,k)},k=function(a,b,c,e,f){null!==e&&e!==y&&(a=a.slice(0,e));return g(a,"",b,c,f)},m=function(a,e,m,l,n,t){if("%%"===a)return"%";a=" ";var D=!1;var p="";var u;var F=0;for(u=m.length;F<u;F++)switch(m.charAt(F)){case " ":case "0":a=m.charAt(F);break;case "+":p="+";break;case "-":D=!0;break;case "'":F+1<u&&(a=m.charAt(F+1),F++)}l=l?+l:0;if(!isFinite(l))throw Error("Width must be finite");n=n?+n:"d"===t?0:-1<"fFeE".indexOf(t)?6:y;if(e&&0===+e)throw Error("Argument number must be greater than zero");if(e&&+e>=c.length)throw Error("Too few arguments");e=e?c[+e]:c[b++];switch(t){case "%":return"%";case "s":return k(e+"",D,l,n,a);case "c":return k(String.fromCharCode(+e),D,l,n,a);case "b":return h(e,2,D,l,n,a);case "o":return h(e,8,D,l,n,a);case "x":return h(e,16,D,l,n,a);case "X":return h(e,16,D,l,n,a).toUpperCase();case "u":return h(e,10,D,l,n,a);case "i":case "d":return e=+e||0,e=Math.round(e-e%1),p=0>e?"-":p,e=p+f(String(Math.abs(e)),n,"0",!1),D&&"0"===a&&(a=" "),g(e,p,D,l,a);case "e":case "E":case "f":case "F":case "g":case "G":return e=+e,p=0>e?"-":p,m=["toExponential","toFixed","toPrecision"]["efg".indexOf(t.toLowerCase())],t=["toString","toUpperCase"]["eEfFgG".indexOf(t)%2],e=p+Math.abs(e)[m](n),g(e,p,D,l,a)[t]();default:return""}};try{return e.replace(a,m)}catch(D){return!1}}function da(){var a=arguments,c=a.length,b=0;if(0===c)throw Error("Empty isset");for(;b!==c;){if(a[b]===y||null===a[b])return!1;b++}return!0}function ea(a){return("number"===typeof a||"string"===typeof a&&-1===" \n\r\t\f\x0B\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000".indexOf(a.slice(-1)))&&""!==a&&!isNaN(a)}function v(a,c){return a===c?0:a>c?1:-1}function E(a,c,b){a=(a+"").indexOf(c,b||0);return-1===a?!1:a}function K(a,c,b){a+="";var e=a.length;0>c&&(c+=e);b!==y&&(e=0>b?b+e:b+c);return c>=a.length||0>c||c>e?!1:a.slice(c,e)}function T(a,c){var b,e=0;if(null===a||a===y)return 0;if(a.constructor!==Array&&a.constructor!==Object)return 1;"COUNT_RECURSIVE"===c&&(c=1);1!==c&&(c=0);for(b in a)a.hasOwnProperty(b)&&(e++,1!==c||!a[b]||a[b].constructor!==Array&&a[b].constructor!==Object||(e+=T(a[b],1)));return e}function U(a,c){var b="",e="",f="";1===arguments.length&&(c=a,a="");if("object"===typeof c){if("[object Array]"===Object.prototype.toString.call(c))return c.join(a);for(b in c)e+=f+c[b],f=a;return e}return c}function P(a,c,b){if(2>arguments.length||a===y||c===y)return null;if(""===a||!1===a||null===a)return!1;if("function"===typeof a||"object"===typeof a||"function"===typeof c||"object"===typeof c)return{0:""};!0===a&&(a="1");a+="";var e=(c+"").split(a);if(b===y)return e;0===b&&(b=1);if(0<b)return b>=e.length?e:e.slice(0,b-1).concat([e.slice(b-1).join(a)]);if(-b>=e.length)return[];e.splice(e.length+b);return e}function fa(a,c){null===c&&(c=1);if(null===a||1>c)return!1;a+="";for(var b=[],e=0,f=a.length;e<f;)b.push(a.slice(e,e+=c));return b}function G(a,c,b,e){var f="",g=function(a,b){for(var c="";c.length<b;)c+=a;return c=c.substr(0,b)};a+="";b=b!==y?b:" ";0!==e&&1!==e&&2!==e&&(e=1);0<(f=c-a.length)&&(0===e?a=g(b,f)+a:1===e?a+=g(b,f):2===e&&(f=g(b,Math.ceil(f/2)),a=(f+a+f).substr(0,c)));return a}function ja(a){var c="",b="";if(a.hasOwnProperty("length"))return a.length?a.pop():null;for(c in a)a.hasOwnProperty(c)&&(b=c);return b?(c=a[b],delete a[b],c):null}function ka(a){for(var c=arguments.length,b=arguments,e=null,f=a,g=b[1].length,h=0,k=1,m=0,l=[],n=[];h<g;){for(;k<c;)l[m++]=b[k++][h];m=0;k=1;if(a){if("string"===typeof a)f=B[a];else if("object"===typeof a&&a.length){e="string"===typeof a[0]?B[a[0]]:a[0];if(e===y)throw Error("Object not found: "+a[0]);f="string"===typeof a[1]?e[a[1]]:a[1]}n[h++]=f.apply(e,l)}else n[h++]=l;l=[]}return n}function V(a,c){var b="[object Array]"===Object.prototype.toString.call(a),e=c?{}:[];if(b&&!c)return a.slice(0).reverse();if(c){var f=[];for(g in a)f.push(g);for(b=f.length;b--;){var g=f[b];e[g]=a[g]}}else for(g in a)e.unshift(a[g]);return e}function la(a){a=(a+"").replace(/[^01]/gi,"");return parseInt(a,2)}function ma(a){0>a&&(a=4294967295+a+1);return parseInt(a,10).toString(2)}function W(a){var c,b="";a+="";var e=0;for(c=a.length;e<c;e++){var f=a.charCodeAt(e).toString(16);b+=2>f.length?"0"+f:f}return b}function X(a){a+="";var c=[],b=0,e;for(e=a.length;b<e;b+=2){var f=parseInt(a.substr(b,1),16);var g=parseInt(a.substr(b+1,1),16);if(isNaN(f)||isNaN(g))return!1;c.push(f<<4|g)}return String.fromCharCode.apply(String,c)}function L(a){for(var c=0,b=1,e="",f,g,h,k,m,l,n,p,t,v,w,C,B,u,x,A,z;c<a.length;){k=a.charAt(c);m="";for(c++;c<a.length&&null!==a.charAt(c).match(/[\d*]/);)m+=a.charAt(c),c++;""===m&&(m="1");switch(k){case "a":case "A":if(arguments[b]===y)throw Error("pack(): Type "+k+": not enough arguments");f=String(arguments[b]);"*"===m&&(m=f.length);for(g=0;g<m;g++)e=f[g]===y?"a"===k?e+String.fromCharCode(0):e+" ":e+f[g];b++;break;case "h":case "H":if(arguments[b]===y)throw Error("pack(): Type "+k+": not enough arguments");f=arguments[b];"*"===m&&(m=f.length);if(m>f.length)throw Error("pack(): Type "+k+": not enough characters in string");for(g=0;g<m;g+=2)l=f[g],l=g+1>=m||f[g+1]===y?l+"0":l+f[g+1],"h"===k&&(l=l[1]+l[0]),e+=String.fromCharCode(parseInt(l,16));b++;break;case "c":case "C":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]),b++;break;case "s":case "S":case "v":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]&255),e+=String.fromCharCode(arguments[b]>>8&255),b++;break;case "n":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]>>8&255),e+=String.fromCharCode(arguments[b]&255),b++;break;case "i":case "I":case "l":case "L":case "V":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]&255),e+=String.fromCharCode(arguments[b]>>8&255),e+=String.fromCharCode(arguments[b]>>16&255),e+=String.fromCharCode(arguments[b]>>24&255),b++;break;case "N":"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++)e+=String.fromCharCode(arguments[b]>>24&255),e+=String.fromCharCode(arguments[b]>>16&255),e+=String.fromCharCode(arguments[b]>>8&255),e+=String.fromCharCode(arguments[b]&255),b++;break;case "f":case "d":l=23;n=8;"d"===k&&(l=52,n=11);"*"===m&&(m=arguments.length-b);if(m>arguments.length-b)throw Error("pack(): Type "+k+": too few arguments");for(g=0;g<m;g++){f=arguments[b];k=Math.pow(2,n-1)-1;h=-k+1;p=k;t=isNaN(u=parseFloat(f))||-Infinity===u||Infinity===u?u:0;v=0;w=2*k+1+l+3;C=Array(w);B=0>(u=0!==t?0:u);u=Math.abs(u);x=Math.floor(u);u-=x;for(f=w;f;)C[--f]=0;for(f=k+2;x&&f;)C[--f]=x%2,x=Math.floor(x/2);for(f=k+1;0<u&&f;--u)C[++f]=(1<=(u*=2))-0;for(f=-1;++f<w&&!C[f];);z=(u=l-1+(f=(v=k+1-f)>=h&&v<=p?f+1:k+1-(v=h-1)))+1;if(C[z]){if(!(A=C[u]))for(z=u+2;!A&&z<w;A=C[z++]);for(z=u+1;A&&0<=--z;(C[z]=!C[z]-0)&&(A=0));}for(f=0>f-2?-1:f-3;++f<w&&!C[f];);(v=k+1-f)>=h&&v<=p?++f:v<h&&(f=k+1-(v=h-1));if(x||0!==t)v=p+1,f=k+2,-Infinity===t?B=1:isNaN(t)&&(C[f]=1);u=Math.abs(v+k);k="";for(z=n+1;--z;)k=u%2+k,u=u>>=1;z=u=0;f=(k=(B?"1":"0")+k+C.slice(f,f+l).join("")).length;for(h=[];f;)u+=(1<<z)*k.charAt(--f),7===z&&(h[h.length]=String.fromCharCode(u),u=0),z=(z+1)%8;h[h.length]=u?String.fromCharCode(u):"";e+=h.join("");b++}break;case "x":if("*"===m)throw Error("pack(): Type x: '*' ignored");for(g=0;g<m;g++)e+=String.fromCharCode(0);break;case "X":if("*"===m)throw Error("pack(): Type X: '*' ignored");for(g=0;g<m;g++){if(0===e.length)throw Error("pack(): Type X: outside of string");e=e.substring(0,e.length-1)}break;case "@":if("*"===m)throw Error("pack(): Type X: '*' ignored");if(m>e.length)for(l=m-e.length,g=0;g<l;g++)e+=String.fromCharCode(0);m<e.length&&(e=e.substring(0,m));break;default:throw Error("pack(): Type "+k+": unknown format code");}}if(b<arguments.length)throw Error("pack(): "+(arguments.length-b)+" arguments unused");return e}function M(a,c){c+="";var b,e=c.length,f=[];if("C*"===a){for(b=0;b<e;b++)f[b+1]=c.charCodeAt(b);return f}if("H*hex"===a){f.hex=[];for(b=0;b<e;b++)f.hex[b+1]=((c.charCodeAt(b++)<<8)+c.charCodeAt(b)).toString(16);return f}}function Q(a,c,b){return y===b?a.test(c):c.match(a)}function Y(a,c){var b,e=null,f=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;"string"===typeof a?"function"===typeof B[a]?b=B[a]:a.match(f)&&(b=(new Function(null,"return "+a))()):"[object Array]"===Object.prototype.toString.call(a)?("string"===typeof a[0]?a[0].match(f)&&(b=eval(a[0]+"['"+a[1]+"']")):b=a[0][a[1]],"string"===typeof a[0]?"function"===typeof B[a[0]]?e=B[a[0]]:a[0].match(f)&&(e=eval(a[0])):"object"===typeof a[0]&&(e=a[0])):"function"===typeof a&&(b=a,e=B);if("function"!==typeof b)throw Error(b+" is not a valid function");return b.apply(e,c)}function Z(a,c,b){var e=/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/;switch(c){case 275:return b===y?e.test(a):1048576===b?!1!==E(a,"."):!0}return!1}function w(a){a+="";var c=0,b="",e=[];if(4===a.length)return[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)].join(".");if(16===a.length){for(c=0;16>c;c++)e.push(((a.charCodeAt(c++)<<8)+a.charCodeAt(c)).toString(16));return e.join(":").replace(/((^|:)0(?=:|$))+:?/g,function(a){b=a.length>b.length?a:b;return a}).replace(b||" ","::")}return!1}function na(a){a+="";var c,b;var e=String.fromCharCode;if(c=a.match(/^(?:\d{1,3}(?:\.|$)){4}/))return c=c[0].split("."),c=e(c[0])+e(c[1])+e(c[2])+e(c[3]),4===c.length?c:!1;if(c=a.match(/^((?:[\da-f]{1,4}(?::|)){0,8})(::)?((?:[\da-f]{1,4}(?::|)){0,8})$/)){for(b=1;4>b;b++)if(2!==b&&0!==c[b].length){c[b]=c[b].split(":");for(a=0;a<c[b].length;a++){c[b][a]=parseInt(c[b][a],16);if(isNaN(c[b][a]))return!1;c[b][a]=e(c[b][a]>>8)+e(c[b][a]&255)}c[b]=c[b].join("")}e=c[1].length+c[3].length;if(16===e)return c[1]+c[3];if(16>e&&0<c[2].length)return c[1]+Array(16-e+1).join("\x00")+c[3]}return!1}function oa(a){var c;a=a.match(/^([1-9]\d*|0[0-7]*|0x[\da-f]+)(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?(?:\.([1-9]\d*|0[0-7]*|0x[\da-f]+))?$/i);if(!a)return!1;a[0]=0;for(c=1;5>c;c+=1)a[0]+=!!(a[c]||"").length,a[c]=parseInt(a[c])||0;a.push(256,256,256,256);a[4+a[0]]*=Math.pow(256,4-a[0]);return a[1]>=a[5]||a[2]>=a[6]||a[3]>=a[7]||a[4]>=a[8]?!1:a[1]*(1===a[0]||16777216)+a[2]*(2>=a[0]||65536)+a[3]*(3>=a[0]||256)+1*a[4]}function l(a){this.__construct(a)}function A(a,c){this.__construct(a,c)}function x(a,c){this.__construct(a,c)}function R(a,c,b){var e=[].slice.call(arguments).slice(3);a&&a.addEventListener?a.addEventListener(c,function(){b.apply(a,e)},!1):a&&a.attachEvent&&a.attachEvent("on"+c,function(){b.apply(a,e)})}function ha(a){return a.trim().replace(",","\n").split("\n").map(function(a){return a.trim()})}function I(a){for(;t.g.firstChild;)t.g.removeChild(t.g.firstChild);t.g.appendChild(a?S.createTextNode(a+""):pa)}"function"!==typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(a,c){if(null==a)throw Error("Cannot convert undefined or null to object");var b,e,f=Object(a);for(e=1;e<arguments.length;e++){var g=arguments[e];if(null!=g)for(b in g)Object.prototype.hasOwnProperty.call(g,b)&&(f[b]=g[b])}return f},writable:!0,configurable:!0});Array.prototype.forEach||(Array.prototype.forEach=function(a,c){if(null==this)throw Error("this is null or not defined");var b,e,f=Object(this);var g=f.length>>>0;if("[object Function]"!=={}.toString.call(a))throw Error(a+" is not a function");c&&(b=c);for(e=0;e<g;){if(e in f){var h=f[e];a.call(b,h,e,f)}e++}});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});var n={},ia=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;n.abs=function(){var a=new this.constructor(this);a.s=1;return a};n.cmp=function(a){var c=this.c,b=(a=new this.constructor(a)).c,e=this.s,f=a.s,g=this.e,h=a.e;if(!c[0]||!b[0])return c[0]?e:b[0]?-f:0;if(e!==f)return e;a=0>e;if(g!==h)return g>h^a?1:-1;f=(g=c.length)<(h=b.length)?g:h;for(e=-1;++e<f;)if(c[e]!==b[e])return c[e]>b[e]^a?1:-1;return g===h?0:g>h^a?1:-1};n.div=function(a){var c=this.constructor,b=this.c,e=(a=new c(a)).c,f=this.s==a.s?1:-1,g=c.DP;if(g!==~~g||0>g||1E6<g)throw Error("Invalid decimal places");if(!e[0])throw Error("Division by zero");if(!b[0])return new c(0*f);var h,k=e.slice(),l=e.length,n=e.length;al=b.length;r=b.slice(0,n);rl=r.length;q=a;qc=q.c=[];qi=0;d=g+(q.e=this.e-a.e)+1;q.s=f;f=0>d?0:d;for(k.unshift(0);rl++<n;)r.push(0);do{for(h=0;10>h;h++){if(n!=(rl=r.length))var t=n>rl?1:-1;else{var p=-1;for(t=0;++p<n;)if(e[p]!=r[p]){t=e[p]>r[p]?1:-1;break}}if(0>t){for(a=rl==n?e:k;rl;){if(r[--rl]<a[rl]){for(p=rl;p&&!r[--p];)r[p]=9;--r[p];r[rl]+=10}r[rl]-=a[rl]}for(;!r[0];)r.shift()}else break}qc[qi++]=t?h:++h;r[0]&&t?r[rl]=b[l]||0:r=[b[l]]}while((l++<al||void 0!==r[0])&&f--);qc[0]||1==qi||(qc.shift(),q.e--);qi>d&&N(q,g,c.RM,void 0!==r[0]);return q};n.eq=function(a){return!this.cmp(a)};n.gt=function(a){return 0<this.cmp(a)};n.gte=function(a){return-1<this.cmp(a)};n.lt=function(a){return 0>this.cmp(a)};n.lte=function(a){return 1>this.cmp(a)};n.minus=n.sub=function(a){var c=this.constructor;var b=this.s,e=(a=new c(a)).s;if(b!==e)return a.s=-e,this.plus(a);var f=this.c.slice();var g=this.e;var h=a.c,k=a.e;if(!f[0]||!h[0])return h[0]?(a.s=-e,a):new c(f[0]?this:0);if(b=g-k){c=b;0>b?(b=-b,g=f):(k=g,g=h);g.reverse();for(e=b;e--;)g.push(0);g.reverse()}else for(g=((c=f.length<h.length)?f:h).length,b=e=0;e<g;e++)if(f[e]!=h[e]){c=f[e]<h[e];break}c&&(g=f,f=h,h=g,a.s=-a.s);if(0<(e=(g=h.length)-(c=f.length)))for(;e--;)f[c++]=0;for(e=c;g>b;){if(f[--g]<h[g]){for(c=g;c&&!f[--c];)f[c]=9;--f[c];f[g]+=10}f[g]-=h[g]}for(;0===f[--e];)f.pop();for(;0===f[0];)f.shift(),--k;f[0]||(a.s=1,f=[k=0]);a.c=f;a.e=k;return a};n.mod=function(a){var c=this,b=c.constructor,e=c.s,f=(a=new b(a)).s;if(!a.c[0])throw Error("Division by zero");c.s=a.s=1;var g=1===a.cmp(c);c.s=e;a.s=f;if(g)return new b(c);e=b.DP;f=b.RM;b.DP=b.RM=0;c=c.div(a);b.DP=e;b.RM=f;return this.minus(c.times(a))};n.plus=n.add=function(a){var c=this.constructor;var b=this.s,e=(a=new c(a)).s;if(b!==e)return a.s=-e,this.minus(a);e=this.e;var f=this.c,g=a.e,h=a.c;if(!f[0]||!h[0])return h[0]?a:new c(f[0]?this:0*b);f=f.slice();if(b=e-g){0<b?(g=e,c=h):(b=-b,c=f);for(c.reverse();b--;)c.push(0);c.reverse()}0>f.length-h.length&&(c=h,h=f,f=c);b=h.length;for(e=0;b;f[b]%=10)e=(f[--b]=f[b]+h[b]+e)/10|0;e&&(f.unshift(e),++g);for(b=f.length;0===f[--b];)f.pop();a.c=f;a.e=g;return a};n.pow=function(a){var c=this,b=new c.constructor(1),e=b,f=0>a;for(f&&(a=-a);;){a&1&&(e=e.times(c));a>>=1;if(!a)break;c=c.times(c)}return f?b.div(e):e};n.round=function(a,c){var b=this.constructor;if(void 0===a)a=0;else if(a!==~~a||0>a||1E6<a)throw Error("Invalid decimal places");return N(new b(this),a,void 0===c?b.RM:c)};n.sqrt=function(){var a=this.constructor;var c=this.s;var b=this.e,e=new a(.5);if(!this.c[0])return new a(this);if(0>c)throw Error("No square root");c=Math.sqrt(this.toString());0===c||c===1/0?(c=this.c.join(""),c.length+b&1||(c+="0"),c=new a(Math.sqrt(c).toString()),c.e=((b+1)/2|0)-(0>b||b&1)):c=new a(c.toString());b=c.e+(a.DP+=4);do{var f=c;c=e.times(f.plus(this.div(f)))}while(f.c.slice(0,b).join("")!==c.c.slice(0,b).join(""));return N(c,a.DP-=4,a.RM)};n.times=n.mul=function(a){var c=this.constructor;var b=this.c,e=(a=new c(a)).c,f=b.length,g=e.length,h=this.e,k=a.e;a.s=this.s===a.s?1:-1;if(!b[0]||!e[0])return new c(0*a.s);a.e=h+k;f<g&&(c=b,b=e,e=c,k=f,f=g,g=k);for(c=Array(k=f+g);k--;)c[k]=0;for(h=g;h--;){g=0;for(k=f+h;k>h;)g=c[k]+e[h]*b[k-h-1]+g,c[k--]=g%10,g=g/10|0;c[k]=(c[k]+g)%10}g?++a.e:c.shift();for(h=c.length;!c[--h];)c.pop();a.c=c;return a};n.toExponential=function(a){return J(this,1,a,a)};n.toFixed=function(a){return J(this,2,a,this.e+a)};n.toPrecision=function(a){return J(this,3,a,a-1)};n.toString=function(){return J(this)};n.valueOf=n.toJSON=function(){return J(this,4)};var p=aa();p["default"]=p.Big=p;B.Big=p;l.prototype={IP_V4:"IPv4",IP_V6:"IPv6",IP_V4_MAX_PREFIX_LENGTH:32,IP_V6_MAX_PREFIX_LENGTH:128,IP_V4_OCTETS:4,IP_V6_OCTETS:16,$in_addr:null,__construct:function(a){if(!Z(a,275))throw Error("Invalid IP address format: "+a);this.$in_addr=na(a)},toString:function(){return w(this.$in_addr)},parse:function(a){return 0===E(a,"0x")?(a=K(a,2),this.parseHex(a)):0===E(a,"0b")?(a=K(a,2),this.parseBin(a)):ea(a)?this.parseLong(a):new l(a)},parseBin:function(a){if(!Q(/^([0-1]{32}|[0-1]{128})$/,a))throw Error("Invalid binary IP address format: "+a);var c="";ka(la,fa(a,8)).forEach(function(a){c+=L("C*",a)});return new l(w(c))},parseHex:function(a){if(!Q(/^([0-9a-fA-F]{8}|[0-9a-fA-F]{32})$/,a))throw Error("Invalid hexadecimal IP address format: "+a);return new l(w(L("H*",a)))},parseLong:function(a,c){if(c===this.IP_V4){var b=a;b=isFinite(b)?[b>>>24,b>>>16&255,b>>>8&255,b&255].join("."):!1;b=new this(b)}else{var e=[];for(b=0;b<this.IP_V6_OCTETS;b++)e.push(p(a).mod(256)),a=p(a).div(256);e=V(e);e[0]="C*";b=new l(w(Y(L,e)))}return b},parseInAddr:function(a){return new l(w(a))},getVersion:function(){return Z(w(this.$in_addr),275,1048576)?this.IP_V4:Z(w(this.$in_addr),275,2097152)?this.IP_V6:!1},getMaxPrefixLength:function(){return this.getVersion()===this.IP_V4?this.IP_V4_MAX_PREFIX_LENGTH:this.IP_V6_MAX_PREFIX_LENGTH},getOctetsCount:function(){return this.getVersion()===this.IP_V4?this.IP_V4_OCTETS:this.IP_V6_OCTETS},getReversePointer:function(){if(this.getVersion()===this.IP_V4){var a=V(P(".",this.toString()));a=U(".",a)+".in-addr.arpa"}else a=M("H*hex",this.$in_addr),a=V(fa(a.hex)),a=U(".",a)+".ip6.arpa";return a},inAddr:function(){return this.$in_addr},toBin:function(){var a=[];M("C*",this.$in_addr).forEach(function(c){a.push(G(ma(c),8,"0",0))});return U(a)},toHex:function(){return W(this.$in_addr)},toLong:function(){var a=0;if(this.getVersion()===this.IP_V4)a=ca("%u",oa(w(this.$in_addr)));else{var c=this.IP_V6_OCTETS-1;var b=M("C*",this.$in_addr);b.forEach(function(b){var e=a;var g=c--;g=p(256).pow(g);b=p(b).times(g);a=O(e,b,1)})}return a},next:function(a){a=a||1;if(0>a)throw Error("Number must be greater than 0");var c,b,e=M("C*",this.$in_addr);for(c=0;c<a;c++)for(b=T(e);0<=b;--b)if(255>e[b]){e[b]++;break}else e[b]=0;e[0]="C*";return new l(w(Y(L,e)))},prev:function(a){a=a||1;if(0>a)throw Error("Number must be greater than 0");var c,b,e=M("C*",this.$in_addr);for(c=0;c<a;c++)for(b=T(e);0<=b;--b)if(0==e[b])e[b]=255;else{e[b]--;break}e[0]="C*";return new l(w(Y(L,e)))}};A.prototype={$ip:null,$netmask:null,$position:0,__construct:function(a,c){this.setIP(a);this.setNetmask(c)},toString:function(){return this.getCIDR()},parse:function(a){if(E(a,"/")){var c=P("/",a,2);a=c[0];c=c[1];a=l.prototype.parse(a);c=this.prefix2netmask(parseInt(c,10),a.getVersion())}else E(a," ")?(c=P(" ",a,2),a=c[0],c=c[1],a=l.prototype.parse(a),c=l.prototype.parse(c)):(a=l.prototype.parse(a),c=this.prefix2netmask(a.getMaxPrefixLength(),a.getVersion()));return new A(a,c)},prefix2netmask:function(a,c){a:{var b=[l.prototype.IP_V4,l.prototype.IP_V6];var e="";for(e in b)if(b.hasOwnProperty(e)&&b[e]==c){b=!0;break a}b=!1}if(!b)throw Error("Wrong IP version");b=c===l.prototype.IP_V4?l.prototype.IP_V4_MAX_PREFIX_LENGTH:l.prototype.IP_V6_MAX_PREFIX_LENGTH;if(!(ea(a)&&0<=a&&a<=b))throw Error("Invalid prefix length");b=G(G("",parseInt(a,10),"1"),b,"0");return l.prototype.parseBin(b)},netmask2prefix:function(a){a=a.toBin();var c="0";c=c?(c+"").replace(/([[\]().?/*{}+$^:])/g,"\\$1"):" \\s\u00a0";return((a+"").replace(new RegExp("["+c+"]+$","g"),"")+"").length},setIP:function(a){if(da(this.$netmask)&&this.$netmask.getVersion()!==a.getVersion())throw Error("IP version is not same as Netmask version");this.$ip=a},setNetmask:function(a){if(!Q(/^1*0*$/,a.toBin()))throw Error("Invalid Netmask address format");if(da(this.$ip)&&a.getVersion()!==this.$ip.getVersion())throw Error("Netmask version is not same as IP version");this.$netmask=a},setPrefixLength:function(a){this.setNetmask(this.prefix2netmask(parseInt(a,10),this.$ip.getVersion()))},getIP:function(){return this.$ip},getNetmask:function(){return this.$netmask},getNetwork:function(){var a=this.getIP().inAddr()+"",c=this.getNetmask().inAddr()+"",b,e=a.length,f=[];for(b=0;b<e;b++)f.push(G((a.charCodeAt(b)&c.charCodeAt(b)).toString(16),2,"0",0));return new l(w(X(f.join(""))))},getPrefixLength:function(){return this.netmask2prefix(this.getNetmask())},getCIDR:function(){return ca("%s/%s",this.getNetwork(),this.getPrefixLength())},getWildcard:function(){return new l(w(~this.getNetmask().inAddr()))},getBroadcast:function(){var a=this.getNetwork().inAddr()+"",c=this.getNetmask().inAddr()+"",b,e=a.length,f=[];for(b=0;b<e;b++)f.push(G((a.charCodeAt(b)|~c.charCodeAt(b)&255).toString(16),2,"0",0));return new l(w(X(f.join(""))))},getFirstIP:function(){return this.getNetwork()},getLastIP:function(){return this.getBroadcast()},getBlockSize:function(){var a=this.$ip.getMaxPrefixLength(),c=this.getPrefixLength();return this.$ip.getVersion()===l.prototype.IP_V6?(a=a-c+"",p("2").pow(a)):Math.pow(2,a-c)},getHosts:function(){var a=this.getNetwork(),c=this.getBroadcast();this.$ip.getVersion()===l.prototype.IP_V4&&2<this.getBlockSize()&&(a=l.prototype.parseBin(K(a.toBin(),0,a.getMaxPrefixLength()-1)+"1"),c=l.prototype.parseBin(K(c.toBin(),0,c.getMaxPrefixLength()-1)+"0"));return new x(a,c)},exclude:function(a){a=this.parse(a);if(0<v(a.getFirstIP().inAddr(),this.getLastIP().inAddr())||0>v(a.getLastIP().inAddr(),this.getFirstIP().inAddr()))throw Error("Exclude subnet not within target network");var c=[],b=this.getPrefixLength()+1;var e=H(!0,{},this);e.setPrefixLength(b);var f=H(!0,{},e);for(f.setIP(e.getLastIP().next());b<=a.getPrefixLength();){var g=new x(e.getFirstIP(),e.getLastIP());if(g.contains(a)){g=e;var h=f}else g=f,h=e;c.push(H(!0,{},h));if(++b>this.getNetwork().getMaxPrefixLength())break;g.setPrefixLength(b);h.setPrefixLength(b);h.setIP(g.getLastIP().next())}return A.prototype.sort(c)},moveTo:function(a){var c=this.$ip.getMaxPrefixLength();if(a<=this.getPrefixLength()||a>c)throw Error("Invalid prefix length");c=this.prefix2netmask(a,this.$ip.getVersion());var b=[];var e=H(!0,{},this);for(e.setPrefixLength(a);e.$ip.inAddr()<this.getLastIP().inAddr();)b.push(e),e=new A(e.getLastIP().next(),c);return b},sort:function(a){return a.sort(function(a,b){a=l.prototype.parse((a+"").split("/").shift()).toHex();b=l.prototype.parse((b+"").split("/").shift()).toHex();return v(a,b)})},current:function(){return this.getFirstIP().next(this.$position)},key:function(){return this.$position},next:function(){++this.$position},rewind:function(){this.$position=0},valid:function(){return 0>=v(this.getFirstIP().next(this.$position).inAddr(),this.getLastIP().inAddr())},count:function(){return parseInt(this.getBlockSize())}};x.prototype={$firstIP:null,$lastIP:null,$position:0,__construct:function(a,c){this.setFirstIP(a);this.setLastIP(c)},parse:function(a){if(E(a,"/")||E(a," ")){a=A.prototype.parse(a);var c=a.getFirstIP();a=a.getLastIP()}else E(a,"*")?(c=l.prototype.parse(a.replace("*","0")),a=l.prototype.parse(a.replace("*","255"))):E(a,"-")?(a=P("-",a,2),c=l.prototype.parse(a[0]),a=l.prototype.parse(a[1])):(c=l.prototype.parse(a),a=H(!0,{},c));return new x(c,a)},contains:function(a){if(a instanceof l)a=0<=v(a.inAddr(),this.$firstIP.inAddr())&&0>=v(a.inAddr(),this.$lastIP.inAddr());else if(a instanceof x||a instanceof A)a=0<=v(a.getFirstIP().inAddr(),this.$firstIP.inAddr())&&0>=v(a.getLastIP().inAddr(),this.$lastIP.inAddr());else throw Error("Invalid type");return a},setFirstIP:function(a){if(this.$lastIP&&0<v(a.inAddr(),this.$lastIP.inAddr()))throw Error("First IP is grater than second");this.$firstIP=a},setLastIP:function(a){if(this.$firstIP&&0>v(a.inAddr(),this.$firstIP.inAddr()))throw Error("Last IP is less than first");this.$lastIP=a},getFirstIP:function(){return this.$firstIP},getLastIP:function(){return this.$lastIP},getNetworks:function(){var a=this.getSpanNetwork(),c=[];if(a.getFirstIP().inAddr()===this.$firstIP.inAddr()&&a.getLastIP().inAddr()===this.$lastIP.inAddr())c.push(a);else{if(a.getFirstIP().inAddr()!==this.$firstIP.inAddr()){var b=a.exclude(this.$firstIP.prev());var e=this.$firstIP.inAddr();b.forEach(function(a){0<=v(a.getFirstIP().inAddr(),e)&&c.push(a)})}a.getLastIP().inAddr()!==this.$lastIP.inAddr()&&(c.length?(b=ja(c),b=b.exclude(this.$lastIP.next())):b=a.exclude(this.$lastIP.next()),e=this.$lastIP.inAddr(),b.forEach(function(a){a.getLastIP().inAddr()<=e&&c.push(a)}))}return A.prototype.sort(c)},getSpanNetwork:function(){var a=this.getFirstIP().inAddr()+"",c=this.getLastIP().inAddr()+"",b,e=a.length,f=[];for(b=0;b<e;b++)f.push(G((a.charCodeAt(b)^c.charCodeAt(b)).toString(16),2,"0",0));c=l.prototype.parseInAddr(X(f.join("")));a=(Q(/^(0*)/,c.toBin(),!0)[1]+"").length;c=l.prototype.parseBin(G(K(this.getFirstIP().toBin(),0,a),c.getMaxPrefixLength(),"0"));return new A(c,A.prototype.prefix2netmask(a,c.getVersion()))},sort:function(a){return a.sort(function(a,b){var c=v(a.getFirstIP().inAddr(),b.getFirstIP().inAddr());return c?c:v(a.getLastIP().inAddr(),b.getLastIP().inAddr())})},merge:function(a){a=x.prototype.sort(a);for(var c=0;c<a.length-1;)0<=v(a[c].getLastIP().next().inAddr(),a[c+1].getFirstIP().inAddr())?(a[c].setLastIP(a[c+1].getLastIP()),a.splice(c+1,1)):++c;return a},current:function(){return this.$firstIP.next(this.$position)},key:function(){return this.$position},next:function(){++this.$position},rewind:function(){this.$position=0},valid:function(){return 0>=v(W(this.$firstIP.next(this.$position).inAddr()),W(this.$lastIP.inAddr()))},count:function(){var a=this.$lastIP.toLong();var c=this.$firstIP.toLong();a=p(a).minus(c);return O(a,1)}};B.IP=l;B.Network=A;B.Range=x;var t={};"abcdefg".split("").map(function(a){t[a]=S.getElementById(a)});var pa=t.g?t.g.firstChild.cloneNode(!1):null;R(t.a,"click",function(a){a.value="";I()},t.c);R(t.b,"click",function(a){a.value="";I()},t.d);R(t.e,"click",function(a,c){var b=ha(a.value);console.log(b);if(b[0])try{var e,f=[];var g=0;for(e=b.length;g<e;++g)b[g]&&(b[g]=b[g].split("-").map(function(a){return a.trim()}),1===b[g].length&&b[g].push(b[g][0]),2===b[g].length&&(b[g][1]=b[g][1]||b[g][0],b[g][0]=b[g][0]||b[g][1],b[g][0]&&b[g][1]&&f.push(new x(new l(b[g][0]),new l(b[g][1])))));f=x.prototype.merge(f);var h=p(0);c.value="";g=0;for(e=f.length;g<e;++g)h=O(h,f[g].count(),1),f[g].getNetworks().forEach(function(a){c.value+=a+"\n"});I(h.gt(p(0))?h:null)}catch(k){I(k.message)}},t.c,t.d);R(t.f,"click",function(a,c){var b=ha(a.value);console.log(b);if(b[0])try{var e,f=[];var g=0;for(e=b.length;g<e;++g)b[g]&&f.push(x.prototype.parse(b[g]));f=x.prototype.merge(f);var h=p(0);c.value="";g=0;for(e=f.length;g<e;++g)h=O(h,f[g].count(),1),c.value+=f[g].getFirstIP()+" - "+f[g].getLastIP()+"\n";I(h.gt(p(0))?h:null)}catch(k){I(k.message)}},t.d,t.c);S.getElementById("c").focus()})(window,document);
classes/class-ip-geo-block-actv.php CHANGED
@@ -68,9 +68,9 @@ class IP_Geo_Block_Activate {
68
 
69
  if ( $settings['network_wide'] ) {
70
  // Copy settings of main site to individual site
71
- $map = IP_Geo_Block::get_option();
72
  $settings['api_key']['GoogleMap'] = $map['api_key']['GoogleMap'];
73
- update_option( IP_Geo_Block::OPTION_NAME, $settings );
74
  }
75
 
76
  // Initialize inidivisual site
68
 
69
  if ( $settings['network_wide'] ) {
70
  // Copy settings of main site to individual site
71
+ $map = IP_Geo_Block::get_option( FALSE );
72
  $settings['api_key']['GoogleMap'] = $map['api_key']['GoogleMap'];
73
+ IP_Geo_Block::update_option( $settings, FALSE );
74
  }
75
 
76
  // Initialize inidivisual site
classes/class-ip-geo-block-apis.php CHANGED
@@ -452,7 +452,7 @@ class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
452
 
453
  public static function update_cache( $hook, $validate, $settings ) {
454
  $time = $_SERVER['REQUEST_TIME'];
455
- $cache = self::get_cache( $ip = $validate['ip'] );
456
 
457
  if ( $cache ) {
458
  $fail = $cache['fail'] + ( 'failed' === $validate['result'] ? 1 : 0 );
@@ -489,7 +489,7 @@ class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
489
  );
490
 
491
  // do not update cache while installing geolocation databases
492
- if ( $settings['cache_hold'] && ( ! $validate['auth'] || 'ZZ' !== $validate['code'] ) )
493
  IP_Geo_Block_Logs::update_cache( $cache );
494
 
495
  return self::$memcache[ $ip ] = $cache;
@@ -500,11 +500,11 @@ class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
500
  self::$memcache = array();
501
  }
502
 
503
- public static function get_cache( $ip ) {
504
- if ( ! empty( self::$memcache[ $ip ] ) )
505
  return self::$memcache[ $ip ];
506
  else
507
- return self::$memcache[ $ip ] = IP_Geo_Block_Logs::search_cache( $ip );
508
  }
509
 
510
  public function get_location( $ip, $args = array() ) {
@@ -630,7 +630,8 @@ class IP_Geo_Block_Provider {
630
  */
631
  public static function get_valid_providers( $settings, $rand = TRUE, $cache = TRUE, $all = TRUE ) {
632
  $list = array();
633
- $providers = $settings['providers'];
 
634
 
635
  foreach ( self::get_providers( 'key', $rand, $cache, empty( $settings['restrict_api'] ) && $all ) as $key => $val ) {
636
  if ( ! empty( $providers[ $key ] ) || ( ! isset( $providers[ $key ] ) && NULL === $val ) )
452
 
453
  public static function update_cache( $hook, $validate, $settings ) {
454
  $time = $_SERVER['REQUEST_TIME'];
455
+ $cache = self::get_cache( $ip = $validate['ip'], $settings['cache_hold'] );
456
 
457
  if ( $cache ) {
458
  $fail = $cache['fail'] + ( 'failed' === $validate['result'] ? 1 : 0 );
489
  );
490
 
491
  // do not update cache while installing geolocation databases
492
+ if ( $settings['cache_hold'] && ! ( $validate['auth'] && 'ZZ' === $validate['code'] ) )
493
  IP_Geo_Block_Logs::update_cache( $cache );
494
 
495
  return self::$memcache[ $ip ] = $cache;
500
  self::$memcache = array();
501
  }
502
 
503
+ public static function get_cache( $ip, $use_cache = TRUE ) {
504
+ if ( isset( self::$memcache[ $ip ] ) )
505
  return self::$memcache[ $ip ];
506
  else
507
+ return $use_cache ? self::$memcache[ $ip ] = IP_Geo_Block_Logs::search_cache( $ip ) : NULL;
508
  }
509
 
510
  public function get_location( $ip, $args = array() ) {
630
  */
631
  public static function get_valid_providers( $settings, $rand = TRUE, $cache = TRUE, $all = TRUE ) {
632
  $list = array();
633
+ $providers = $settings['providers' ];
634
+ $cache &= $settings['cache_hold']; // exclude `Cache` when `IP address cache` is disabled
635
 
636
  foreach ( self::get_providers( 'key', $rand, $cache, empty( $settings['restrict_api'] ) && $all ) as $key => $val ) {
637
  if ( ! empty( $providers[ $key ] ) || ( ! isset( $providers[ $key ] ) && NULL === $val ) )
classes/class-ip-geo-block-cron.php CHANGED
@@ -1,424 +1,430 @@
1
- <?php
2
- /**
3
- * IP Geo Block - Cron Class
4
- *
5
- * @package IP_Geo_Block
6
- * @author tokkonopapa <tokkonopapa@yahoo.com>
7
- * @license GPL-3.0
8
- * @link https://www.ipgeoblock.com/
9
- * @copyright 2013-2018 tokkonopapa
10
- */
11
-
12
- class IP_Geo_Block_Cron {
13
-
14
- /**
15
- * Cron scheduler.
16
- *
17
- */
18
- private static function schedule_cron_job( &$update, $db, $immediate = FALSE ) {
19
- wp_clear_scheduled_hook( IP_Geo_Block::CRON_NAME, array( $immediate ) );
20
-
21
- if ( $update['auto'] || $immediate ) {
22
- $now = time();
23
- $next = $now + ( $immediate ? 0 : DAY_IN_SECONDS );
24
-
25
- if ( FALSE === $immediate ) {
26
- ++$update['retry'];
27
- $cycle = DAY_IN_SECONDS * (int)$update['cycle'];
28
-
29
- if ( isset( $db['ipv4_last'] ) ) {
30
- // in case of Maxmind Legacy or IP2Location
31
- if ( $now - (int)$db['ipv4_last'] < $cycle &&
32
- $now - (int)$db['ipv6_last'] < $cycle ) {
33
- $update['retry'] = 0;
34
- $next = max( (int)$db['ipv4_last'], (int)$db['ipv6_last'] ) +
35
- $cycle + rand( DAY_IN_SECONDS, DAY_IN_SECONDS * 6 );
36
- }
37
- } else {
38
- // in case of Maxmind GeoLite2
39
- if ( $now - (int)$db['ip_last'] < $cycle ) {
40
- $update['retry'] = 0;
41
- $next = (int)$db['ip_last'] +
42
- $cycle + rand( DAY_IN_SECONDS, DAY_IN_SECONDS * 6 );
43
- }
44
- }
45
- }
46
-
47
- wp_schedule_single_event( $next, IP_Geo_Block::CRON_NAME, array( $immediate ) );
48
- }
49
- }
50
-
51
- /**
52
- * Database auto downloader.
53
- *
54
- * This function is called when:
55
- * 1. Plugin is activated
56
- * 2. WP Cron is kicked
57
- * under the following condition:
58
- * A. Once per site when this plugin is activated on network wide
59
- * B. Multiple time for each blog when this plugin is individually activated
60
- */
61
- public static function exec_update_db( $immediate = FALSE ) {
62
- // extract ip address from transient API to confirm the request source
63
- $ip = IP_Geo_Block::get_ip_address( $settings = IP_Geo_Block::get_option() );
64
- add_filter( IP_Geo_Block::PLUGIN_NAME . '-ip-addr', array( __CLASS__, 'extract_ip' ) );
65
-
66
- $context = IP_Geo_Block::get_instance();
67
- $args = IP_Geo_Block::get_request_headers( $settings );
68
-
69
- // download database files (higher priority order)
70
- foreach ( $providers = IP_Geo_Block_Provider::get_addons( $settings['providers'] ) as $provider ) {
71
- if ( $geo = IP_Geo_Block_API::get_instance( $provider, $settings ) ) {
72
- $res[ $provider ] = $geo->download( $settings[ $provider ], $args );
73
-
74
- // re-schedule cron job
75
- self::schedule_cron_job( $settings['update'], $settings[ $provider ], FALSE );
76
-
77
- // update provider settings
78
- self::update_settings( $settings, array( 'update', $provider ) );
79
-
80
- // skip to update settings in case of InfiniteWP that could be in a different country
81
- if ( isset( $_SERVER['HTTP_X_REQUESTED_FROM'] ) && FALSE !== strpos( $_SERVER['HTTP_X_REQUESTED_FROM'], 'InfiniteWP' ) )
82
- continue;
83
-
84
- // update matching rule immediately
85
- if ( $immediate && 'done' !== get_transient( IP_Geo_Block::CRON_NAME ) ) {
86
- $validate = $context->validate_ip( 'admin', $settings );
87
-
88
- if ( 'ZZ' === $validate['code'] )
89
- continue;
90
-
91
- // matching rule should be reset when blocking happens
92
- if ( 'passed' !== $validate['result'] )
93
- $settings['matching_rule'] = -1;
94
-
95
- // setup country code in whitelist if it needs to be initialized
96
- if ( -1 === (int)$settings['matching_rule'] ) {
97
- $settings['matching_rule'] = 0; // white list
98
-
99
- // when the country code doesn't exist in whitelist, then add it
100
- if ( FALSE === strpos( $settings['white_list'], $validate['code'] ) )
101
- $settings['white_list'] .= ( $settings['white_list'] ? ',' : '' ) . $validate['code'];
102
- }
103
-
104
- // update option settings
105
- self::update_settings( $settings, array( 'matching_rule', 'white_list' ) );
106
-
107
- // finished to update matching rule
108
- set_transient( IP_Geo_Block::CRON_NAME, 'done', 5 * MINUTE_IN_SECONDS );
109
- }
110
- }
111
- }
112
-
113
- return isset( $res ) ? $res : NULL;
114
- }
115
-
116
- /**
117
- * Update setting data according to the site type.
118
- *
119
- */
120
- private static function update_settings( $src, $keys = array() ) {
121
- // for multisite
122
- if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) {
123
- global $wpdb;
124
- $blog_ids = $wpdb->get_col( "SELECT `blog_id` FROM `$wpdb->blogs`" );
125
-
126
- foreach ( $blog_ids as $id ) {
127
- switch_to_blog( $id );
128
- $dst = IP_Geo_Block::get_option();
129
-
130
- foreach ( $keys as $key ) {
131
- $dst[ $key ] = $src[ $key ];
132
- }
133
-
134
- update_option( IP_Geo_Block::OPTION_NAME, $dst );
135
- restore_current_blog();
136
- }
137
- }
138
-
139
- // for single site
140
- else {
141
- update_option( IP_Geo_Block::OPTION_NAME, $src );
142
- }
143
- }
144
-
145
- /**
146
- * Extract ip address from transient API.
147
- *
148
- */
149
- public static function extract_ip() {
150
- return filter_var(
151
- $ip_adrs = get_transient( IP_Geo_Block::CRON_NAME ), FILTER_VALIDATE_IP
152
- ) ? $ip_adrs : $_SERVER['REMOTE_ADDR'];
153
- }
154
-
155
- /**
156
- * Kick off a cron job to download database immediately in background on activation.
157
- *
158
- */
159
- public static function start_update_db( $settings, $immediate = TRUE ) {
160
- // updating should be done by main site when this plugin is activated for network
161
- if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) && ! is_main_site() )
162
- return;
163
-
164
- if ( $immediate ) // update matching rule immediately in exec_update_db() / extract_ip()
165
- set_transient( IP_Geo_Block::CRON_NAME, IP_Geo_Block::get_ip_address( $settings ), MINUTE_IN_SECONDS );
166
-
167
- self::schedule_cron_job( $settings['update'], NULL, $immediate );
168
- }
169
-
170
- public static function stop_update_db() {
171
- wp_clear_scheduled_hook( IP_Geo_Block::CRON_NAME, array( FALSE ) ); // @since 2.1.0
172
- }
173
-
174
- /**
175
- * Kick off a cron job to garbage collection for IP address cache.
176
- *
177
- */
178
- public static function exec_cache_gc( $settings ) {
179
- self::stop_cache_gc();
180
-
181
- IP_Geo_Block_Logs::delete_expired( array(
182
- min( 365, max( 1, (int)$settings['validation']['explogs'] ) ) * DAY_IN_SECONDS,
183
- (int)$settings['cache_time']
184
- ) );
185
-
186
- self::start_cache_gc( $settings );
187
- }
188
-
189
- public static function start_cache_gc( $settings = FALSE ) {
190
- $settings or $settings = IP_Geo_Block::get_option();
191
-
192
- if ( ! wp_next_scheduled( IP_Geo_Block::CACHE_NAME ) )
193
- wp_schedule_single_event( time() + max( $settings['cache_time_gc'], MINUTE_IN_SECONDS ), IP_Geo_Block::CACHE_NAME );
194
- }
195
-
196
- public static function stop_cache_gc() {
197
- wp_clear_scheduled_hook( IP_Geo_Block::CACHE_NAME ); // @since 2.1.0
198
- }
199
-
200
- /**
201
- * Decompresses gz archive and output to the file.
202
- *
203
- * @param string $src full path to the downloaded file.
204
- * @param string $dst full path to extracted file.
205
- * @return TRUE or array of error code and message.
206
- */
207
- private static function gzfile( $src, $dst ) {
208
- try {
209
- if ( FALSE === ( $gz = gzopen( $src, 'r' ) ) )
210
- throw new Exception(
211
- sprintf( __( 'Unable to read <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $src )
212
- );
213
-
214
- if ( FALSE === ( $fp = @fopen( $dst, 'cb' ) ) )
215
- throw new Exception(
216
- sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $filename )
217
- );
218
-
219
- if ( ! flock( $fp, LOCK_EX ) )
220
- throw new Exception(
221
- sprintf( __( 'Can\'t lock <code>%s</code>. Please try again after a while.', 'ip-geo-block' ), $filename )
222
- );
223
-
224
- ftruncate( $fp, 0 ); // truncate file
225
-
226
- // same block size in wp-includes/class-http.php
227
- while ( $data = gzread( $gz, 4096 ) ) {
228
- fwrite( $fp, $data, strlen( $data ) );
229
- }
230
- }
231
-
232
- catch ( Exception $e ) {
233
- $err = array(
234
- 'code' => $e->getCode(),
235
- 'message' => $e->getMessage(),
236
- );
237
- }
238
-
239
- if ( ! empty( $fp ) ) {
240
- fflush( $fp ); // flush output before releasing the lock
241
- flock ( $fp, LOCK_UN ); // release the lock
242
- fclose( $fp );
243
- }
244
-
245
- return empty( $err ) ? TRUE : $err;
246
- }
247
-
248
- /**
249
- * Download zip/gz file, uncompress and save it to specified file
250
- *
251
- * @param string $url URL of remote file to be downloaded.
252
- * @param array $args request headers.
253
- * @param string $filename full path to the downloaded file.
254
- * @param int $modified time of last modified on the remote server.
255
- * @return array status message.
256
- */
257
- public static function download_zip( $url, $args, $files, $modified ) {
258
- require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
259
- $fs = IP_Geo_Block_FS::init( 'download_zip' );
260
-
261
- // get extension
262
- $ext = strtolower( pathinfo( $url, PATHINFO_EXTENSION ) );
263
- if ( 'tar' === strtolower( pathinfo( pathinfo( $url, PATHINFO_FILENAME ), PATHINFO_EXTENSION ) ) )
264
- $ext = 'tar';
265
-
266
- // check file (1st parameter includes absolute path in case of array)
267
- $filename = is_array( $files ) ? $files[0] : (string)$files;
268
- if ( ! $fs->exists( $filename ) )
269
- $modified = 0;
270
-
271
- // set 'If-Modified-Since' request header
272
- $args += array(
273
- 'headers' => array(
274
- 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
275
- 'Accept-Encoding' => 'gzip, deflate',
276
- 'If-Modified-Since' => gmdate( DATE_RFC1123, (int)$modified ),
277
- ),
278
- );
279
-
280
- // fetch file and get response code & message
281
- if ( isset( $args['method'] ) && 'GET' === $args['method'] )
282
- $src = wp_remote_get ( ( $url = esc_url_raw( $url ) ), $args );
283
- else
284
- $src = wp_remote_head( ( $url = esc_url_raw( $url ) ), $args );
285
-
286
- if ( is_wp_error( $src ) )
287
- return array(
288
- 'code' => $src->get_error_code(),
289
- 'message' => $src->get_error_message(),
290
- );
291
-
292
- $code = wp_remote_retrieve_response_code ( $src );
293
- $mesg = wp_remote_retrieve_response_message( $src );
294
- $data = wp_remote_retrieve_header( $src, 'last-modified' );
295
- $modified = $data ? strtotime( $data ) : $modified;
296
-
297
- if ( 304 == $code )
298
- return array(
299
- 'code' => $code,
300
- 'message' => __( 'Your database file is up-to-date.', 'ip-geo-block' ),
301
- 'filename' => $filename,
302
- 'modified' => $modified,
303
- );
304
-
305
- elseif ( 200 != $code )
306
- return array(
307
- 'code' => $code,
308
- 'message' => $code.' '.$mesg,
309
- );
310
-
311
- try {
312
- // in case that the server which does not support HEAD method
313
- if ( isset( $args['method'] ) && 'GET' === $args['method'] ) {
314
- $data = wp_remote_retrieve_body( $src );
315
-
316
- if ( 'gz' === $ext ) {
317
- if ( function_exists( 'gzdecode') ) { // @since PHP 5.4.0
318
- if ( FALSE === $fs->put_contents( $filename, gzdecode( $data ) ) )
319
- throw new Exception(
320
- sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $filename )
321
- );
322
- }
323
-
324
- else {
325
- $src = get_temp_dir() . basename( $url ); // $src should be removed
326
- $fs->put_contents( $src, $data );
327
- TRUE === ( $ret = self::gzfile( $src, $filename ) ) or $err = $ret;
328
- }
329
- }
330
-
331
- elseif ( 'tar' === $ext && class_exists( 'PharData', FALSE ) ) { // @since PECL phar 2.0.0
332
- $name = wp_remote_retrieve_header( $src, 'content-disposition' );
333
- $name = explode( 'filename=', $name );
334
- $name = array_pop( $name ); // e.g. GeoLite2-Country_20180102.tar.gz
335
- $src = ( $tmp = get_temp_dir() ) . $name; // $src should be removed
336
-
337
- // CVE-2015-6833: A directory traversal when extracting ZIP files could be used to overwrite files
338
- // outside of intended area via a `..` in a ZIP archive entry that is mishandled by extractTo().
339
- if ( $fs->put_contents( $src, $data ) ) {
340
- $data = new PharData( $src, FilesystemIterator::SKIP_DOTS ); // get archives
341
-
342
- // make the list of contents to be extracted from archives.
343
- // when the list doesn't match the contents in archives, extractTo() may be crushed on windows.
344
- $dst = $data->getSubPathname(); // e.g. GeoLite2-Country_20180102
345
- foreach ( $files as $key => $val ) {
346
- $files[ $key ] = $dst.'/'.basename( $val );
347
- }
348
-
349
- // extract specific files from archives into temporary directory and copy it to the destination.
350
- $data->extractTo( $tmp .= $dst, $files /* NULL */, TRUE ); // $tmp should be removed
351
-
352
- // copy extracted files to Geolocation APIs directory
353
- $dst = dirname( $filename );
354
- foreach ( $files as $val ) {
355
- // should the destination be exclusive with LOCK_EX ?
356
- // $fs->put_contents( $dst.'/'.basename( $val ), $fs->get_contents( $tmp.'/'.$val ) );
357
- $fs->copy( $tmp.'/'.$val, $dst.'/'.basename( $val ), TRUE );
358
- }
359
- }
360
- }
361
- }
362
-
363
- // downloaded and unzip
364
- else {
365
- // download file
366
- $src = download_url( $url );
367
-
368
- if ( is_wp_error( $src ) )
369
- throw new Exception(
370
- $src->get_error_code() . ' ' . $src->get_error_message()
371
- );
372
-
373
- // unzip file
374
- if ( 'gz' === $ext ) {
375
- TRUE === ( $ret = self::gzfile( $src, $filename ) ) or $err = $ret;
376
- }
377
-
378
- elseif ( 'zip' === $ext && class_exists( 'ZipArchive', FALSE ) ) {
379
- $tmp = get_temp_dir(); // @since 2.5
380
- $ret = $fs->unzip_file( $src, $tmp ); // @since 2.5
381
-
382
- if ( is_wp_error( $ret ) )
383
- throw new Exception(
384
- $ret->get_error_code() . ' ' . $ret->get_error_message()
385
- );
386
-
387
- if ( FALSE === ( $data = $fs->get_contents( $tmp .= basename( $filename ) ) ) )
388
- throw new Exception(
389
- sprintf( __( 'Unable to read <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $tmp )
390
- );
391
-
392
- if ( FALSE === $fs->put_contents( $filename, $data ) )
393
- throw new Exception(
394
- sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $filename )
395
- );
396
- }
397
-
398
- else {
399
- throw new Exception( __( 'gz or zip is not supported on your system.', 'ip-geo-block' ) );
400
- }
401
- }
402
- }
403
-
404
- // error handler
405
- catch ( Exception $e ) {
406
- $err = array(
407
- 'code' => $e->getCode(),
408
- 'message' => $e->getMessage(),
409
- );
410
- }
411
-
412
- ! empty ( $gz ) and gzclose( $gz );
413
- ! empty ( $tmp ) and $fs->delete( $tmp, TRUE ); // should be removed recursively in case of directory
414
- is_string( $src ) && $fs->is_file( $src ) and $fs->delete( $src );
415
-
416
- return empty( $err ) ? array(
417
- 'code' => $code,
418
- 'message' => sprintf( __( 'Last update: %s', 'ip-geo-block' ), IP_Geo_Block_Util::localdate( $modified ) ),
419
- 'filename' => $filename,
420
- 'modified' => $modified,
421
- ) : $err;
422
- }
423
-
 
 
 
 
 
 
424
  }
1
+ <?php
2
+ /**
3
+ * IP Geo Block - Cron Class
4
+ *
5
+ * @package IP_Geo_Block
6
+ * @author tokkonopapa <tokkonopapa@yahoo.com>
7
+ * @license GPL-3.0
8
+ * @link https://www.ipgeoblock.com/
9
+ * @copyright 2013-2018 tokkonopapa
10
+ */
11
+
12
+ class IP_Geo_Block_Cron {
13
+
14
+ /**
15
+ * Cron scheduler.
16
+ *
17
+ */
18
+ private static function schedule_cron_job( &$update, $db, $immediate = FALSE ) {
19
+ wp_clear_scheduled_hook( IP_Geo_Block::CRON_NAME, array( $immediate ) );
20
+
21
+ if ( $update['auto'] || $immediate ) {
22
+ $now = time();
23
+ $next = $now + ( $immediate ? 0 : DAY_IN_SECONDS );
24
+
25
+ if ( FALSE === $immediate ) {
26
+ ++$update['retry'];
27
+ $cycle = DAY_IN_SECONDS * (int)$update['cycle'];
28
+
29
+ if ( isset( $db['ipv4_last'] ) ) {
30
+ // in case of Maxmind Legacy or IP2Location
31
+ if ( $now - (int)$db['ipv4_last'] < $cycle &&
32
+ $now - (int)$db['ipv6_last'] < $cycle ) {
33
+ $update['retry'] = 0;
34
+ $next = max( (int)$db['ipv4_last'], (int)$db['ipv6_last'] ) +
35
+ $cycle + rand( DAY_IN_SECONDS, DAY_IN_SECONDS * 6 );
36
+ }
37
+ } else {
38
+ // in case of Maxmind GeoLite2
39
+ if ( $now - (int)$db['ip_last'] < $cycle ) {
40
+ $update['retry'] = 0;
41
+ $next = (int)$db['ip_last'] +
42
+ $cycle + rand( DAY_IN_SECONDS, DAY_IN_SECONDS * 6 );
43
+ }
44
+ }
45
+ }
46
+
47
+ wp_schedule_single_event( $next, IP_Geo_Block::CRON_NAME, array( $immediate ) );
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Database auto downloader.
53
+ *
54
+ * This function is called when:
55
+ * 1. Plugin is activated
56
+ * 2. WP Cron is kicked
57
+ * under the following condition:
58
+ * A. Once per site when this plugin is activated on network wide
59
+ * B. Multiple time for each blog when this plugin is individually activated
60
+ */
61
+ public static function exec_update_db( $immediate = FALSE ) {
62
+ $settings = IP_Geo_Block::get_option();
63
+
64
+ // extract ip address from transient API to confirm the request source
65
+ if ( $immediate ) {
66
+ set_transient( IP_Geo_Block::CRON_NAME, IP_Geo_Block::get_ip_address( $settings ), MINUTE_IN_SECONDS );
67
+ add_filter( IP_Geo_Block::PLUGIN_NAME . '-ip-addr', array( __CLASS__, 'extract_ip' ) );
68
+ }
69
+
70
+ $context = IP_Geo_Block::get_instance();
71
+ $args = IP_Geo_Block::get_request_headers( $settings );
72
+
73
+ // download database files (higher priority order)
74
+ foreach ( $providers = IP_Geo_Block_Provider::get_addons( $settings['providers'] ) as $provider ) {
75
+ if ( $geo = IP_Geo_Block_API::get_instance( $provider, $settings ) ) {
76
+ $res[ $provider ] = $geo->download( $settings[ $provider ], $args );
77
+
78
+ // re-schedule cron job
79
+ self::schedule_cron_job( $settings['update'], $settings[ $provider ], FALSE );
80
+
81
+ // update provider settings
82
+ self::update_settings( $settings, array( 'update', $provider ) );
83
+
84
+ // skip to update settings in case of InfiniteWP that could be in a different country
85
+ if ( isset( $_SERVER['HTTP_X_REQUESTED_FROM'] ) && FALSE !== strpos( $_SERVER['HTTP_X_REQUESTED_FROM'], 'InfiniteWP' ) )
86
+ continue;
87
+
88
+ // update matching rule immediately
89
+ if ( $immediate && 'done' !== get_transient( IP_Geo_Block::CRON_NAME ) ) {
90
+ $validate = $context->validate_ip( 'admin', $settings );
91
+
92
+ if ( 'ZZ' === $validate['code'] )
93
+ continue;
94
+
95
+ // matching rule should be reset when blocking happens
96
+ if ( 'passed' !== $validate['result'] )
97
+ $settings['matching_rule'] = -1;
98
+
99
+ // setup country code in whitelist if it needs to be initialized
100
+ if ( -1 === (int)$settings['matching_rule'] ) {
101
+ $settings['matching_rule'] = 0; // white list
102
+
103
+ // when the country code doesn't exist in whitelist, then add it
104
+ if ( FALSE === strpos( $settings['white_list'], $validate['code'] ) )
105
+ $settings['white_list'] .= ( $settings['white_list'] ? ',' : '' ) . $validate['code'];
106
+ }
107
+
108
+ // update option settings
109
+ self::update_settings( $settings, array( 'matching_rule', 'white_list' ) );
110
+
111
+ // finished to update matching rule
112
+ set_transient( IP_Geo_Block::CRON_NAME, 'done', 5 * MINUTE_IN_SECONDS );
113
+
114
+ // trigger update action
115
+ do_action( IP_Geo_Block::PLUGIN_NAME . '-db-updated', $settings, $validate['code'] );
116
+ }
117
+ }
118
+ }
119
+
120
+ return isset( $res ) ? $res : NULL;
121
+ }
122
+
123
+ /**
124
+ * Update setting data according to the site type.
125
+ *
126
+ */
127
+ private static function update_settings( $src, $keys = array() ) {
128
+ // for multisite
129
+ if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) {
130
+ global $wpdb;
131
+ $blog_ids = $wpdb->get_col( "SELECT `blog_id` FROM `$wpdb->blogs`" );
132
+
133
+ foreach ( $blog_ids as $id ) {
134
+ switch_to_blog( $id );
135
+ $dst = IP_Geo_Block::get_option( FALSE );
136
+
137
+ foreach ( $keys as $key ) {
138
+ $dst[ $key ] = $src[ $key ];
139
+ }
140
+
141
+ IP_Geo_Block::update_option( $dst, FALSE );
142
+ restore_current_blog();
143
+ }
144
+ }
145
+
146
+ // for single site
147
+ else {
148
+ IP_Geo_Block::update_option( $src );
149
+ }
150
+ }
151
+
152
+ /**
153
+ * Extract ip address from transient API.
154
+ *
155
+ */
156
+ public static function extract_ip( $ip ) {
157
+ return filter_var(
158
+ $ip_self = get_transient( IP_Geo_Block::CRON_NAME ), FILTER_VALIDATE_IP
159
+ ) ? $ip_self : $ip;
160
+ }
161
+
162
+ /**
163
+ * Kick off a cron job to download database immediately in background on activation.
164
+ *
165
+ */
166
+ public static function start_update_db( $settings, $immediate = TRUE ) {
167
+ // updating should be done by main site when this plugin is activated for network
168
+ if ( is_main_site() || ! is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) )
169
+ self::schedule_cron_job( $settings['update'], NULL, $immediate );
170
+ }
171
+
172
+ public static function stop_update_db() {
173
+ wp_clear_scheduled_hook( IP_Geo_Block::CRON_NAME, array( FALSE ) ); // @since 2.1.0
174
+ }
175
+
176
+ /**
177
+ * Kick off a cron job to garbage collection for IP address cache.
178
+ *
179
+ */
180
+ public static function exec_cache_gc( $settings ) {
181
+ self::stop_cache_gc();
182
+
183
+ IP_Geo_Block_Logs::delete_expired( array(
184
+ min( 365, max( 1, (int)$settings['validation']['explogs'] ) ) * DAY_IN_SECONDS,
185
+ (int)$settings['cache_time']
186
+ ) );
187
+
188
+ self::start_cache_gc( $settings );
189
+ }
190
+
191
+ public static function start_cache_gc( $settings = FALSE ) {
192
+ if ( ! wp_next_scheduled( IP_Geo_Block::CACHE_NAME ) ) {
193
+ $settings or $settings = IP_Geo_Block::get_option();
194
+ wp_schedule_single_event( time() + max( $settings['cache_time_gc'], MINUTE_IN_SECONDS ), IP_Geo_Block::CACHE_NAME );
195
+ }
196
+ }
197
+
198
+ public static function stop_cache_gc() {
199
+ wp_clear_scheduled_hook( IP_Geo_Block::CACHE_NAME ); // @since 2.1.0
200
+ }
201
+
202
+ /**
203
+ * Decompresses gz archive and output to the file.
204
+ *
205
+ * @param string $src full path to the downloaded file.
206
+ * @param string $dst full path to extracted file.
207
+ * @return TRUE or array of error code and message.
208
+ */
209
+ private static function gzfile( $src, $dst ) {
210
+ try {
211
+ if ( FALSE === ( $gz = gzopen( $src, 'r' ) ) )
212
+ throw new Exception(
213
+ sprintf( __( 'Unable to read <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $src )
214
+ );
215
+
216
+ if ( FALSE === ( $fp = @fopen( $dst, 'cb' ) ) )
217
+ throw new Exception(
218
+ sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $filename )
219
+ );
220
+
221
+ if ( ! flock( $fp, LOCK_EX ) )
222
+ throw new Exception(
223
+ sprintf( __( 'Can\'t lock <code>%s</code>. Please try again after a while.', 'ip-geo-block' ), $filename )
224
+ );
225
+
226
+ ftruncate( $fp, 0 ); // truncate file
227
+
228
+ // same block size in wp-includes/class-http.php
229
+ while ( $data = gzread( $gz, 4096 ) ) {
230
+ fwrite( $fp, $data, strlen( $data ) );
231
+ }
232
+ }
233
+
234
+ catch ( Exception $e ) {
235
+ $err = array(
236
+ 'code' => $e->getCode(),
237
+ 'message' => $e->getMessage(),
238
+ );
239
+ }
240
+
241
+ if ( ! empty( $fp ) ) {
242
+ fflush( $fp ); // flush output before releasing the lock
243
+ flock ( $fp, LOCK_UN ); // release the lock
244
+ fclose( $fp );
245
+ }
246
+
247
+ return empty( $err ) ? TRUE : $err;
248
+ }
249
+
250
+ /**
251
+ * Download zip/gz file, uncompress and save it to specified file
252
+ *
253
+ * @param string $url URL of remote file to be downloaded.
254
+ * @param array $args request headers.
255
+ * @param string $filename full path to the downloaded file.
256
+ * @param int $modified time of last modified on the remote server.
257
+ * @return array status message.
258
+ */
259
+ public static function download_zip( $url, $args, $files, $modified ) {
260
+ require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
261
+ $fs = IP_Geo_Block_FS::init( 'download_zip' );
262
+
263
+ // get extension
264
+ $ext = strtolower( pathinfo( $url, PATHINFO_EXTENSION ) );
265
+ if ( 'tar' === strtolower( pathinfo( pathinfo( $url, PATHINFO_FILENAME ), PATHINFO_EXTENSION ) ) )
266
+ $ext = 'tar';
267
+
268
+ // check file (1st parameter includes absolute path in case of array)
269
+ $filename = is_array( $files ) ? $files[0] : (string)$files;
270
+ if ( ! $fs->exists( $filename ) )
271
+ $modified = 0;
272
+
273
+ // set 'If-Modified-Since' request header
274
+ $args += array(
275
+ 'headers' => array(
276
+ 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
277
+ 'Accept-Encoding' => 'gzip, deflate',
278
+ 'If-Modified-Since' => gmdate( DATE_RFC1123, (int)$modified ),
279
+ ),
280
+ );
281
+
282
+ // fetch file and get response code & message
283
+ if ( isset( $args['method'] ) && 'GET' === $args['method'] )
284
+ $src = wp_remote_get ( ( $url = esc_url_raw( $url ) ), $args );
285
+ else
286
+ $src = wp_remote_head( ( $url = esc_url_raw( $url ) ), $args );
287
+
288
+ if ( is_wp_error( $src ) )
289
+ return array(
290
+ 'code' => $src->get_error_code(),
291
+ 'message' => $src->get_error_message(),
292
+ );
293
+
294
+ $code = wp_remote_retrieve_response_code ( $src );
295
+ $mesg = wp_remote_retrieve_response_message( $src );
296
+ $data = wp_remote_retrieve_header( $src, 'last-modified' );
297
+ $modified = $data ? strtotime( $data ) : $modified;
298
+
299
+ if ( 304 == $code )
300
+ return array(
301
+ 'code' => $code,
302
+ 'message' => __( 'Your database file is up-to-date.', 'ip-geo-block' ),
303
+ 'filename' => $filename,
304
+ 'modified' => $modified,
305
+ );
306
+
307
+ elseif ( 200 != $code )
308
+ return array(
309
+ 'code' => $code,
310
+ 'message' => $code.' '.$mesg,
311
+ );
312
+
313
+ try {
314
+ // in case that the server which does not support HEAD method
315
+ if ( isset( $args['method'] ) && 'GET' === $args['method'] ) {
316
+ $data = wp_remote_retrieve_body( $src );
317
+
318
+ if ( 'gz' === $ext ) {
319
+ if ( function_exists( 'gzdecode') ) { // @since PHP 5.4.0
320
+ if ( FALSE === $fs->put_contents( $filename, gzdecode( $data ) ) )
321
+ throw new Exception(
322
+ sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $filename )
323
+ );
324
+ }
325
+
326
+ else {
327
+ $src = get_temp_dir() . basename( $url ); // $src should be removed
328
+ $fs->put_contents( $src, $data );
329
+ if ( TRUE !== ( $ret = self::gzfile( $src, $filename ) ) ) {
330
+ $err = $ret;
331
+ }
332
+ }
333
+ }
334
+
335
+ elseif ( 'tar' === $ext && class_exists( 'PharData', FALSE ) ) { // @since PECL phar 2.0.0
336
+ $name = wp_remote_retrieve_header( $src, 'content-disposition' );
337
+ $name = explode( 'filename=', $name );
338
+ $name = array_pop( $name ); // e.g. GeoLite2-Country_20180102.tar.gz
339
+ $src = ( $tmp = get_temp_dir() ) . $name; // $src should be removed
340
+
341
+ // CVE-2015-6833: A directory traversal when extracting ZIP files could be used to overwrite files
342
+ // outside of intended area via a `..` in a ZIP archive entry that is mishandled by extractTo().
343
+ if ( $fs->put_contents( $src, $data ) ) {
344
+ $data = new PharData( $src, FilesystemIterator::SKIP_DOTS ); // get archives
345
+
346
+ // make the list of contents to be extracted from archives.
347
+ // when the list doesn't match the contents in archives, extractTo() may be crushed on windows.
348
+ $dst = $data->getSubPathname(); // e.g. GeoLite2-Country_20180102
349
+ foreach ( $files as $key => $val ) {
350
+ $files[ $key ] = $dst.'/'.basename( $val );
351
+ }
352
+
353
+ // extract specific files from archives into temporary directory and copy it to the destination.
354
+ $data->extractTo( $tmp .= $dst, $files /* NULL */, TRUE ); // $tmp should be removed
355
+
356
+ // copy extracted files to Geolocation APIs directory
357
+ $dst = dirname( $filename );
358
+ foreach ( $files as $val ) {
359
+ // should the destination be exclusive with LOCK_EX ?
360
+ // $fs->put_contents( $dst.'/'.basename( $val ), $fs->get_contents( $tmp.'/'.$val ) );
361
+ $fs->copy( $tmp.'/'.$val, $dst.'/'.basename( $val ), TRUE );
362
+ }
363
+ }
364
+ }
365
+ }
366
+
367
+ // downloaded and unzip
368
+ else {
369
+ // download file
370
+ $src = download_url( $url );
371
+
372
+ if ( is_wp_error( $src ) )
373
+ throw new Exception(
374
+ $src->get_error_code() . ' ' . $src->get_error_message()
375
+ );
376
+
377
+ // unzip file
378
+ if ( 'gz' === $ext ) {
379
+ if ( TRUE !== ( $ret = self::gzfile( $src, $filename ) ) ) {
380
+ $err = $ret;
381
+ }
382
+ }
383
+
384
+ elseif ( 'zip' === $ext && class_exists( 'ZipArchive', FALSE ) ) {
385
+ $tmp = get_temp_dir(); // @since 2.5
386
+ $ret = $fs->unzip_file( $src, $tmp ); // @since 2.5
387
+
388
+ if ( is_wp_error( $ret ) )
389
+ throw new Exception(
390
+ $ret->get_error_code() . ' ' . $ret->get_error_message()
391
+ );
392
+
393
+ if ( FALSE === ( $data = $fs->get_contents( $tmp .= basename( $filename ) ) ) )
394
+ throw new Exception(
395
+ sprintf( __( 'Unable to read <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $tmp )
396
+ );
397
+
398
+ if ( FALSE === $fs->put_contents( $filename, $data ) )
399
+ throw new Exception(
400
+ sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $filename )
401
+ );
402
+ }
403
+
404
+ else {
405
+ throw new Exception( __( 'gz or zip is not supported on your system.', 'ip-geo-block' ) );
406
+ }
407
+ }
408
+ }
409
+
410
+ // error handler
411
+ catch ( Exception $e ) {
412
+ $err = array(
413
+ 'code' => $e->getCode(),
414
+ 'message' => $e->getMessage(),
415
+ );
416
+ }
417
+
418
+ ! empty ( $gz ) and gzclose( $gz );
419
+ ! empty ( $tmp ) and $fs->delete( $tmp, TRUE ); // should be removed recursively in case of directory
420
+ is_string( $src ) && $fs->is_file( $src ) and $fs->delete( $src );
421
+
422
+ return empty( $err ) ? array(
423
+ 'code' => $code,
424
+ 'message' => sprintf( __( 'Last update: %s', 'ip-geo-block' ), IP_Geo_Block_Util::localdate( $modified ) ),
425
+ 'filename' => $filename,
426
+ 'modified' => $modified,
427
+ ) : $err;
428
+ }
429
+
430
  }
classes/class-ip-geo-block-logs.php CHANGED
@@ -232,17 +232,21 @@ class IP_Geo_Block_Logs {
232
 
233
  foreach ( $tables as $table ) {
234
  $table = $wpdb->prefix . $table;
235
- if ( $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) !== $table )
236
- return sprintf( __( 'Creating a DB table %s had failed. Once de-activate this plugin, and then activate again.', 'ip-geo-block' ), $table );
 
 
237
 
238
  $result = $wpdb->get_results( "SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table'", ARRAY_A );
239
  foreach ( empty( $result ) ? array() : $result as $col ) {
240
- if ( in_array( $col['COLUMN_NAME'], array( 'ip', 'host' ), TRUE ) && 'varbinary' !== $col['DATA_TYPE'] )
241
- return sprintf( __( 'Column type in %s unmatched. Once de-activate this plugin, and then activate again.', 'ip-geo-block' ), $table );
 
 
242
  }
243
  }
244
 
245
- return NULL;
246
  }
247
 
248
  /**
@@ -272,11 +276,11 @@ class IP_Geo_Block_Logs {
272
  * Restore statistics data.
273
  *
274
  */
275
- public static function restore_stat( $default = FALSE ) {
276
  global $wpdb;
277
  $table = $wpdb->prefix . self::TABLE_STAT;
278
  $data = $wpdb->get_results( "SELECT * FROM `$table`", ARRAY_A ) or self::error( __LINE__ );
279
- return empty( $data ) ? ( $default ? self::$default : FALSE ) : unserialize( $data[0]['data'] );
280
  }
281
 
282
  /**
@@ -629,18 +633,30 @@ class IP_Geo_Block_Logs {
629
  $validate['ip'] = IP_Geo_Block_Util::anonymize_ip( $validate['ip'] );
630
 
631
  if ( $record ) {
632
- // count the number of rows for each hook
633
  global $wpdb;
634
  $table = $wpdb->prefix . self::TABLE_LOGS;
635
- $count = (int)$wpdb->get_var( "SELECT count(*) FROM `$table`" );
636
 
 
 
637
  // Can't start transaction on the assumption that the storage engine is innoDB.
638
  // So there are some cases where logs are excessively deleted.
 
639
  $sql = $wpdb->prepare(
640
- "DELETE FROM `$table` ORDER BY `time` ASC LIMIT %d",
641
  max( 0, $count - (int)$settings['validation']['maxlogs'] + 1 )
642
  ) and $wpdb->query( $sql ) or self::error( __LINE__ );
643
-
 
 
 
 
 
 
 
 
 
 
 
644
  // insert into DB
645
  if ( 2 === self::cipher_mode_key() ) {
646
  $sql = $wpdb->prepare(
@@ -686,7 +702,7 @@ class IP_Geo_Block_Logs {
686
  }
687
  }
688
 
689
- if ( get_transient( IP_Geo_Block::PLUGIN_NAME . '-live-log' ) ) {
690
  // skip self command
691
  global $pagenow;
692
  if ( 'admin-ajax.php' === $pagenow && isset( $_POST['action'] ) && 'ip_geo_block' === $_POST['action'] && isset( $_POST['cmd'] ) && 0 === strpos( $_POST['cmd'], 'live-' ) )
@@ -954,36 +970,36 @@ class IP_Geo_Block_Logs {
954
  *
955
  */
956
  public static function update_stat( $hook, $validate, $settings ) {
957
- // Restore statistics.
958
- if ( $stat = self::restore_stat() ) {
959
-
960
- $provider = isset( $validate['provider'] ) ? $validate['provider'] : 'Cache'; // asign `Cache` if no provider is available
961
- if ( empty( $stat['providers'][ $provider ] ) )
962
- $stat['providers'][ $provider ] = array( 'count' => 0, 'time' => 0.0 );
963
-
964
- $stat['providers'][ $provider ]['count']++; // undefined in auth_fail()
965
- $stat['providers'][ $provider ]['time' ] += (float)( isset( $validate['time'] ) ? $validate['time'] : 0 );
966
-
967
- if ( IP_Geo_Block::is_blocked( $validate['result'] ) ) {
968
- // Blocked by type of IP address
969
- if ( filter_var( $validate['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) )
970
- ++$stat['IPv4'];
971
- elseif ( filter_var( $validate['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) )
972
- ++$stat['IPv6'];
973
-
974
- ++$stat['blocked' ];
975
- @++$stat['countries'][ $validate['code'] ];
976
- @++$stat['daystats' ][ mktime( 0, 0, 0 ) ][ $hook ];
977
- }
978
-
979
- if ( count( $stat['daystats'] ) > max( 30, min( 365, (int)$settings['validation']['recdays'] ) ) ) {
980
- reset( $stat['daystats'] ); // pointer to the top
981
- unset( $stat['daystats'][ key( $stat['daystats'] ) ] ); // unset at the top
982
- }
983
 
984
- // Record statistics.
985
- self::record_stat( $stat );
 
986
  }
 
 
 
987
  }
988
 
989
  /**
232
 
233
  foreach ( $tables as $table ) {
234
  $table = $wpdb->prefix . $table;
235
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) !== $table ) {
236
+ self::error( __LINE__, sprintf( __( 'Creating a DB table %s had failed. Once de-activate this plugin, and then activate again.', 'ip-geo-block' ), $table ) );
237
+ return FALSE;
238
+ }
239
 
240
  $result = $wpdb->get_results( "SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table'", ARRAY_A );
241
  foreach ( empty( $result ) ? array() : $result as $col ) {
242
+ if ( in_array( $col['COLUMN_NAME'], array( 'ip', 'host' ), TRUE ) && 'varbinary' !== $col['DATA_TYPE'] ) {
243
+ self::error( __LINE__, sprintf( __( 'Column type in %s unmatched. Once de-activate this plugin, and then activate again.', 'ip-geo-block' ), $table ) );
244
+ return FALSE;
245
+ }
246
  }
247
  }
248
 
249
+ return TRUE;
250
  }
251
 
252
  /**
276
  * Restore statistics data.
277
  *
278
  */
279
+ public static function restore_stat() {
280
  global $wpdb;
281
  $table = $wpdb->prefix . self::TABLE_STAT;
282
  $data = $wpdb->get_results( "SELECT * FROM `$table`", ARRAY_A ) or self::error( __LINE__ );
283
+ return empty( $data ) ? self::$default : unserialize( $data[0]['data'] ) + self::$default;
284
  }
285
 
286
  /**
633
  $validate['ip'] = IP_Geo_Block_Util::anonymize_ip( $validate['ip'] );
634
 
635
  if ( $record ) {
 
636
  global $wpdb;
637
  $table = $wpdb->prefix . self::TABLE_LOGS;
 
638
 
639
+ // limit the number of rows
640
+ if (1):
641
  // Can't start transaction on the assumption that the storage engine is innoDB.
642
  // So there are some cases where logs are excessively deleted.
643
+ $count = (int)$wpdb->get_var( "SELECT count(*) FROM `$table`" );
644
  $sql = $wpdb->prepare(
645
+ "DELETE FROM `$table` ORDER BY `No` ASC LIMIT %d",
646
  max( 0, $count - (int)$settings['validation']['maxlogs'] + 1 )
647
  ) and $wpdb->query( $sql ) or self::error( __LINE__ );
648
+ else:
649
+ // This SQL slows down on MySQL 5.7.23 and keeps +2 extra rows on MySQL 5.0.67
650
+ // @see https://teratail.com/questions/14584
651
+ $sql = $wpdb->prepare(
652
+ "DELETE FROM `$table` WHERE NOT EXISTS(
653
+ SELECT * FROM (
654
+ SELECT * FROM `$table` t2 ORDER BY t2.time DESC LIMIT %d
655
+ ) t3 WHERE t3.No = $table.No
656
+ )",
657
+ $settings['validation']['maxlogs'] - 1
658
+ ) and $wpdb->query( $sql ) or self::error( __LINE__ );
659
+ endif;
660
  // insert into DB
661
  if ( 2 === self::cipher_mode_key() ) {
662
  $sql = $wpdb->prepare(
702
  }
703
  }
704
 
705
+ if ( IP_Geo_Block::get_live_log() ) {
706
  // skip self command
707
  global $pagenow;
708
  if ( 'admin-ajax.php' === $pagenow && isset( $_POST['action'] ) && 'ip_geo_block' === $_POST['action'] && isset( $_POST['cmd'] ) && 0 === strpos( $_POST['cmd'], 'live-' ) )
970
  *
971
  */
972
  public static function update_stat( $hook, $validate, $settings ) {
973
+ // Restore statistics
974
+ $stat = self::restore_stat();
975
+
976
+ // Count provider
977
+ $provider = isset( $validate['provider'] ) ? $validate['provider'] : 'Cache'; // asign `Cache` if no provider is available
978
+ if ( empty( $stat['providers'][ $provider ] ) )
979
+ $stat['providers'][ $provider ] = array( 'count' => 0, 'time' => 0.0 );
980
+
981
+ $stat['providers'][ $provider ]['count']++; // undefined in auth_fail()
982
+ $stat['providers'][ $provider ]['time' ] += (float)( isset( $validate['time'] ) ? $validate['time'] : 0 );
983
+
984
+ // Blocked by type of IP address
985
+ if ( IP_Geo_Block::is_blocked( $validate['result'] ) ) {
986
+ if ( filter_var( $validate['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) )
987
+ ++$stat['IPv4'];
988
+ elseif ( filter_var( $validate['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) )
989
+ ++$stat['IPv6'];
990
+
991
+ ++$stat['blocked' ];
992
+ @++$stat['countries'][ $validate['code'] ];
993
+ @++$stat['daystats' ][ mktime( 0, 0, 0 ) ][ $hook ];
994
+ }
 
 
 
 
995
 
996
+ if ( count( $stat['daystats'] ) > max( 30, min( 365, (int)$settings['validation']['recdays'] ) ) ) {
997
+ reset( $stat['daystats'] ); // pointer to the top
998
+ unset( $stat['daystats'][ key( $stat['daystats'] ) ] ); // unset at the top
999
  }
1000
+
1001
+ // Record statistics
1002
+ self::record_stat( $stat );
1003
  }
1004
 
1005
  /**
classes/class-ip-geo-block-opts.php CHANGED
@@ -16,7 +16,7 @@ class IP_Geo_Block_Opts {
16
  *
17
  */
18
  private static $option_table = array(
19
- 'version' => '3.0.15',// Version of this table (not package)
20
  // since version 1.0
21
  'providers' => array(), // List of providers and API keys
22
  'comment' => array( // Message on the comment form
@@ -30,6 +30,7 @@ class IP_Geo_Block_Opts {
30
  'response_code' => 403, // Response code
31
  'save_statistics' => TRUE, // Record validation statistics
32
  'clean_uninstall' => TRUE, // Remove all savings from DB
 
33
  // since version 1.1
34
  'cache_hold' => TRUE, // Record IP address cache
35
  'cache_time' => HOUR_IN_SECONDS, // @since 3.5
@@ -139,7 +140,7 @@ class IP_Geo_Block_Opts {
139
  ),
140
  // since version 2.2.7
141
  'api_key' => array( // API key
142
- 'GoogleMap' => 'default',
143
  ),
144
  // since version 2.2.8
145
  'login_action' => array( // Actions for wp-login.php
@@ -163,7 +164,6 @@ class IP_Geo_Block_Opts {
163
  'target_cates' => array(), // blocking target of categories
164
  'target_tags' => array(), // blocking target of tags
165
  'ua_list' => "Google:HOST,bot:HOST,slurp:HOST\nspider:HOST,archive:HOST,*:FEED\nembed.ly:HOST,Twitterbot:US,Facebot:US",
166
- 'simulate' => FALSE, // just simulate, never block
167
  // since version 3.0.3
168
  'dnslkup' => FALSE, // use DNS reverse lookup
169
  'response_code' => 307, // better for AdSense
@@ -249,192 +249,190 @@ class IP_Geo_Block_Opts {
249
  * @since 3.0.3.1 This should be executed in admin context
250
  */
251
  public static function upgrade() {
252
- $default = self::get_default();
 
 
253
 
254
- if ( FALSE === ( $settings = get_option( IP_Geo_Block::OPTION_NAME ) ) ) {
255
- // save package version number
256
- $version = $default['version'] = IP_Geo_Block::VERSION;
257
 
258
- // create new option table
259
- add_option( IP_Geo_Block::OPTION_NAME, $settings = $default );
 
 
260
  }
261
 
262
- else {
263
- $version = $settings['version'];
264
-
265
- // refresh if it's too old
266
- if ( version_compare( $version, '2.0.0' ) < 0 )
267
- $settings = $default;
268
-
269
- if ( version_compare( $version, '2.1.0' ) < 0 ) {
270
- foreach ( array( 'plugins', 'themes' ) as $tmp ) {
271
- $settings['validation'][ $tmp ] = $default['validation'][ $tmp ];
272
- }
273
  }
274
 
275
- if ( version_compare( $version, '2.2.0' ) < 0 ) {
276
- foreach ( array( 'anonymize', 'signature', 'extra_ips', 'rewrite' ) as $tmp ) {
277
- $settings[ $tmp ] = $default[ $tmp ];
278
- }
279
-
280
- foreach ( array( 'admin', 'ajax' ) as $tmp ) {
281
- if ( $settings['validation'][ $tmp ] == 2 )
282
- $settings['validation'][ $tmp ] = 3; // WP-ZEP + Block by country
283
- }
284
  }
 
285
 
286
- if ( version_compare( $version, '2.2.1' ) < 0 ) {
287
- foreach ( array( 'Maxmind', 'IP2Location' ) as $tmp ) {
288
- $settings[ $tmp ] = $default[ $tmp ];
289
- }
290
  }
 
291
 
292
- if ( version_compare( $version, '2.2.2' ) < 0 ) {
293
- $tmp = get_option( 'ip_geo_block_statistics' );
294
- $tmp['daystats'] = array();
295
- IP_Geo_Block_Logs::record_stat( $tmp );
296
- delete_option( 'ip_geo_block_statistics' ); // @since 1.2.0
297
 
298
- foreach ( array( 'maxmind', 'ip2location' ) as $tmp ) {
299
- unset( $settings[ $tmp ] );
300
- }
301
  }
 
302
 
303
- if ( version_compare( $version, '2.2.3' ) < 0 )
304
- $settings['api_dir'] = $default['api_dir'];
305
-
306
- if ( version_compare( $version, '2.2.5' ) < 0 ) {
307
- // https://wordpress.org/support/topic/compatibility-with-ag-custom-admin
308
- $arr = array();
309
- foreach ( explode( ',', $settings['signature'] ) as $tmp ) {
310
- $tmp = trim( $tmp );
311
- if ( 'wp-config.php' === $tmp || 'passwd' === $tmp )
312
- $tmp = '/' . $tmp;
313
- array_push( $arr, $tmp );
314
- }
315
- $settings['signature'] = implode( ',', $arr );
316
- foreach ( array( 'plugins', 'themes' ) as $tmp ) {
317
- $settings['exception'][ $tmp ] = $default['exception'][ $tmp ];
318
- }
319
  }
320
-
321
- if ( version_compare( $version, '2.2.6' ) < 0 ) {
322
- $settings['signature'] = str_replace( " ", "\n", $settings['signature'] );
323
- $settings['extra_ips']['white_list'] = str_replace( " ", "\n", $settings['extra_ips']['white_list'] );
324
- $settings['extra_ips']['black_list'] = str_replace( " ", "\n", $settings['extra_ips']['black_list'] );
325
-
326
- foreach ( array( 'plugins', 'themes' ) as $tmp ) {
327
- $arr = array_keys( $settings['exception'][ $tmp ] );
328
- if ( ! empty( $arr ) && ! is_numeric( $arr[0] ) )
329
- $settings['exception'][ $tmp ] = $arr;
330
- }
331
  }
 
332
 
333
- if ( version_compare( $version, '2.2.7' ) < 0 )
334
- $settings['api_key'] = $default['api_key'];
 
 
335
 
336
- if ( version_compare( $version, '2.2.8' ) < 0 ) {
337
- $settings['login_action'] = $default['login_action'];
338
- // Block by country (register, lost password)
339
- if ( 2 === (int)$settings['validation']['login'] )
340
- $settings['login_action']['login'] = FALSE;
341
  }
 
342
 
343
- if ( version_compare( $version, '2.2.9' ) < 0 ) {
344
- $settings['validation']['timing' ] = $default['validation']['timing' ];
345
- $settings['validation']['recdays'] = $default['validation']['recdays'];
346
- }
347
 
348
- if ( version_compare( $version, '3.0.0' ) < 0 ) {
349
- foreach ( array( 'cache_time_gc', 'response_msg', 'redirect_uri', 'network_wide', 'public' ) as $tmp ) {
350
- $settings[ $tmp ] = $default[ $tmp ];
351
- }
 
 
352
 
353
- foreach ( array( 'public', 'includes', 'uploads', 'languages' ) as $tmp ) {
354
- $settings['validation'][ $tmp ] = $default['validation'][ $tmp ];
355
- $settings['rewrite' ][ $tmp ] = $default['rewrite' ][ $tmp ];
356
- $settings['exception' ][ $tmp ] = $default['exception' ][ $tmp ];
357
- }
358
 
359
- $settings['exception']['admin'] = $default['exception']['admin'];
 
 
360
  }
361
 
362
- if ( version_compare( $version, '3.0.1' ) < 0 )
363
- delete_transient( IP_Geo_Block::CACHE_NAME ); // @since 2.8
364
-
365
- if ( version_compare( $version, '3.0.3' ) < 0 ) {
366
- $settings['exception' ]['restapi' ] = $default['exception' ]['restapi' ];
367
- $settings['validation' ]['restapi' ] = $default['validation']['restapi' ];
368
- $settings['validation' ]['mimetype' ] = $default['validation']['mimetype' ];
369
- $settings['public' ]['redirect_uri' ] = $default['public' ]['redirect_uri' ];
370
- $settings['public' ]['response_msg' ] = $default['public' ]['response_msg' ];
371
- $settings['public' ]['response_code'] = $default['public' ]['response_code'];
372
- $settings['public' ]['dnslkup' ] = TRUE;
373
- $settings['public' ]['ua_list' ] = str_replace( '*:HOST=embed.ly', 'embed.ly:HOST', $settings['public']['ua_list'] );
374
- $settings['login_action']['resetpass' ] = @$settings['login_action']['resetpasss'];
375
- $settings['mimetype' ] = $default['mimetype'];
376
- unset(
377
- $settings['rewrite' ]['public' ], // unused @3.0.0
378
- $settings['rewrite' ]['content' ], // unused @3.0.0
379
- $settings['login_action']['resetpasss'] // mis-spelled
380
- );
381
  }
382
 
383
- if ( version_compare( $version, '3.0.4.1' ) < 0 ) {
384
- if ( ! isset( $settings['Maxmind']['use_asn'] ) ) {
385
- $settings['Maxmind' ]['use_asn' ] = 0; // disable
386
- $settings['Maxmind' ]['asn4_path' ] = $default['Maxmind' ]['asn4_path' ];
387
- $settings['Maxmind' ]['asn4_last' ] = $default['Maxmind' ]['asn4_last' ];
388
- $settings['Maxmind' ]['asn6_path' ] = $default['Maxmind' ]['asn6_path' ];
389
- $settings['Maxmind' ]['asn6_last' ] = $default['Maxmind' ]['asn6_last' ];
390
- $settings['mimetype']['capability'] = $default['mimetype']['capability'];
391
- }
392
- }
393
 
394
- if ( version_compare( $version, '3.0.5' ) < 0 ) {
395
- $settings['live_update'] = $default['live_update'];
396
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
 
398
- if ( version_compare( $version, '3.0.8' ) < 0 ) {
399
- $settings['timeout' ] = $default['timeout'];
400
- $settings['Geolite2']['use_asn'] = $settings['Maxmind']['use_asn'];
401
- foreach ( array( 'ip_path', 'ip_last', 'asn_path', 'asn_last' ) as $tmp ) {
402
- $settings['Geolite2'][ $tmp ] = $default['Geolite2'][ $tmp ];
403
- }
 
 
404
  }
 
405
 
406
- if ( version_compare( $version, '3.0.9' ) < 0 )
407
- $settings['priority'] = $default['priority'];
408
 
409
- if ( version_compare( $version, '3.0.10' ) < 0 ) {
410
- $settings['behavior'] = $default['behavior'];
411
- $settings['public' ]['behavior'] = $default['public']['behavior'];
 
 
412
  }
 
413
 
414
- if ( version_compare( $version, '3.0.11' ) < 0 ) {
415
- // change the size of some database columns
416
- $settings['cache_hold'] = $default['cache_hold'];
417
- IP_Geo_Block_Logs::delete_tables( IP_Geo_Block::CACHE_NAME );
418
- IP_Geo_Block_Logs::create_tables();
419
- IP_Geo_Block_Logs::reset_sqlite_db();
420
- }
421
 
422
- if ( version_compare( $version, '3.0.13' ) < 0 ) {
423
- $settings['validation' ]['maxlogs'] = $default['validation']['maxlogs'];
424
- $settings['validation' ]['explogs'] = $default['validation']['explogs'];
425
- $settings['restrict_api'] = $settings['anonymize'];
426
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
427
 
428
- if ( version_compare( $version, '3.0.14' ) < 0 )
429
- $settings['login_link'] = $default['login_link'];
430
 
431
- if ( version_compare( $version, '3.0.15' ) < 0 )
432
- IP_Geo_Block_Logs::upgrade( $version );
433
 
434
- // update package version number
435
- $settings['version'] = IP_Geo_Block::VERSION;
 
 
 
 
 
436
  }
437
 
 
 
 
438
  // install addons for IP Geolocation database API ver. 1.1.13
439
  $providers = IP_Geo_Block_Provider::get_addons();
440
  if ( empty( $providers ) || ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) || version_compare( $version, '3.0.14' ) < 0 )
@@ -442,8 +440,8 @@ class IP_Geo_Block_Opts {
442
 
443
  $settings['request_ua'] = trim( str_replace( array( 'InfiniteWP' ), '', @$_SERVER['HTTP_USER_AGENT'] ) );
444
 
445
- // update option table
446
- update_option( IP_Geo_Block::OPTION_NAME, $settings );
447
 
448
  // return upgraded settings
449
  return $settings;
16
  *
17
  */
18
  private static $option_table = array(
19
+ 'version' => '3.0.16',// Version of this table (not package)
20
  // since version 1.0
21
  'providers' => array(), // List of providers and API keys
22
  'comment' => array( // Message on the comment form
30
  'response_code' => 403, // Response code
31
  'save_statistics' => TRUE, // Record validation statistics
32
  'clean_uninstall' => TRUE, // Remove all savings from DB
33
+ 'simulate' => FALSE, // just simulate, never block
34
  // since version 1.1
35
  'cache_hold' => TRUE, // Record IP address cache
36
  'cache_time' => HOUR_IN_SECONDS, // @since 3.5
140
  ),
141
  // since version 2.2.7
142
  'api_key' => array( // API key
143
+ 'GoogleMap' => NULL, // 'default':revoked, NULL:iframe
144
  ),
145
  // since version 2.2.8
146
  'login_action' => array( // Actions for wp-login.php
164
  'target_cates' => array(), // blocking target of categories
165
  'target_tags' => array(), // blocking target of tags
166
  'ua_list' => "Google:HOST,bot:HOST,slurp:HOST\nspider:HOST,archive:HOST,*:FEED\nembed.ly:HOST,Twitterbot:US,Facebot:US",
 
167
  // since version 3.0.3
168
  'dnslkup' => FALSE, // use DNS reverse lookup
169
  'response_code' => 307, // better for AdSense
249
  * @since 3.0.3.1 This should be executed in admin context
250
  */
251
  public static function upgrade() {
252
+ $default = IP_Geo_Block::get_default();
253
+ $settings = IP_Geo_Block::get_option();
254
+ $version = $settings['version'];
255
 
256
+ // refresh if it's too old
257
+ if ( version_compare( $version, '2.0.0' ) < 0 )
258
+ $settings = $default;
259
 
260
+ if ( version_compare( $version, '2.1.0' ) < 0 ) {
261
+ foreach ( array( 'plugins', 'themes' ) as $tmp ) {
262
+ $settings['validation'][ $tmp ] = $default['validation'][ $tmp ];
263
+ }
264
  }
265
 
266
+ if ( version_compare( $version, '2.2.0' ) < 0 ) {
267
+ foreach ( array( 'anonymize', 'signature', 'extra_ips', 'rewrite' ) as $tmp ) {
268
+ $settings[ $tmp ] = $default[ $tmp ];
 
 
 
 
 
 
 
 
269
  }
270
 
271
+ foreach ( array( 'admin', 'ajax' ) as $tmp ) {
272
+ if ( $settings['validation'][ $tmp ] == 2 )
273
+ $settings['validation'][ $tmp ] = 3; // WP-ZEP + Block by country
 
 
 
 
 
 
274
  }
275
+ }
276
 
277
+ if ( version_compare( $version, '2.2.1' ) < 0 ) {
278
+ foreach ( array( 'Maxmind', 'IP2Location' ) as $tmp ) {
279
+ $settings[ $tmp ] = $default[ $tmp ];
 
280
  }
281
+ }
282
 
283
+ if ( version_compare( $version, '2.2.2' ) < 0 ) {
284
+ $tmp = get_option( 'ip_geo_block_statistics' );
285
+ $tmp['daystats'] = array();
286
+ IP_Geo_Block_Logs::record_stat( $tmp );
287
+ delete_option( 'ip_geo_block_statistics' ); // @since 1.2.0
288
 
289
+ foreach ( array( 'maxmind', 'ip2location' ) as $tmp ) {
290
+ unset( $settings[ $tmp ] );
 
291
  }
292
+ }
293
 
294
+ if ( version_compare( $version, '2.2.3' ) < 0 )
295
+ $settings['api_dir'] = $default['api_dir'];
296
+
297
+ if ( version_compare( $version, '2.2.5' ) < 0 ) {
298
+ // https://wordpress.org/support/topic/compatibility-with-ag-custom-admin
299
+ $arr = array();
300
+ foreach ( explode( ',', $settings['signature'] ) as $tmp ) {
301
+ $tmp = trim( $tmp );
302
+ if ( 'wp-config.php' === $tmp || 'passwd' === $tmp )
303
+ $tmp = '/' . $tmp;
304
+ array_push( $arr, $tmp );
 
 
 
 
 
305
  }
306
+ $settings['signature'] = implode( ',', $arr );
307
+ foreach ( array( 'plugins', 'themes' ) as $tmp ) {
308
+ $settings['exception'][ $tmp ] = $default['exception'][ $tmp ];
 
 
 
 
 
 
 
 
309
  }
310
+ }
311
 
312
+ if ( version_compare( $version, '2.2.6' ) < 0 ) {
313
+ $settings['signature'] = str_replace( " ", "\n", $settings['signature'] );
314
+ $settings['extra_ips']['white_list'] = str_replace( " ", "\n", $settings['extra_ips']['white_list'] );
315
+ $settings['extra_ips']['black_list'] = str_replace( " ", "\n", $settings['extra_ips']['black_list'] );
316
 
317
+ foreach ( array( 'plugins', 'themes' ) as $tmp ) {
318
+ $arr = array_keys( $settings['exception'][ $tmp ] );
319
+ if ( ! empty( $arr ) && ! is_numeric( $arr[0] ) )
320
+ $settings['exception'][ $tmp ] = $arr;
 
321
  }
322
+ }
323
 
324
+ if ( version_compare( $version, '2.2.7' ) < 0 )
325
+ $settings['api_key'] = $default['api_key'];
 
 
326
 
327
+ if ( version_compare( $version, '2.2.8' ) < 0 ) {
328
+ $settings['login_action'] = $default['login_action'];
329
+ // Block by country (register, lost password)
330
+ if ( 2 === (int)$settings['validation']['login'] )
331
+ $settings['login_action']['login'] = FALSE;
332
+ }
333
 
334
+ if ( version_compare( $version, '2.2.9' ) < 0 ) {
335
+ $settings['validation']['timing' ] = $default['validation']['timing' ];
336
+ $settings['validation']['recdays'] = $default['validation']['recdays'];
337
+ }
 
338
 
339
+ if ( version_compare( $version, '3.0.0' ) < 0 ) {
340
+ foreach ( array( 'cache_time_gc', 'response_msg', 'redirect_uri', 'network_wide', 'public' ) as $tmp ) {
341
+ $settings[ $tmp ] = $default[ $tmp ];
342
  }
343
 
344
+ foreach ( array( 'public', 'includes', 'uploads', 'languages' ) as $tmp ) {
345
+ $settings['validation'][ $tmp ] = $default['validation'][ $tmp ];
346
+ $settings['rewrite' ][ $tmp ] = $default['rewrite' ][ $tmp ];
347
+ $settings['exception' ][ $tmp ] = $default['exception' ][ $tmp ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  }
349
 
350
+ $settings['exception']['admin'] = $default['exception']['admin'];
351
+ }
 
 
 
 
 
 
 
 
352
 
353
+ if ( version_compare( $version, '3.0.1' ) < 0 )
354
+ delete_transient( IP_Geo_Block::CACHE_NAME ); // @since 2.8
355
+
356
+ if ( version_compare( $version, '3.0.3' ) < 0 ) {
357
+ $settings['exception' ]['restapi' ] = $default['exception' ]['restapi' ];
358
+ $settings['validation' ]['restapi' ] = $default['validation']['restapi' ];
359
+ $settings['validation' ]['mimetype' ] = $default['validation']['mimetype' ];
360
+ $settings['public' ]['redirect_uri' ] = $default['public' ]['redirect_uri' ];
361
+ $settings['public' ]['response_msg' ] = $default['public' ]['response_msg' ];
362
+ $settings['public' ]['response_code'] = $default['public' ]['response_code'];
363
+ $settings['public' ]['dnslkup' ] = TRUE;
364
+ $settings['public' ]['ua_list' ] = str_replace( '*:HOST=embed.ly', 'embed.ly:HOST', $settings['public']['ua_list'] );
365
+ $settings['login_action']['resetpass' ] = @$settings['login_action']['resetpasss'];
366
+ $settings['mimetype' ] = $default['mimetype'];
367
+ unset(
368
+ $settings['rewrite' ]['public' ], // unused @3.0.0
369
+ $settings['rewrite' ]['content' ], // unused @3.0.0
370
+ $settings['login_action']['resetpasss'] // mis-spelled
371
+ );
372
+ }
373
 
374
+ if ( version_compare( $version, '3.0.4.1' ) < 0 ) {
375
+ if ( ! isset( $settings['Maxmind']['use_asn'] ) ) {
376
+ $settings['Maxmind' ]['use_asn' ] = 0; // disable
377
+ $settings['Maxmind' ]['asn4_path' ] = $default['Maxmind' ]['asn4_path' ];
378
+ $settings['Maxmind' ]['asn4_last' ] = $default['Maxmind' ]['asn4_last' ];
379
+ $settings['Maxmind' ]['asn6_path' ] = $default['Maxmind' ]['asn6_path' ];
380
+ $settings['Maxmind' ]['asn6_last' ] = $default['Maxmind' ]['asn6_last' ];
381
+ $settings['mimetype']['capability'] = $default['mimetype']['capability'];
382
  }
383
+ }
384
 
385
+ if ( version_compare( $version, '3.0.5' ) < 0 )
386
+ $settings['live_update'] = $default['live_update'];
387
 
388
+ if ( version_compare( $version, '3.0.8' ) < 0 ) {
389
+ $settings['timeout' ] = $default['timeout'];
390
+ $settings['Geolite2']['use_asn'] = $settings['Maxmind']['use_asn'];
391
+ foreach ( array( 'ip_path', 'ip_last', 'asn_path', 'asn_last' ) as $tmp ) {
392
+ $settings['Geolite2'][ $tmp ] = $default['Geolite2'][ $tmp ];
393
  }
394
+ }
395
 
396
+ if ( version_compare( $version, '3.0.9' ) < 0 )
397
+ $settings['priority'] = $default['priority'];
 
 
 
 
 
398
 
399
+ if ( version_compare( $version, '3.0.10' ) < 0 ) {
400
+ $settings['behavior'] = $default['behavior'];
401
+ $settings['public' ]['behavior'] = $default['public']['behavior'];
402
+ }
403
+
404
+ if ( version_compare( $version, '3.0.11' ) < 0 ) {
405
+ // change the size of some database columns
406
+ $settings['cache_hold'] = $default['cache_hold'];
407
+ IP_Geo_Block_Logs::delete_tables( IP_Geo_Block::CACHE_NAME );
408
+ IP_Geo_Block_Logs::create_tables();
409
+ IP_Geo_Block_Logs::reset_sqlite_db();
410
+ }
411
+
412
+ if ( version_compare( $version, '3.0.13' ) < 0 ) {
413
+ $settings['validation' ]['maxlogs'] = $default['validation']['maxlogs'];
414
+ $settings['validation' ]['explogs'] = $default['validation']['explogs'];
415
+ $settings['restrict_api'] = $settings['anonymize'];
416
+ }
417
 
418
+ if ( version_compare( $version, '3.0.14' ) < 0 )
419
+ $settings['login_link'] = $default['login_link'];
420
 
421
+ if ( version_compare( $version, '3.0.15' ) < 0 )
422
+ IP_Geo_Block_Logs::upgrade( $version );
423
 
424
+ if ( version_compare( $version, '3.0.16' ) < 0 ) {
425
+ if ( isset( $settings['public']['simulate'] ) ) {
426
+ $settings['simulate'] = $settings['public']['simulate'];
427
+ unset( $settings['public']['simulate'] );
428
+ } else {
429
+ $settings['simulate'] = $default['simulate'];
430
+ }
431
  }
432
 
433
+ // update package version number
434
+ $settings['version'] = IP_Geo_Block::VERSION;
435
+
436
  // install addons for IP Geolocation database API ver. 1.1.13
437
  $providers = IP_Geo_Block_Provider::get_addons();
438
  if ( empty( $providers ) || ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) || version_compare( $version, '3.0.14' ) < 0 )
440
 
441
  $settings['request_ua'] = trim( str_replace( array( 'InfiniteWP' ), '', @$_SERVER['HTTP_USER_AGENT'] ) );
442
 
443
+ // update (or create if it does not exist) option table
444
+ IP_Geo_Block::update_option( $settings );
445
 
446
  // return upgraded settings
447
  return $settings;
classes/class-ip-geo-block-util.php CHANGED
@@ -106,7 +106,7 @@ class IP_Geo_Block_Util {
106
  public static function rebuild_nonce( $location, $retrieve = TRUE ) {
107
  // check if the location is internal
108
  $url = parse_url( $location );
109
- $key = IP_Geo_Block::PLUGIN_NAME . '-auth-nonce';
110
 
111
  if ( empty( $url['host'] ) || $url['host'] === parse_url( home_url(), PHP_URL_HOST ) ) {
112
  if ( $retrieve ) {
@@ -187,15 +187,13 @@ class IP_Geo_Block_Util {
187
 
188
  // Nonce generated 0-12 hours ago
189
  $expected = substr( self::hash_nonce( $exp . '|' . $action . '|' . $uid . '|' . $tok ), -12, 10 );
190
- if ( self::hash_equals( $expected, (string)$nonce ) ) {
191
  return 1;
192
- }
193
 
194
  // Nonce generated 12-24 hours ago
195
  $expected = substr( self::hash_nonce( ( $exp - 1 ) . '|' . $action . '|' . $uid . '|' . $tok ), -12, 10 );
196
- if ( self::hash_equals( $expected, (string)$nonce ) ) {
197
  return 2;
198
- }
199
 
200
  // Invalid nonce
201
  return FALSE;
@@ -273,12 +271,21 @@ class IP_Geo_Block_Util {
273
  return FALSE;
274
 
275
  $cookie = $_COOKIE[ $cookie_name ];
 
276
 
277
- if ( count( $cookie_elements = explode( '|', $cookie ) ) !== 4 )
278
- return FALSE;
 
 
279
 
280
- list( $username, $expiration, $token, $hmac ) = $cookie_elements;
281
- $cache_cookie = compact( 'username', 'expiration', 'token', 'hmac', 'scheme' );
 
 
 
 
 
 
282
  }
283
 
284
  return $cache_cookie;
@@ -321,7 +328,7 @@ class IP_Geo_Block_Util {
321
  $scheme = $cookie['scheme'];
322
  $username = $cookie['username'];
323
  $hmac = $cookie['hmac'];
324
- $token = $cookie['token'];
325
  $expired = $expiration = $cookie['expiration'];
326
 
327
  // Allow a grace period for POST and Ajax requests
@@ -336,11 +343,18 @@ class IP_Geo_Block_Util {
336
  return $cache_user = FALSE;
337
 
338
  $pass_frag = substr( $cache_user->user_pass, 8, 4 );
339
- $key = self::hash_nonce( $username . '|' . $pass_frag . '|' . $expiration . '|' . $token, $scheme );
340
 
341
- // If ext/hash is not present, compat.php's hash_hmac() does not support sha256.
342
- $algo = function_exists( 'hash' ) ? 'sha256' : 'sha1';
343
- $hash = self::hash_hmac( $algo, $username . '|' . $expiration . '|' . $token, $key );
 
 
 
 
 
 
 
 
344
 
345
  if ( ! self::hash_equals( $hash, $hmac ) )
346
  return $cache_user = FALSE;
@@ -763,9 +777,10 @@ class IP_Geo_Block_Util {
763
  *
764
  */
765
  public static function is_feed( $request_uri ) {
766
- return isset( $_GET['feed'] ) ?
767
  ( preg_match( '!(?:comments-)?(?:feed|rss|rss2|rdf|atom)$!', $_GET['feed'] ) ? TRUE : FALSE ) :
768
- ( preg_match( '!(?:comments/)?(?:feed|rss|rss2|rdf|atom)/?$!', $request_uri ) ? TRUE : FALSE );
 
769
  }
770
 
771
  /**
@@ -776,6 +791,7 @@ class IP_Geo_Block_Util {
776
  private static function is_IIS() {
777
  $_is_apache = ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'LiteSpeed' ) !== FALSE );
778
  $_is_IIS = ! $_is_apache && ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer' ) !== FALSE );
 
779
  return $_is_IIS ? substr( $_SERVER['SERVER_SOFTWARE'], strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/' ) + 14 ) : FALSE;
780
  }
781
 
@@ -919,7 +935,7 @@ class IP_Geo_Block_Util {
919
  }
920
 
921
  /**
922
- * Get the list of multisite
923
  *
924
  * This function should be called after 'init' hook is fired.
925
  */
@@ -951,56 +967,6 @@ class IP_Geo_Block_Util {
951
  );
952
  }
953
 
954
- /**
955
- * Load and show theme template
956
- *
957
- */
958
- private static $theme_template = array();
959
-
960
- public static function show_theme_template( $code, $settings ) {
961
- if ( file_exists( $file = get_stylesheet_directory() . '/' . $code . '.php' ) /* child theme */ ||
962
- file_exists( $file = get_template_directory() . '/' . $code . '.php' ) /* parent theme */ ) {
963
- // keep the response code and the template file
964
- self::$theme_template = array( 'code' => $code, 'file' => $file );
965
-
966
- // case 1: validation timing is `init`
967
- if ( $action = current_filter() ) { // `plugins_loaded`, `wp` or FALSE
968
- add_action( // `wp` (on front-end target) is too late to apply `init`
969
- 'wp' === $action ? 'template_redirect' : 'init',
970
- 'IP_Geo_Block_Util::load_theme_template', $settings['priority']
971
- );
972
- return TRUE; // load template at the specified action
973
- }
974
-
975
- // case 2: validation timing is `mu-plugins`
976
- elseif ( '<?php' !== file_get_contents( $file, FALSE, NULL, 0, 5 ) ) {
977
- self::load_theme_template(); // load template and die immediately
978
- }
979
- }
980
-
981
- // prevent to make a cached page. `set_404()` should not be used for `wp_dir()`.
982
- global $wp_query; isset( $wp_query->is_404 ) and $wp_query->is_404 = TRUE;
983
-
984
- return FALSE; // die with wp_die() immediately
985
- }
986
-
987
- public static function load_theme_template( $template = FALSE ) {
988
- global $wp_query; isset( $wp_query ) and $wp_query->set_404(); // for stylesheet
989
-
990
- status_header( self::$theme_template['code'] ); // @since 2.0.0
991
- add_filter( 'document_title_parts', 'IP_Geo_Block_Util::change_title' ); // @since 4.4.0
992
-
993
- // avoid loading template for HEAD requests because of performance bump. See #14348.
994
- 'HEAD' !== $_SERVER['REQUEST_METHOD'] and include self::$theme_template['file'];
995
- exit;
996
- }
997
-
998
- public static function change_title( $title_parts ) {
999
- // change title from `Not Found` to the correct one.
1000
- $title_parts['title'] = get_status_header_desc( self::$theme_template['code'] );
1001
- return $title_parts;
1002
- }
1003
-
1004
  /**
1005
  * Generates cryptographically secure pseudo-random bytes
1006
  *
@@ -1043,7 +1009,8 @@ class IP_Geo_Block_Util {
1043
  );
1044
  }
1045
 
1046
- public static function generate_link() {
 
1047
  $link = self::random_bytes();
1048
  $hash = bin2hex( self::hash_link( $link ) );
1049
 
@@ -1058,21 +1025,32 @@ class IP_Geo_Block_Util {
1058
  'hash' => bin2hex( self::hash_link( $hash ) ),
1059
  );
1060
 
1061
- update_option( IP_Geo_Block::OPTION_NAME, $settings );
 
 
 
 
1062
  return add_query_arg( IP_Geo_Block::PLUGIN_NAME . '-key', $link, wp_login_url() );
1063
  }
1064
 
1065
- public static function delete_link() {
 
1066
  $settings = IP_Geo_Block::get_option();
1067
  $settings['login_link'] = array( 'link' => NULL, 'hash' => NULL );
1068
- update_option( IP_Geo_Block::OPTION_NAME, $settings );
 
 
 
 
1069
  }
1070
 
 
1071
  public static function get_link() {
1072
  $settings = IP_Geo_Block::get_option();
1073
  return $settings['login_link']['link'] ? $settings['login_link']['link'] : FALSE;
1074
  }
1075
 
 
1076
  public static function verify_link( $link, $hash = NULL ) {
1077
  return self::hash_equals( self::hash_link( $link ), pack( 'H*', $hash ? $hash : self::get_link() ) ); // hex2bin() for PHP 5.4+
1078
  }
106
  public static function rebuild_nonce( $location, $retrieve = TRUE ) {
107
  // check if the location is internal
108
  $url = parse_url( $location );
109
+ $key = IP_Geo_Block::get_auth_key();
110
 
111
  if ( empty( $url['host'] ) || $url['host'] === parse_url( home_url(), PHP_URL_HOST ) ) {
112
  if ( $retrieve ) {
187
 
188
  // Nonce generated 0-12 hours ago
189
  $expected = substr( self::hash_nonce( $exp . '|' . $action . '|' . $uid . '|' . $tok ), -12, 10 );
190
+ if ( self::hash_equals( $expected, (string)$nonce ) )
191
  return 1;
 
192
 
193
  // Nonce generated 12-24 hours ago
194
  $expected = substr( self::hash_nonce( ( $exp - 1 ) . '|' . $action . '|' . $uid . '|' . $tok ), -12, 10 );
195
+ if ( self::hash_equals( $expected, (string)$nonce ) )
196
  return 2;
 
197
 
198
  // Invalid nonce
199
  return FALSE;
271
  return FALSE;
272
 
273
  $cookie = $_COOKIE[ $cookie_name ];
274
+ $n = count( $cookie_elements = explode( '|', $cookie ) );
275
 
276
+ if ( 4 === $n ) { // @since 4.0.0
277
+ list( $username, $expiration, $token, $hmac ) = $cookie_elements;
278
+ $cache_cookie = compact( 'username', 'expiration', 'token', 'hmac', 'scheme' );
279
+ }
280
 
281
+ elseif ( 3 === $n ) { // @before 4.0.0
282
+ list( $username, $expiration, $hmac ) = $cookie_elements;
283
+ $cache_cookie = compact( 'username', 'expiration', 'hmac', 'scheme' );
284
+ }
285
+
286
+ else {
287
+ return FALSE;
288
+ }
289
  }
290
 
291
  return $cache_cookie;
328
  $scheme = $cookie['scheme'];
329
  $username = $cookie['username'];
330
  $hmac = $cookie['hmac'];
331
+ $token = isset( $cookie['token'] ) ? $cookie['token'] : NULL;
332
  $expired = $expiration = $cookie['expiration'];
333
 
334
  // Allow a grace period for POST and Ajax requests
343
  return $cache_user = FALSE;
344
 
345
  $pass_frag = substr( $cache_user->user_pass, 8, 4 );
 
346
 
347
+ if ( is_null( $token ) ) { // @before 4.0.0
348
+ $key = self::hash_nonce( $username . $pass_frag . '|' . $expiration, $scheme );
349
+ $hash = hash_hmac( 'md5', $username . '|' . $expiration, $key );
350
+ }
351
+
352
+ else { // @since 4.0.0
353
+ // If ext/hash is not present, compat.php's hash_hmac() does not support sha256.
354
+ $key = self::hash_nonce( $username . '|' . $pass_frag . '|' . $expiration . '|' . $token, $scheme );
355
+ $algo = function_exists( 'hash' ) ? 'sha256' : 'sha1';
356
+ $hash = self::hash_hmac( $algo, $username . '|' . $expiration . '|' . $token, $key );
357
+ }
358
 
359
  if ( ! self::hash_equals( $hash, $hmac ) )
360
  return $cache_user = FALSE;
777
  *
778
  */
779
  public static function is_feed( $request_uri ) {
780
+ return /* function_exists( 'is_feed' ) ? is_feed() : */ ( isset( $_GET['feed'] ) ?
781
  ( preg_match( '!(?:comments-)?(?:feed|rss|rss2|rdf|atom)$!', $_GET['feed'] ) ? TRUE : FALSE ) :
782
+ ( preg_match( '!(?:comments/)?(?:feed|rss|rss2|rdf|atom)/?$!', $request_uri ) ? TRUE : FALSE )
783
+ );
784
  }
785
 
786
  /**
791
  private static function is_IIS() {
792
  $_is_apache = ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'LiteSpeed' ) !== FALSE );
793
  $_is_IIS = ! $_is_apache && ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer' ) !== FALSE );
794
+
795
  return $_is_IIS ? substr( $_SERVER['SERVER_SOFTWARE'], strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/' ) + 14 ) : FALSE;
796
  }
797
 
935
  }
936
 
937
  /**
938
+ * Get the list of multisite managed by the specific user
939
  *
940
  * This function should be called after 'init' hook is fired.
941
  */
967
  );
968
  }
969
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
970
  /**
971
  * Generates cryptographically secure pseudo-random bytes
972
  *
1009
  );
1010
  }
1011
 
1012
+ // used at `admin_ajax_callback()` in class-ip-geo-block-admin.php
1013
+ public static function generate_link( $context ) {
1014
  $link = self::random_bytes();
1015
  $hash = bin2hex( self::hash_link( $link ) );
1016
 
1025
  'hash' => bin2hex( self::hash_link( $hash ) ),
1026
  );
1027
 
1028
+ if ( $context->is_network_admin() && $settings['network_wide'] )
1029
+ $context->update_multisite_settings( $settings );
1030
+ else
1031
+ IP_Geo_Block::update_option( $settings );
1032
+
1033
  return add_query_arg( IP_Geo_Block::PLUGIN_NAME . '-key', $link, wp_login_url() );
1034
  }
1035
 
1036
+ // used at `admin_ajax_callback()` in class-ip-geo-block-admin.php
1037
+ public static function delete_link( $context ) {
1038
  $settings = IP_Geo_Block::get_option();
1039
  $settings['login_link'] = array( 'link' => NULL, 'hash' => NULL );
1040
+
1041
+ if ( $context->is_network_admin() && $settings['network_wide'] )
1042
+ $context->update_multisite_settings( $settings );
1043
+ else
1044
+ IP_Geo_Block::update_option( $settings );
1045
  }
1046
 
1047
+ // used at `tab_setup()` in tab-settings.php
1048
  public static function get_link() {
1049
  $settings = IP_Geo_Block::get_option();
1050
  return $settings['login_link']['link'] ? $settings['login_link']['link'] : FALSE;
1051
  }
1052
 
1053
+ // used at `validate_login()` in class-ip-geo-block.php
1054
  public static function verify_link( $link, $hash = NULL ) {
1055
  return self::hash_equals( self::hash_link( $link ), pack( 'H*', $hash ? $hash : self::get_link() ) ); // hex2bin() for PHP 5.4+
1056
  }
classes/class-ip-geo-block.php CHANGED
@@ -15,7 +15,7 @@ class IP_Geo_Block {
15
  * Unique identifier for this plugin.
16
  *
17
  */
18
- const VERSION = '3.0.15';
19
  const GEOAPI_NAME = 'ip-geo-api';
20
  const PLUGIN_NAME = 'ip-geo-block';
21
  const OPTION_NAME = 'ip_geo_block_settings';
@@ -27,14 +27,18 @@ class IP_Geo_Block {
27
  *
28
  */
29
  private static $instance = NULL;
 
 
 
30
  private static $wp_path = array();
31
  private static $remote_addr = NULL;
 
32
  private $pagenow = NULL;
33
  private $request_uri = NULL;
34
  private $target_type = NULL;
35
 
36
  /**
37
- * Initialize the plugin
38
  *
39
  */
40
  private function __construct() {
@@ -52,11 +56,14 @@ class IP_Geo_Block {
52
  $settings = self::get_option();
53
  $priority = $settings['priority' ];
54
  $validate = $settings['validation'];
55
- $live_log = get_transient( IP_Geo_Block::PLUGIN_NAME . '-live-log' );
56
 
57
  // include drop in if it exists
58
  file_exists( $key = IP_Geo_Block_Util::unslashit( $settings['api_dir'] ) . '/drop-in.php' ) and include( $key );
59
 
 
 
 
 
60
  // normalize requested uri and page
61
  $key = preg_replace( array( '!\.+/!', '!//+!' ), '/', $_SERVER['REQUEST_URI'] );
62
  $this->request_uri = @parse_url( $key, PHP_URL_PATH ) or $this->request_uri = $key;
@@ -97,19 +104,19 @@ class IP_Geo_Block {
97
 
98
  // analize core validation target (comment|xmlrpc|login|public)
99
  elseif ( isset( $list[ $this->pagenow ] ) ) {
100
- if ( $validate[ $list[ $this->pagenow ] ] || $live_log )
101
  $loader->add_action( 'init', array( $this, 'validate_' . $list[ $this->pagenow ] ), $priority );
102
  }
103
 
104
  // alternative of trackback
105
  elseif ( 'POST' === $_SERVER['REQUEST_METHOD'] && 'trackback' === basename( $this->request_uri ) ) {
106
- if ( $validate['comment'] || $live_log )
107
  $loader->add_action( 'init', array( $this, 'validate_comment' ), $priority );
108
  }
109
 
110
  else {
111
  // public facing pages
112
- if ( $validate['public'] || ( ! empty( $_FILES ) && $validate['mimetype'] ) || $live_log /* && 'index.php' === $this->pagenow */ )
113
  defined( 'DOING_CRON' ) or $loader->add_action( 'init', array( $this, 'validate_public' ), $priority );
114
 
115
  // message text on comment form
@@ -118,7 +125,7 @@ class IP_Geo_Block {
118
  add_action( 'comment_form' . $key, array( $this, 'comment_form_message' ) );
119
  }
120
 
121
- if ( $validate['comment'] || $live_log ) {
122
  add_action( 'pre_comment_on_post', array( $this, 'validate_comment' ), $priority ); // wp-comments-post.php @since 2.8.0
123
  add_action( 'pre_trackback_post', array( $this, 'validate_comment' ), $priority ); // wp-trackback.php @since 4.7.0
124
  add_filter( 'preprocess_comment', array( $this, 'validate_comment' ), $priority ); // wp-includes/comment.php @since 1.5.0
@@ -130,12 +137,12 @@ class IP_Geo_Block {
130
  add_filter( 'bbp_current_user_can_access_create_reply_form', array( $this, 'validate_front' ), $priority );
131
  }
132
 
133
- if ( $validate['login'] || $live_log ) {
134
  // for hide/rename wp-login.php, BuddyPress: prevent registration and rendering form
135
  add_action( 'login_init', array( $this, 'validate_login' ), $priority );
136
 
137
  // only when block on front-end is disabled
138
- if ( ! $validate['public'] || $live_log ) {
139
  add_action( 'bp_core_screen_signup', array( $this, 'validate_login' ), $priority );
140
  add_action( 'bp_signup_pre_validate', array( $this, 'validate_login' ), $priority );
141
  }
@@ -156,7 +163,7 @@ class IP_Geo_Block {
156
  }
157
 
158
  /**
159
- * I/F for registering custom fileter
160
  *
161
  */
162
  public static function add_filter( $tag, $function, $priority = 10, $args = 1 ) {
@@ -164,13 +171,21 @@ class IP_Geo_Block {
164
  }
165
 
166
  /**
167
- * Return an instance of this class.
168
  *
169
  */
170
  public static function get_instance() {
171
  return self::$instance ? self::$instance : ( self::$instance = new self );
172
  }
173
 
 
 
 
 
 
 
 
 
174
  /**
175
  * Optional values handlings.
176
  *
@@ -180,14 +195,17 @@ class IP_Geo_Block {
180
  return IP_Geo_Block_Opts::get_default();
181
  }
182
 
183
- // get optional values from wp options
184
- public static function get_option() {
185
- return ( $option = get_option( self::OPTION_NAME ) ) ? $option : self::get_default();
 
 
 
 
186
  }
187
 
188
- // get the WordPress path of validation target
189
- public static function get_wp_path() {
190
- return self::$wp_path;
191
  }
192
 
193
  /**
@@ -206,8 +224,8 @@ class IP_Geo_Block {
206
  *
207
  */
208
  public function request_nonce( $args = array(), $url = '' ) {
209
- if ( 0 === strpos( $url, admin_url() ) && empty( $args[ $handle = self::PLUGIN_NAME . '-auth-nonce' ] ) )
210
- $args += array( $handle => IP_Geo_Block_Util::create_nonce( $handle ) );
211
 
212
  return $args;
213
  }
@@ -216,19 +234,22 @@ class IP_Geo_Block {
216
  * Register and enqueue a nonce with a specific JavaScript.
217
  *
218
  */
219
- public static function enqueue_nonce() {
220
  if ( is_user_logged_in() ) {
 
 
 
221
  $args['sites'] = IP_Geo_Block_Util::get_sites_of_user();
222
- $args['nonce'] = IP_Geo_Block_Util::create_nonce( $handle = self::PLUGIN_NAME . '-auth-nonce' );
 
223
 
224
- // authentication
225
  $script = plugins_url(
226
  ! defined( 'IP_GEO_BLOCK_DEBUG' ) || ! IP_GEO_BLOCK_DEBUG ?
227
  'admin/js/authenticate.min.js' : 'admin/js/authenticate.js', IP_GEO_BLOCK_BASE
228
  );
229
 
230
- wp_enqueue_script( $handle, $script, array( 'jquery' ), self::VERSION );
231
- wp_localize_script( $handle, 'IP_GEO_BLOCK_AUTH', $args + self::$wp_path );
232
  }
233
  }
234
 
@@ -379,6 +400,9 @@ class IP_Geo_Block {
379
  defined( 'DONOTCACHEPAGE' ) or define( 'DONOTCACHEPAGE', TRUE );
380
  nocache_headers(); // wp-includes/functions.php @since 2.0.0
381
 
 
 
 
382
  if ( defined( 'XMLRPC_REQUEST' ) && 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
383
  status_header( 405 );
384
  header( 'Content-Type: text/plain' );
@@ -396,33 +420,75 @@ class IP_Geo_Block {
396
  exit;
397
  } else {
398
  $code = 403; // avoid redirection loop
399
- }
400
 
401
  default: // 4xx Client Error, 5xx Server Error
402
  status_header( $code ); // @since 2.0.0
403
 
404
- // https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
405
- 'public' !== $hook and header( 'X-Robots-Tag: noindex, nofollow', FALSE );
406
-
407
  if ( function_exists( 'trackback_response' ) )
408
  trackback_response( $code, IP_Geo_Block_Util::kses( $mesg ) ); // @since 0.71
409
 
410
- // Show human readable page
411
  elseif ( ! defined( 'DOING_AJAX' ) && ! defined( 'XMLRPC_REQUEST' ) ) {
412
- if ( IP_Geo_Block_Util::show_theme_template( $code, $settings ) ) {
413
- return; // continue to show at `init`
414
- } else {
415
- $hook = ( IP_Geo_Block_Util::is_user_logged_in() && 'admin' === $this->target_type );
416
- wp_die( // get_dashboard_url() @since 3.1.0
417
- IP_Geo_Block_Util::kses( $mesg ) . ( $hook ? "\n<p><a rel='nofollow' href='" . esc_url( get_dashboard_url( IP_Geo_Block_Util::get_current_user_id() ) ) . "'>&laquo; " . __( 'Dashboard' ) . "</a></p>" : '' ),
418
- get_status_header_desc( $code ), array( 'response' => $code, 'back_link' => ! $hook )
419
- );
420
- }
 
 
421
  }
422
  exit;
423
  }
424
  }
425
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  /**
427
  * Validate ip address.
428
  *
@@ -481,11 +547,11 @@ class IP_Geo_Block {
481
  IP_Geo_Block_API_Cache::update_cache( $hook, $validate, $settings );
482
 
483
  // update statistics
484
- if ( $settings['save_statistics'] )
485
  IP_Geo_Block_Logs::update_stat( $hook, $validate, $settings );
486
 
487
  // send response code to refuse
488
- if ( $block && $die )
489
  $this->send_response( $hook, $validate, $settings );
490
  }
491
 
@@ -609,10 +675,10 @@ class IP_Geo_Block {
609
 
610
  // list of request for specific action or page to bypass WP-ZEP
611
  $list = array_merge( apply_filters( self::PLUGIN_NAME . '-bypass-admins', array(), $settings ), array(
612
- // in wp-admin js/widget.js, includes/template.php, async-upload.php, plugins.php, PHP Compatibility Checker
613
- 'heartbeat', 'save-widget', 'wp-compression-test', 'upload-attachment', 'deactivate', 'imgedit-preview', 'wpephpcompat_start_test',
614
- // bbPress, Anti-Malware Security and Brute-Force Firewall, Jetpack page & action, Email Subscribers & Newsletters by Icegram
615
- 'bp_avatar_upload', 'GOTMLS_logintime', 'jetpack', 'authorize', 'jetpack_modules', 'atd_settings', 'bulk-activate', 'bulk-deactivate', 'es_sendemail',
616
  ) );
617
 
618
  // skip validation of country code and WP-ZEP if exceptions matches action or page
@@ -623,7 +689,7 @@ class IP_Geo_Block {
623
  elseif ( ! $this->check_exceptions( $action, $page, $list ) ) {
624
  if ( ( 2 & $rule ) && $zep ) {
625
  // redirect if valid nonce in referer, otherwise register WP-ZEP (2: WP-ZEP)
626
- IP_Geo_Block_Util::trace_nonce( self::PLUGIN_NAME . '-auth-nonce' );
627
  add_filter( self::PLUGIN_NAME . '-admin', array( $this, 'check_nonce' ), 4, 2 );
628
  }
629
  }
@@ -648,7 +714,7 @@ class IP_Geo_Block {
648
  preg_match( "!($path)($name)!", $this->request_uri, $name );
649
  $name = empty( $name[2] ) ? $name[1] : $name[2];
650
 
651
- // set validation rule by target (0: Bypass, 1: Block by country, 2: WP-ZEP)
652
  $settings = self::get_option();
653
  $rule = (int)$settings['validation'][ $type ];
654
 
@@ -663,7 +729,7 @@ class IP_Geo_Block {
663
  elseif ( ! in_array( $name, $path, TRUE ) ) {
664
  if ( 2 & $rule ) {
665
  // redirect if valid nonce in referer, otherwise register WP-ZEP (2: WP-ZEP)
666
- IP_Geo_Block_Util::trace_nonce( self::PLUGIN_NAME . '-auth-nonce' );
667
  add_filter( self::PLUGIN_NAME . '-admin', array( $this, 'check_nonce' ), 4, 2 );
668
  }
669
  }
@@ -688,7 +754,7 @@ class IP_Geo_Block {
688
  // Count up a number of fails when authentication is failed
689
  $time = microtime( TRUE );
690
  $settings = self::get_option();
691
- if ( $cache = IP_Geo_Block_API_Cache::get_cache( self::$remote_addr ) ) {
692
  $validate = self::make_validation( self::$remote_addr, array(
693
  'result' => 'failed', // count up $cache['fail'] in update_cache()
694
  'provider' => 'Cache',
@@ -727,7 +793,7 @@ class IP_Geo_Block {
727
 
728
  public function check_fail( $validate, $settings ) {
729
  // check if number of fails reaches the limit. can't overwrite existing result.
730
- $cache = IP_Geo_Block_API_Cache::get_cache( $validate['ip'] );
731
  return $cache && $cache['fail'] > max( 0, (int)$settings['login_fails'] ) ? $validate + array( 'result' => 'limited' ) : $validate;
732
  }
733
 
@@ -738,8 +804,8 @@ class IP_Geo_Block {
738
 
739
  public function check_nonce( $validate, $settings ) {
740
  // should be passed when nonce is valid. can't overwrite existing result
741
- $nonce = IP_Geo_Block_Util::retrieve_nonce( $action = self::PLUGIN_NAME . '-auth-nonce' );
742
- return $validate + array( 'result' => IP_Geo_Block_Util::verify_nonce( $nonce, $action ) || 'XX' === $validate['code'] ? 'passed' : 'wp-zep' );
743
  }
744
 
745
  public function check_signature( $validate, $settings ) {
@@ -845,7 +911,7 @@ class IP_Geo_Block {
845
  $settings = self::get_option();
846
  $public = $settings['public'];
847
 
848
- // replace "Validation rule settings"
849
  if ( $settings['validation']['public'] && -1 !== (int)$public['matching_rule'] ) {
850
  foreach ( array( 'matching_rule', 'white_list', 'black_list', 'response_code', 'response_msg', 'redirect_uri' ) as $key ) {
851
  $settings[ $key ] = $public[ $key ];
@@ -876,12 +942,12 @@ class IP_Geo_Block {
876
  add_filter( self::PLUGIN_NAME . '-ip-addr', array( 'IP_Geo_Block_Util', 'get_proxy_ip' ), 20, 1 );
877
 
878
  // validate country by IP address (block: true, die: false)
879
- $this->validate_ip( 'public', $settings, 1 & $settings['validation']['public'], ! $public['simulate'] );
880
  }
881
 
882
  public function check_behavior( $validate, $settings ) {
883
  // check if page view with a short period time is under the threshold
884
- $cache = IP_Geo_Block_API_Cache::get_cache( self::$remote_addr );
885
 
886
  if ( $cache && $cache['view'] >= $settings['behavior']['view'] && $_SERVER['REQUEST_TIME'] - $cache['last'] <= $settings['behavior']['time'] )
887
  return $validate + array( 'result' => 'badbot' ); // can't overwrite existing result
15
  * Unique identifier for this plugin.
16
  *
17
  */
18
+ const VERSION = '3.0.16';
19
  const GEOAPI_NAME = 'ip-geo-api';
20
  const PLUGIN_NAME = 'ip-geo-block';
21
  const OPTION_NAME = 'ip_geo_block_settings';
27
  *
28
  */
29
  private static $instance = NULL;
30
+ private static $settings = NULL;
31
+ private static $auth_key = NULL;
32
+ private static $live_log = FALSE;
33
  private static $wp_path = array();
34
  private static $remote_addr = NULL;
35
+
36
  private $pagenow = NULL;
37
  private $request_uri = NULL;
38
  private $target_type = NULL;
39
 
40
  /**
41
+ * Initialize the plugin.
42
  *
43
  */
44
  private function __construct() {
56
  $settings = self::get_option();
57
  $priority = $settings['priority' ];
58
  $validate = $settings['validation'];
 
59
 
60
  // include drop in if it exists
61
  file_exists( $key = IP_Geo_Block_Util::unslashit( $settings['api_dir'] ) . '/drop-in.php' ) and include( $key );
62
 
63
+ // global settings after `drop-in.php`
64
+ self::$live_log = get_transient( self::PLUGIN_NAME . '-live-log' );
65
+ self::$auth_key = apply_filters( self::PLUGIN_NAME . '-auth-key', self::PLUGIN_NAME . '-auth-nonce' );
66
+
67
  // normalize requested uri and page
68
  $key = preg_replace( array( '!\.+/!', '!//+!' ), '/', $_SERVER['REQUEST_URI'] );
69
  $this->request_uri = @parse_url( $key, PHP_URL_PATH ) or $this->request_uri = $key;
104
 
105
  // analize core validation target (comment|xmlrpc|login|public)
106
  elseif ( isset( $list[ $this->pagenow ] ) ) {
107
+ if ( $validate[ $list[ $this->pagenow ] ] || self::$live_log )
108
  $loader->add_action( 'init', array( $this, 'validate_' . $list[ $this->pagenow ] ), $priority );
109
  }
110
 
111
  // alternative of trackback
112
  elseif ( 'POST' === $_SERVER['REQUEST_METHOD'] && 'trackback' === basename( $this->request_uri ) ) {
113
+ if ( $validate['comment'] || self::$live_log )
114
  $loader->add_action( 'init', array( $this, 'validate_comment' ), $priority );
115
  }
116
 
117
  else {
118
  // public facing pages
119
+ if ( $validate['public'] || ( ! empty( $_FILES ) && $validate['mimetype'] ) || self::$live_log /* && 'index.php' === $this->pagenow */ )
120
  defined( 'DOING_CRON' ) or $loader->add_action( 'init', array( $this, 'validate_public' ), $priority );
121
 
122
  // message text on comment form
125
  add_action( 'comment_form' . $key, array( $this, 'comment_form_message' ) );
126
  }
127
 
128
+ if ( $validate['comment'] || self::$live_log ) {
129
  add_action( 'pre_comment_on_post', array( $this, 'validate_comment' ), $priority ); // wp-comments-post.php @since 2.8.0
130
  add_action( 'pre_trackback_post', array( $this, 'validate_comment' ), $priority ); // wp-trackback.php @since 4.7.0
131
  add_filter( 'preprocess_comment', array( $this, 'validate_comment' ), $priority ); // wp-includes/comment.php @since 1.5.0
137
  add_filter( 'bbp_current_user_can_access_create_reply_form', array( $this, 'validate_front' ), $priority );
138
  }
139
 
140
+ if ( $validate['login'] || self::$live_log ) {
141
  // for hide/rename wp-login.php, BuddyPress: prevent registration and rendering form
142
  add_action( 'login_init', array( $this, 'validate_login' ), $priority );
143
 
144
  // only when block on front-end is disabled
145
+ if ( ! $validate['public'] || self::$live_log ) {
146
  add_action( 'bp_core_screen_signup', array( $this, 'validate_login' ), $priority );
147
  add_action( 'bp_signup_pre_validate', array( $this, 'validate_login' ), $priority );
148
  }
163
  }
164
 
165
  /**
166
+ * I/F for registering custom fileter.
167
  *
168
  */
169
  public static function add_filter( $tag, $function, $priority = 10, $args = 1 ) {
171
  }
172
 
173
  /**
174
+ * Get the instance of this class.
175
  *
176
  */
177
  public static function get_instance() {
178
  return self::$instance ? self::$instance : ( self::$instance = new self );
179
  }
180
 
181
+ /**
182
+ * Getter functions for the private values.
183
+ *
184
+ */
185
+ public static function get_auth_key() { return self::$auth_key; }
186
+ public static function get_live_log() { return self::$live_log; }
187
+ public static function get_wp_path() { return self::$wp_path; }
188
+
189
  /**
190
  * Optional values handlings.
191
  *
195
  return IP_Geo_Block_Opts::get_default();
196
  }
197
 
198
+ public static function get_option( $cache = TRUE ) {
199
+ if ( $cache ) {
200
+ self::$settings or ( self::$settings = get_option( self::OPTION_NAME ) ) or ( self::$settings = self::get_default() );
201
+ return self::$settings;
202
+ } else {
203
+ return ( $settings = get_option( self::OPTION_NAME ) ) ? $settings : self::get_default();
204
+ }
205
  }
206
 
207
+ public static function update_option( $settings, $cache = TRUE ) {
208
+ return update_option( self::OPTION_NAME, $cache ? self::$settings = $settings : $settings );
 
209
  }
210
 
211
  /**
224
  *
225
  */
226
  public function request_nonce( $args = array(), $url = '' ) {
227
+ if ( 0 === strpos( $url, admin_url() ) && empty( $args[ self::$auth_key ] ) )
228
+ $args += array( self::$auth_key => IP_Geo_Block_Util::create_nonce( self::$auth_key ) );
229
 
230
  return $args;
231
  }
234
  * Register and enqueue a nonce with a specific JavaScript.
235
  *
236
  */
237
+ public static function enqueue_nonce( $hook ) {
238
  if ( is_user_logged_in() ) {
239
+ $settings = self::get_option();
240
+ $validate = $settings['validation'];
241
+
242
  $args['sites'] = IP_Geo_Block_Util::get_sites_of_user();
243
+ $args['nonce'] = IP_Geo_Block_Util::create_nonce( self::$auth_key );
244
+ $args['key' ] = $validate['admin'] & 2 || $validate['ajax'] & 2 || $validate['plugins'] & 2 || $validate['themes'] & 2 ? self::$auth_key : FALSE;
245
 
 
246
  $script = plugins_url(
247
  ! defined( 'IP_GEO_BLOCK_DEBUG' ) || ! IP_GEO_BLOCK_DEBUG ?
248
  'admin/js/authenticate.min.js' : 'admin/js/authenticate.js', IP_GEO_BLOCK_BASE
249
  );
250
 
251
+ wp_enqueue_script ( self::$auth_key, $script, array( 'jquery' ), self::VERSION );
252
+ wp_localize_script( self::$auth_key, 'IP_GEO_BLOCK_AUTH', $args + self::$wp_path );
253
  }
254
  }
255
 
400
  defined( 'DONOTCACHEPAGE' ) or define( 'DONOTCACHEPAGE', TRUE );
401
  nocache_headers(); // wp-includes/functions.php @since 2.0.0
402
 
403
+ // https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
404
+ 'public' === $hook and header( 'X-Robots-Tag: noindex, nofollow', FALSE );
405
+
406
  if ( defined( 'XMLRPC_REQUEST' ) && 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
407
  status_header( 405 );
408
  header( 'Content-Type: text/plain' );
420
  exit;
421
  } else {
422
  $code = 403; // avoid redirection loop
423
+ } // continue to default
424
 
425
  default: // 4xx Client Error, 5xx Server Error
426
  status_header( $code ); // @since 2.0.0
427
 
 
 
 
428
  if ( function_exists( 'trackback_response' ) )
429
  trackback_response( $code, IP_Geo_Block_Util::kses( $mesg ) ); // @since 0.71
430
 
 
431
  elseif ( ! defined( 'DOING_AJAX' ) && ! defined( 'XMLRPC_REQUEST' ) ) {
432
+ $hook = ( IP_Geo_Block_Util::is_user_logged_in() && 'admin' === $hook );
433
+ if ( ! $hook && TRUE === $this->show_theme_template( $code, $settings ) )
434
+ return;
435
+
436
+ // prevent to make a cached page. `set_404()` should not be used for `wp_die()`.
437
+ global $wp_query; isset( $wp_query->is_404 ) and $wp_query->is_404 = TRUE;
438
+
439
+ wp_die( // get_dashboard_url() @since 3.1.0
440
+ IP_Geo_Block_Util::kses( $mesg ) . ( $hook ? "\n<p>&laquo; <a href='javascript:history.back()'>" . __( 'Back' ) . "</a> / <a rel='nofollow' href='" . esc_url( get_dashboard_url( IP_Geo_Block_Util::get_current_user_id() ) ) . "'>" . __( 'Dashboard' ) . "</a></p>" : '' ),
441
+ get_status_header_desc( $code ), array( 'response' => $code, 'back_link' => ! $hook )
442
+ );
443
  }
444
  exit;
445
  }
446
  }
447
 
448
+ /**
449
+ * Load and show theme template
450
+ *
451
+ */
452
+ private function show_theme_template( $code, $settings ) {
453
+ if ( file_exists( $file = get_stylesheet_directory() . '/' . $code . '.php' ) /* child theme */ ||
454
+ file_exists( $file = get_template_directory() . '/' . $code . '.php' ) /* parent theme */ ) {
455
+ // keep the response code and the template file
456
+ $this->theme_template = array( 'code' => $code, 'file' => $file );
457
+
458
+ // case 1: validation timing is `init`
459
+ if ( $action = current_filter() ) { // `plugins_loaded`, `wp` or FALSE
460
+ add_action( // `wp` (on front-end target) is too late to apply `init`
461
+ 'wp' === $action ? 'template_redirect' : 'init',
462
+ array( $this, 'load_theme_template' ), $settings['priority']
463
+ );
464
+ return TRUE; // load template at the specified action
465
+ }
466
+
467
+ // case 2: validation timing is `mu-plugins`
468
+ elseif ( '<?php' !== file_get_contents( $file, FALSE, NULL, 0, 5 ) ) {
469
+ $this->load_theme_template(); // load template and die immediately
470
+ }
471
+ }
472
+
473
+ return FALSE; // die with wp_die() immediately
474
+ }
475
+
476
+ public function load_theme_template( $template = FALSE ) {
477
+ global $wp_query; isset( $wp_query ) and $wp_query->set_404(); // for stylesheet
478
+
479
+ // change title from `Not Found` because of `set_404()` to the right one.
480
+ add_filter( 'document_title_parts', array( $this, 'change_title' ) ); // @since 4.4.0
481
+
482
+ // avoid loading template for HEAD requests because of performance bump. See #14348.
483
+ 'HEAD' !== $_SERVER['REQUEST_METHOD'] and include $this->theme_template['file'];
484
+ exit;
485
+ }
486
+
487
+ public function change_title( $title_parts ) {
488
+ $title_parts['title'] = get_status_header_desc( $this->theme_template['code'] );
489
+ return $title_parts;
490
+ }
491
+
492
  /**
493
  * Validate ip address.
494
  *
547
  IP_Geo_Block_API_Cache::update_cache( $hook, $validate, $settings );
548
 
549
  // update statistics
550
+ if ( $settings['save_statistics'] && ! $validate['auth'] )
551
  IP_Geo_Block_Logs::update_stat( $hook, $validate, $settings );
552
 
553
  // send response code to refuse
554
+ if ( empty( $settings['simulate'] ) && $block && $die )
555
  $this->send_response( $hook, $validate, $settings );
556
  }
557
 
675
 
676
  // list of request for specific action or page to bypass WP-ZEP
677
  $list = array_merge( apply_filters( self::PLUGIN_NAME . '-bypass-admins', array(), $settings ), array(
678
+ // in wp-admin js/widget.js, includes/template.php, async-upload.php, plugins.php, PHP Compatibility Checker, bbPress
679
+ 'heartbeat', 'save-widget', 'wp-compression-test', 'upload-attachment', 'deactivate', 'imgedit-preview', 'wpephpcompat_start_test', 'bp_avatar_upload',
680
+ // Anti-Malware Security and Brute-Force Firewall, Jetpack page & action, Email Subscribers & Newsletters by Icegram, Swift Performance
681
+ 'GOTMLS_logintime', 'jetpack', 'authorize', 'jetpack_modules', 'atd_settings', 'bulk-activate', 'bulk-deactivate', 'es_sendemail', 'swift_performance_setup'
682
  ) );
683
 
684
  // skip validation of country code and WP-ZEP if exceptions matches action or page
689
  elseif ( ! $this->check_exceptions( $action, $page, $list ) ) {
690
  if ( ( 2 & $rule ) && $zep ) {
691
  // redirect if valid nonce in referer, otherwise register WP-ZEP (2: WP-ZEP)
692
+ IP_Geo_Block_Util::trace_nonce( self::$auth_key );
693
  add_filter( self::PLUGIN_NAME . '-admin', array( $this, 'check_nonce' ), 4, 2 );
694
  }
695
  }
714
  preg_match( "!($path)($name)!", $this->request_uri, $name );
715
  $name = empty( $name[2] ) ? $name[1] : $name[2];
716
 
717
+ // set validation rules by target (0: Bypass, 1: Block by country, 2: WP-ZEP)
718
  $settings = self::get_option();
719
  $rule = (int)$settings['validation'][ $type ];
720
 
729
  elseif ( ! in_array( $name, $path, TRUE ) ) {
730
  if ( 2 & $rule ) {
731
  // redirect if valid nonce in referer, otherwise register WP-ZEP (2: WP-ZEP)
732
+ IP_Geo_Block_Util::trace_nonce( self::$auth_key );
733
  add_filter( self::PLUGIN_NAME . '-admin', array( $this, 'check_nonce' ), 4, 2 );
734
  }
735
  }
754
  // Count up a number of fails when authentication is failed
755
  $time = microtime( TRUE );
756
  $settings = self::get_option();
757
+ if ( $cache = IP_Geo_Block_API_Cache::get_cache( self::$remote_addr, $settings['cache_hold'] ) ) {
758
  $validate = self::make_validation( self::$remote_addr, array(
759
  'result' => 'failed', // count up $cache['fail'] in update_cache()
760
  'provider' => 'Cache',
793
 
794
  public function check_fail( $validate, $settings ) {
795
  // check if number of fails reaches the limit. can't overwrite existing result.
796
+ $cache = IP_Geo_Block_API_Cache::get_cache( $validate['ip'], $settings['cache_hold'] );
797
  return $cache && $cache['fail'] > max( 0, (int)$settings['login_fails'] ) ? $validate + array( 'result' => 'limited' ) : $validate;
798
  }
799
 
804
 
805
  public function check_nonce( $validate, $settings ) {
806
  // should be passed when nonce is valid. can't overwrite existing result
807
+ $nonce = IP_Geo_Block_Util::retrieve_nonce( self::$auth_key );
808
+ return $validate + array( 'result' => IP_Geo_Block_Util::verify_nonce( $nonce, self::$auth_key ) || 'XX' === $validate['code'] ? 'passed' : 'wp-zep' );
809
  }
810
 
811
  public function check_signature( $validate, $settings ) {
911
  $settings = self::get_option();
912
  $public = $settings['public'];
913
 
914
+ // replace validation rules
915
  if ( $settings['validation']['public'] && -1 !== (int)$public['matching_rule'] ) {
916
  foreach ( array( 'matching_rule', 'white_list', 'black_list', 'response_code', 'response_msg', 'redirect_uri' ) as $key ) {
917
  $settings[ $key ] = $public[ $key ];
942
  add_filter( self::PLUGIN_NAME . '-ip-addr', array( 'IP_Geo_Block_Util', 'get_proxy_ip' ), 20, 1 );
943
 
944
  // validate country by IP address (block: true, die: false)
945
+ $this->validate_ip( 'public', $settings, 1 & $settings['validation']['public'] );
946
  }
947
 
948
  public function check_behavior( $validate, $settings ) {
949
  // check if page view with a short period time is under the threshold
950
+ $cache = IP_Geo_Block_API_Cache::get_cache( self::$remote_addr, $settings['cache_hold'] );
951
 
952
  if ( $cache && $cache['view'] >= $settings['behavior']['view'] && $_SERVER['REQUEST_TIME'] - $cache['last'] <= $settings['behavior']['time'] )
953
  return $validate + array( 'result' => 'badbot' ); // can't overwrite existing result
includes/Net/IPv6.php CHANGED
@@ -23,7 +23,7 @@
23
  * @link http://pear.php.net/package/Net_IPv6
24
  */
25
 
26
- if ( ! class_exists( 'IP_Geo_Block_Pear' ) ):
27
  class IP_Geo_Block_Pear {
28
  public static function raiseError( $msg ) {
29
  return false;
23
  * @link http://pear.php.net/package/Net_IPv6
24
  */
25
 
26
+ if ( ! class_exists( 'IP_Geo_Block_Pear', FALSE ) ):
27
  class IP_Geo_Block_Pear {
28
  public static function raiseError( $msg ) {
29
  return false;
includes/random_compat/byte_safe_strings.php CHANGED
@@ -29,8 +29,8 @@
29
  if (!is_callable('RandomCompat_strlen')) {
30
  if (
31
  defined('MB_OVERLOAD_STRING')
32
- &&
33
- ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
34
  ) {
35
  /**
36
  * strlen() implementation that isn't brittle to mbstring.func_overload
@@ -83,8 +83,8 @@ if (!is_callable('RandomCompat_substr')) {
83
 
84
  if (
85
  defined('MB_OVERLOAD_STRING')
86
- &&
87
- ((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
88
  ) {
89
  /**
90
  * substr() implementation that isn't brittle to mbstring.func_overload
29
  if (!is_callable('RandomCompat_strlen')) {
30
  if (
31
  defined('MB_OVERLOAD_STRING')
32
+ && // https://github.com/PHPCompatibility/PHPCompatibility/issues/119
33
+ ((int) ini_get(implode('.', array('mbstring', 'func_overload')))) & MB_OVERLOAD_STRING
34
  ) {
35
  /**
36
  * strlen() implementation that isn't brittle to mbstring.func_overload
83
 
84
  if (
85
  defined('MB_OVERLOAD_STRING')
86
+ && // https://github.com/PHPCompatibility/PHPCompatibility/issues/119
87
+ ((int) ini_get(implode('.', array('mbstring', 'func_overload')))) & MB_OVERLOAD_STRING
88
  ) {
89
  /**
90
  * substr() implementation that isn't brittle to mbstring.func_overload
includes/random_compat/random_bytes_mcrypt.php CHANGED
@@ -56,8 +56,9 @@ if (!is_callable('random_bytes')) {
56
  );
57
  }
58
 
59
- /** @var string|bool $buf */
60
- $buf = @mcrypt_create_iv((int) $bytes, (int) MCRYPT_DEV_URANDOM);
 
61
  if (
62
  is_string($buf)
63
  &&
56
  );
57
  }
58
 
59
+ /** @var string|bool $buf */ /* MCRYPT_DEV_RANDOM:0, MCRYPT_DEV_URANDOM:1 */
60
+ $fnc = implode('_', array('mcrypt', 'create', 'iv'));
61
+ $buf = @$fnc((int) $bytes, (int) 1 /*MCRYPT_DEV_URANDOM*/);
62
  if (
63
  is_string($buf)
64
  &&
ip-geo-block.php CHANGED
@@ -13,7 +13,7 @@
13
  * Plugin Name: IP Geo Block
14
  * Plugin URI: https://wordpress.org/plugins/ip-geo-block/
15
  * Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
16
- * Version: 3.0.15
17
  * Author: tokkonopapa
18
  * Author URI: https://www.ipgeoblock.com/
19
  * Text Domain: ip-geo-block
13
  * Plugin Name: IP Geo Block
14
  * Plugin URI: https://wordpress.org/plugins/ip-geo-block/
15
  * Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
16
+ * Version: 3.0.16
17
  * Author: tokkonopapa
18
  * Author URI: https://www.ipgeoblock.com/
19
  * Text Domain: ip-geo-block
languages/ip-geo-block-ja.mo CHANGED
Binary file
languages/ip-geo-block-ja.po CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: IP Geo Block 3.0.15\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2018-10-02 22:28+0900\n"
8
- "PO-Revision-Date: 2018-10-02 22:31+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -25,170 +25,170 @@ msgid ""
25
  "It blocks any spams, login attempts and malicious access to the admin area "
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
- "自国以外から投稿されるスパム、ログインフォーム、さらにゼロデイ攻撃を含む管理領域への悪意あるアクセスか"
29
- "らサイトを守ります。"
30
 
31
- #: admin/class-ip-geo-block-admin.php:291
32
  msgid "Are you sure ?"
33
  msgstr "実行してもよいですか?"
34
 
35
- #: admin/class-ip-geo-block-admin.php:292
36
- #: admin/class-ip-geo-block-admin.php:793
37
  msgid "Open a new window"
38
  msgstr "別窓で開く"
39
 
40
- #: admin/class-ip-geo-block-admin.php:293 admin/includes/tab-settings.php:1506
41
  msgid "Generate new link"
42
  msgstr "新しいリンクを生成"
43
 
44
- #: admin/class-ip-geo-block-admin.php:294 admin/includes/tab-settings.php:1507
45
  msgid "Delete current link"
46
  msgstr "生成したリンクを削除"
47
 
48
- #: admin/class-ip-geo-block-admin.php:295
49
  msgid ""
50
  "Please add the following link to favorites / bookmarks in your browser : "
51
  msgstr "次のリンクをブラウザのお気に入り/ブックマークに追加して下さい : "
52
 
53
- #: admin/class-ip-geo-block-admin.php:296
54
  msgid "ajax for logged-in user"
55
  msgstr "認証済ユーザー用 ajax"
56
 
57
- #: admin/class-ip-geo-block-admin.php:297
58
  msgid "ajax for non logged-in user"
59
  msgstr "未認証ユーザー用 ajax"
60
 
61
- #: admin/class-ip-geo-block-admin.php:298
62
  #, php-format
63
  msgid "[Found: %d]"
64
  msgstr "[見つかった数:%d]"
65
 
66
- #: admin/class-ip-geo-block-admin.php:299
67
  #, php-format
68
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
69
  msgstr "ログから `%s` を検索し、検証して下さい。"
70
 
71
- #: admin/class-ip-geo-block-admin.php:300
72
  msgid "This feature is available with HTML5 compliant browsers."
73
  msgstr "HTML5準拠のブラウザでのみ機能します。"
74
 
75
- #: admin/class-ip-geo-block-admin.php:301
76
  msgid "The selected row cannot be found in the table."
77
  msgstr "テーブル中に選択された行が見つかりません。"
78
 
79
- #: admin/class-ip-geo-block-admin.php:302
80
- #: admin/class-ip-geo-block-admin.php:1571
81
  #, php-format
82
  msgid "An error occurred while executing the ajax command `%s`."
83
  msgstr "Ajaxコマンド `%s` の実行中にエラーが発生しました。"
84
 
85
- #: admin/class-ip-geo-block-admin.php:306
86
  msgid "No data available in table"
87
  msgstr "テーブルにデータがありません"
88
 
89
- #: admin/class-ip-geo-block-admin.php:307
90
  msgid "No matching records found"
91
  msgstr "一致するレコードがありません"
92
 
93
- #: admin/class-ip-geo-block-admin.php:308
94
  #: admin/includes/class-admin-ajax.php:107
95
  #: admin/includes/class-admin-ajax.php:240
96
  #: admin/includes/tab-geolocation.php:74
97
  msgid "IP address"
98
  msgstr "IPアドレス"
99
 
100
- #: admin/class-ip-geo-block-admin.php:309
101
  #: admin/includes/class-admin-ajax.php:108
102
  #: admin/includes/class-admin-ajax.php:241
103
  msgid "Code"
104
  msgstr "国"
105
 
106
- #: admin/class-ip-geo-block-admin.php:310
107
  #: admin/includes/class-admin-ajax.php:109
108
  #: admin/includes/class-admin-ajax.php:242
109
  msgid "ASN"
110
  msgstr "AS番号"
111
 
112
- #: admin/class-ip-geo-block-admin.php:311
113
  #: admin/includes/class-admin-ajax.php:243
114
  msgid "Host name"
115
  msgstr "ホスト名"
116
 
117
- #: admin/class-ip-geo-block-admin.php:312
118
  #: admin/includes/class-admin-ajax.php:110
119
  #: admin/includes/class-admin-ajax.php:244
120
  msgid "Target"
121
  msgstr "検証対象"
122
 
123
- #: admin/class-ip-geo-block-admin.php:313
124
  #: admin/includes/class-admin-ajax.php:245
125
  msgid "Failure / Total"
126
  msgstr "ログイン失敗/総計"
127
 
128
- #: admin/class-ip-geo-block-admin.php:314
129
  #: admin/includes/class-admin-ajax.php:246
130
  msgid "Elapsed[sec]"
131
  msgstr "経過 [秒]"
132
 
133
- #: admin/class-ip-geo-block-admin.php:315
134
  #: admin/includes/class-admin-ajax.php:106
135
  msgid "Time"
136
  msgstr "日時"
137
 
138
- #: admin/class-ip-geo-block-admin.php:316
139
  #: admin/includes/class-admin-ajax.php:111
140
  msgid "Result"
141
  msgstr "検証結果"
142
 
143
- #: admin/class-ip-geo-block-admin.php:317
144
  #: admin/includes/class-admin-ajax.php:112
145
  msgid "Request"
146
  msgstr "リクエスト"
147
 
148
- #: admin/class-ip-geo-block-admin.php:318
149
  #: admin/includes/class-admin-ajax.php:113
150
  msgid "User agent"
151
  msgstr "ユーザー・エージェント"
152
 
153
- #: admin/class-ip-geo-block-admin.php:319
154
  #: admin/includes/class-admin-ajax.php:114
155
  msgid "HTTP headers"
156
  msgstr "HTTP ヘッダー"
157
 
158
- #: admin/class-ip-geo-block-admin.php:320
159
  #: admin/includes/class-admin-ajax.php:115
160
  msgid "$_POST data"
161
  msgstr "$_POST データ"
162
 
163
- #: admin/class-ip-geo-block-admin.php:346
164
  msgid "Contribute on GitHub"
165
  msgstr "開発に参加"
166
 
167
- #: admin/class-ip-geo-block-admin.php:360
168
- #: admin/class-ip-geo-block-admin.php:478
169
- #: admin/class-ip-geo-block-admin.php:736
170
  msgid "Settings"
171
  msgstr "設定"
172
 
173
- #: admin/class-ip-geo-block-admin.php:455
174
- #: admin/class-ip-geo-block-admin.php:456
175
- #: admin/class-ip-geo-block-admin.php:466
176
- #: admin/class-ip-geo-block-admin.php:467
177
- #: admin/class-ip-geo-block-admin.php:477
178
- #: admin/class-ip-geo-block-admin.php:487
179
  msgid "IP Geo Block"
180
  msgstr "IP Geo Block"
181
 
182
- #: admin/class-ip-geo-block-admin.php:488
183
- #: admin/class-ip-geo-block-admin.php:741
184
- msgid "Site List"
185
  msgstr "サイト一覧"
186
 
187
- #: admin/class-ip-geo-block-admin.php:517
188
  msgid "You need WordPress 3.7+."
189
  msgstr "WordPress 3.7 以上が必要です。"
190
 
191
- #: admin/class-ip-geo-block-admin.php:521
192
  #, php-format
193
  msgid ""
194
  "Can not load Geolocation API libraries from <code>%s</code>. It seems to "
@@ -206,11 +206,12 @@ msgstr ""
206
  "com/tokkonopapa/WordPress-IP-Geo-API\" title=\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-"
207
  "IP-Geo-API</a> から <a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-API/"
208
  "archive/master.zip\" title=\"Download the contents of tokkonopapa/WordPress-IP-Geo-API as a zip file"
209
- "\">ZIP file</a> のダウンロードに失敗したようです。<a rel=\"noreferrer\" href=\"https://www.ipgeoblock."
210
- "com/codex/how-to-fix-permission-troubles.html\" title=\"How can I fix permission troubles? | IP Geo "
211
- "Block\">FAQ</a> を参照し、適切な書き込み権限と共に <code>ip-geo-api</code> をインストールしてください。"
 
212
 
213
- #: admin/class-ip-geo-block-admin.php:530
214
  #, php-format
215
  msgid ""
216
  "You should select at least one API at <a href=\"%s\">Geolocation API "
@@ -220,89 +221,90 @@ msgstr ""
220
  "<a href=\"%s\">位置情報APIの設定</a>で、少なくとも1つ以上のAPIを選択して下さい。未選択の場合、キャッ"
221
  "シュの有効期限切れと共にロックアウトされます。"
222
 
223
- #: admin/class-ip-geo-block-admin.php:539
224
  #, php-format
225
  msgid ""
226
  "You should select at least one API for local database at <a href=\"%s"
227
  "\">Geolocation API settings</a>. Otherwise access to the external API may "
228
  "slow down the site."
229
  msgstr ""
230
- "<a href=\"%s\">位置情報APIの設定</a>で、ローカルデータベース用のAPIを少なくとも1つ以上選択して下さい。"
231
- "未選択の場合、外部APIへのアクセスにより、サイトの応答性が悪くなります。"
232
 
233
- #: admin/class-ip-geo-block-admin.php:550
234
  #, php-format
235
  msgid ""
236
  "Now downloading geolocation databases in background. After a little while, "
237
  "please check your country code and &#8220;<strong>Matching rule</"
238
- "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
239
  msgstr ""
240
- "バックグラウンドで位置情報データベースをダウンロードしています。少しの間をおいた後、あなたの国コードと"
241
- "[<strong>マッチング規則</strong>]を[<a href=\"%s\">検証ルールの設定</a>]で確認して下さい。"
 
242
 
243
- #: admin/class-ip-geo-block-admin.php:556
244
  #, php-format
245
  msgid ""
246
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
247
- "confirm it at <a href=\"%s\">Validation rule settings</a>."
248
  msgstr ""
249
- "[<strong>マッチング規則</strong>]が正しく設定されていません。[<a href=\"%s\">検証ルールの設定</a>]"
250
- "を確認して下さい。"
251
 
252
- #: admin/class-ip-geo-block-admin.php:565
253
  msgid "Local database and matching rule have been updated."
254
  msgstr "ローカル・データベースとマッチング規則を更新しました。"
255
 
256
- #: admin/class-ip-geo-block-admin.php:576
257
  msgid ""
258
  "Once you logout, you will be unable to login again because the number of "
259
  "login attempts reaches the limit."
260
  msgstr ""
261
- "あなたのIPアドレスのログイン試行可能回数がリミットに達したため、ログアウトすると再びログインする事が出"
262
- "来なくなります。"
263
 
264
- #: admin/class-ip-geo-block-admin.php:578
265
  #, php-format
266
  msgid ""
267
  "Please remove your IP address in &#8220;%1$sStatistics in IP address cache"
268
  "%2$s&#8221; on &#8220;%3$sStatistics%4$s&#8221; tab to prevent locking "
269
  "yourself out."
270
  msgstr ""
271
- "[%3$s統計%4$s]タブの[%1$sIPアドレスのキャッシュ%2$s]から自身のIPアドレスを削除し、ロックアウトを回"
272
- "避してください。"
273
 
274
- #: admin/class-ip-geo-block-admin.php:589
275
  msgid ""
276
  "Once you logout, you will be unable to login again because your country code "
277
  "or IP address is in the blacklist."
278
  msgstr ""
279
- "あなたの国コードまたはIPアドレスがブラックリストに含まれているため、ログアウトすると再びログインする事"
280
- "が出来なくなります。"
281
 
282
- #: admin/class-ip-geo-block-admin.php:590
283
  msgid ""
284
  "Once you logout, you will be unable to login again because your country code "
285
  "or IP address is not in the whitelist."
286
  msgstr ""
287
- "あなたの国コードまたはIPアドレスがホワイトリストに含まれていないため、ログアウトすると再びログインする"
288
- "事が出来なくなります。"
289
 
290
- #: admin/class-ip-geo-block-admin.php:594
291
  #, php-format
292
- msgid "Please check your &#8220;%sValidation rule settings%s&#8221;."
293
- msgstr "[%s検証ルールの設定%s]を確認して下さい。"
294
 
295
- #: admin/class-ip-geo-block-admin.php:598
296
  #, php-format
297
  msgid ""
298
- "Please confirm your local geolocation databases at &#8220;%sLocal database "
299
- "settings%s&#8221; section and remove your IP address in cache at &#8220;"
300
- "%sStatistics in cache%s&#8221; section."
301
  msgstr ""
302
- "[%sローカル・データベースの設定%s]で位置情報データベースを確認し、[%sキャッシュの統計%s]でキャッ"
303
- "シュされているあなたのIPアドレスを削除して下さい。"
304
 
305
- #: admin/class-ip-geo-block-admin.php:620
306
  #, php-format
307
  msgid ""
308
  "Emergency login link is outdated. Please delete it once and generate again "
@@ -312,62 +314,62 @@ msgstr ""
312
  "緊急ログイン・リンクが古くなっています。[%sプラグインの設定%s]で一度削除してから再度生成してくださ"
313
  "い。 またブラウザのお気に入り/ブックマークも忘れずに更新して下さい。"
314
 
315
- #: admin/class-ip-geo-block-admin.php:629
316
  msgid ""
317
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
318
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
319
  "select &#8220;init&#8221; action hook."
320
  msgstr ""
321
  "[検証のタイミング]に「&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)」が選択されていますが、"
322
- "<strong>IP Geo Allow</strong> と互換性がありません。「&#8220;init&#8221; アクション・フック」を選択して"
323
- "ください。"
324
 
325
- #: admin/class-ip-geo-block-admin.php:737
326
  msgid "Statistics"
327
  msgstr "統計"
328
 
329
- #: admin/class-ip-geo-block-admin.php:738
330
  msgid "Logs"
331
  msgstr "ログ"
332
 
333
- #: admin/class-ip-geo-block-admin.php:739
334
  msgid "Search"
335
  msgstr "検索"
336
 
337
- #: admin/class-ip-geo-block-admin.php:740
338
  msgid "Attribution"
339
  msgstr "リンク"
340
 
341
- #: admin/class-ip-geo-block-admin.php:757
342
- #: admin/class-ip-geo-block-admin.php:773
343
- msgid "Network wide"
344
  msgstr "ネットワーク管理"
345
 
346
- #: admin/class-ip-geo-block-admin.php:786
347
  msgid "Toggle all"
348
  msgstr "全てを開閉"
349
 
350
- #: admin/class-ip-geo-block-admin.php:789
351
  msgid ""
352
  "Independent of &#8220;Privacy and record settings&#8221;, you can see all "
353
  "the requests validated by this plugin in almost real time."
354
  msgstr ""
355
- "[プライバシーと記録の設定]にかかわらず、このプラグインによる検証結果のすべてを、ほぼリアルタイムに表"
356
- "示します。"
357
 
358
- #: admin/class-ip-geo-block-admin.php:789 admin/includes/tab-accesslog.php:39
359
  msgid "Live update"
360
  msgstr "ライブアップデート"
361
 
362
- #: admin/class-ip-geo-block-admin.php:793
363
  msgid "Open a new window on clicking the link in the chart."
364
  msgstr "チャート内のリンクをクリックすると、新しいウィンドウが開きます。"
365
 
366
- #: admin/class-ip-geo-block-admin.php:817
367
  msgid "Thanks for providing these great services for free."
368
  msgstr "これらのすばらしいサービスの提供元に、敬意と感謝の意を表します!"
369
 
370
- #: admin/class-ip-geo-block-admin.php:818
371
  msgid ""
372
  "(Most browsers will redirect you to each site <a href=\"https://www."
373
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
@@ -376,33 +378,33 @@ msgstr ""
376
  "(ほとんどのブラウザでは、<a href=\"https://www.ipgeoblock.com/etc/referer.html\" title=\"Referer "
377
  "Checker\">参照元を残さずにリンク先にリダイレクトできます</a>。)"
378
 
379
- #: admin/class-ip-geo-block-admin.php:823
380
  msgid "Back to top"
381
  msgstr "トップに戻る"
382
 
383
- #: admin/class-ip-geo-block-admin.php:915
384
  msgid "Enable"
385
  msgstr "有効"
386
 
387
- #: admin/class-ip-geo-block-admin.php:930
388
  msgid "Select one"
389
  msgstr "何れかを選択"
390
 
391
- #: admin/class-ip-geo-block-admin.php:1349
392
  msgid "You do not have sufficient permissions to access this page."
393
  msgstr "このページにアクセスするための十分な権限がありません。"
394
 
395
- #: admin/class-ip-geo-block-admin.php:1376
396
  #: admin/includes/class-admin-rewrite.php:194
397
- #: classes/class-ip-geo-block-cron.php:216
398
- #: classes/class-ip-geo-block-cron.php:320
399
- #: classes/class-ip-geo-block-cron.php:394
400
- #: classes/class-ip-geo-block-opts.php:471
401
  #, php-format
402
  msgid "Unable to write <code>%s</code>. Please check the permission."
403
  msgstr "<code>%s</code> に書き込めません。パーミッションをチェックして下さい。"
404
 
405
- #: admin/class-ip-geo-block-admin.php:1406
406
  msgid "Settings saved."
407
  msgstr "設定を保存しました。"
408
 
@@ -424,8 +426,8 @@ msgid ""
424
  msgstr "%sは誤ったフォーマットです。該当行を削除し、再実行してください。"
425
 
426
  #: admin/includes/class-admin-rewrite.php:168
427
- #: classes/class-ip-geo-block-cron.php:211
428
- #: classes/class-ip-geo-block-cron.php:389
429
  #, php-format
430
  msgid "Unable to read <code>%s</code>. Please check the permission."
431
  msgstr "<code>%s</code> が読めません。パーミッションをチェックして下さい。"
@@ -449,23 +451,23 @@ msgstr "検証のログ"
449
  msgid "Help"
450
  msgstr "ヘルプ"
451
 
452
- #: admin/includes/tab-accesslog.php:55 admin/includes/tab-settings.php:413
453
  msgid "Comment post"
454
  msgstr "コメント投稿"
455
 
456
- #: admin/includes/tab-accesslog.php:56 admin/includes/tab-settings.php:414
457
  msgid "XML-RPC"
458
  msgstr "XML-RPC"
459
 
460
- #: admin/includes/tab-accesslog.php:57 admin/includes/tab-settings.php:415
461
  msgid "Login form"
462
  msgstr "ログイン・フォーム"
463
 
464
- #: admin/includes/tab-accesslog.php:58 admin/includes/tab-settings.php:416
465
  msgid "Admin area"
466
  msgstr "管理領域"
467
 
468
- #: admin/includes/tab-accesslog.php:59 admin/includes/tab-settings.php:418
469
  msgid "Public facing pages"
470
  msgstr "一般公開ページ"
471
 
@@ -540,14 +542,14 @@ msgstr "ローカル・ファイルへエクスポートする"
540
  msgid "Export csv"
541
  msgstr "CSVへエクスポート"
542
 
543
- #: admin/includes/tab-accesslog.php:193 admin/includes/tab-network.php:112
544
- #: admin/includes/tab-statistics.php:413
545
  #, php-format
546
  msgid "[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled."
547
  msgstr "[%s検証のログを記録%s]が無効です。"
548
 
549
- #: admin/includes/tab-accesslog.php:194 admin/includes/tab-network.php:113
550
- #: admin/includes/tab-statistics.php:414
551
  msgid ""
552
  "Please set the proper condition to record and analyze the validation logs."
553
  msgstr "検証のログを記録し分析するためには、適切な条件を設定して下さい。"
@@ -564,14 +566,14 @@ msgstr "IPアドレスの位置情報を検索"
564
  msgid "Geolocation API"
565
  msgstr "位置情報API"
566
 
567
- #: admin/includes/tab-geolocation.php:89 admin/includes/tab-settings.php:1084
568
  msgid ""
569
  "<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
570
  "Moreover, this option replaces the end of IP address with &#8220;***&#8221; "
571
  "to make it anonymous.\">Anonymize IP address</dfn>"
572
  msgstr ""
573
- "<dfn title=\"IPアドレスは、常に暗号化されてキャッシュとログに記録されます。このオプションはさらに、IP"
574
- "ドレスの末尾を「***」に置き換えて匿名化します。\">IPアドレスを匿名化する</dfn>"
575
 
576
  #: admin/includes/tab-geolocation.php:104
577
  msgid "Search geolocation"
@@ -636,17 +638,17 @@ msgid ""
636
  "sample.\"><span></span></a>&#8221; button (if exists) attached to the "
637
  "following list to confirm that the blocked request is not malicious."
638
  msgstr ""
639
- "[例外]に追加する前に、以下の候補に付いたボタン &#8220;<a class=\"ip-geo-block-icon ip-geo-block-icon-"
640
- "alert\" title=\"このボタンは単なるサンプルです。\"><span></span></a>&#8221;(もしあれば)をクリックし、"
641
- "遮断されたリクエストに悪意のないことを確認して下さい。"
642
 
643
  #: admin/includes/tab-settings.php:19
644
  msgid "Open CIDR calculator for IPv4 / IPv6."
645
  msgstr "IPv4/IPv6用CIDR変換電卓を開きます。"
646
 
647
  #: admin/includes/tab-settings.php:54
648
- msgid "Validation rule settings"
649
- msgstr "検証ルールの設定"
650
 
651
  #: admin/includes/tab-settings.php:76
652
  msgid ""
@@ -654,8 +656,8 @@ msgid ""
654
  "code by referring &#8220;Scan country code&#8221;.\">Your IP address / "
655
  "Country</dfn>"
656
  msgstr ""
657
- "<dfn title=\"[国コードを検索する]を参照し、適切な位置情報APIと国コードを設定して下さい。\">あなたのIP"
658
- "アドレス / 国コード</dfn>"
659
 
660
  #: admin/includes/tab-settings.php:85 admin/includes/tab-settings.php:104
661
  msgid "Scan all the APIs you selected at Geolocation API settings"
@@ -671,8 +673,8 @@ msgid ""
671
  "code by referring &#8220;Scan country code&#8221;.\">Server IP address / "
672
  "Country</dfn>"
673
  msgstr ""
674
- "<dfn title=\"[国コードを検索する]を参照し、適切な位置情報APIと国コードを設定して下さい。\">サーバーの"
675
- "IPアドレス / 国コード</dfn>"
676
 
677
  #: admin/includes/tab-settings.php:112
678
  msgid "Whitelist"
@@ -696,9 +698,10 @@ msgid ""
696
  "the code that does not correspond to any of the countries.\">Whitelist of "
697
  "country code</dfn>"
698
  msgstr ""
699
- "<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード「XX」は、localhost を含むプ"
700
- "ライベート・アドレスに割り当てられ、また「ZZ」は不明(位置情報データベースに未登録)を表します。どの国"
701
- "にもマッチさせないことが必要な場合には、「YY」を指定してください。\">国コードのホワイトリスト</dfn>"
 
702
 
703
  #: admin/includes/tab-settings.php:119
704
  msgid ""
@@ -709,11 +712,12 @@ msgid ""
709
  "the code that does not correspond to any of the countries.\">Blacklist of "
710
  "country code</dfn>"
711
  msgstr ""
712
- "<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード「XX」は、localhost を含むプ"
713
- "ライベート・アドレスに割り当てられ、また「ZZ」は不明(位置情報データベースに未登録)を表します。どの国"
714
- "にもマッチさせないことが必要な場合には、「YY」を指定してください。\">国コードのブラックリスト</dfn>"
 
715
 
716
- #: admin/includes/tab-settings.php:125 admin/includes/tab-settings.php:790
717
  msgid "Matching rule"
718
  msgstr "マッチング規則"
719
 
@@ -728,7 +732,8 @@ msgstr ""
728
  msgid ""
729
  "A request from which the country code or IP address is in the blacklist will "
730
  "be blocked."
731
- msgstr "国コードまたはIPアドレスがブラックリストに<strong>含まれている</strong>リクエストを遮断します。"
 
732
 
733
  #: admin/includes/tab-settings.php:180
734
  msgid ""
@@ -736,8 +741,8 @@ msgid ""
736
  "Whitelist/Blacklist of extra IP addresses&#8221; to specify a group of IP "
737
  "networks.\">Use Autonomous System Number</dfn>"
738
  msgstr ""
739
- "<dfn title=\"ホワイトリスト、ブラックリストにIPアドレスを指定する代わりに、ネットワークのグループを代表"
740
- "する「AS番号」の指定を可能にします。\">AS番号を使用可能にする</dfn>"
741
 
742
  #: admin/includes/tab-settings.php:191
743
  #, php-format
@@ -746,6 +751,18 @@ msgstr "AS番号の検索に役立つツールを &#8220;%s&#8221; に紹介し
746
 
747
  #: admin/includes/tab-settings.php:198
748
  msgid ""
 
 
 
 
 
 
 
 
 
 
 
 
749
  "<dfn title=\"e.g. &#8220;192.0.64.0/18&#8221; for Jetpack server, "
750
  "&#8220;69.46.36.0/27&#8221; for WordFence server or &#8220;AS32934&#8221; "
751
  "for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
@@ -753,25 +770,13 @@ msgstr ""
753
  "<dfn title=\"例)192.0.64.0/18(Jetpackサーバー)、69.46.36.0/27(WordFenceサーバー)、"
754
  "AS32934(Facebook)\">国コードに優先して検証するIPアドレスのホワイトリスト</dfn>"
755
 
756
- #: admin/includes/tab-settings.php:219
757
  msgid ""
758
  "<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
759
  "\">Blacklist of extra IP addresses prior to country code</dfn>"
760
  msgstr ""
761
- "<dfn title=\"サーバー・レベルのアクセス制御の使用をお勧めします(例:.htaccess)。\">国コードに優先して"
762
- "検証するIPアドレスのブラックリスト</dfn>"
763
-
764
- #: admin/includes/tab-settings.php:240
765
- msgid ""
766
- "<dfn title=\"If your server is placed behind the proxy server or the load "
767
- "balancing server, you need to put the appropriate key such as &#8220;"
768
- "HTTP_X_FORWARDED_FOR&#8221;, &#8220;HTTP_X_REAL_IP&#8221; or something like "
769
- "that to retrieve the client IP address.\">$_SERVER keys to retrieve extra IP "
770
- "addresses</dfn>"
771
- msgstr ""
772
- "<dfn title=\"あなたのサーバーがプロキシー・サーバーやロード・バランサーの背後に位置する場合は、クライア"
773
- "ントのIPアドレスを抽出するため「HTTP_X_FORWARDED_FOR」や「HTTP_X_REAL_IP」など、$_SERVER の適切なキーを"
774
- "指定してください。\">IPアドレスを追加抽出する $_SERVER のキー</dfn>"
775
 
776
  #: admin/includes/tab-settings.php:258
777
  msgid ""
@@ -784,9 +789,9 @@ msgid ""
784
  "please click to restore.\"><span></span></a>)</nobr>"
785
  msgstr ""
786
  "<dfn title=\"「国コードで遮断」および「ゼロデイ攻撃を遮断」とは独立に、[管理領域]、[管理領域 ajax/"
787
- "post]、[プラグイン領域]、[テーマ領域]をターゲットとした悪意のあるシグネチャを検証します。\">悪意の"
788
- "あるシグネチャ</dfn> <nobr>(<a class=\"ip-geo-block-icon ip-geo-block-icon-cycle\" id=\"ip-geo-block-"
789
- "decode\" title=\"文字化けした場合、クリックして復元して下さい。\"><span></span></a>)</nobr>"
790
 
791
  #: admin/includes/tab-settings.php:272
792
  msgid ""
@@ -807,9 +812,9 @@ msgid ""
807
  "&#8220;upload_files&#8221; for Administrator, Editor and Author. This "
808
  "verification will be skipped if empty.\">Capabilities to be verified</dfn>"
809
  msgstr ""
810
- "<dfn title=\"検証する権限を指定します。アップローダーによっては、特定の権限を必要とする場合があります。"
811
- "デフォルトは、管理者(Administrator)、編集者(Editor)、投稿者(Author)向けの「upload_files」です。空"
812
- "欄の場合、この検証はスキップされます。\">検証する権限</dfn>"
813
 
814
  #: admin/includes/tab-settings.php:287
815
  msgid ""
@@ -829,13 +834,13 @@ msgid ""
829
  "timing&#8221; so that other staff would not fetch the uploaded files before "
830
  "this validation.\">Prevent malicious file uploading</dfn>"
831
  msgstr ""
832
- "<dfn title=\"ファイル・タイプを限定し、バックエンド、またはフロントエンドを経由するマルウェアやバックド"
833
- "アのアップロードを遮断します。他のプラグインやテーマに先んじて確実に遮断するために、[検証のタイミン"
834
- "グ]を「&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)」に設定することを検討してください。\">悪意のある"
835
- "アップロード防止</dfn>"
836
 
837
- #: admin/includes/tab-settings.php:304 admin/includes/tab-settings.php:479
838
- #: admin/includes/tab-settings.php:624 admin/includes/tab-settings.php:1189
839
  msgid "Disable"
840
  msgstr "無効"
841
 
@@ -856,7 +861,7 @@ msgstr ""
856
  "<dfn title=\"テーマ・ディレクトリには 403.php など、独自のファイルを設置する事が出来ます。\">レスポン"
857
  "ス・コード</dfn> %s"
858
 
859
- #: admin/includes/tab-settings.php:344 admin/includes/tab-settings.php:873
860
  msgid ""
861
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
862
  "to a public facing page, visitors would not be blocked on the page to "
@@ -864,11 +869,11 @@ msgid ""
864
  "[Front-end target settings] section. Empty URL is altered to your home."
865
  "\">Redirect URL</dfn>"
866
  msgstr ""
867
- "<dfn title=\"レスポンス・コード 2xx 、3xx 用のリダイレクト先 URL を指定します。リダイレクトのループを避"
868
- "けるため、自サイト内の URL は[フロントエンドの設定]に関わらず遮断の対象外となります。空欄の場合、サイ"
869
- "トのホームが使用されます。\">リダイレクト先 URL</dfn>"
870
 
871
- #: admin/includes/tab-settings.php:361 admin/includes/tab-settings.php:891
872
  msgid ""
873
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
874
  "message</dfn>"
@@ -904,122 +909,135 @@ msgid ""
904
  "validation-timing.html' title='Validation timing | IP Geo Block'>some "
905
  "restrictions</a>."
906
  msgstr ""
907
- "標準的な他のプラグインより早いタイミングで検証を実行します。これによりサーバーの負荷は軽減されますが、"
908
- "<a rel=‘noreferrer’ href=‘https://www.ipgeoblock.com/codex/validation-timing.html' title=‘Validation "
909
- "timing | IP Geo Block’>幾つかの制限事項</a> が生じます。"
910
 
911
- #: admin/includes/tab-settings.php:405
 
 
 
 
 
 
 
 
 
 
 
 
 
912
  msgid "Back-end target settings"
913
  msgstr "バックエンドの設定"
914
 
915
- #: admin/includes/tab-settings.php:411
916
  #, php-format
917
- msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
918
  msgstr "<dfn title=\"%s へのリクエストを検証します。\">%s</dfn>"
919
 
920
- #: admin/includes/tab-settings.php:417
921
  msgid "Other areas"
922
  msgstr "その他の領域"
923
 
924
- #: admin/includes/tab-settings.php:418
925
  msgid "public facing pages"
926
  msgstr "一般公開ページ"
927
 
928
- #: admin/includes/tab-settings.php:434 admin/includes/tab-settings.php:480
929
- #: admin/includes/tab-settings.php:512 admin/includes/tab-settings.php:518
930
- #: admin/includes/tab-settings.php:783
931
  msgid "Block by country"
932
  msgstr "国コードで遮断"
933
 
934
- #: admin/includes/tab-settings.php:444
935
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
936
  msgstr "全体を &lt;p&gt; タグで囲みます。使用可能タグ:"
937
 
938
- #: admin/includes/tab-settings.php:444
939
  msgid "Message on comment form"
940
  msgstr "投稿フォーム上のメッセージ"
941
 
942
- #: admin/includes/tab-settings.php:457
943
  msgid "None"
944
  msgstr "なし"
945
 
946
- #: admin/includes/tab-settings.php:458
947
  msgid "Top"
948
  msgstr "上部"
949
 
950
- #: admin/includes/tab-settings.php:459
951
  msgid "Bottom"
952
  msgstr "下部"
953
 
954
- #: admin/includes/tab-settings.php:481
955
  msgid "Completely close"
956
  msgstr "完全に閉鎖"
957
 
958
- #: admin/includes/tab-settings.php:487
959
  msgid "Action to login as a registered user."
960
  msgstr "登録済みユーザーとしてログインするアクション。"
961
 
962
- #: admin/includes/tab-settings.php:487
963
  msgid "Log in"
964
  msgstr "ログイン"
965
 
966
- #: admin/includes/tab-settings.php:488
967
  msgid "Action to register new users."
968
  msgstr "新規ユーザーを登録するアクション。"
969
 
970
- #: admin/includes/tab-settings.php:488
971
  msgid "Register"
972
  msgstr "登録"
973
 
974
- #: admin/includes/tab-settings.php:489
975
  msgid "Action to reset a password to create a new one."
976
  msgstr "パスワードをリセットし、新しいパスワードに更新するアクション。"
977
 
978
- #: admin/includes/tab-settings.php:489
979
  msgid "Password Reset"
980
  msgstr "パスワードのリセット"
981
 
982
- #: admin/includes/tab-settings.php:490
983
  msgid "Action to email a password to a registered user."
984
  msgstr "登録済みユーザーにパスワードを送付するアクション。"
985
 
986
- #: admin/includes/tab-settings.php:490
987
  msgid "Lost Password"
988
  msgstr "パスワード紛失"
989
 
990
- #: admin/includes/tab-settings.php:491
991
  msgid ""
992
  "Action to show prompt to enter a password on password protected post and "
993
  "page."
994
  msgstr "パスワードで保護された投稿とページにパスワードを入力するプロンプトを表示するアクション。"
995
 
996
- #: admin/includes/tab-settings.php:491
997
  msgid "Password protected"
998
  msgstr "パスワード保護"
999
 
1000
- #: admin/includes/tab-settings.php:513
1001
  msgid ""
1002
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
1003
  "actions</dfn>"
1004
  msgstr "<dfn title=\"遮断対象とするアクションを指定します。\">対象アクション</dfn>"
1005
 
1006
- #: admin/includes/tab-settings.php:519
1007
  msgid "Prevent Zero-day Exploit"
1008
  msgstr "ゼロデイ攻撃を遮断"
1009
 
1010
- #: admin/includes/tab-settings.php:523
1011
  msgid ""
1012
  "It will block a request related to the services for both public facing pages "
1013
  "and the dashboard."
1014
  msgstr "一般公開ページとダッシュボード向けサービスに関連するリクエストを遮断します。"
1015
 
1016
- #: admin/includes/tab-settings.php:524
1017
  msgid ""
1018
  "Regardless of the country code, it will block a malicious request related to "
1019
  "the services only for the dashboard."
1020
  msgstr "国コードに拘らず、ダッシュボード向けサービスだけに関連する悪意のあるリクエストを遮断します。"
1021
 
1022
- #: admin/includes/tab-settings.php:530
1023
  msgid ""
1024
  "This is applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221; when "
1025
  "&#8220;IP address cache&#8221; in &#8220;Privacy and record settings&#8221; "
@@ -1029,55 +1047,55 @@ msgstr ""
1029
  "[プライバシーと記録の設定]&raquo;[IPアドレスのキャッシュを記録]が有効の時、[XML-RPC]と[ログイ"
1030
  "ン・フォーム]に適用されます。ロックアウト時間は[有効時間]で定義します。"
1031
 
1032
- #: admin/includes/tab-settings.php:530
1033
  msgid "Max failed login attempts per IP address"
1034
  msgstr "IPアドレス当たりのログイン試行可能回数"
1035
 
1036
- #: admin/includes/tab-settings.php:571
1037
  msgid "admin post for logged-in user"
1038
  msgstr "認証済ユーザー用 admin post"
1039
 
1040
- #: admin/includes/tab-settings.php:572
1041
  msgid "admin post for non logged-in user"
1042
  msgstr "未認証ユーザー用 admin post"
1043
 
1044
- #: admin/includes/tab-settings.php:594
1045
  msgid "Admin ajax/post"
1046
  msgstr "管理領域 ajax/post"
1047
 
1048
- #: admin/includes/tab-settings.php:608
1049
  msgid ""
1050
  "Specify the action name (&#8220;action=&hellip;&#8221;) or the page name "
1051
  "(&#8220;page=&hellip;&#8221;) to prevent unintended blocking caused by "
1052
  "&#8220;Block by country&#8221; (for non logged-in user) and &#8220;Prevent "
1053
  "Zero-day Exploit&#8221; (for logged-in user)."
1054
  msgstr ""
1055
- "「国コードで遮断」(未認証ユーザーの場合)および「ゼロデイ攻撃を遮断」(認証済みユーザーの場合)が、意"
1056
- "図しない遮断の原因となる場合、アクション名(&#8220;action=&hellip;&#8221; の &#8220;&hellip;&#8221;"
1057
- "分)、またはページ名(&#8220;page=&hellip;&#8221; の &#8220;&hellip;&#8221; 部分)を指定し、検証対象か"
1058
- "ら除外します。"
1059
 
1060
- #: admin/includes/tab-settings.php:608 admin/includes/tab-settings.php:686
1061
- #: admin/includes/tab-settings.php:746
1062
  msgid "Exceptions"
1063
  msgstr "例外"
1064
 
1065
- #: admin/includes/tab-settings.php:609
1066
  msgid "Toggle with non logged-in user"
1067
  msgstr "未認証ユーザー用を含む項目に限定して表示する"
1068
 
1069
- #: admin/includes/tab-settings.php:612
1070
  msgid "Candidate actions/pages"
1071
  msgstr "候補 アクション/ページ"
1072
 
1073
- #: admin/includes/tab-settings.php:626
1074
  #, php-format
1075
  msgid ""
1076
  "Regardless of the country code, it will block a malicious request to <code>"
1077
  "%s&ctdot;/*.php</code>."
1078
  msgstr "国コードに拘らず、<code>%s&ctdot;/*.php</code>への悪意のあるリクエストを遮断します。"
1079
 
1080
- #: admin/includes/tab-settings.php:627
1081
  msgid ""
1082
  "Select the item which causes unintended blocking in order to exclude from "
1083
  "the validation target. Grayed item indicates &#8220;INACTIVE&#8221;."
@@ -1085,133 +1103,133 @@ msgstr ""
1085
  "意図しない遮断の原因となる項目を選択し、検証対象から除外します。灰色で表示された項目は、「非アクティ"
1086
  "ブ」であることを示しています。"
1087
 
1088
- #: admin/includes/tab-settings.php:628
1089
  #, php-format
1090
  msgid ""
1091
  "It configures &#8220;%s&#8221; to validate a direct request to the PHP file "
1092
  "which does not load WordPress core. Make sure to deny direct access to the "
1093
  "hidden files beginning with a dot by the server's configuration."
1094
  msgstr ""
1095
- "WordPressコアを読み込まないPHPファイルへのリクエストを検証対象とするために、%s を設定します。ドットで始"
1096
- "まる隠しファイルへのアクセス拒否がサーバー側で設定されていることを確認して下さい。"
1097
 
1098
- #: admin/includes/tab-settings.php:629
1099
  msgid "Sorry, but your server type is not supported."
1100
  msgstr "このサーバーではサポートされません。"
1101
 
1102
- #: admin/includes/tab-settings.php:630
1103
  msgid ""
1104
  "You need to click &#8220;Save Changes&#8221; button for imported settings to "
1105
  "take effect."
1106
  msgstr "インポートされた設定を有効にするには、[変更を保存]ボタンをクリックする必要があります。"
1107
 
1108
- #: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:725
1109
  msgid "Force to load WP core"
1110
  msgstr "WPコアの読み込みを強制"
1111
 
1112
- #: admin/includes/tab-settings.php:670
1113
  msgid "Plugins area"
1114
  msgstr "プラグイン領域"
1115
 
1116
- #: admin/includes/tab-settings.php:730
1117
  msgid "Themes area"
1118
  msgstr "テーマ領域"
1119
 
1120
- #: admin/includes/tab-settings.php:765
1121
  msgid "Front-end target settings"
1122
  msgstr "フロントエンドの設定"
1123
 
1124
- #: admin/includes/tab-settings.php:800
1125
- msgid "Follow &#8220;Validation rule settings&#8221;"
1126
- msgstr "[検証ルールの設定]に従う"
1127
 
1128
- #: admin/includes/tab-settings.php:842
1129
  #, php-format
1130
  msgid ""
1131
  "<dfn title=\"You can configure a different response code from the Back-end. "
1132
  "This is useful to prevent violation against your affiliate program."
1133
  "\">Response code</dfn> %s"
1134
  msgstr ""
1135
- "<dfn title=\"バックエンドと異なるレスポンス・コードを設定できます。これは、アフィリエイト・プログラムに"
1136
- "対する違反を防止するのに役立つでしょう。\">レスポンス・コード</dfn> %s"
1137
 
1138
- #: admin/includes/tab-settings.php:906
1139
  msgid ""
1140
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
1141
  msgstr "<dfn title=\"特定のページを遮断対象に指定します。\">ページ</dfn>"
1142
 
1143
- #: admin/includes/tab-settings.php:918
1144
  msgid ""
1145
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
1146
  "target.\">Post type</dfn>"
1147
  msgstr "<dfn title=\"特定の投稿タイプのシングルページを遮断対象に指定します。\">投稿タイプ</dfn>"
1148
 
1149
- #: admin/includes/tab-settings.php:930
1150
  msgid ""
1151
  "<dfn title=\"Specify the individual category on a single page or archive "
1152
  "page as a blocking target.\">Category</dfn>"
1153
  msgstr ""
1154
- "<dfn title=\"特定のカテゴリを含むシングルページかアーカイブページを遮断対象に指定します。\">カテゴリ</"
1155
- "dfn>"
1156
 
1157
- #: admin/includes/tab-settings.php:942
1158
  msgid ""
1159
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1160
  "a blocking target.\">Tag</dfn>"
1161
  msgstr ""
1162
  "<dfn title=\"特定のタグを含むシングルページかアーカイブページを遮断対象に指定します。\">タグ</dfn>"
1163
 
1164
- #: admin/includes/tab-settings.php:956
1165
  msgid "Specify the validation target on front-end."
1166
  msgstr "フロントエンドの検証対象を設定します。"
1167
 
1168
- #: admin/includes/tab-settings.php:956
1169
  msgid "Validation target"
1170
  msgstr "検証対象"
1171
 
1172
- #: admin/includes/tab-settings.php:967
1173
  msgid "All requests"
1174
  msgstr "全てのリクエスト"
1175
 
1176
- #: admin/includes/tab-settings.php:968
1177
  msgid "Specify the targets"
1178
  msgstr "ターゲットを指定"
1179
 
1180
- #: admin/includes/tab-settings.php:971
1181
  msgid ""
1182
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1183
  "wp&#8221; action hook. It means that this feature would not be compatible "
1184
  "with any page caching."
1185
  msgstr ""
1186
- "[検証のタイミング]が &#8220;wp&#8221; アクション・フックまで遅延されます。これにより、ページ・キャッ"
1187
- "シュとの互換性がなくなることに注意してください。"
1188
 
1189
- #: admin/includes/tab-settings.php:981
1190
  msgid "Specify the name of actions as exception that is invariably blocked."
1191
  msgstr "常に遮断されるアクション名を例外として指定します。"
1192
 
1193
- #: admin/includes/tab-settings.php:981
1194
  msgid "Excluded actions"
1195
  msgstr "除外するアクション"
1196
 
1197
- #: admin/includes/tab-settings.php:997
1198
  msgid ""
1199
  "<dfn title=\"Specify the frequency of request for certain period of time."
1200
  "\">Blocking condition</dfn>"
1201
  msgstr "<dfn title=\"特定期間のリクエスト頻度を設定します。\">遮断条件</dfn>"
1202
 
1203
- #: admin/includes/tab-settings.php:999
1204
  #, php-format
1205
  msgid "More than %1$s page view (PV) in %2$s seconds"
1206
  msgstr "%2$s 秒間で %1$s を超えるページビュー (PV)"
1207
 
1208
- #: admin/includes/tab-settings.php:1007
1209
  msgid ""
1210
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1211
  "behaved bots and crawlers</dfn>"
1212
  msgstr "<dfn title=\"リクエスト頻度を検証します。\">行儀の悪いボットやクローラーを遮断</dfn>"
1213
 
1214
- #: admin/includes/tab-settings.php:1024
1215
  msgid ""
1216
  "A part of user agent string and a qualification connected with a separator "
1217
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
@@ -1221,14 +1239,14 @@ msgid ""
1221
  "qualification&#8221;."
1222
  msgstr ""
1223
  "適用されるルールを表す記号(「:」は通過、「#」は遮断)で区切られたユーザーエージェント文字列の一部と"
1224
- "「条件」のペアです。「条件」には「DNS」、「FEED」、国コード、または&nbsp;IPアドレス(CIDR記法)が使えま"
1225
- "す。また否定を表す記号「!」を「条件」の直前に配置する事が出来ます。"
1226
 
1227
- #: admin/includes/tab-settings.php:1024
1228
  msgid "UA string and qualification"
1229
  msgstr "ユーザーエージェント文字列と条件"
1230
 
1231
- #: admin/includes/tab-settings.php:1041
1232
  msgid ""
1233
  "It enables to verify the host by reverse DNS lookup which would spend some "
1234
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
@@ -1238,178 +1256,170 @@ msgstr ""
1238
  "DNS 逆引きによりホストを検証します(幾らかのサーバー・リソースを消費します)。無効にした場合、[ユー"
1239
  "ザーエージェント文字列と条件]中の「HOST」および「HOST=&hellip;」は常に真となります。"
1240
 
1241
- #: admin/includes/tab-settings.php:1041
1242
  msgid "Reverse DNS lookup"
1243
  msgstr "DNS 逆引き"
1244
 
1245
- #: admin/includes/tab-settings.php:1058
1246
- msgid ""
1247
- "It enables to simulate validation without deployment. The results can be "
1248
- "found as &#8220;public&#8221; in Logs."
1249
- msgstr "機能を有効にする事なくリクエストの検証をシミュレートします。結果はログで確認する事が出来ます。"
1250
-
1251
- #: admin/includes/tab-settings.php:1058
1252
- msgid "Simulation mode"
1253
- msgstr "シミュレーション・モード"
1254
-
1255
- #: admin/includes/tab-settings.php:1076
1256
  msgid "Privacy and record settings"
1257
  msgstr "プライバシーと記録の設定"
1258
 
1259
- #: admin/includes/tab-settings.php:1099
1260
  msgid ""
1261
  "<dfn title=\"This option restricts not to send IP address to the external "
1262
  "Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
1263
  msgstr ""
1264
- "<dfn title=\"このオプションは、IPアドレスを外部の位置情報APIへ送信することを制限します。\">外部APIへの"
1265
- "送信を制限する</dfn>"
1266
 
1267
- #: admin/includes/tab-settings.php:1114
1268
- msgid ""
1269
- "<dfn title=\"This option enables to record the number blocked countries and "
1270
- "the number of blocked requests per day.\">Record &#8220;Statistics of "
1271
- "validation&#8221;</dfn>"
1272
- msgstr ""
1273
- "<dfn title=\"このオプションは、国別遮断数や1日あたりの遮断数など、統計の記録を有効にします。\">検証の統"
1274
- "計を記録</dfn>"
1275
-
1276
- #: admin/includes/tab-settings.php:1129
1277
- msgid "Maximum period for &#8220;Statistics&#8221; [days]"
1278
- msgstr "記録する統計の最大期間[日]"
1279
-
1280
- #: admin/includes/tab-settings.php:1147
1281
  msgid ""
1282
  "<dfn title=\"This option enables to record the IP address, country code and "
1283
  "failure counter of login attempts into the cache on database to minimize the "
1284
  "impact on site speed.\">Record &#8220;IP address cache&#8221;</dfn>"
1285
  msgstr ""
1286
- "<dfn title=\"このオプションは、IPアドレス、国コード、ログイン失敗回数等のキャッシュへの記録を有効にし、"
1287
- "サイト速度への影響を最小化します。\">IPアドレスをキャッシュに記録</dfn>"
1288
 
1289
- #: admin/includes/tab-settings.php:1162
1290
  msgid ""
1291
  "<dfn title=\"If user authentication fails consecutively beyond &#8220;Max "
1292
  "number of failed login attempts per IP address&#8221;, subsequent login will "
1293
  "also be prohibited for this period.\">Expiration time [sec] for each entry</"
1294
  "dfn>"
1295
  msgstr ""
1296
- "<dfn title=\"ユーザ認証が連続%d回失敗した場合も、以降のログインがこの期間だけ(ガベージコレクション周期"
1297
- "を含む)禁止されます。\">各エントリーの有効期間 [秒]</dfn>"
1298
 
1299
- #: admin/includes/tab-settings.php:1178
1300
  msgid ""
1301
  "<dfn title=\"This option enables to record the validation logs including IP "
1302
  "addresses.\">Record &#8220;Validation logs&#8221;</dfn>"
1303
  msgstr ""
1304
- "<dfn title=\"このオプションは、IPアドレスを含む検証ログの記録を有効にします。\">検証のログを記録</dfn>"
 
1305
 
1306
- #: admin/includes/tab-settings.php:1190
1307
  msgid "When blocked"
1308
  msgstr "遮断時に記録"
1309
 
1310
- #: admin/includes/tab-settings.php:1191
1311
  msgid "When passed"
1312
  msgstr "通過時に記録"
1313
 
1314
- #: admin/includes/tab-settings.php:1192
1315
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1316
  msgstr "遮断時または遮断対象国の通過時に記録"
1317
 
1318
- #: admin/includes/tab-settings.php:1193
1319
  msgid "Unauthenticated visitor"
1320
  msgstr "未認証の訪問者を記録"
1321
 
1322
- #: admin/includes/tab-settings.php:1194
1323
  msgid "Authenticated user"
1324
  msgstr "認証済のユーザーを記録"
1325
 
1326
- #: admin/includes/tab-settings.php:1195
1327
  msgid "All the validation"
1328
  msgstr "すべての検証を記録"
1329
 
1330
- #: admin/includes/tab-settings.php:1203
1331
  #, php-format
1332
  msgid ""
1333
  "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1334
  "\">Expiration time [days] for each entry</dfn>"
1335
  msgstr "<dfn title=\"ログの最大エントリー数は %d に制限されます。\">各エントリーの有効期間[日]</dfn>"
1336
 
1337
- #: admin/includes/tab-settings.php:1220
1338
  msgid ""
1339
  "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
1340
  "with value</dfn>"
1341
  msgstr "<dfn title=\"例)action, comment, log, pwd, FILES\">内容を展開する$_POSTのキー</dfn>"
1342
 
1343
- #: admin/includes/tab-settings.php:1239
1344
  msgid "Maximum entries in &#8220;Logs&#8221;"
1345
  msgstr "記録するログの最大エントリ数"
1346
 
1347
- #: admin/includes/tab-settings.php:1256
1348
  msgid ""
1349
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1350
  "&#8220;Live update&#8221;</dfn>"
1351
  msgstr ""
1352
- "<dfn title=\"SQLiteデータベース・ソースを選択します。\">ライブアップデート用SQLiteデータベース・ソース"
1353
- "の選択</dfn>"
1354
 
1355
- #: admin/includes/tab-settings.php:1269
1356
  msgid "Ordinary file"
1357
- msgstr "通常のファイル"
1358
 
1359
- #: admin/includes/tab-settings.php:1270
1360
  msgid "In-Memory"
1361
  msgstr "イン・メモリ"
1362
 
1363
- #: admin/includes/tab-settings.php:1273
1364
  msgid "PDO_SQLITE driver not available"
1365
  msgstr "PDO_SQLITEドライバが利用出来ません"
1366
 
1367
- #: admin/includes/tab-settings.php:1274
1368
  msgid ""
1369
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1370
  "without conflict with other plugins."
1371
  msgstr "数十ミリ秒のオーバーヘッドが生じますが、他のプラグインと競合することなく、安全に使用できます。"
1372
 
1373
- #: admin/includes/tab-settings.php:1275
1374
  msgid ""
1375
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1376
  "with other plugins using this method."
1377
- msgstr "数ミリ秒のオーバーヘッドが生じます。同手法を用いている他のプラグインと競合する可能性があります。"
 
1378
 
1379
- #: admin/includes/tab-settings.php:1283
1380
  msgid "Reset database source of &#8220;Live update&#8221;"
1381
  msgstr "ライブアップデートのデータソースをリセットする"
1382
 
1383
- #: admin/includes/tab-settings.php:1291
1384
  msgid "Reset now"
1385
  msgstr "今すぐリセット"
1386
 
1387
- #: admin/includes/tab-settings.php:1300 admin/includes/tab-settings.php:1427
1388
  msgid ""
1389
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1390
  "once and activate again."
1391
  msgstr ""
1392
  "WP-Cronのタスクが見つかりません。 一旦このプラグインを停止させた後、再度、有効化してみてください。"
1393
 
1394
- #: admin/includes/tab-settings.php:1305
1395
  msgid ""
1396
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1397
- "expired entries in &#8220;IP address cache&#8221; and &#8220;Logs&#8221;."
1398
- "\">Interval [sec] to cleanup expired entries of IP address</dfn>"
1399
  msgstr ""
1400
- "<dfn title=\"このオプションは、有効期限の切れたIPアドレスのエントリーを削除するWP-Cronイベントの起動周"
1401
- "期を設定します。\">ガベージコレクション周期[秒]</dfn>"
1402
 
1403
- #: admin/includes/tab-settings.php:1314 admin/includes/tab-settings.php:1443
1404
  #, php-format
1405
  msgid "Next schedule: %s"
1406
  msgstr "次回日時:%s"
1407
 
1408
- #: admin/includes/tab-settings.php:1321
 
 
 
 
 
 
 
 
 
 
 
 
 
1409
  msgid "Remove all settings and records at uninstallation"
1410
  msgstr "アンインストール時に設定と記録を全て削除"
1411
 
1412
- #: admin/includes/tab-settings.php:1338
1413
  msgid "Geolocation API settings"
1414
  msgstr "位置情報APIの設定"
1415
 
@@ -1418,8 +1428,8 @@ msgid ""
1418
  "<dfn title=\"IP address cache and local databases are scanned at the top "
1419
  "priority.\">API selection and key settings</dfn>"
1420
  msgstr ""
1421
- "<dfn title=\"IPアドレスのキャッシュとローカルのデータベースが最優先で検索されます。\">APIの選択とキーの"
1422
- "設定</dfn>"
1423
 
1424
  #: admin/includes/tab-settings.php:1377
1425
  msgid "Timeout for network API [sec]"
@@ -1433,7 +1443,7 @@ msgstr "ローカル・データベースの設定"
1433
  msgid "database"
1434
  msgstr "ファイル"
1435
 
1436
- #: admin/includes/tab-settings.php:1410 classes/class-ip-geo-block-cron.php:418
1437
  #, php-format
1438
  msgid "Last update: %s"
1439
  msgstr "最終更新:%s"
@@ -1467,17 +1477,17 @@ msgid ""
1467
  "browser as this plugin does not keep the key itself.\">Emergency login link</"
1468
  "dfn>"
1469
  msgstr ""
1470
- "<dfn title=\"緊急時にもログイン可能なリンクを生成します。キー自体は保存されないので、生成したリンクをブ"
1471
- "ラウザのお気に入り/ブックマークに追加してください。\">緊急時用ログイン・リンク</dfn>"
1472
 
1473
  #: admin/includes/tab-settings.php:1515
1474
  msgid ""
1475
- "<dfn title=\"Valid key for Google Maps JavaScript API. A free tier has limit "
1476
- "even if it's &#8220;default&#8221;. Maps Embed API without key can be "
1477
- "available in case of empty.\">Google Maps API key</dfn>"
1478
  msgstr ""
1479
- "<dfn title=\"Google Maps JavaScript API の有効なキー。「default」であっても一定の使用制限があります。空"
1480
- "欄にするとキーなしの Maps Embed API が使用可能です。\">Google Maps API キー</dfn>"
1481
 
1482
  #: admin/includes/tab-settings.php:1531
1483
  msgid "Export / Import settings"
@@ -1520,12 +1530,12 @@ msgid "Best for Back-end"
1520
  msgstr "バックエンドの推奨設定"
1521
 
1522
  #: admin/includes/tab-settings.php:1564
1523
- msgid "DB tables for this plugin"
1524
- msgstr "このプラグイン用データベース・テーブル"
1525
 
1526
  #: admin/includes/tab-settings.php:1572
1527
- msgid "Initialize now"
1528
- msgstr "今すぐ初期化"
1529
 
1530
  #: admin/includes/tab-settings.php:1581
1531
  msgid ""
@@ -1536,10 +1546,10 @@ msgid ""
1536
  "support/plugin/ip-geo-block\" title=\"[IP Geo Block] Support | WordPress.org"
1537
  "\">support forum</a> ]"
1538
  msgstr ""
1539
- "<dfn title=\"予期しない遮断が発生した場合は、ダンプされた診断情報を元にリクエストの遮断理由を推定し、問"
1540
- "題解決に役立ててください。\">診断情報</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
1541
- "support/plugin/ip-geo-block\" title=\"[IP Geo Block] Support | WordPress.org\">サポート・フォーラム</"
1542
- "a> ]"
1543
 
1544
  #: admin/includes/tab-settings.php:1588
1545
  msgid "Please copy &amp; paste when submitting your issue to support forum"
@@ -1554,14 +1564,15 @@ msgid ""
1554
  "While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
1555
  "others will pass an IP address to the 3rd parties' API via HTTP."
1556
  msgstr ""
1557
- "MaxmindとIP2Locationはローカルのデータベースを検索しますが、他はHTTPを介して外部のAPIにIPアドレスを渡し"
1558
- "ます。"
1559
 
1560
  #: admin/includes/tab-settings.php:1606
1561
  msgid ""
1562
  "Please select the appropriate APIs to fit the privacy law / regulation in "
1563
  "your country / region."
1564
- msgstr "あなたの国/地域におけるプライバシー保護の法規・条例に適合するよう、適切なAPIを選択して下さい。"
 
1565
 
1566
  #: admin/includes/tab-settings.php:1615
1567
  #, php-format
@@ -1569,10 +1580,18 @@ msgid ""
1569
  "Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
1570
  "2.0.0+%s."
1571
  msgstr ""
1572
- "Maxmind GeoLite2 データベースと API には、PHP バージョン 5.4.0 以上と %sPECL phar 2.0.0 以上%sが必要で"
1573
- "す。"
1574
 
1575
- #: admin/includes/tab-statistics.php:19
 
 
 
 
 
 
 
 
1576
  msgid "Statistics of validation"
1577
  msgstr "検証の統計"
1578
 
@@ -1648,40 +1667,40 @@ msgstr "IPアドレス(トップ10)"
1648
  msgid "Slug in back-end"
1649
  msgstr "バックエンドのスラッグ"
1650
 
1651
- #: admin/includes/tab-statistics.php:355
1652
  msgid "Toggle sorting order"
1653
  msgstr "ソート順を切り替え"
1654
 
1655
- #: admin/includes/tab-statistics.php:406
1656
  #, php-format
1657
  msgid "[ %sRecord &#8220;Statistics of validation&#8221;%s ] is disabled."
1658
  msgstr "[%s検証の統計を記録%s]が無効です。"
1659
 
1660
- #: admin/includes/tab-statistics.php:407
1661
  msgid ""
1662
  "Please set the proper condition to record and analyze the validation "
1663
  "statistics."
1664
  msgstr "検証の統計を記録し分析するためには、適切な条件を設定して下さい。"
1665
 
1666
- #: admin/includes/tab-statistics.php:420
1667
  #, php-format
1668
  msgid "[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled."
1669
  msgstr "[%sIPアドレスをキャッシュに記録%s]が無効です。"
1670
 
1671
- #: admin/includes/tab-statistics.php:421
1672
  msgid "Please set the proper condition to record IP address in cache."
1673
  msgstr "キャッシュを利用しサイトの応答性を上げるためには、適切な条件を設定して下さい。"
1674
 
1675
- #: classes/class-ip-geo-block-cron.php:221
1676
  #, php-format
1677
  msgid "Can't lock <code>%s</code>. Please try again after a while."
1678
  msgstr "<code>%s</code> をロック出来ません。パーミッションをチェックして下さい。"
1679
 
1680
- #: classes/class-ip-geo-block-cron.php:300
1681
  msgid "Your database file is up-to-date."
1682
  msgstr "データベース・ファイルは最新です。"
1683
 
1684
- #: classes/class-ip-geo-block-cron.php:399
1685
  msgid "gz or zip is not supported on your system."
1686
  msgstr "gz または zip がサポートされていません。"
1687
 
@@ -1693,9 +1712,9 @@ msgid ""
1693
  "Editing_wp-config.php#WordPress_Upgrade_Constants\" title=\"Editing wp-"
1694
  "config.php &laquo; WordPress Codex\">this document</a> for more details."
1695
  msgstr ""
1696
- "本プラグインは、メソッド「%s」による FTP あるいは SSH を使ったファイル操作をサポートしていません。詳し"
1697
- "くは、<a href=\"https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants\" title="
1698
- "\"Editing wp-config.php &laquo; WordPress Codex\">このドキュメント</a>を参照してください。"
1699
 
1700
  #: classes/class-ip-geo-block-file.php:68
1701
  msgid ""
@@ -1705,10 +1724,10 @@ msgid ""
1705
  "\"Editing wp-config.php &laquo; WordPress Codex\">this document</a> for more "
1706
  "details."
1707
  msgstr ""
1708
- "本プラグイン FTP あるいは SSH を使ったファイル操作を有効にするためには、<code>wp-config.php</code> に幾"
1709
- "つかの定義が必要です。詳しくは、<a href=\"https://codex.wordpress.org/Editing_wp-config."
1710
- "php#WordPress_Upgrade_Constants\" title=\"Editing wp-config.php &laquo; WordPress Codex\">このドキュメ"
1711
- "ント</a>を参照してください。"
1712
 
1713
  #: classes/class-ip-geo-block-logs.php:236
1714
  #, php-format
@@ -1717,17 +1736,13 @@ msgid ""
1717
  "activate again."
1718
  msgstr "%s 用のテーブルが作成されていません。一旦このプラグインを無効化し、再度有効化して下さい。"
1719
 
1720
- #: classes/class-ip-geo-block-logs.php:241
1721
  #, php-format
1722
  msgid ""
1723
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1724
  "again."
1725
  msgstr "%s 用のカラム型が一致しません。一旦このプラグインを無効化し、再度有効化して下さい。"
1726
 
1727
- #: classes/class-ip-geo-block.php:417
1728
- msgid "Dashboard"
1729
- msgstr "ダッシュボード"
1730
-
1731
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:151
1732
  #: wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php:144
1733
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
@@ -1740,5 +1755,5 @@ msgid ""
1740
  "Can't find IP Geo Block in your plugins directory. Please remove <code>%s</"
1741
  "code> or re-install %s."
1742
  msgstr ""
1743
- "プラグイン・ディレクトリにIP Geo Blockが見つかりません。<code>%s</code>を削除するか、%sを再インストール"
1744
- "してください。"
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: IP Geo Block 3.0.16\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2018-11-01 22:01+0900\n"
8
+ "PO-Revision-Date: 2018-11-01 22:03+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
25
  "It blocks any spams, login attempts and malicious access to the admin area "
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
+ "自国以外から投稿されるスパム、ログインフォーム、さらにゼロデイ攻撃を含む管理領域への悪意あるアクセス"
29
+ "からサイトを守ります。"
30
 
31
+ #: admin/class-ip-geo-block-admin.php:297
32
  msgid "Are you sure ?"
33
  msgstr "実行してもよいですか?"
34
 
35
+ #: admin/class-ip-geo-block-admin.php:298
36
+ #: admin/class-ip-geo-block-admin.php:790
37
  msgid "Open a new window"
38
  msgstr "別窓で開く"
39
 
40
+ #: admin/class-ip-geo-block-admin.php:299 admin/includes/tab-settings.php:1506
41
  msgid "Generate new link"
42
  msgstr "新しいリンクを生成"
43
 
44
+ #: admin/class-ip-geo-block-admin.php:300 admin/includes/tab-settings.php:1507
45
  msgid "Delete current link"
46
  msgstr "生成したリンクを削除"
47
 
48
+ #: admin/class-ip-geo-block-admin.php:301
49
  msgid ""
50
  "Please add the following link to favorites / bookmarks in your browser : "
51
  msgstr "次のリンクをブラウザのお気に入り/ブックマークに追加して下さい : "
52
 
53
+ #: admin/class-ip-geo-block-admin.php:302
54
  msgid "ajax for logged-in user"
55
  msgstr "認証済ユーザー用 ajax"
56
 
57
+ #: admin/class-ip-geo-block-admin.php:303
58
  msgid "ajax for non logged-in user"
59
  msgstr "未認証ユーザー用 ajax"
60
 
61
+ #: admin/class-ip-geo-block-admin.php:304
62
  #, php-format
63
  msgid "[Found: %d]"
64
  msgstr "[見つかった数:%d]"
65
 
66
+ #: admin/class-ip-geo-block-admin.php:305
67
  #, php-format
68
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
69
  msgstr "ログから `%s` を検索し、検証して下さい。"
70
 
71
+ #: admin/class-ip-geo-block-admin.php:306
72
  msgid "This feature is available with HTML5 compliant browsers."
73
  msgstr "HTML5準拠のブラウザでのみ機能します。"
74
 
75
+ #: admin/class-ip-geo-block-admin.php:307
76
  msgid "The selected row cannot be found in the table."
77
  msgstr "テーブル中に選択された行が見つかりません。"
78
 
79
+ #: admin/class-ip-geo-block-admin.php:308
80
+ #: admin/class-ip-geo-block-admin.php:1568
81
  #, php-format
82
  msgid "An error occurred while executing the ajax command `%s`."
83
  msgstr "Ajaxコマンド `%s` の実行中にエラーが発生しました。"
84
 
85
+ #: admin/class-ip-geo-block-admin.php:312
86
  msgid "No data available in table"
87
  msgstr "テーブルにデータがありません"
88
 
89
+ #: admin/class-ip-geo-block-admin.php:313
90
  msgid "No matching records found"
91
  msgstr "一致するレコードがありません"
92
 
93
+ #: admin/class-ip-geo-block-admin.php:314
94
  #: admin/includes/class-admin-ajax.php:107
95
  #: admin/includes/class-admin-ajax.php:240
96
  #: admin/includes/tab-geolocation.php:74
97
  msgid "IP address"
98
  msgstr "IPアドレス"
99
 
100
+ #: admin/class-ip-geo-block-admin.php:315
101
  #: admin/includes/class-admin-ajax.php:108
102
  #: admin/includes/class-admin-ajax.php:241
103
  msgid "Code"
104
  msgstr "国"
105
 
106
+ #: admin/class-ip-geo-block-admin.php:316
107
  #: admin/includes/class-admin-ajax.php:109
108
  #: admin/includes/class-admin-ajax.php:242
109
  msgid "ASN"
110
  msgstr "AS番号"
111
 
112
+ #: admin/class-ip-geo-block-admin.php:317
113
  #: admin/includes/class-admin-ajax.php:243
114
  msgid "Host name"
115
  msgstr "ホスト名"
116
 
117
+ #: admin/class-ip-geo-block-admin.php:318
118
  #: admin/includes/class-admin-ajax.php:110
119
  #: admin/includes/class-admin-ajax.php:244
120
  msgid "Target"
121
  msgstr "検証対象"
122
 
123
+ #: admin/class-ip-geo-block-admin.php:319
124
  #: admin/includes/class-admin-ajax.php:245
125
  msgid "Failure / Total"
126
  msgstr "ログイン失敗/総計"
127
 
128
+ #: admin/class-ip-geo-block-admin.php:320
129
  #: admin/includes/class-admin-ajax.php:246
130
  msgid "Elapsed[sec]"
131
  msgstr "経過 [秒]"
132
 
133
+ #: admin/class-ip-geo-block-admin.php:321
134
  #: admin/includes/class-admin-ajax.php:106
135
  msgid "Time"
136
  msgstr "日時"
137
 
138
+ #: admin/class-ip-geo-block-admin.php:322
139
  #: admin/includes/class-admin-ajax.php:111
140
  msgid "Result"
141
  msgstr "検証結果"
142
 
143
+ #: admin/class-ip-geo-block-admin.php:323
144
  #: admin/includes/class-admin-ajax.php:112
145
  msgid "Request"
146
  msgstr "リクエスト"
147
 
148
+ #: admin/class-ip-geo-block-admin.php:324
149
  #: admin/includes/class-admin-ajax.php:113
150
  msgid "User agent"
151
  msgstr "ユーザー・エージェント"
152
 
153
+ #: admin/class-ip-geo-block-admin.php:325
154
  #: admin/includes/class-admin-ajax.php:114
155
  msgid "HTTP headers"
156
  msgstr "HTTP ヘッダー"
157
 
158
+ #: admin/class-ip-geo-block-admin.php:326
159
  #: admin/includes/class-admin-ajax.php:115
160
  msgid "$_POST data"
161
  msgstr "$_POST データ"
162
 
163
+ #: admin/class-ip-geo-block-admin.php:352
164
  msgid "Contribute on GitHub"
165
  msgstr "開発に参加"
166
 
167
+ #: admin/class-ip-geo-block-admin.php:366
168
+ #: admin/class-ip-geo-block-admin.php:483
169
+ #: admin/class-ip-geo-block-admin.php:733
170
  msgid "Settings"
171
  msgstr "設定"
172
 
173
+ #: admin/class-ip-geo-block-admin.php:460
174
+ #: admin/class-ip-geo-block-admin.php:461
175
+ #: admin/class-ip-geo-block-admin.php:471
176
+ #: admin/class-ip-geo-block-admin.php:472
177
+ #: admin/class-ip-geo-block-admin.php:482
178
+ #: admin/class-ip-geo-block-admin.php:492
179
  msgid "IP Geo Block"
180
  msgstr "IP Geo Block"
181
 
182
+ #: admin/class-ip-geo-block-admin.php:493
183
+ #: admin/class-ip-geo-block-admin.php:738
184
+ msgid "Sites list"
185
  msgstr "サイト一覧"
186
 
187
+ #: admin/class-ip-geo-block-admin.php:522
188
  msgid "You need WordPress 3.7+."
189
  msgstr "WordPress 3.7 以上が必要です。"
190
 
191
+ #: admin/class-ip-geo-block-admin.php:526
192
  #, php-format
193
  msgid ""
194
  "Can not load Geolocation API libraries from <code>%s</code>. It seems to "
206
  "com/tokkonopapa/WordPress-IP-Geo-API\" title=\"tokkonopapa/WordPress-IP-Geo-API - GitHub\">WordPress-"
207
  "IP-Geo-API</a> から <a rel=\"noreferrer\" href=\"https://github.com/tokkonopapa/WordPress-IP-Geo-API/"
208
  "archive/master.zip\" title=\"Download the contents of tokkonopapa/WordPress-IP-Geo-API as a zip file"
209
+ "\">ZIP file</a> のダウンロードに失敗したようです。<a rel=\"noreferrer\" href=\"https://www."
210
+ "ipgeoblock.com/codex/how-to-fix-permission-troubles.html\" title=\"How can I fix permission "
211
+ "troubles? | IP Geo Block\">FAQ</a> を参照し、適切な書き込み権限と共に <code>ip-geo-api</code> をイン"
212
+ "ストールしてください。"
213
 
214
+ #: admin/class-ip-geo-block-admin.php:535
215
  #, php-format
216
  msgid ""
217
  "You should select at least one API at <a href=\"%s\">Geolocation API "
221
  "<a href=\"%s\">位置情報APIの設定</a>で、少なくとも1つ以上のAPIを選択して下さい。未選択の場合、キャッ"
222
  "シュの有効期限切れと共にロックアウトされます。"
223
 
224
+ #: admin/class-ip-geo-block-admin.php:544
225
  #, php-format
226
  msgid ""
227
  "You should select at least one API for local database at <a href=\"%s"
228
  "\">Geolocation API settings</a>. Otherwise access to the external API may "
229
  "slow down the site."
230
  msgstr ""
231
+ "<a href=\"%s\">位置情報APIの設定</a>で、ローカルデータベース用のAPIを少なくとも1つ以上選択して下さ"
232
+ "い。未選択の場合、外部APIへのアクセスにより、サイトの応答性が悪くなります。"
233
 
234
+ #: admin/class-ip-geo-block-admin.php:555
235
  #, php-format
236
  msgid ""
237
  "Now downloading geolocation databases in background. After a little while, "
238
  "please check your country code and &#8220;<strong>Matching rule</"
239
+ "strong>&#8221; at <a href=\"%s\">Validation rules and behavior</a>."
240
  msgstr ""
241
+ "バックグラウンドで位置情報データベースをダウンロードしています。少しの間をおいた後、あなたの国コード"
242
+ "と[<strong>マッチング規則</strong>]を[<a href=\"%s\">検証ルールと振る舞いの設定</a>]で確認して下"
243
+ "さい。"
244
 
245
+ #: admin/class-ip-geo-block-admin.php:561
246
  #, php-format
247
  msgid ""
248
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
249
+ "confirm it at <a href=\"%s\">Validation rules and behavior</a>."
250
  msgstr ""
251
+ "[<strong>マッチング規則</strong>]が正しく設定されていません。[<a href=\"%s\">検証ルールと振る舞い"
252
+ "の設定</a>]を確認して下さい。"
253
 
254
+ #: admin/class-ip-geo-block-admin.php:570
255
  msgid "Local database and matching rule have been updated."
256
  msgstr "ローカル・データベースとマッチング規則を更新しました。"
257
 
258
+ #: admin/class-ip-geo-block-admin.php:581
259
  msgid ""
260
  "Once you logout, you will be unable to login again because the number of "
261
  "login attempts reaches the limit."
262
  msgstr ""
263
+ "あなたのIPアドレスのログイン試行可能回数がリミットに達したため、ログアウトすると再びログインする事が"
264
+ "出来なくなります。"
265
 
266
+ #: admin/class-ip-geo-block-admin.php:583
267
  #, php-format
268
  msgid ""
269
  "Please remove your IP address in &#8220;%1$sStatistics in IP address cache"
270
  "%2$s&#8221; on &#8220;%3$sStatistics%4$s&#8221; tab to prevent locking "
271
  "yourself out."
272
  msgstr ""
273
+ "[%3$s統計%4$s]タブの[%1$sIPアドレスのキャッシュ%2$s]から自身のIPアドレスを削除し、ロックアウトを"
274
+ "回避してください。"
275
 
276
+ #: admin/class-ip-geo-block-admin.php:594
277
  msgid ""
278
  "Once you logout, you will be unable to login again because your country code "
279
  "or IP address is in the blacklist."
280
  msgstr ""
281
+ "あなたの国コードまたはIPアドレスがブラックリストに含まれているため、ログアウトすると再びログインする"
282
+ "事が出来なくなります。"
283
 
284
+ #: admin/class-ip-geo-block-admin.php:595
285
  msgid ""
286
  "Once you logout, you will be unable to login again because your country code "
287
  "or IP address is not in the whitelist."
288
  msgstr ""
289
+ "あなたの国コードまたはIPアドレスがホワイトリストに含まれていないため、ログアウトすると再びログインす"
290
+ "る事が出来なくなります。"
291
 
292
+ #: admin/class-ip-geo-block-admin.php:599
293
  #, php-format
294
+ msgid "Please check your &#8220;%sValidation rules and behavior%s&#8221;."
295
+ msgstr "[%s検証ルールと振る舞いの設定%s]を確認して下さい。"
296
 
297
+ #: admin/class-ip-geo-block-admin.php:603
298
  #, php-format
299
  msgid ""
300
+ "Please confirm your local geolocation database files exist at &#8220;%sLocal "
301
+ "database settings%s&#8221; section, or remove your IP address in cache at "
302
+ "&#8220;%sStatistics in cache%s&#8221; section."
303
  msgstr ""
304
+ "[%sローカル・データベースの設定%s]で位置情報データベース・ファイルの有無を確認して下さい。あるいは"
305
+ "[%sキャッシュの統計%s]でキャッシュされているあなたのIPアドレスを削除して下さい。"
306
 
307
+ #: admin/class-ip-geo-block-admin.php:617
308
  #, php-format
309
  msgid ""
310
  "Emergency login link is outdated. Please delete it once and generate again "
314
  "緊急ログイン・リンクが古くなっています。[%sプラグインの設定%s]で一度削除してから再度生成してくださ"
315
  "い。 またブラウザのお気に入り/ブックマークも忘れずに更新して下さい。"
316
 
317
+ #: admin/class-ip-geo-block-admin.php:626
318
  msgid ""
319
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
320
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
321
  "select &#8220;init&#8221; action hook."
322
  msgstr ""
323
  "[検証のタイミング]に「&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)」が選択されていますが、"
324
+ "<strong>IP Geo Allow</strong> と互換性がありません。「&#8220;init&#8221; アクション・フック」を選択し"
325
+ "てください。"
326
 
327
+ #: admin/class-ip-geo-block-admin.php:734
328
  msgid "Statistics"
329
  msgstr "統計"
330
 
331
+ #: admin/class-ip-geo-block-admin.php:735
332
  msgid "Logs"
333
  msgstr "ログ"
334
 
335
+ #: admin/class-ip-geo-block-admin.php:736
336
  msgid "Search"
337
  msgstr "検索"
338
 
339
+ #: admin/class-ip-geo-block-admin.php:737
340
  msgid "Attribution"
341
  msgstr "リンク"
342
 
343
+ #: admin/class-ip-geo-block-admin.php:754
344
+ #: admin/class-ip-geo-block-admin.php:770
345
+ msgid "Network"
346
  msgstr "ネットワーク管理"
347
 
348
+ #: admin/class-ip-geo-block-admin.php:783
349
  msgid "Toggle all"
350
  msgstr "全てを開閉"
351
 
352
+ #: admin/class-ip-geo-block-admin.php:786
353
  msgid ""
354
  "Independent of &#8220;Privacy and record settings&#8221;, you can see all "
355
  "the requests validated by this plugin in almost real time."
356
  msgstr ""
357
+ "[プライバシーと記録の設定]にかかわらず、このプラグインによる検証結果のすべてを、ほぼリアルタイムに"
358
+ "表示します。"
359
 
360
+ #: admin/class-ip-geo-block-admin.php:786 admin/includes/tab-accesslog.php:39
361
  msgid "Live update"
362
  msgstr "ライブアップデート"
363
 
364
+ #: admin/class-ip-geo-block-admin.php:790
365
  msgid "Open a new window on clicking the link in the chart."
366
  msgstr "チャート内のリンクをクリックすると、新しいウィンドウが開きます。"
367
 
368
+ #: admin/class-ip-geo-block-admin.php:814
369
  msgid "Thanks for providing these great services for free."
370
  msgstr "これらのすばらしいサービスの提供元に、敬意と感謝の意を表します!"
371
 
372
+ #: admin/class-ip-geo-block-admin.php:815
373
  msgid ""
374
  "(Most browsers will redirect you to each site <a href=\"https://www."
375
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
378
  "(ほとんどのブラウザでは、<a href=\"https://www.ipgeoblock.com/etc/referer.html\" title=\"Referer "
379
  "Checker\">参照元を残さずにリンク先にリダイレクトできます</a>。)"
380
 
381
+ #: admin/class-ip-geo-block-admin.php:820
382
  msgid "Back to top"
383
  msgstr "トップに戻る"
384
 
385
+ #: admin/class-ip-geo-block-admin.php:912
386
  msgid "Enable"
387
  msgstr "有効"
388
 
389
+ #: admin/class-ip-geo-block-admin.php:927
390
  msgid "Select one"
391
  msgstr "何れかを選択"
392
 
393
+ #: admin/class-ip-geo-block-admin.php:1346
394
  msgid "You do not have sufficient permissions to access this page."
395
  msgstr "このページにアクセスするための十分な権限がありません。"
396
 
397
+ #: admin/class-ip-geo-block-admin.php:1373
398
  #: admin/includes/class-admin-rewrite.php:194
399
+ #: classes/class-ip-geo-block-cron.php:218
400
+ #: classes/class-ip-geo-block-cron.php:322
401
+ #: classes/class-ip-geo-block-cron.php:400
402
+ #: classes/class-ip-geo-block-opts.php:469
403
  #, php-format
404
  msgid "Unable to write <code>%s</code>. Please check the permission."
405
  msgstr "<code>%s</code> に書き込めません。パーミッションをチェックして下さい。"
406
 
407
+ #: admin/class-ip-geo-block-admin.php:1403
408
  msgid "Settings saved."
409
  msgstr "設定を保存しました。"
410
 
426
  msgstr "%sは誤ったフォーマットです。該当行を削除し、再実行してください。"
427
 
428
  #: admin/includes/class-admin-rewrite.php:168
429
+ #: classes/class-ip-geo-block-cron.php:213
430
+ #: classes/class-ip-geo-block-cron.php:395
431
  #, php-format
432
  msgid "Unable to read <code>%s</code>. Please check the permission."
433
  msgstr "<code>%s</code> が読めません。パーミッションをチェックして下さい。"
451
  msgid "Help"
452
  msgstr "ヘルプ"
453
 
454
+ #: admin/includes/tab-accesslog.php:55 admin/includes/tab-settings.php:428
455
  msgid "Comment post"
456
  msgstr "コメント投稿"
457
 
458
+ #: admin/includes/tab-accesslog.php:56 admin/includes/tab-settings.php:429
459
  msgid "XML-RPC"
460
  msgstr "XML-RPC"
461
 
462
+ #: admin/includes/tab-accesslog.php:57 admin/includes/tab-settings.php:430
463
  msgid "Login form"
464
  msgstr "ログイン・フォーム"
465
 
466
+ #: admin/includes/tab-accesslog.php:58 admin/includes/tab-settings.php:431
467
  msgid "Admin area"
468
  msgstr "管理領域"
469
 
470
+ #: admin/includes/tab-accesslog.php:59 admin/includes/tab-settings.php:433
471
  msgid "Public facing pages"
472
  msgstr "一般公開ページ"
473
 
542
  msgid "Export csv"
543
  msgstr "CSVへエクスポート"
544
 
545
+ #: admin/includes/tab-accesslog.php:198 admin/includes/tab-network.php:112
546
+ #: admin/includes/tab-statistics.php:410
547
  #, php-format
548
  msgid "[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled."
549
  msgstr "[%s検証のログを記録%s]が無効です。"
550
 
551
+ #: admin/includes/tab-accesslog.php:199 admin/includes/tab-network.php:113
552
+ #: admin/includes/tab-statistics.php:411
553
  msgid ""
554
  "Please set the proper condition to record and analyze the validation logs."
555
  msgstr "検証のログを記録し分析するためには、適切な条件を設定して下さい。"
566
  msgid "Geolocation API"
567
  msgstr "位置情報API"
568
 
569
+ #: admin/includes/tab-geolocation.php:89 admin/includes/tab-settings.php:1083
570
  msgid ""
571
  "<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
572
  "Moreover, this option replaces the end of IP address with &#8220;***&#8221; "
573
  "to make it anonymous.\">Anonymize IP address</dfn>"
574
  msgstr ""
575
+ "<dfn title=\"IPアドレスは、常に暗号化されてキャッシュとログに記録されます。このオプションはさらに、IP"
576
+ "アドレスの末尾を「***」に置き換えて匿名化します。\">IPアドレスを匿名化する</dfn>"
577
 
578
  #: admin/includes/tab-geolocation.php:104
579
  msgid "Search geolocation"
638
  "sample.\"><span></span></a>&#8221; button (if exists) attached to the "
639
  "following list to confirm that the blocked request is not malicious."
640
  msgstr ""
641
+ "[例外]に追加する前に、以下の候補に付いたボタン &#8220;<a class=\"ip-geo-block-icon ip-geo-block-"
642
+ "icon-alert\" title=\"このボタンは単なるサンプルです。\"><span></span></a>&#8221;(もしあれば)をク"
643
+ "リックし、遮断されたリクエストに悪意のないことを確認して下さい。"
644
 
645
  #: admin/includes/tab-settings.php:19
646
  msgid "Open CIDR calculator for IPv4 / IPv6."
647
  msgstr "IPv4/IPv6用CIDR変換電卓を開きます。"
648
 
649
  #: admin/includes/tab-settings.php:54
650
+ msgid "Validation rules and behavior"
651
+ msgstr "検証ルールと振る舞いの設定"
652
 
653
  #: admin/includes/tab-settings.php:76
654
  msgid ""
656
  "code by referring &#8220;Scan country code&#8221;.\">Your IP address / "
657
  "Country</dfn>"
658
  msgstr ""
659
+ "<dfn title=\"[国コードを検索する]を参照し、適切な位置情報APIと国コードを設定して下さい。\">あなたの"
660
+ "IPアドレス / 国コード</dfn>"
661
 
662
  #: admin/includes/tab-settings.php:85 admin/includes/tab-settings.php:104
663
  msgid "Scan all the APIs you selected at Geolocation API settings"
673
  "code by referring &#8220;Scan country code&#8221;.\">Server IP address / "
674
  "Country</dfn>"
675
  msgstr ""
676
+ "<dfn title=\"[国コードを検索する]を参照し、適切な位置情報APIと国コードを設定して下さい。\">サーバー"
677
+ "IPアドレス / 国コード</dfn>"
678
 
679
  #: admin/includes/tab-settings.php:112
680
  msgid "Whitelist"
698
  "the code that does not correspond to any of the countries.\">Whitelist of "
699
  "country code</dfn>"
700
  msgstr ""
701
+ "<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード「XX」は、localhost を含む"
702
+ "プライベート・アドレスに割り当てられ、また「ZZ」は不明(位置情報データベースに未登録)を表します。ど"
703
+ "の国にもマッチさせないことが必要な場合には、「YY」を指定してください。\">国コードのホワイトリスト</"
704
+ "dfn>"
705
 
706
  #: admin/includes/tab-settings.php:119
707
  msgid ""
712
  "the code that does not correspond to any of the countries.\">Blacklist of "
713
  "country code</dfn>"
714
  msgstr ""
715
+ "<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード「XX」は、localhost を含む"
716
+ "プライベート・アドレスに割り当てられ、また「ZZ」は不明(位置情報データベースに未登録)を表します。ど"
717
+ "の国にもマッチさせないことが必要な場合には、「YY」を指定してください。\">国コードのブラックリスト</"
718
+ "dfn>"
719
 
720
+ #: admin/includes/tab-settings.php:125 admin/includes/tab-settings.php:805
721
  msgid "Matching rule"
722
  msgstr "マッチング規則"
723
 
732
  msgid ""
733
  "A request from which the country code or IP address is in the blacklist will "
734
  "be blocked."
735
+ msgstr ""
736
+ "国コードまたはIPアドレスがブラックリストに<strong>含まれている</strong>リクエストを遮断します。"
737
 
738
  #: admin/includes/tab-settings.php:180
739
  msgid ""
741
  "Whitelist/Blacklist of extra IP addresses&#8221; to specify a group of IP "
742
  "networks.\">Use Autonomous System Number</dfn>"
743
  msgstr ""
744
+ "<dfn title=\"ホワイトリスト、ブラックリストにIPアドレスを指定する代わりに、ネットワークのグループを代"
745
+ "表する「AS番号」の指定を可能にします。\">AS番号を使用可能にする</dfn>"
746
 
747
  #: admin/includes/tab-settings.php:191
748
  #, php-format
751
 
752
  #: admin/includes/tab-settings.php:198
753
  msgid ""
754
+ "<dfn title=\"If your server is placed behind the proxy server or the load "
755
+ "balancing server, you need to put the appropriate key such as &#8220;"
756
+ "HTTP_X_FORWARDED_FOR&#8221;, &#8220;HTTP_X_REAL_IP&#8221; or something like "
757
+ "that to retrieve the client IP address.\">$_SERVER keys to retrieve extra IP "
758
+ "addresses</dfn>"
759
+ msgstr ""
760
+ "<dfn title=\"あなたのサーバーがプロキシー・サーバーやロード・バランサーの背後に位置する場合は、クライ"
761
+ "アントのIPアドレスを抽出するため「HTTP_X_FORWARDED_FOR」や「HTTP_X_REAL_IP」など、$_SERVER の適切な"
762
+ "キーを指定してください。\">IPアドレスを追加抽出する $_SERVER のキー</dfn>"
763
+
764
+ #: admin/includes/tab-settings.php:216
765
+ msgid ""
766
  "<dfn title=\"e.g. &#8220;192.0.64.0/18&#8221; for Jetpack server, "
767
  "&#8220;69.46.36.0/27&#8221; for WordFence server or &#8220;AS32934&#8221; "
768
  "for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
770
  "<dfn title=\"例)192.0.64.0/18(Jetpackサーバー)、69.46.36.0/27(WordFenceサーバー)、"
771
  "AS32934(Facebook)\">国コードに優先して検証するIPアドレスのホワイトリスト</dfn>"
772
 
773
+ #: admin/includes/tab-settings.php:237
774
  msgid ""
775
  "<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
776
  "\">Blacklist of extra IP addresses prior to country code</dfn>"
777
  msgstr ""
778
+ "<dfn title=\"サーバー・レベルのアクセス制御の使用をお勧めします(例:.htaccess)。\">国コードに優先し"
779
+ "て検証するIPアドレスのブラックリスト</dfn>"
 
 
 
 
 
 
 
 
 
 
 
 
780
 
781
  #: admin/includes/tab-settings.php:258
782
  msgid ""
789
  "please click to restore.\"><span></span></a>)</nobr>"
790
  msgstr ""
791
  "<dfn title=\"「国コードで遮断」および「ゼロデイ攻撃を遮断」とは独立に、[管理領域]、[管理領域 ajax/"
792
+ "post]、[プラグイン領域]、[テーマ領域]をターゲットとした悪意のあるシグネチャを検証します。\">悪意"
793
+ "のあるシグネチャ</dfn> <nobr>(<a class=\"ip-geo-block-icon ip-geo-block-icon-cycle\" id=\"ip-geo-"
794
+ "block-decode\" title=\"文字化けした場合、クリックして復元して下さい。\"><span></span></a>)</nobr>"
795
 
796
  #: admin/includes/tab-settings.php:272
797
  msgid ""
812
  "&#8220;upload_files&#8221; for Administrator, Editor and Author. This "
813
  "verification will be skipped if empty.\">Capabilities to be verified</dfn>"
814
  msgstr ""
815
+ "<dfn title=\"検証する権限を指定します。アップローダーによっては、特定の権限を必要とする場合がありま"
816
+ "す。デフォルトは、管理者(Administrator)、編集者(Editor)、投稿者(Author)向けの「upload_files」で"
817
+ "す。空欄の場合、この検証はスキップされます。\">検証する権限</dfn>"
818
 
819
  #: admin/includes/tab-settings.php:287
820
  msgid ""
834
  "timing&#8221; so that other staff would not fetch the uploaded files before "
835
  "this validation.\">Prevent malicious file uploading</dfn>"
836
  msgstr ""
837
+ "<dfn title=\"ファイル・タイプを限定し、バックエンド、またはフロントエンドを経由するマルウェアやバック"
838
+ "ドアのアップロードを遮断します。他のプラグインやテーマに先んじて確実に遮断するために、[検証のタイミ"
839
+ "ング]を「&#8220;mu-plugins&#8221; (ip-geo-block-mu.php)」に設定することを検討してください。\">悪意の"
840
+ "あるアップロード防止</dfn>"
841
 
842
+ #: admin/includes/tab-settings.php:304 admin/includes/tab-settings.php:494
843
+ #: admin/includes/tab-settings.php:639 admin/includes/tab-settings.php:1155
844
  msgid "Disable"
845
  msgstr "無効"
846
 
861
  "<dfn title=\"テーマ・ディレクトリには 403.php など、独自のファイルを設置する事が出来ます。\">レスポン"
862
  "ス・コード</dfn> %s"
863
 
864
+ #: admin/includes/tab-settings.php:344 admin/includes/tab-settings.php:888
865
  msgid ""
866
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
867
  "to a public facing page, visitors would not be blocked on the page to "
869
  "[Front-end target settings] section. Empty URL is altered to your home."
870
  "\">Redirect URL</dfn>"
871
  msgstr ""
872
+ "<dfn title=\"レスポンス・コード 2xx 、3xx 用のリダイレクト先 URL を指定します。リダイレクトのループを"
873
+ "避けるため、自サイト内の URL は[フロントエンドの設定]に関わらず遮断の対象外となります。空欄の場合、"
874
+ "サイトのホームが使用されます。\">リダイレクト先 URL</dfn>"
875
 
876
+ #: admin/includes/tab-settings.php:361 admin/includes/tab-settings.php:906
877
  msgid ""
878
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
879
  "message</dfn>"
909
  "validation-timing.html' title='Validation timing | IP Geo Block'>some "
910
  "restrictions</a>."
911
  msgstr ""
912
+ "標準的な他のプラグインより早いタイミングで検証を実行します。これによりサーバーの負荷は軽減されます"
913
+ "が、<a rel=‘noreferrer’ href=‘https://www.ipgeoblock.com/codex/validation-timing.html' "
914
+ "title=‘Validation timing | IP Geo Block’>幾つかの制限事項</a> が生じます。"
915
 
916
+ #: admin/includes/tab-settings.php:403
917
+ msgid ""
918
+ "It enables to simulate the validation rules without actual blocking in order "
919
+ "to check the behavior of this plugin. The results can be found on &#8220;"
920
+ "Logs&#8221; tab."
921
+ msgstr ""
922
+ "このプラグインの動作を確認するために、実際に遮断させることなく検証ルールをシミュレートします。結果は"
923
+ "ログで確認する事が出来ます。"
924
+
925
+ #: admin/includes/tab-settings.php:403
926
+ msgid "Simulation mode"
927
+ msgstr "シミュレーション・モード"
928
+
929
+ #: admin/includes/tab-settings.php:420
930
  msgid "Back-end target settings"
931
  msgstr "バックエンドの設定"
932
 
933
+ #: admin/includes/tab-settings.php:426
934
  #, php-format
935
+ msgid "<dfn title=\"It enables to validate requests to %s.\">%s</dfn>"
936
  msgstr "<dfn title=\"%s へのリクエストを検証します。\">%s</dfn>"
937
 
938
+ #: admin/includes/tab-settings.php:432
939
  msgid "Other areas"
940
  msgstr "その他の領域"
941
 
942
+ #: admin/includes/tab-settings.php:433
943
  msgid "public facing pages"
944
  msgstr "一般公開ページ"
945
 
946
+ #: admin/includes/tab-settings.php:449 admin/includes/tab-settings.php:495
947
+ #: admin/includes/tab-settings.php:527 admin/includes/tab-settings.php:533
948
+ #: admin/includes/tab-settings.php:798
949
  msgid "Block by country"
950
  msgstr "国コードで遮断"
951
 
952
+ #: admin/includes/tab-settings.php:459
953
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
954
  msgstr "全体を &lt;p&gt; タグで囲みます。使用可能タグ:"
955
 
956
+ #: admin/includes/tab-settings.php:459
957
  msgid "Message on comment form"
958
  msgstr "投稿フォーム上のメッセージ"
959
 
960
+ #: admin/includes/tab-settings.php:472
961
  msgid "None"
962
  msgstr "なし"
963
 
964
+ #: admin/includes/tab-settings.php:473
965
  msgid "Top"
966
  msgstr "上部"
967
 
968
+ #: admin/includes/tab-settings.php:474
969
  msgid "Bottom"
970
  msgstr "下部"
971
 
972
+ #: admin/includes/tab-settings.php:496
973
  msgid "Completely close"
974
  msgstr "完全に閉鎖"
975
 
976
+ #: admin/includes/tab-settings.php:502
977
  msgid "Action to login as a registered user."
978
  msgstr "登録済みユーザーとしてログインするアクション。"
979
 
980
+ #: admin/includes/tab-settings.php:502
981
  msgid "Log in"
982
  msgstr "ログイン"
983
 
984
+ #: admin/includes/tab-settings.php:503
985
  msgid "Action to register new users."
986
  msgstr "新規ユーザーを登録するアクション。"
987
 
988
+ #: admin/includes/tab-settings.php:503
989
  msgid "Register"
990
  msgstr "登録"
991
 
992
+ #: admin/includes/tab-settings.php:504
993
  msgid "Action to reset a password to create a new one."
994
  msgstr "パスワードをリセットし、新しいパスワードに更新するアクション。"
995
 
996
+ #: admin/includes/tab-settings.php:504
997
  msgid "Password Reset"
998
  msgstr "パスワードのリセット"
999
 
1000
+ #: admin/includes/tab-settings.php:505
1001
  msgid "Action to email a password to a registered user."
1002
  msgstr "登録済みユーザーにパスワードを送付するアクション。"
1003
 
1004
+ #: admin/includes/tab-settings.php:505
1005
  msgid "Lost Password"
1006
  msgstr "パスワード紛失"
1007
 
1008
+ #: admin/includes/tab-settings.php:506
1009
  msgid ""
1010
  "Action to show prompt to enter a password on password protected post and "
1011
  "page."
1012
  msgstr "パスワードで保護された投稿とページにパスワードを入力するプロンプトを表示するアクション。"
1013
 
1014
+ #: admin/includes/tab-settings.php:506
1015
  msgid "Password protected"
1016
  msgstr "パスワード保護"
1017
 
1018
+ #: admin/includes/tab-settings.php:528
1019
  msgid ""
1020
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
1021
  "actions</dfn>"
1022
  msgstr "<dfn title=\"遮断対象とするアクションを指定します。\">対象アクション</dfn>"
1023
 
1024
+ #: admin/includes/tab-settings.php:534
1025
  msgid "Prevent Zero-day Exploit"
1026
  msgstr "ゼロデイ攻撃を遮断"
1027
 
1028
+ #: admin/includes/tab-settings.php:538
1029
  msgid ""
1030
  "It will block a request related to the services for both public facing pages "
1031
  "and the dashboard."
1032
  msgstr "一般公開ページとダッシュボード向けサービスに関連するリクエストを遮断します。"
1033
 
1034
+ #: admin/includes/tab-settings.php:539
1035
  msgid ""
1036
  "Regardless of the country code, it will block a malicious request related to "
1037
  "the services only for the dashboard."
1038
  msgstr "国コードに拘らず、ダッシュボード向けサービスだけに関連する悪意のあるリクエストを遮断します。"
1039
 
1040
+ #: admin/includes/tab-settings.php:545
1041
  msgid ""
1042
  "This is applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221; when "
1043
  "&#8220;IP address cache&#8221; in &#8220;Privacy and record settings&#8221; "
1047
  "[プライバシーと記録の設定]&raquo;[IPアドレスのキャッシュを記録]が有効の時、[XML-RPC]と[ログイ"
1048
  "ン・フォーム]に適用されます。ロックアウト時間は[有効時間]で定義します。"
1049
 
1050
+ #: admin/includes/tab-settings.php:545
1051
  msgid "Max failed login attempts per IP address"
1052
  msgstr "IPアドレス当たりのログイン試行可能回数"
1053
 
1054
+ #: admin/includes/tab-settings.php:586
1055
  msgid "admin post for logged-in user"
1056
  msgstr "認証済ユーザー用 admin post"
1057
 
1058
+ #: admin/includes/tab-settings.php:587
1059
  msgid "admin post for non logged-in user"
1060
  msgstr "未認証ユーザー用 admin post"
1061
 
1062
+ #: admin/includes/tab-settings.php:609
1063
  msgid "Admin ajax/post"
1064
  msgstr "管理領域 ajax/post"
1065
 
1066
+ #: admin/includes/tab-settings.php:623
1067
  msgid ""
1068
  "Specify the action name (&#8220;action=&hellip;&#8221;) or the page name "
1069
  "(&#8220;page=&hellip;&#8221;) to prevent unintended blocking caused by "
1070
  "&#8220;Block by country&#8221; (for non logged-in user) and &#8220;Prevent "
1071
  "Zero-day Exploit&#8221; (for logged-in user)."
1072
  msgstr ""
1073
+ "「国コードで遮断」(未認証ユーザーの場合)および「ゼロデイ攻撃を遮断」(認証済みユーザーの場合)が、"
1074
+ "意図しない遮断の原因となる場合、アクション名(&#8220;action=&hellip;&#8221; の &#8220;&hellip;"
1075
+ "&#8221; 部分)、またはページ名(&#8220;page=&hellip;&#8221; の &#8220;&hellip;&#8221; 部分)を指定"
1076
+ "し、検証対象から除外します。"
1077
 
1078
+ #: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:701
1079
+ #: admin/includes/tab-settings.php:761
1080
  msgid "Exceptions"
1081
  msgstr "例外"
1082
 
1083
+ #: admin/includes/tab-settings.php:624
1084
  msgid "Toggle with non logged-in user"
1085
  msgstr "未認証ユーザー用を含む項目に限定して表示する"
1086
 
1087
+ #: admin/includes/tab-settings.php:627
1088
  msgid "Candidate actions/pages"
1089
  msgstr "候補 アクション/ページ"
1090
 
1091
+ #: admin/includes/tab-settings.php:641
1092
  #, php-format
1093
  msgid ""
1094
  "Regardless of the country code, it will block a malicious request to <code>"
1095
  "%s&ctdot;/*.php</code>."
1096
  msgstr "国コードに拘らず、<code>%s&ctdot;/*.php</code>への悪意のあるリクエストを遮断します。"
1097
 
1098
+ #: admin/includes/tab-settings.php:642
1099
  msgid ""
1100
  "Select the item which causes unintended blocking in order to exclude from "
1101
  "the validation target. Grayed item indicates &#8220;INACTIVE&#8221;."
1103
  "意図しない遮断の原因となる項目を選択し、検証対象から除外します。灰色で表示された項目は、「非アクティ"
1104
  "ブ」であることを示しています。"
1105
 
1106
+ #: admin/includes/tab-settings.php:643
1107
  #, php-format
1108
  msgid ""
1109
  "It configures &#8220;%s&#8221; to validate a direct request to the PHP file "
1110
  "which does not load WordPress core. Make sure to deny direct access to the "
1111
  "hidden files beginning with a dot by the server's configuration."
1112
  msgstr ""
1113
+ "WordPressコアを読み込まないPHPファイルへのリクエストを検証対象とするために、%s を設定します。ドットで"
1114
+ "始まる隠しファイルへのアクセス拒否がサーバー側で設定されていることを確認して下さい。"
1115
 
1116
+ #: admin/includes/tab-settings.php:644
1117
  msgid "Sorry, but your server type is not supported."
1118
  msgstr "このサーバーではサポートされません。"
1119
 
1120
+ #: admin/includes/tab-settings.php:645
1121
  msgid ""
1122
  "You need to click &#8220;Save Changes&#8221; button for imported settings to "
1123
  "take effect."
1124
  msgstr "インポートされた設定を有効にするには、[変更を保存]ボタンをクリックする必要があります。"
1125
 
1126
+ #: admin/includes/tab-settings.php:680 admin/includes/tab-settings.php:740
1127
  msgid "Force to load WP core"
1128
  msgstr "WPコアの読み込みを強制"
1129
 
1130
+ #: admin/includes/tab-settings.php:685
1131
  msgid "Plugins area"
1132
  msgstr "プラグイン領域"
1133
 
1134
+ #: admin/includes/tab-settings.php:745
1135
  msgid "Themes area"
1136
  msgstr "テーマ領域"
1137
 
1138
+ #: admin/includes/tab-settings.php:780
1139
  msgid "Front-end target settings"
1140
  msgstr "フロントエンドの設定"
1141
 
1142
+ #: admin/includes/tab-settings.php:815
1143
+ msgid "Follow &#8220;Validation rules and behavior&#8221;"
1144
+ msgstr "[検証ルールと振る舞いの設定]に従う"
1145
 
1146
+ #: admin/includes/tab-settings.php:857
1147
  #, php-format
1148
  msgid ""
1149
  "<dfn title=\"You can configure a different response code from the Back-end. "
1150
  "This is useful to prevent violation against your affiliate program."
1151
  "\">Response code</dfn> %s"
1152
  msgstr ""
1153
+ "<dfn title=\"バックエンドと異なるレスポンス・コードを設定できます。これは、アフィリエイト・プログラム"
1154
+ "に対する違反を防止するのに役立つでしょう。\">レスポンス・コード</dfn> %s"
1155
 
1156
+ #: admin/includes/tab-settings.php:921
1157
  msgid ""
1158
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
1159
  msgstr "<dfn title=\"特定のページを遮断対象に指定します。\">ページ</dfn>"
1160
 
1161
+ #: admin/includes/tab-settings.php:933
1162
  msgid ""
1163
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
1164
  "target.\">Post type</dfn>"
1165
  msgstr "<dfn title=\"特定の投稿タイプのシングルページを遮断対象に指定します。\">投稿タイプ</dfn>"
1166
 
1167
+ #: admin/includes/tab-settings.php:945
1168
  msgid ""
1169
  "<dfn title=\"Specify the individual category on a single page or archive "
1170
  "page as a blocking target.\">Category</dfn>"
1171
  msgstr ""
1172
+ "<dfn title=\"特定のカテゴリを含むシングルページかアーカイブページを遮断対象に指定します。\">カテゴリ"
1173
+ "</dfn>"
1174
 
1175
+ #: admin/includes/tab-settings.php:957
1176
  msgid ""
1177
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1178
  "a blocking target.\">Tag</dfn>"
1179
  msgstr ""
1180
  "<dfn title=\"特定のタグを含むシングルページかアーカイブページを遮断対象に指定します。\">タグ</dfn>"
1181
 
1182
+ #: admin/includes/tab-settings.php:971
1183
  msgid "Specify the validation target on front-end."
1184
  msgstr "フロントエンドの検証対象を設定します。"
1185
 
1186
+ #: admin/includes/tab-settings.php:971
1187
  msgid "Validation target"
1188
  msgstr "検証対象"
1189
 
1190
+ #: admin/includes/tab-settings.php:982
1191
  msgid "All requests"
1192
  msgstr "全てのリクエスト"
1193
 
1194
+ #: admin/includes/tab-settings.php:983
1195
  msgid "Specify the targets"
1196
  msgstr "ターゲットを指定"
1197
 
1198
+ #: admin/includes/tab-settings.php:986
1199
  msgid ""
1200
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1201
  "wp&#8221; action hook. It means that this feature would not be compatible "
1202
  "with any page caching."
1203
  msgstr ""
1204
+ "[検証のタイミング]が &#8220;wp&#8221; アクション・フックまで遅延されます。これにより、ページ・"
1205
+ "キャッシュとの互換性がなくなることに注意してください。"
1206
 
1207
+ #: admin/includes/tab-settings.php:996
1208
  msgid "Specify the name of actions as exception that is invariably blocked."
1209
  msgstr "常に遮断されるアクション名を例外として指定します。"
1210
 
1211
+ #: admin/includes/tab-settings.php:996
1212
  msgid "Excluded actions"
1213
  msgstr "除外するアクション"
1214
 
1215
+ #: admin/includes/tab-settings.php:1012
1216
  msgid ""
1217
  "<dfn title=\"Specify the frequency of request for certain period of time."
1218
  "\">Blocking condition</dfn>"
1219
  msgstr "<dfn title=\"特定期間のリクエスト頻度を設定します。\">遮断条件</dfn>"
1220
 
1221
+ #: admin/includes/tab-settings.php:1014
1222
  #, php-format
1223
  msgid "More than %1$s page view (PV) in %2$s seconds"
1224
  msgstr "%2$s 秒間で %1$s を超えるページビュー (PV)"
1225
 
1226
+ #: admin/includes/tab-settings.php:1022
1227
  msgid ""
1228
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1229
  "behaved bots and crawlers</dfn>"
1230
  msgstr "<dfn title=\"リクエスト頻度を検証します。\">行儀の悪いボットやクローラーを遮断</dfn>"
1231
 
1232
+ #: admin/includes/tab-settings.php:1039
1233
  msgid ""
1234
  "A part of user agent string and a qualification connected with a separator "
1235
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
1239
  "qualification&#8221;."
1240
  msgstr ""
1241
  "適用されるルールを表す記号(「:」は通過、「#」は遮断)で区切られたユーザーエージェント文字列の一部と"
1242
+ "「条件」のペアです。「条件」には「DNS」、「FEED」、国コード、または&nbsp;IPアドレス(CIDR記法)が使え"
1243
+ "ます。また否定を表す記号「!」を「条件」の直前に配置する事が出来ます。"
1244
 
1245
+ #: admin/includes/tab-settings.php:1039
1246
  msgid "UA string and qualification"
1247
  msgstr "ユーザーエージェント文字列と条件"
1248
 
1249
+ #: admin/includes/tab-settings.php:1056
1250
  msgid ""
1251
  "It enables to verify the host by reverse DNS lookup which would spend some "
1252
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
1256
  "DNS 逆引きによりホストを検証します(幾らかのサーバー・リソースを消費します)。無効にした場合、[ユー"
1257
  "ザーエージェント文字列と条件]中の「HOST」および「HOST=&hellip;」は常に真となります。"
1258
 
1259
+ #: admin/includes/tab-settings.php:1056
1260
  msgid "Reverse DNS lookup"
1261
  msgstr "DNS 逆引き"
1262
 
1263
+ #: admin/includes/tab-settings.php:1075
 
 
 
 
 
 
 
 
 
 
1264
  msgid "Privacy and record settings"
1265
  msgstr "プライバシーと記録の設定"
1266
 
1267
+ #: admin/includes/tab-settings.php:1098
1268
  msgid ""
1269
  "<dfn title=\"This option restricts not to send IP address to the external "
1270
  "Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
1271
  msgstr ""
1272
+ "<dfn title=\"このオプションは、IPアドレスを外部の位置情報APIへ送信することを制限します。\">外部API"
1273
+ "の送信を制限する</dfn>"
1274
 
1275
+ #: admin/includes/tab-settings.php:1113
 
 
 
 
 
 
 
 
 
 
 
 
 
1276
  msgid ""
1277
  "<dfn title=\"This option enables to record the IP address, country code and "
1278
  "failure counter of login attempts into the cache on database to minimize the "
1279
  "impact on site speed.\">Record &#8220;IP address cache&#8221;</dfn>"
1280
  msgstr ""
1281
+ "<dfn title=\"このオプションは、IPアドレス、国コード、ログイン失敗回数等のキャッシュへの記録を有効に"
1282
+ "し、サイト速度への影響を最小化します。\">IPアドレスをキャッシュに記録</dfn>"
1283
 
1284
+ #: admin/includes/tab-settings.php:1128
1285
  msgid ""
1286
  "<dfn title=\"If user authentication fails consecutively beyond &#8220;Max "
1287
  "number of failed login attempts per IP address&#8221;, subsequent login will "
1288
  "also be prohibited for this period.\">Expiration time [sec] for each entry</"
1289
  "dfn>"
1290
  msgstr ""
1291
+ "<dfn title=\"ユーザ認証が連続%d回失敗した場合も、以降のログインがこの期間だけ(ガベージコレクション周"
1292
+ "期を含む)禁止されます。\">各エントリーの有効期間 [秒]</dfn>"
1293
 
1294
+ #: admin/includes/tab-settings.php:1144
1295
  msgid ""
1296
  "<dfn title=\"This option enables to record the validation logs including IP "
1297
  "addresses.\">Record &#8220;Validation logs&#8221;</dfn>"
1298
  msgstr ""
1299
+ "<dfn title=\"このオプションは、IPアドレスを含む検証ログの記録を有効にします。\">検証のログを記録</"
1300
+ "dfn>"
1301
 
1302
+ #: admin/includes/tab-settings.php:1156
1303
  msgid "When blocked"
1304
  msgstr "遮断時に記録"
1305
 
1306
+ #: admin/includes/tab-settings.php:1157
1307
  msgid "When passed"
1308
  msgstr "通過時に記録"
1309
 
1310
+ #: admin/includes/tab-settings.php:1158
1311
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1312
  msgstr "遮断時または遮断対象国の通過時に記録"
1313
 
1314
+ #: admin/includes/tab-settings.php:1159
1315
  msgid "Unauthenticated visitor"
1316
  msgstr "未認証の訪問者を記録"
1317
 
1318
+ #: admin/includes/tab-settings.php:1160
1319
  msgid "Authenticated user"
1320
  msgstr "認証済のユーザーを記録"
1321
 
1322
+ #: admin/includes/tab-settings.php:1161
1323
  msgid "All the validation"
1324
  msgstr "すべての検証を記録"
1325
 
1326
+ #: admin/includes/tab-settings.php:1169
1327
  #, php-format
1328
  msgid ""
1329
  "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1330
  "\">Expiration time [days] for each entry</dfn>"
1331
  msgstr "<dfn title=\"ログの最大エントリー数は %d に制限されます。\">各エントリーの有効期間[日]</dfn>"
1332
 
1333
+ #: admin/includes/tab-settings.php:1186
1334
  msgid ""
1335
  "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
1336
  "with value</dfn>"
1337
  msgstr "<dfn title=\"例)action, comment, log, pwd, FILES\">内容を展開する$_POSTのキー</dfn>"
1338
 
1339
+ #: admin/includes/tab-settings.php:1205
1340
  msgid "Maximum entries in &#8220;Logs&#8221;"
1341
  msgstr "記録するログの最大エントリ数"
1342
 
1343
+ #: admin/includes/tab-settings.php:1222
1344
  msgid ""
1345
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1346
  "&#8220;Live update&#8221;</dfn>"
1347
  msgstr ""
1348
+ "<dfn title=\"SQLiteデータベース・ソースを選択します。\">ライブアップデート用SQLiteデータベース・ソー"
1349
+ "スの選択</dfn>"
1350
 
1351
+ #: admin/includes/tab-settings.php:1235
1352
  msgid "Ordinary file"
1353
+ msgstr "ファイル"
1354
 
1355
+ #: admin/includes/tab-settings.php:1236
1356
  msgid "In-Memory"
1357
  msgstr "イン・メモリ"
1358
 
1359
+ #: admin/includes/tab-settings.php:1239
1360
  msgid "PDO_SQLITE driver not available"
1361
  msgstr "PDO_SQLITEドライバが利用出来ません"
1362
 
1363
+ #: admin/includes/tab-settings.php:1240
1364
  msgid ""
1365
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1366
  "without conflict with other plugins."
1367
  msgstr "数十ミリ秒のオーバーヘッドが生じますが、他のプラグインと競合することなく、安全に使用できます。"
1368
 
1369
+ #: admin/includes/tab-settings.php:1241
1370
  msgid ""
1371
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1372
  "with other plugins using this method."
1373
+ msgstr ""
1374
+ "数ミリ秒のオーバーヘッドが生じます。同手法を用いている他のプラグインと競合する可能性があります。"
1375
 
1376
+ #: admin/includes/tab-settings.php:1249
1377
  msgid "Reset database source of &#8220;Live update&#8221;"
1378
  msgstr "ライブアップデートのデータソースをリセットする"
1379
 
1380
+ #: admin/includes/tab-settings.php:1257
1381
  msgid "Reset now"
1382
  msgstr "今すぐリセット"
1383
 
1384
+ #: admin/includes/tab-settings.php:1266 admin/includes/tab-settings.php:1427
1385
  msgid ""
1386
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1387
  "once and activate again."
1388
  msgstr ""
1389
  "WP-Cronのタスクが見つかりません。 一旦このプラグインを停止させた後、再度、有効化してみてください。"
1390
 
1391
+ #: admin/includes/tab-settings.php:1271
1392
  msgid ""
1393
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1394
+ "expired entries from &#8220;IP address cache&#8221; and &#8220;Validation "
1395
+ "logs&#8221;.\">Interval [sec] to cleanup expired entries of IP address</dfn>"
1396
  msgstr ""
1397
+ "<dfn title=\"キャッシュとログから有効期限の切れたIPアドレスのエントリーを削除する WP-Cron イベントの"
1398
+ "起動周期を設定します。\">ガベージコレクション周期[秒]</dfn>"
1399
 
1400
+ #: admin/includes/tab-settings.php:1280 admin/includes/tab-settings.php:1443
1401
  #, php-format
1402
  msgid "Next schedule: %s"
1403
  msgstr "次回日時:%s"
1404
 
1405
+ #: admin/includes/tab-settings.php:1287
1406
+ msgid ""
1407
+ "<dfn title=\"This option enables to record the number blocked countries and "
1408
+ "the number of blocked requests per day.\">Record &#8220;Statistics of "
1409
+ "validation&#8221;</dfn>"
1410
+ msgstr ""
1411
+ "<dfn title=\"このオプションは、国別遮断数や1日あたりの遮断数など、統計の記録を有効にします。\">検証の"
1412
+ "統計を記録</dfn>"
1413
+
1414
+ #: admin/includes/tab-settings.php:1302
1415
+ msgid "Maximum period for &#8220;Statistics&#8221; [days]"
1416
+ msgstr "記録する統計の最大期間[日]"
1417
+
1418
+ #: admin/includes/tab-settings.php:1320
1419
  msgid "Remove all settings and records at uninstallation"
1420
  msgstr "アンインストール時に設定と記録を全て削除"
1421
 
1422
+ #: admin/includes/tab-settings.php:1337
1423
  msgid "Geolocation API settings"
1424
  msgstr "位置情報APIの設定"
1425
 
1428
  "<dfn title=\"IP address cache and local databases are scanned at the top "
1429
  "priority.\">API selection and key settings</dfn>"
1430
  msgstr ""
1431
+ "<dfn title=\"IPアドレスのキャッシュとローカルのデータベースが最優先で検索されます。\">APIの選択とキー"
1432
+ "の設定</dfn>"
1433
 
1434
  #: admin/includes/tab-settings.php:1377
1435
  msgid "Timeout for network API [sec]"
1443
  msgid "database"
1444
  msgstr "ファイル"
1445
 
1446
+ #: admin/includes/tab-settings.php:1410 classes/class-ip-geo-block-cron.php:424
1447
  #, php-format
1448
  msgid "Last update: %s"
1449
  msgstr "最終更新:%s"
1477
  "browser as this plugin does not keep the key itself.\">Emergency login link</"
1478
  "dfn>"
1479
  msgstr ""
1480
+ "<dfn title=\"緊急時にもログイン可能なリンクを生成します。キー自体は保存されないので、生成したリンクを"
1481
+ "ブラウザのお気に入り/ブックマークに追加してください。\">緊急時用ログイン・リンク</dfn>"
1482
 
1483
  #: admin/includes/tab-settings.php:1515
1484
  msgid ""
1485
+ "<dfn title=\"Valid key for Google Maps JavaScript API. Maps Embed API in "
1486
+ "iframe can be available without key in case it's empty.\">Google Maps API "
1487
+ "key</dfn>"
1488
  msgstr ""
1489
+ "<dfn title=\"Google Maps JavaScript API の有効なキー。空欄にするとキーなしの Maps Embed API が使用可"
1490
+ "能です。\">Google Maps API キー</dfn>"
1491
 
1492
  #: admin/includes/tab-settings.php:1531
1493
  msgid "Export / Import settings"
1530
  msgstr "バックエンドの推奨設定"
1531
 
1532
  #: admin/includes/tab-settings.php:1564
1533
+ msgid "Diagnose all DB tables"
1534
+ msgstr "全データベース・テーブルの検査"
1535
 
1536
  #: admin/includes/tab-settings.php:1572
1537
+ msgid "Diagnose now"
1538
+ msgstr "今すぐ検査"
1539
 
1540
  #: admin/includes/tab-settings.php:1581
1541
  msgid ""
1546
  "support/plugin/ip-geo-block\" title=\"[IP Geo Block] Support | WordPress.org"
1547
  "\">support forum</a> ]"
1548
  msgstr ""
1549
+ "<dfn title=\"予期しない遮断が発生した場合は、ダンプされた診断情報を元にリクエストの遮断理由を推定し、"
1550
+ "問題解決に役立ててください。\">診断情報</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress."
1551
+ "org/support/plugin/ip-geo-block\" title=\"[IP Geo Block] Support | WordPress.org\">サポート・フォーラ"
1552
+ "ム</a> ]"
1553
 
1554
  #: admin/includes/tab-settings.php:1588
1555
  msgid "Please copy &amp; paste when submitting your issue to support forum"
1564
  "While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
1565
  "others will pass an IP address to the 3rd parties' API via HTTP."
1566
  msgstr ""
1567
+ "MaxmindとIP2Locationはローカルのデータベースを検索しますが、他はHTTPを介して外部のAPIにIPアドレスを渡"
1568
+ "します。"
1569
 
1570
  #: admin/includes/tab-settings.php:1606
1571
  msgid ""
1572
  "Please select the appropriate APIs to fit the privacy law / regulation in "
1573
  "your country / region."
1574
+ msgstr ""
1575
+ "あなたの国/地域におけるプライバシー保護の法規・条例に適合するよう、適切なAPIを選択して下さい。"
1576
 
1577
  #: admin/includes/tab-settings.php:1615
1578
  #, php-format
1580
  "Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
1581
  "2.0.0+%s."
1582
  msgstr ""
1583
+ "Maxmind GeoLite2 データベースと API には、PHP バージョン 5.4.0 以上と %sPECL phar 2.0.0 以上%sが必要"
1584
+ "です。"
1585
 
1586
+ #: admin/includes/tab-settings.php:1623
1587
+ #, php-format
1588
+ msgid ""
1589
+ "Please refer to \"%sLiving with cache plugin%s\" for compatibility with "
1590
+ "cache plugins."
1591
+ msgstr ""
1592
+ "キャッシュ・プラグインとの互換性については、%sこのドキュメント%s を参照して下さい。"
1593
+
1594
+ #: admin/includes/tab-statistics.php:18
1595
  msgid "Statistics of validation"
1596
  msgstr "検証の統計"
1597
 
1667
  msgid "Slug in back-end"
1668
  msgstr "バックエンドのスラッグ"
1669
 
1670
+ #: admin/includes/tab-statistics.php:348
1671
  msgid "Toggle sorting order"
1672
  msgstr "ソート順を切り替え"
1673
 
1674
+ #: admin/includes/tab-statistics.php:404
1675
  #, php-format
1676
  msgid "[ %sRecord &#8220;Statistics of validation&#8221;%s ] is disabled."
1677
  msgstr "[%s検証の統計を記録%s]が無効です。"
1678
 
1679
+ #: admin/includes/tab-statistics.php:405
1680
  msgid ""
1681
  "Please set the proper condition to record and analyze the validation "
1682
  "statistics."
1683
  msgstr "検証の統計を記録し分析するためには、適切な条件を設定して下さい。"
1684
 
1685
+ #: admin/includes/tab-statistics.php:416
1686
  #, php-format
1687
  msgid "[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled."
1688
  msgstr "[%sIPアドレスをキャッシュに記録%s]が無効です。"
1689
 
1690
+ #: admin/includes/tab-statistics.php:417
1691
  msgid "Please set the proper condition to record IP address in cache."
1692
  msgstr "キャッシュを利用しサイトの応答性を上げるためには、適切な条件を設定して下さい。"
1693
 
1694
+ #: classes/class-ip-geo-block-cron.php:223
1695
  #, php-format
1696
  msgid "Can't lock <code>%s</code>. Please try again after a while."
1697
  msgstr "<code>%s</code> をロック出来ません。パーミッションをチェックして下さい。"
1698
 
1699
+ #: classes/class-ip-geo-block-cron.php:302
1700
  msgid "Your database file is up-to-date."
1701
  msgstr "データベース・ファイルは最新です。"
1702
 
1703
+ #: classes/class-ip-geo-block-cron.php:405
1704
  msgid "gz or zip is not supported on your system."
1705
  msgstr "gz または zip がサポートされていません。"
1706
 
1712
  "Editing_wp-config.php#WordPress_Upgrade_Constants\" title=\"Editing wp-"
1713
  "config.php &laquo; WordPress Codex\">this document</a> for more details."
1714
  msgstr ""
1715
+ "本プラグインは、メソッド「%s」による FTP あるいは SSH を使ったファイル操作をサポートしていません。詳"
1716
+ "しくは、<a href=\"https://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants\" "
1717
+ "title=\"Editing wp-config.php &laquo; WordPress Codex\">このドキュメント</a>を参照してください。"
1718
 
1719
  #: classes/class-ip-geo-block-file.php:68
1720
  msgid ""
1724
  "\"Editing wp-config.php &laquo; WordPress Codex\">this document</a> for more "
1725
  "details."
1726
  msgstr ""
1727
+ "本プラグイン FTP あるいは SSH を使ったファイル操作を有効にするためには、<code>wp-config.php</code> "
1728
+ "幾つかの定義が必要です。詳しくは、<a href=\"https://codex.wordpress.org/Editing_wp-config."
1729
+ "php#WordPress_Upgrade_Constants\" title=\"Editing wp-config.php &laquo; WordPress Codex\">このドキュ"
1730
+ "メント</a>を参照してください。"
1731
 
1732
  #: classes/class-ip-geo-block-logs.php:236
1733
  #, php-format
1736
  "activate again."
1737
  msgstr "%s 用のテーブルが作成されていません。一旦このプラグインを無効化し、再度有効化して下さい。"
1738
 
1739
+ #: classes/class-ip-geo-block-logs.php:243
1740
  #, php-format
1741
  msgid ""
1742
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1743
  "again."
1744
  msgstr "%s 用のカラム型が一致しません。一旦このプラグインを無効化し、再度有効化して下さい。"
1745
 
 
 
 
 
1746
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:151
1747
  #: wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php:144
1748
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
1755
  "Can't find IP Geo Block in your plugins directory. Please remove <code>%s</"
1756
  "code> or re-install %s."
1757
  msgstr ""
1758
+ "プラグイン・ディレクトリにIP Geo Blockが見つかりません。<code>%s</code>を削除するか、%sを再インストー"
1759
+ "ルしてください。"
languages/ip-geo-block.mo CHANGED
Binary file
languages/ip-geo-block.po CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: IP Geo Block 3.0.15\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2018-10-02 22:28+0900\n"
8
- "PO-Revision-Date: 2018-10-02 22:31+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -26,167 +26,167 @@ msgid ""
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
 
29
- #: admin/class-ip-geo-block-admin.php:291
30
  msgid "Are you sure ?"
31
  msgstr ""
32
 
33
- #: admin/class-ip-geo-block-admin.php:292
34
- #: admin/class-ip-geo-block-admin.php:793
35
  msgid "Open a new window"
36
  msgstr ""
37
 
38
- #: admin/class-ip-geo-block-admin.php:293 admin/includes/tab-settings.php:1506
39
  msgid "Generate new link"
40
  msgstr ""
41
 
42
- #: admin/class-ip-geo-block-admin.php:294 admin/includes/tab-settings.php:1507
43
  msgid "Delete current link"
44
  msgstr ""
45
 
46
- #: admin/class-ip-geo-block-admin.php:295
47
  msgid ""
48
  "Please add the following link to favorites / bookmarks in your browser : "
49
  msgstr ""
50
 
51
- #: admin/class-ip-geo-block-admin.php:296
52
  msgid "ajax for logged-in user"
53
  msgstr ""
54
 
55
- #: admin/class-ip-geo-block-admin.php:297
56
  msgid "ajax for non logged-in user"
57
  msgstr ""
58
 
59
- #: admin/class-ip-geo-block-admin.php:298
60
  #, php-format
61
  msgid "[Found: %d]"
62
  msgstr ""
63
 
64
- #: admin/class-ip-geo-block-admin.php:299
65
  #, php-format
66
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
67
  msgstr ""
68
 
69
- #: admin/class-ip-geo-block-admin.php:300
70
  msgid "This feature is available with HTML5 compliant browsers."
71
  msgstr ""
72
 
73
- #: admin/class-ip-geo-block-admin.php:301
74
  msgid "The selected row cannot be found in the table."
75
  msgstr ""
76
 
77
- #: admin/class-ip-geo-block-admin.php:302
78
- #: admin/class-ip-geo-block-admin.php:1571
79
  #, php-format
80
  msgid "An error occurred while executing the ajax command `%s`."
81
  msgstr ""
82
 
83
- #: admin/class-ip-geo-block-admin.php:306
84
  msgid "No data available in table"
85
  msgstr ""
86
 
87
- #: admin/class-ip-geo-block-admin.php:307
88
  msgid "No matching records found"
89
  msgstr ""
90
 
91
- #: admin/class-ip-geo-block-admin.php:308
92
  #: admin/includes/class-admin-ajax.php:107
93
  #: admin/includes/class-admin-ajax.php:240
94
  #: admin/includes/tab-geolocation.php:74
95
  msgid "IP address"
96
  msgstr ""
97
 
98
- #: admin/class-ip-geo-block-admin.php:309
99
  #: admin/includes/class-admin-ajax.php:108
100
  #: admin/includes/class-admin-ajax.php:241
101
  msgid "Code"
102
  msgstr ""
103
 
104
- #: admin/class-ip-geo-block-admin.php:310
105
  #: admin/includes/class-admin-ajax.php:109
106
  #: admin/includes/class-admin-ajax.php:242
107
  msgid "ASN"
108
  msgstr ""
109
 
110
- #: admin/class-ip-geo-block-admin.php:311
111
  #: admin/includes/class-admin-ajax.php:243
112
  msgid "Host name"
113
  msgstr ""
114
 
115
- #: admin/class-ip-geo-block-admin.php:312
116
  #: admin/includes/class-admin-ajax.php:110
117
  #: admin/includes/class-admin-ajax.php:244
118
  msgid "Target"
119
  msgstr ""
120
 
121
- #: admin/class-ip-geo-block-admin.php:313
122
  #: admin/includes/class-admin-ajax.php:245
123
  msgid "Failure / Total"
124
  msgstr ""
125
 
126
- #: admin/class-ip-geo-block-admin.php:314
127
  #: admin/includes/class-admin-ajax.php:246
128
  msgid "Elapsed[sec]"
129
  msgstr ""
130
 
131
- #: admin/class-ip-geo-block-admin.php:315
132
  #: admin/includes/class-admin-ajax.php:106
133
  msgid "Time"
134
  msgstr ""
135
 
136
- #: admin/class-ip-geo-block-admin.php:316
137
  #: admin/includes/class-admin-ajax.php:111
138
  msgid "Result"
139
  msgstr ""
140
 
141
- #: admin/class-ip-geo-block-admin.php:317
142
  #: admin/includes/class-admin-ajax.php:112
143
  msgid "Request"
144
  msgstr ""
145
 
146
- #: admin/class-ip-geo-block-admin.php:318
147
  #: admin/includes/class-admin-ajax.php:113
148
  msgid "User agent"
149
  msgstr ""
150
 
151
- #: admin/class-ip-geo-block-admin.php:319
152
  #: admin/includes/class-admin-ajax.php:114
153
  msgid "HTTP headers"
154
  msgstr ""
155
 
156
- #: admin/class-ip-geo-block-admin.php:320
157
  #: admin/includes/class-admin-ajax.php:115
158
  msgid "$_POST data"
159
  msgstr ""
160
 
161
- #: admin/class-ip-geo-block-admin.php:346
162
  msgid "Contribute on GitHub"
163
  msgstr ""
164
 
165
- #: admin/class-ip-geo-block-admin.php:360
166
- #: admin/class-ip-geo-block-admin.php:478
167
- #: admin/class-ip-geo-block-admin.php:736
168
  msgid "Settings"
169
  msgstr ""
170
 
171
- #: admin/class-ip-geo-block-admin.php:455
172
- #: admin/class-ip-geo-block-admin.php:456
173
- #: admin/class-ip-geo-block-admin.php:466
174
- #: admin/class-ip-geo-block-admin.php:467
175
- #: admin/class-ip-geo-block-admin.php:477
176
- #: admin/class-ip-geo-block-admin.php:487
177
  msgid "IP Geo Block"
178
  msgstr ""
179
 
180
- #: admin/class-ip-geo-block-admin.php:488
181
- #: admin/class-ip-geo-block-admin.php:741
182
- msgid "Site List"
183
  msgstr ""
184
 
185
- #: admin/class-ip-geo-block-admin.php:517
186
  msgid "You need WordPress 3.7+."
187
  msgstr ""
188
 
189
- #: admin/class-ip-geo-block-admin.php:521
190
  #, php-format
191
  msgid ""
192
  "Can not load Geolocation API libraries from <code>%s</code>. It seems to "
@@ -201,7 +201,7 @@ msgid ""
201
  "troubles? | IP Geo Block\">this instruction</a>."
202
  msgstr ""
203
 
204
- #: admin/class-ip-geo-block-admin.php:530
205
  #, php-format
206
  msgid ""
207
  "You should select at least one API at <a href=\"%s\">Geolocation API "
@@ -209,7 +209,7 @@ msgid ""
209
  "expires."
210
  msgstr ""
211
 
212
- #: admin/class-ip-geo-block-admin.php:539
213
  #, php-format
214
  msgid ""
215
  "You should select at least one API for local database at <a href=\"%s"
@@ -217,32 +217,32 @@ msgid ""
217
  "slow down the site."
218
  msgstr ""
219
 
220
- #: admin/class-ip-geo-block-admin.php:550
221
  #, php-format
222
  msgid ""
223
  "Now downloading geolocation databases in background. After a little while, "
224
  "please check your country code and &#8220;<strong>Matching rule</"
225
- "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
226
  msgstr ""
227
 
228
- #: admin/class-ip-geo-block-admin.php:556
229
  #, php-format
230
  msgid ""
231
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
232
- "confirm it at <a href=\"%s\">Validation rule settings</a>."
233
  msgstr ""
234
 
235
- #: admin/class-ip-geo-block-admin.php:565
236
  msgid "Local database and matching rule have been updated."
237
  msgstr ""
238
 
239
- #: admin/class-ip-geo-block-admin.php:576
240
  msgid ""
241
  "Once you logout, you will be unable to login again because the number of "
242
  "login attempts reaches the limit."
243
  msgstr ""
244
 
245
- #: admin/class-ip-geo-block-admin.php:578
246
  #, php-format
247
  msgid ""
248
  "Please remove your IP address in &#8220;%1$sStatistics in IP address cache"
@@ -250,32 +250,32 @@ msgid ""
250
  "yourself out."
251
  msgstr ""
252
 
253
- #: admin/class-ip-geo-block-admin.php:589
254
  msgid ""
255
  "Once you logout, you will be unable to login again because your country code "
256
  "or IP address is in the blacklist."
257
  msgstr ""
258
 
259
- #: admin/class-ip-geo-block-admin.php:590
260
  msgid ""
261
  "Once you logout, you will be unable to login again because your country code "
262
  "or IP address is not in the whitelist."
263
  msgstr ""
264
 
265
- #: admin/class-ip-geo-block-admin.php:594
266
  #, php-format
267
- msgid "Please check your &#8220;%sValidation rule settings%s&#8221;."
268
  msgstr ""
269
 
270
- #: admin/class-ip-geo-block-admin.php:598
271
  #, php-format
272
  msgid ""
273
- "Please confirm your local geolocation databases at &#8220;%sLocal database "
274
- "settings%s&#8221; section and remove your IP address in cache at &#8220;"
275
- "%sStatistics in cache%s&#8221; section."
276
  msgstr ""
277
 
278
- #: admin/class-ip-geo-block-admin.php:620
279
  #, php-format
280
  msgid ""
281
  "Emergency login link is outdated. Please delete it once and generate again "
@@ -283,90 +283,90 @@ msgid ""
283
  "favorites / bookmarks in your browser."
284
  msgstr ""
285
 
286
- #: admin/class-ip-geo-block-admin.php:629
287
  msgid ""
288
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
289
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
290
  "select &#8220;init&#8221; action hook."
291
  msgstr ""
292
 
293
- #: admin/class-ip-geo-block-admin.php:737
294
  msgid "Statistics"
295
  msgstr ""
296
 
297
- #: admin/class-ip-geo-block-admin.php:738
298
  msgid "Logs"
299
  msgstr ""
300
 
301
- #: admin/class-ip-geo-block-admin.php:739
302
  msgid "Search"
303
  msgstr ""
304
 
305
- #: admin/class-ip-geo-block-admin.php:740
306
  msgid "Attribution"
307
  msgstr ""
308
 
309
- #: admin/class-ip-geo-block-admin.php:757
310
- #: admin/class-ip-geo-block-admin.php:773
311
- msgid "Network wide"
312
  msgstr ""
313
 
314
- #: admin/class-ip-geo-block-admin.php:786
315
  msgid "Toggle all"
316
  msgstr ""
317
 
318
- #: admin/class-ip-geo-block-admin.php:789
319
  msgid ""
320
  "Independent of &#8220;Privacy and record settings&#8221;, you can see all "
321
  "the requests validated by this plugin in almost real time."
322
  msgstr ""
323
 
324
- #: admin/class-ip-geo-block-admin.php:789 admin/includes/tab-accesslog.php:39
325
  msgid "Live update"
326
  msgstr ""
327
 
328
- #: admin/class-ip-geo-block-admin.php:793
329
  msgid "Open a new window on clicking the link in the chart."
330
  msgstr ""
331
 
332
- #: admin/class-ip-geo-block-admin.php:817
333
  msgid "Thanks for providing these great services for free."
334
  msgstr ""
335
 
336
- #: admin/class-ip-geo-block-admin.php:818
337
  msgid ""
338
  "(Most browsers will redirect you to each site <a href=\"https://www."
339
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
340
  "when you click the link</a>.)"
341
  msgstr ""
342
 
343
- #: admin/class-ip-geo-block-admin.php:823
344
  msgid "Back to top"
345
  msgstr ""
346
 
347
- #: admin/class-ip-geo-block-admin.php:915
348
  msgid "Enable"
349
  msgstr ""
350
 
351
- #: admin/class-ip-geo-block-admin.php:930
352
  msgid "Select one"
353
  msgstr ""
354
 
355
- #: admin/class-ip-geo-block-admin.php:1349
356
  msgid "You do not have sufficient permissions to access this page."
357
  msgstr ""
358
 
359
- #: admin/class-ip-geo-block-admin.php:1376
360
  #: admin/includes/class-admin-rewrite.php:194
361
- #: classes/class-ip-geo-block-cron.php:216
362
- #: classes/class-ip-geo-block-cron.php:320
363
- #: classes/class-ip-geo-block-cron.php:394
364
- #: classes/class-ip-geo-block-opts.php:471
365
  #, php-format
366
  msgid "Unable to write <code>%s</code>. Please check the permission."
367
  msgstr ""
368
 
369
- #: admin/class-ip-geo-block-admin.php:1406
370
  msgid "Settings saved."
371
  msgstr ""
372
 
@@ -388,8 +388,8 @@ msgid ""
388
  msgstr ""
389
 
390
  #: admin/includes/class-admin-rewrite.php:168
391
- #: classes/class-ip-geo-block-cron.php:211
392
- #: classes/class-ip-geo-block-cron.php:389
393
  #, php-format
394
  msgid "Unable to read <code>%s</code>. Please check the permission."
395
  msgstr ""
@@ -413,23 +413,23 @@ msgstr ""
413
  msgid "Help"
414
  msgstr ""
415
 
416
- #: admin/includes/tab-accesslog.php:55 admin/includes/tab-settings.php:413
417
  msgid "Comment post"
418
  msgstr ""
419
 
420
- #: admin/includes/tab-accesslog.php:56 admin/includes/tab-settings.php:414
421
  msgid "XML-RPC"
422
  msgstr ""
423
 
424
- #: admin/includes/tab-accesslog.php:57 admin/includes/tab-settings.php:415
425
  msgid "Login form"
426
  msgstr ""
427
 
428
- #: admin/includes/tab-accesslog.php:58 admin/includes/tab-settings.php:416
429
  msgid "Admin area"
430
  msgstr ""
431
 
432
- #: admin/includes/tab-accesslog.php:59 admin/includes/tab-settings.php:418
433
  msgid "Public facing pages"
434
  msgstr ""
435
 
@@ -504,14 +504,14 @@ msgstr ""
504
  msgid "Export csv"
505
  msgstr ""
506
 
507
- #: admin/includes/tab-accesslog.php:193 admin/includes/tab-network.php:112
508
- #: admin/includes/tab-statistics.php:413
509
  #, php-format
510
  msgid "[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled."
511
  msgstr ""
512
 
513
- #: admin/includes/tab-accesslog.php:194 admin/includes/tab-network.php:113
514
- #: admin/includes/tab-statistics.php:414
515
  msgid ""
516
  "Please set the proper condition to record and analyze the validation logs."
517
  msgstr ""
@@ -528,7 +528,7 @@ msgstr ""
528
  msgid "Geolocation API"
529
  msgstr ""
530
 
531
- #: admin/includes/tab-geolocation.php:89 admin/includes/tab-settings.php:1084
532
  msgid ""
533
  "<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
534
  "Moreover, this option replaces the end of IP address with &#8220;***&#8221; "
@@ -604,7 +604,7 @@ msgid "Open CIDR calculator for IPv4 / IPv6."
604
  msgstr ""
605
 
606
  #: admin/includes/tab-settings.php:54
607
- msgid "Validation rule settings"
608
  msgstr ""
609
 
610
  #: admin/includes/tab-settings.php:76
@@ -662,7 +662,7 @@ msgid ""
662
  "country code</dfn>"
663
  msgstr ""
664
 
665
- #: admin/includes/tab-settings.php:125 admin/includes/tab-settings.php:790
666
  msgid "Matching rule"
667
  msgstr ""
668
 
@@ -692,26 +692,26 @@ msgstr ""
692
 
693
  #: admin/includes/tab-settings.php:198
694
  msgid ""
 
 
 
 
 
 
 
 
 
695
  "<dfn title=\"e.g. &#8220;192.0.64.0/18&#8221; for Jetpack server, "
696
  "&#8220;69.46.36.0/27&#8221; for WordFence server or &#8220;AS32934&#8221; "
697
  "for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
698
  msgstr ""
699
 
700
- #: admin/includes/tab-settings.php:219
701
  msgid ""
702
  "<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
703
  "\">Blacklist of extra IP addresses prior to country code</dfn>"
704
  msgstr ""
705
 
706
- #: admin/includes/tab-settings.php:240
707
- msgid ""
708
- "<dfn title=\"If your server is placed behind the proxy server or the load "
709
- "balancing server, you need to put the appropriate key such as &#8220;"
710
- "HTTP_X_FORWARDED_FOR&#8221;, &#8220;HTTP_X_REAL_IP&#8221; or something like "
711
- "that to retrieve the client IP address.\">$_SERVER keys to retrieve extra IP "
712
- "addresses</dfn>"
713
- msgstr ""
714
-
715
  #: admin/includes/tab-settings.php:258
716
  msgid ""
717
  "<dfn title=\"It validates malicious signatures independently of &#8220;Block "
@@ -758,8 +758,8 @@ msgid ""
758
  "this validation.\">Prevent malicious file uploading</dfn>"
759
  msgstr ""
760
 
761
- #: admin/includes/tab-settings.php:304 admin/includes/tab-settings.php:479
762
- #: admin/includes/tab-settings.php:624 admin/includes/tab-settings.php:1189
763
  msgid "Disable"
764
  msgstr ""
765
 
@@ -778,7 +778,7 @@ msgid ""
778
  "directory.\">Response code</dfn> %s"
779
  msgstr ""
780
 
781
- #: admin/includes/tab-settings.php:344 admin/includes/tab-settings.php:873
782
  msgid ""
783
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
784
  "to a public facing page, visitors would not be blocked on the page to "
@@ -787,7 +787,7 @@ msgid ""
787
  "\">Redirect URL</dfn>"
788
  msgstr ""
789
 
790
- #: admin/includes/tab-settings.php:361 admin/includes/tab-settings.php:891
791
  msgid ""
792
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
793
  "message</dfn>"
@@ -823,118 +823,129 @@ msgid ""
823
  "restrictions</a>."
824
  msgstr ""
825
 
826
- #: admin/includes/tab-settings.php:405
 
 
 
 
 
 
 
 
 
 
 
827
  msgid "Back-end target settings"
828
  msgstr ""
829
 
830
- #: admin/includes/tab-settings.php:411
831
  #, php-format
832
- msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
833
  msgstr ""
834
 
835
- #: admin/includes/tab-settings.php:417
836
  msgid "Other areas"
837
  msgstr ""
838
 
839
- #: admin/includes/tab-settings.php:418
840
  msgid "public facing pages"
841
  msgstr ""
842
 
843
- #: admin/includes/tab-settings.php:434 admin/includes/tab-settings.php:480
844
- #: admin/includes/tab-settings.php:512 admin/includes/tab-settings.php:518
845
- #: admin/includes/tab-settings.php:783
846
  msgid "Block by country"
847
  msgstr ""
848
 
849
- #: admin/includes/tab-settings.php:444
850
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
851
  msgstr ""
852
 
853
- #: admin/includes/tab-settings.php:444
854
  msgid "Message on comment form"
855
  msgstr ""
856
 
857
- #: admin/includes/tab-settings.php:457
858
  msgid "None"
859
  msgstr ""
860
 
861
- #: admin/includes/tab-settings.php:458
862
  msgid "Top"
863
  msgstr ""
864
 
865
- #: admin/includes/tab-settings.php:459
866
  msgid "Bottom"
867
  msgstr ""
868
 
869
- #: admin/includes/tab-settings.php:481
870
  msgid "Completely close"
871
  msgstr ""
872
 
873
- #: admin/includes/tab-settings.php:487
874
  msgid "Action to login as a registered user."
875
  msgstr ""
876
 
877
- #: admin/includes/tab-settings.php:487
878
  msgid "Log in"
879
  msgstr ""
880
 
881
- #: admin/includes/tab-settings.php:488
882
  msgid "Action to register new users."
883
  msgstr ""
884
 
885
- #: admin/includes/tab-settings.php:488
886
  msgid "Register"
887
  msgstr ""
888
 
889
- #: admin/includes/tab-settings.php:489
890
  msgid "Action to reset a password to create a new one."
891
  msgstr ""
892
 
893
- #: admin/includes/tab-settings.php:489
894
  msgid "Password Reset"
895
  msgstr ""
896
 
897
- #: admin/includes/tab-settings.php:490
898
  msgid "Action to email a password to a registered user."
899
  msgstr ""
900
 
901
- #: admin/includes/tab-settings.php:490
902
  msgid "Lost Password"
903
  msgstr ""
904
 
905
- #: admin/includes/tab-settings.php:491
906
  msgid ""
907
  "Action to show prompt to enter a password on password protected post and "
908
  "page."
909
  msgstr ""
910
 
911
- #: admin/includes/tab-settings.php:491
912
  msgid "Password protected"
913
  msgstr ""
914
 
915
- #: admin/includes/tab-settings.php:513
916
  msgid ""
917
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
918
  "actions</dfn>"
919
  msgstr ""
920
 
921
- #: admin/includes/tab-settings.php:519
922
  msgid "Prevent Zero-day Exploit"
923
  msgstr ""
924
 
925
- #: admin/includes/tab-settings.php:523
926
  msgid ""
927
  "It will block a request related to the services for both public facing pages "
928
  "and the dashboard."
929
  msgstr ""
930
 
931
- #: admin/includes/tab-settings.php:524
932
  msgid ""
933
  "Regardless of the country code, it will block a malicious request related to "
934
  "the services only for the dashboard."
935
  msgstr ""
936
 
937
- #: admin/includes/tab-settings.php:530
938
  msgid ""
939
  "This is applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221; when "
940
  "&#8220;IP address cache&#8221; in &#8220;Privacy and record settings&#8221; "
@@ -942,23 +953,23 @@ msgid ""
942
  "cache."
943
  msgstr ""
944
 
945
- #: admin/includes/tab-settings.php:530
946
  msgid "Max failed login attempts per IP address"
947
  msgstr ""
948
 
949
- #: admin/includes/tab-settings.php:571
950
  msgid "admin post for logged-in user"
951
  msgstr ""
952
 
953
- #: admin/includes/tab-settings.php:572
954
  msgid "admin post for non logged-in user"
955
  msgstr ""
956
 
957
- #: admin/includes/tab-settings.php:594
958
  msgid "Admin ajax/post"
959
  msgstr ""
960
 
961
- #: admin/includes/tab-settings.php:608
962
  msgid ""
963
  "Specify the action name (&#8220;action=&hellip;&#8221;) or the page name "
964
  "(&#8220;page=&hellip;&#8221;) to prevent unintended blocking caused by "
@@ -966,33 +977,33 @@ msgid ""
966
  "Zero-day Exploit&#8221; (for logged-in user)."
967
  msgstr ""
968
 
969
- #: admin/includes/tab-settings.php:608 admin/includes/tab-settings.php:686
970
- #: admin/includes/tab-settings.php:746
971
  msgid "Exceptions"
972
  msgstr ""
973
 
974
- #: admin/includes/tab-settings.php:609
975
  msgid "Toggle with non logged-in user"
976
  msgstr ""
977
 
978
- #: admin/includes/tab-settings.php:612
979
  msgid "Candidate actions/pages"
980
  msgstr ""
981
 
982
- #: admin/includes/tab-settings.php:626
983
  #, php-format
984
  msgid ""
985
  "Regardless of the country code, it will block a malicious request to <code>"
986
  "%s&ctdot;/*.php</code>."
987
  msgstr ""
988
 
989
- #: admin/includes/tab-settings.php:627
990
  msgid ""
991
  "Select the item which causes unintended blocking in order to exclude from "
992
  "the validation target. Grayed item indicates &#8220;INACTIVE&#8221;."
993
  msgstr ""
994
 
995
- #: admin/includes/tab-settings.php:628
996
  #, php-format
997
  msgid ""
998
  "It configures &#8220;%s&#8221; to validate a direct request to the PHP file "
@@ -1000,37 +1011,37 @@ msgid ""
1000
  "hidden files beginning with a dot by the server's configuration."
1001
  msgstr ""
1002
 
1003
- #: admin/includes/tab-settings.php:629
1004
  msgid "Sorry, but your server type is not supported."
1005
  msgstr ""
1006
 
1007
- #: admin/includes/tab-settings.php:630
1008
  msgid ""
1009
  "You need to click &#8220;Save Changes&#8221; button for imported settings to "
1010
  "take effect."
1011
  msgstr ""
1012
 
1013
- #: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:725
1014
  msgid "Force to load WP core"
1015
  msgstr ""
1016
 
1017
- #: admin/includes/tab-settings.php:670
1018
  msgid "Plugins area"
1019
  msgstr ""
1020
 
1021
- #: admin/includes/tab-settings.php:730
1022
  msgid "Themes area"
1023
  msgstr ""
1024
 
1025
- #: admin/includes/tab-settings.php:765
1026
  msgid "Front-end target settings"
1027
  msgstr ""
1028
 
1029
- #: admin/includes/tab-settings.php:800
1030
- msgid "Follow &#8220;Validation rule settings&#8221;"
1031
  msgstr ""
1032
 
1033
- #: admin/includes/tab-settings.php:842
1034
  #, php-format
1035
  msgid ""
1036
  "<dfn title=\"You can configure a different response code from the Back-end. "
@@ -1038,78 +1049,78 @@ msgid ""
1038
  "\">Response code</dfn> %s"
1039
  msgstr ""
1040
 
1041
- #: admin/includes/tab-settings.php:906
1042
  msgid ""
1043
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
1044
  msgstr ""
1045
 
1046
- #: admin/includes/tab-settings.php:918
1047
  msgid ""
1048
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
1049
  "target.\">Post type</dfn>"
1050
  msgstr ""
1051
 
1052
- #: admin/includes/tab-settings.php:930
1053
  msgid ""
1054
  "<dfn title=\"Specify the individual category on a single page or archive "
1055
  "page as a blocking target.\">Category</dfn>"
1056
  msgstr ""
1057
 
1058
- #: admin/includes/tab-settings.php:942
1059
  msgid ""
1060
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1061
  "a blocking target.\">Tag</dfn>"
1062
  msgstr ""
1063
 
1064
- #: admin/includes/tab-settings.php:956
1065
  msgid "Specify the validation target on front-end."
1066
  msgstr ""
1067
 
1068
- #: admin/includes/tab-settings.php:956
1069
  msgid "Validation target"
1070
  msgstr ""
1071
 
1072
- #: admin/includes/tab-settings.php:967
1073
  msgid "All requests"
1074
  msgstr ""
1075
 
1076
- #: admin/includes/tab-settings.php:968
1077
  msgid "Specify the targets"
1078
  msgstr ""
1079
 
1080
- #: admin/includes/tab-settings.php:971
1081
  msgid ""
1082
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1083
  "wp&#8221; action hook. It means that this feature would not be compatible "
1084
  "with any page caching."
1085
  msgstr ""
1086
 
1087
- #: admin/includes/tab-settings.php:981
1088
  msgid "Specify the name of actions as exception that is invariably blocked."
1089
  msgstr ""
1090
 
1091
- #: admin/includes/tab-settings.php:981
1092
  msgid "Excluded actions"
1093
  msgstr ""
1094
 
1095
- #: admin/includes/tab-settings.php:997
1096
  msgid ""
1097
  "<dfn title=\"Specify the frequency of request for certain period of time."
1098
  "\">Blocking condition</dfn>"
1099
  msgstr ""
1100
 
1101
- #: admin/includes/tab-settings.php:999
1102
  #, php-format
1103
  msgid "More than %1$s page view (PV) in %2$s seconds"
1104
  msgstr ""
1105
 
1106
- #: admin/includes/tab-settings.php:1007
1107
  msgid ""
1108
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1109
  "behaved bots and crawlers</dfn>"
1110
  msgstr ""
1111
 
1112
- #: admin/includes/tab-settings.php:1024
1113
  msgid ""
1114
  "A part of user agent string and a qualification connected with a separator "
1115
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
@@ -1119,11 +1130,11 @@ msgid ""
1119
  "qualification&#8221;."
1120
  msgstr ""
1121
 
1122
- #: admin/includes/tab-settings.php:1024
1123
  msgid "UA string and qualification"
1124
  msgstr ""
1125
 
1126
- #: admin/includes/tab-settings.php:1041
1127
  msgid ""
1128
  "It enables to verify the host by reverse DNS lookup which would spend some "
1129
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
@@ -1131,49 +1142,28 @@ msgid ""
1131
  "return &#8220;true&#8221;."
1132
  msgstr ""
1133
 
1134
- #: admin/includes/tab-settings.php:1041
1135
  msgid "Reverse DNS lookup"
1136
  msgstr ""
1137
 
1138
- #: admin/includes/tab-settings.php:1058
1139
- msgid ""
1140
- "It enables to simulate validation without deployment. The results can be "
1141
- "found as &#8220;public&#8221; in Logs."
1142
- msgstr ""
1143
-
1144
- #: admin/includes/tab-settings.php:1058
1145
- msgid "Simulation mode"
1146
- msgstr ""
1147
-
1148
- #: admin/includes/tab-settings.php:1076
1149
  msgid "Privacy and record settings"
1150
  msgstr ""
1151
 
1152
- #: admin/includes/tab-settings.php:1099
1153
  msgid ""
1154
  "<dfn title=\"This option restricts not to send IP address to the external "
1155
  "Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
1156
  msgstr ""
1157
 
1158
- #: admin/includes/tab-settings.php:1114
1159
- msgid ""
1160
- "<dfn title=\"This option enables to record the number blocked countries and "
1161
- "the number of blocked requests per day.\">Record &#8220;Statistics of "
1162
- "validation&#8221;</dfn>"
1163
- msgstr ""
1164
-
1165
- #: admin/includes/tab-settings.php:1129
1166
- msgid "Maximum period for &#8220;Statistics&#8221; [days]"
1167
- msgstr ""
1168
-
1169
- #: admin/includes/tab-settings.php:1147
1170
  msgid ""
1171
  "<dfn title=\"This option enables to record the IP address, country code and "
1172
  "failure counter of login attempts into the cache on database to minimize the "
1173
  "impact on site speed.\">Record &#8220;IP address cache&#8221;</dfn>"
1174
  msgstr ""
1175
 
1176
- #: admin/includes/tab-settings.php:1162
1177
  msgid ""
1178
  "<dfn title=\"If user authentication fails consecutively beyond &#8220;Max "
1179
  "number of failed login attempts per IP address&#8221;, subsequent login will "
@@ -1181,114 +1171,125 @@ msgid ""
1181
  "dfn>"
1182
  msgstr ""
1183
 
1184
- #: admin/includes/tab-settings.php:1178
1185
  msgid ""
1186
  "<dfn title=\"This option enables to record the validation logs including IP "
1187
  "addresses.\">Record &#8220;Validation logs&#8221;</dfn>"
1188
  msgstr ""
1189
 
1190
- #: admin/includes/tab-settings.php:1190
1191
  msgid "When blocked"
1192
  msgstr ""
1193
 
1194
- #: admin/includes/tab-settings.php:1191
1195
  msgid "When passed"
1196
  msgstr ""
1197
 
1198
- #: admin/includes/tab-settings.php:1192
1199
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1200
  msgstr ""
1201
 
1202
- #: admin/includes/tab-settings.php:1193
1203
  msgid "Unauthenticated visitor"
1204
  msgstr ""
1205
 
1206
- #: admin/includes/tab-settings.php:1194
1207
  msgid "Authenticated user"
1208
  msgstr ""
1209
 
1210
- #: admin/includes/tab-settings.php:1195
1211
  msgid "All the validation"
1212
  msgstr ""
1213
 
1214
- #: admin/includes/tab-settings.php:1203
1215
  #, php-format
1216
  msgid ""
1217
  "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1218
  "\">Expiration time [days] for each entry</dfn>"
1219
  msgstr ""
1220
 
1221
- #: admin/includes/tab-settings.php:1220
1222
  msgid ""
1223
  "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
1224
  "with value</dfn>"
1225
  msgstr ""
1226
 
1227
- #: admin/includes/tab-settings.php:1239
1228
  msgid "Maximum entries in &#8220;Logs&#8221;"
1229
  msgstr ""
1230
 
1231
- #: admin/includes/tab-settings.php:1256
1232
  msgid ""
1233
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1234
  "&#8220;Live update&#8221;</dfn>"
1235
  msgstr ""
1236
 
1237
- #: admin/includes/tab-settings.php:1269
1238
  msgid "Ordinary file"
1239
  msgstr ""
1240
 
1241
- #: admin/includes/tab-settings.php:1270
1242
  msgid "In-Memory"
1243
  msgstr ""
1244
 
1245
- #: admin/includes/tab-settings.php:1273
1246
  msgid "PDO_SQLITE driver not available"
1247
  msgstr ""
1248
 
1249
- #: admin/includes/tab-settings.php:1274
1250
  msgid ""
1251
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1252
  "without conflict with other plugins."
1253
  msgstr ""
1254
 
1255
- #: admin/includes/tab-settings.php:1275
1256
  msgid ""
1257
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1258
  "with other plugins using this method."
1259
  msgstr ""
1260
 
1261
- #: admin/includes/tab-settings.php:1283
1262
  msgid "Reset database source of &#8220;Live update&#8221;"
1263
  msgstr ""
1264
 
1265
- #: admin/includes/tab-settings.php:1291
1266
  msgid "Reset now"
1267
  msgstr ""
1268
 
1269
- #: admin/includes/tab-settings.php:1300 admin/includes/tab-settings.php:1427
1270
  msgid ""
1271
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1272
  "once and activate again."
1273
  msgstr ""
1274
 
1275
- #: admin/includes/tab-settings.php:1305
1276
  msgid ""
1277
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1278
- "expired entries in &#8220;IP address cache&#8221; and &#8220;Logs&#8221;."
1279
- "\">Interval [sec] to cleanup expired entries of IP address</dfn>"
1280
  msgstr ""
1281
 
1282
- #: admin/includes/tab-settings.php:1314 admin/includes/tab-settings.php:1443
1283
  #, php-format
1284
  msgid "Next schedule: %s"
1285
  msgstr ""
1286
 
1287
- #: admin/includes/tab-settings.php:1321
 
 
 
 
 
 
 
 
 
 
 
1288
  msgid "Remove all settings and records at uninstallation"
1289
  msgstr ""
1290
 
1291
- #: admin/includes/tab-settings.php:1338
1292
  msgid "Geolocation API settings"
1293
  msgstr ""
1294
 
@@ -1310,7 +1311,7 @@ msgstr ""
1310
  msgid "database"
1311
  msgstr ""
1312
 
1313
- #: admin/includes/tab-settings.php:1410 classes/class-ip-geo-block-cron.php:418
1314
  #, php-format
1315
  msgid "Last update: %s"
1316
  msgstr ""
@@ -1347,9 +1348,9 @@ msgstr ""
1347
 
1348
  #: admin/includes/tab-settings.php:1515
1349
  msgid ""
1350
- "<dfn title=\"Valid key for Google Maps JavaScript API. A free tier has limit "
1351
- "even if it's &#8220;default&#8221;. Maps Embed API without key can be "
1352
- "available in case of empty.\">Google Maps API key</dfn>"
1353
  msgstr ""
1354
 
1355
  #: admin/includes/tab-settings.php:1531
@@ -1393,11 +1394,11 @@ msgid "Best for Back-end"
1393
  msgstr ""
1394
 
1395
  #: admin/includes/tab-settings.php:1564
1396
- msgid "DB tables for this plugin"
1397
  msgstr ""
1398
 
1399
  #: admin/includes/tab-settings.php:1572
1400
- msgid "Initialize now"
1401
  msgstr ""
1402
 
1403
  #: admin/includes/tab-settings.php:1581
@@ -1437,7 +1438,14 @@ msgid ""
1437
  "2.0.0+%s."
1438
  msgstr ""
1439
 
1440
- #: admin/includes/tab-statistics.php:19
 
 
 
 
 
 
 
1441
  msgid "Statistics of validation"
1442
  msgstr ""
1443
 
@@ -1513,40 +1521,40 @@ msgstr ""
1513
  msgid "Slug in back-end"
1514
  msgstr ""
1515
 
1516
- #: admin/includes/tab-statistics.php:355
1517
  msgid "Toggle sorting order"
1518
  msgstr ""
1519
 
1520
- #: admin/includes/tab-statistics.php:406
1521
  #, php-format
1522
  msgid "[ %sRecord &#8220;Statistics of validation&#8221;%s ] is disabled."
1523
  msgstr ""
1524
 
1525
- #: admin/includes/tab-statistics.php:407
1526
  msgid ""
1527
  "Please set the proper condition to record and analyze the validation "
1528
  "statistics."
1529
  msgstr ""
1530
 
1531
- #: admin/includes/tab-statistics.php:420
1532
  #, php-format
1533
  msgid "[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled."
1534
  msgstr ""
1535
 
1536
- #: admin/includes/tab-statistics.php:421
1537
  msgid "Please set the proper condition to record IP address in cache."
1538
  msgstr ""
1539
 
1540
- #: classes/class-ip-geo-block-cron.php:221
1541
  #, php-format
1542
  msgid "Can't lock <code>%s</code>. Please try again after a while."
1543
  msgstr ""
1544
 
1545
- #: classes/class-ip-geo-block-cron.php:300
1546
  msgid "Your database file is up-to-date."
1547
  msgstr ""
1548
 
1549
- #: classes/class-ip-geo-block-cron.php:399
1550
  msgid "gz or zip is not supported on your system."
1551
  msgstr ""
1552
 
@@ -1575,17 +1583,13 @@ msgid ""
1575
  "activate again."
1576
  msgstr ""
1577
 
1578
- #: classes/class-ip-geo-block-logs.php:241
1579
  #, php-format
1580
  msgid ""
1581
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1582
  "again."
1583
  msgstr ""
1584
 
1585
- #: classes/class-ip-geo-block.php:417
1586
- msgid "Dashboard"
1587
- msgstr ""
1588
-
1589
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:151
1590
  #: wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php:144
1591
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: IP Geo Block 3.0.16\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2018-11-01 22:01+0900\n"
8
+ "PO-Revision-Date: 2018-11-01 22:03+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
 
29
+ #: admin/class-ip-geo-block-admin.php:297
30
  msgid "Are you sure ?"
31
  msgstr ""
32
 
33
+ #: admin/class-ip-geo-block-admin.php:298
34
+ #: admin/class-ip-geo-block-admin.php:790
35
  msgid "Open a new window"
36
  msgstr ""
37
 
38
+ #: admin/class-ip-geo-block-admin.php:299 admin/includes/tab-settings.php:1506
39
  msgid "Generate new link"
40
  msgstr ""
41
 
42
+ #: admin/class-ip-geo-block-admin.php:300 admin/includes/tab-settings.php:1507
43
  msgid "Delete current link"
44
  msgstr ""
45
 
46
+ #: admin/class-ip-geo-block-admin.php:301
47
  msgid ""
48
  "Please add the following link to favorites / bookmarks in your browser : "
49
  msgstr ""
50
 
51
+ #: admin/class-ip-geo-block-admin.php:302
52
  msgid "ajax for logged-in user"
53
  msgstr ""
54
 
55
+ #: admin/class-ip-geo-block-admin.php:303
56
  msgid "ajax for non logged-in user"
57
  msgstr ""
58
 
59
+ #: admin/class-ip-geo-block-admin.php:304
60
  #, php-format
61
  msgid "[Found: %d]"
62
  msgstr ""
63
 
64
+ #: admin/class-ip-geo-block-admin.php:305
65
  #, php-format
66
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
67
  msgstr ""
68
 
69
+ #: admin/class-ip-geo-block-admin.php:306
70
  msgid "This feature is available with HTML5 compliant browsers."
71
  msgstr ""
72
 
73
+ #: admin/class-ip-geo-block-admin.php:307
74
  msgid "The selected row cannot be found in the table."
75
  msgstr ""
76
 
77
+ #: admin/class-ip-geo-block-admin.php:308
78
+ #: admin/class-ip-geo-block-admin.php:1568
79
  #, php-format
80
  msgid "An error occurred while executing the ajax command `%s`."
81
  msgstr ""
82
 
83
+ #: admin/class-ip-geo-block-admin.php:312
84
  msgid "No data available in table"
85
  msgstr ""
86
 
87
+ #: admin/class-ip-geo-block-admin.php:313
88
  msgid "No matching records found"
89
  msgstr ""
90
 
91
+ #: admin/class-ip-geo-block-admin.php:314
92
  #: admin/includes/class-admin-ajax.php:107
93
  #: admin/includes/class-admin-ajax.php:240
94
  #: admin/includes/tab-geolocation.php:74
95
  msgid "IP address"
96
  msgstr ""
97
 
98
+ #: admin/class-ip-geo-block-admin.php:315
99
  #: admin/includes/class-admin-ajax.php:108
100
  #: admin/includes/class-admin-ajax.php:241
101
  msgid "Code"
102
  msgstr ""
103
 
104
+ #: admin/class-ip-geo-block-admin.php:316
105
  #: admin/includes/class-admin-ajax.php:109
106
  #: admin/includes/class-admin-ajax.php:242
107
  msgid "ASN"
108
  msgstr ""
109
 
110
+ #: admin/class-ip-geo-block-admin.php:317
111
  #: admin/includes/class-admin-ajax.php:243
112
  msgid "Host name"
113
  msgstr ""
114
 
115
+ #: admin/class-ip-geo-block-admin.php:318
116
  #: admin/includes/class-admin-ajax.php:110
117
  #: admin/includes/class-admin-ajax.php:244
118
  msgid "Target"
119
  msgstr ""
120
 
121
+ #: admin/class-ip-geo-block-admin.php:319
122
  #: admin/includes/class-admin-ajax.php:245
123
  msgid "Failure / Total"
124
  msgstr ""
125
 
126
+ #: admin/class-ip-geo-block-admin.php:320
127
  #: admin/includes/class-admin-ajax.php:246
128
  msgid "Elapsed[sec]"
129
  msgstr ""
130
 
131
+ #: admin/class-ip-geo-block-admin.php:321
132
  #: admin/includes/class-admin-ajax.php:106
133
  msgid "Time"
134
  msgstr ""
135
 
136
+ #: admin/class-ip-geo-block-admin.php:322
137
  #: admin/includes/class-admin-ajax.php:111
138
  msgid "Result"
139
  msgstr ""
140
 
141
+ #: admin/class-ip-geo-block-admin.php:323
142
  #: admin/includes/class-admin-ajax.php:112
143
  msgid "Request"
144
  msgstr ""
145
 
146
+ #: admin/class-ip-geo-block-admin.php:324
147
  #: admin/includes/class-admin-ajax.php:113
148
  msgid "User agent"
149
  msgstr ""
150
 
151
+ #: admin/class-ip-geo-block-admin.php:325
152
  #: admin/includes/class-admin-ajax.php:114
153
  msgid "HTTP headers"
154
  msgstr ""
155
 
156
+ #: admin/class-ip-geo-block-admin.php:326
157
  #: admin/includes/class-admin-ajax.php:115
158
  msgid "$_POST data"
159
  msgstr ""
160
 
161
+ #: admin/class-ip-geo-block-admin.php:352
162
  msgid "Contribute on GitHub"
163
  msgstr ""
164
 
165
+ #: admin/class-ip-geo-block-admin.php:366
166
+ #: admin/class-ip-geo-block-admin.php:483
167
+ #: admin/class-ip-geo-block-admin.php:733
168
  msgid "Settings"
169
  msgstr ""
170
 
171
+ #: admin/class-ip-geo-block-admin.php:460
172
+ #: admin/class-ip-geo-block-admin.php:461
173
+ #: admin/class-ip-geo-block-admin.php:471
174
+ #: admin/class-ip-geo-block-admin.php:472
175
+ #: admin/class-ip-geo-block-admin.php:482
176
+ #: admin/class-ip-geo-block-admin.php:492
177
  msgid "IP Geo Block"
178
  msgstr ""
179
 
180
+ #: admin/class-ip-geo-block-admin.php:493
181
+ #: admin/class-ip-geo-block-admin.php:738
182
+ msgid "Sites list"
183
  msgstr ""
184
 
185
+ #: admin/class-ip-geo-block-admin.php:522
186
  msgid "You need WordPress 3.7+."
187
  msgstr ""
188
 
189
+ #: admin/class-ip-geo-block-admin.php:526
190
  #, php-format
191
  msgid ""
192
  "Can not load Geolocation API libraries from <code>%s</code>. It seems to "
201
  "troubles? | IP Geo Block\">this instruction</a>."
202
  msgstr ""
203
 
204
+ #: admin/class-ip-geo-block-admin.php:535
205
  #, php-format
206
  msgid ""
207
  "You should select at least one API at <a href=\"%s\">Geolocation API "
209
  "expires."
210
  msgstr ""
211
 
212
+ #: admin/class-ip-geo-block-admin.php:544
213
  #, php-format
214
  msgid ""
215
  "You should select at least one API for local database at <a href=\"%s"
217
  "slow down the site."
218
  msgstr ""
219
 
220
+ #: admin/class-ip-geo-block-admin.php:555
221
  #, php-format
222
  msgid ""
223
  "Now downloading geolocation databases in background. After a little while, "
224
  "please check your country code and &#8220;<strong>Matching rule</"
225
+ "strong>&#8221; at <a href=\"%s\">Validation rules and behavior</a>."
226
  msgstr ""
227
 
228
+ #: admin/class-ip-geo-block-admin.php:561
229
  #, php-format
230
  msgid ""
231
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
232
+ "confirm it at <a href=\"%s\">Validation rules and behavior</a>."
233
  msgstr ""
234
 
235
+ #: admin/class-ip-geo-block-admin.php:570
236
  msgid "Local database and matching rule have been updated."
237
  msgstr ""
238
 
239
+ #: admin/class-ip-geo-block-admin.php:581
240
  msgid ""
241
  "Once you logout, you will be unable to login again because the number of "
242
  "login attempts reaches the limit."
243
  msgstr ""
244
 
245
+ #: admin/class-ip-geo-block-admin.php:583
246
  #, php-format
247
  msgid ""
248
  "Please remove your IP address in &#8220;%1$sStatistics in IP address cache"
250
  "yourself out."
251
  msgstr ""
252
 
253
+ #: admin/class-ip-geo-block-admin.php:594
254
  msgid ""
255
  "Once you logout, you will be unable to login again because your country code "
256
  "or IP address is in the blacklist."
257
  msgstr ""
258
 
259
+ #: admin/class-ip-geo-block-admin.php:595
260
  msgid ""
261
  "Once you logout, you will be unable to login again because your country code "
262
  "or IP address is not in the whitelist."
263
  msgstr ""
264
 
265
+ #: admin/class-ip-geo-block-admin.php:599
266
  #, php-format
267
+ msgid "Please check your &#8220;%sValidation rules and behavior%s&#8221;."
268
  msgstr ""
269
 
270
+ #: admin/class-ip-geo-block-admin.php:603
271
  #, php-format
272
  msgid ""
273
+ "Please confirm your local geolocation database files exist at &#8220;%sLocal "
274
+ "database settings%s&#8221; section, or remove your IP address in cache at "
275
+ "&#8220;%sStatistics in cache%s&#8221; section."
276
  msgstr ""
277
 
278
+ #: admin/class-ip-geo-block-admin.php:617
279
  #, php-format
280
  msgid ""
281
  "Emergency login link is outdated. Please delete it once and generate again "
283
  "favorites / bookmarks in your browser."
284
  msgstr ""
285
 
286
+ #: admin/class-ip-geo-block-admin.php:626
287
  msgid ""
288
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
289
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
290
  "select &#8220;init&#8221; action hook."
291
  msgstr ""
292
 
293
+ #: admin/class-ip-geo-block-admin.php:734
294
  msgid "Statistics"
295
  msgstr ""
296
 
297
+ #: admin/class-ip-geo-block-admin.php:735
298
  msgid "Logs"
299
  msgstr ""
300
 
301
+ #: admin/class-ip-geo-block-admin.php:736
302
  msgid "Search"
303
  msgstr ""
304
 
305
+ #: admin/class-ip-geo-block-admin.php:737
306
  msgid "Attribution"
307
  msgstr ""
308
 
309
+ #: admin/class-ip-geo-block-admin.php:754
310
+ #: admin/class-ip-geo-block-admin.php:770
311
+ msgid "Network"
312
  msgstr ""
313
 
314
+ #: admin/class-ip-geo-block-admin.php:783
315
  msgid "Toggle all"
316
  msgstr ""
317
 
318
+ #: admin/class-ip-geo-block-admin.php:786
319
  msgid ""
320
  "Independent of &#8220;Privacy and record settings&#8221;, you can see all "
321
  "the requests validated by this plugin in almost real time."
322
  msgstr ""
323
 
324
+ #: admin/class-ip-geo-block-admin.php:786 admin/includes/tab-accesslog.php:39
325
  msgid "Live update"
326
  msgstr ""
327
 
328
+ #: admin/class-ip-geo-block-admin.php:790
329
  msgid "Open a new window on clicking the link in the chart."
330
  msgstr ""
331
 
332
+ #: admin/class-ip-geo-block-admin.php:814
333
  msgid "Thanks for providing these great services for free."
334
  msgstr ""
335
 
336
+ #: admin/class-ip-geo-block-admin.php:815
337
  msgid ""
338
  "(Most browsers will redirect you to each site <a href=\"https://www."
339
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
340
  "when you click the link</a>.)"
341
  msgstr ""
342
 
343
+ #: admin/class-ip-geo-block-admin.php:820
344
  msgid "Back to top"
345
  msgstr ""
346
 
347
+ #: admin/class-ip-geo-block-admin.php:912
348
  msgid "Enable"
349
  msgstr ""
350
 
351
+ #: admin/class-ip-geo-block-admin.php:927
352
  msgid "Select one"
353
  msgstr ""
354
 
355
+ #: admin/class-ip-geo-block-admin.php:1346
356
  msgid "You do not have sufficient permissions to access this page."
357
  msgstr ""
358
 
359
+ #: admin/class-ip-geo-block-admin.php:1373
360
  #: admin/includes/class-admin-rewrite.php:194
361
+ #: classes/class-ip-geo-block-cron.php:218
362
+ #: classes/class-ip-geo-block-cron.php:322
363
+ #: classes/class-ip-geo-block-cron.php:400
364
+ #: classes/class-ip-geo-block-opts.php:469
365
  #, php-format
366
  msgid "Unable to write <code>%s</code>. Please check the permission."
367
  msgstr ""
368
 
369
+ #: admin/class-ip-geo-block-admin.php:1403
370
  msgid "Settings saved."
371
  msgstr ""
372
 
388
  msgstr ""
389
 
390
  #: admin/includes/class-admin-rewrite.php:168
391
+ #: classes/class-ip-geo-block-cron.php:213
392
+ #: classes/class-ip-geo-block-cron.php:395
393
  #, php-format
394
  msgid "Unable to read <code>%s</code>. Please check the permission."
395
  msgstr ""
413
  msgid "Help"
414
  msgstr ""
415
 
416
+ #: admin/includes/tab-accesslog.php:55 admin/includes/tab-settings.php:428
417
  msgid "Comment post"
418
  msgstr ""
419
 
420
+ #: admin/includes/tab-accesslog.php:56 admin/includes/tab-settings.php:429
421
  msgid "XML-RPC"
422
  msgstr ""
423
 
424
+ #: admin/includes/tab-accesslog.php:57 admin/includes/tab-settings.php:430
425
  msgid "Login form"
426
  msgstr ""
427
 
428
+ #: admin/includes/tab-accesslog.php:58 admin/includes/tab-settings.php:431
429
  msgid "Admin area"
430
  msgstr ""
431
 
432
+ #: admin/includes/tab-accesslog.php:59 admin/includes/tab-settings.php:433
433
  msgid "Public facing pages"
434
  msgstr ""
435
 
504
  msgid "Export csv"
505
  msgstr ""
506
 
507
+ #: admin/includes/tab-accesslog.php:198 admin/includes/tab-network.php:112
508
+ #: admin/includes/tab-statistics.php:410
509
  #, php-format
510
  msgid "[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled."
511
  msgstr ""
512
 
513
+ #: admin/includes/tab-accesslog.php:199 admin/includes/tab-network.php:113
514
+ #: admin/includes/tab-statistics.php:411
515
  msgid ""
516
  "Please set the proper condition to record and analyze the validation logs."
517
  msgstr ""
528
  msgid "Geolocation API"
529
  msgstr ""
530
 
531
+ #: admin/includes/tab-geolocation.php:89 admin/includes/tab-settings.php:1083
532
  msgid ""
533
  "<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
534
  "Moreover, this option replaces the end of IP address with &#8220;***&#8221; "
604
  msgstr ""
605
 
606
  #: admin/includes/tab-settings.php:54
607
+ msgid "Validation rules and behavior"
608
  msgstr ""
609
 
610
  #: admin/includes/tab-settings.php:76
662
  "country code</dfn>"
663
  msgstr ""
664
 
665
+ #: admin/includes/tab-settings.php:125 admin/includes/tab-settings.php:805
666
  msgid "Matching rule"
667
  msgstr ""
668
 
692
 
693
  #: admin/includes/tab-settings.php:198
694
  msgid ""
695
+ "<dfn title=\"If your server is placed behind the proxy server or the load "
696
+ "balancing server, you need to put the appropriate key such as &#8220;"
697
+ "HTTP_X_FORWARDED_FOR&#8221;, &#8220;HTTP_X_REAL_IP&#8221; or something like "
698
+ "that to retrieve the client IP address.\">$_SERVER keys to retrieve extra IP "
699
+ "addresses</dfn>"
700
+ msgstr ""
701
+
702
+ #: admin/includes/tab-settings.php:216
703
+ msgid ""
704
  "<dfn title=\"e.g. &#8220;192.0.64.0/18&#8221; for Jetpack server, "
705
  "&#8220;69.46.36.0/27&#8221; for WordFence server or &#8220;AS32934&#8221; "
706
  "for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
707
  msgstr ""
708
 
709
+ #: admin/includes/tab-settings.php:237
710
  msgid ""
711
  "<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
712
  "\">Blacklist of extra IP addresses prior to country code</dfn>"
713
  msgstr ""
714
 
 
 
 
 
 
 
 
 
 
715
  #: admin/includes/tab-settings.php:258
716
  msgid ""
717
  "<dfn title=\"It validates malicious signatures independently of &#8220;Block "
758
  "this validation.\">Prevent malicious file uploading</dfn>"
759
  msgstr ""
760
 
761
+ #: admin/includes/tab-settings.php:304 admin/includes/tab-settings.php:494
762
+ #: admin/includes/tab-settings.php:639 admin/includes/tab-settings.php:1155
763
  msgid "Disable"
764
  msgstr ""
765
 
778
  "directory.\">Response code</dfn> %s"
779
  msgstr ""
780
 
781
+ #: admin/includes/tab-settings.php:344 admin/includes/tab-settings.php:888
782
  msgid ""
783
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
784
  "to a public facing page, visitors would not be blocked on the page to "
787
  "\">Redirect URL</dfn>"
788
  msgstr ""
789
 
790
+ #: admin/includes/tab-settings.php:361 admin/includes/tab-settings.php:906
791
  msgid ""
792
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
793
  "message</dfn>"
823
  "restrictions</a>."
824
  msgstr ""
825
 
826
+ #: admin/includes/tab-settings.php:403
827
+ msgid ""
828
+ "It enables to simulate the validation rules without actual blocking in order "
829
+ "to check the behavior of this plugin. The results can be found on &#8220;"
830
+ "Logs&#8221; tab."
831
+ msgstr ""
832
+
833
+ #: admin/includes/tab-settings.php:403
834
+ msgid "Simulation mode"
835
+ msgstr ""
836
+
837
+ #: admin/includes/tab-settings.php:420
838
  msgid "Back-end target settings"
839
  msgstr ""
840
 
841
+ #: admin/includes/tab-settings.php:426
842
  #, php-format
843
+ msgid "<dfn title=\"It enables to validate requests to %s.\">%s</dfn>"
844
  msgstr ""
845
 
846
+ #: admin/includes/tab-settings.php:432
847
  msgid "Other areas"
848
  msgstr ""
849
 
850
+ #: admin/includes/tab-settings.php:433
851
  msgid "public facing pages"
852
  msgstr ""
853
 
854
+ #: admin/includes/tab-settings.php:449 admin/includes/tab-settings.php:495
855
+ #: admin/includes/tab-settings.php:527 admin/includes/tab-settings.php:533
856
+ #: admin/includes/tab-settings.php:798
857
  msgid "Block by country"
858
  msgstr ""
859
 
860
+ #: admin/includes/tab-settings.php:459
861
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
862
  msgstr ""
863
 
864
+ #: admin/includes/tab-settings.php:459
865
  msgid "Message on comment form"
866
  msgstr ""
867
 
868
+ #: admin/includes/tab-settings.php:472
869
  msgid "None"
870
  msgstr ""
871
 
872
+ #: admin/includes/tab-settings.php:473
873
  msgid "Top"
874
  msgstr ""
875
 
876
+ #: admin/includes/tab-settings.php:474
877
  msgid "Bottom"
878
  msgstr ""
879
 
880
+ #: admin/includes/tab-settings.php:496
881
  msgid "Completely close"
882
  msgstr ""
883
 
884
+ #: admin/includes/tab-settings.php:502
885
  msgid "Action to login as a registered user."
886
  msgstr ""
887
 
888
+ #: admin/includes/tab-settings.php:502
889
  msgid "Log in"
890
  msgstr ""
891
 
892
+ #: admin/includes/tab-settings.php:503
893
  msgid "Action to register new users."
894
  msgstr ""
895
 
896
+ #: admin/includes/tab-settings.php:503
897
  msgid "Register"
898
  msgstr ""
899
 
900
+ #: admin/includes/tab-settings.php:504
901
  msgid "Action to reset a password to create a new one."
902
  msgstr ""
903
 
904
+ #: admin/includes/tab-settings.php:504
905
  msgid "Password Reset"
906
  msgstr ""
907
 
908
+ #: admin/includes/tab-settings.php:505
909
  msgid "Action to email a password to a registered user."
910
  msgstr ""
911
 
912
+ #: admin/includes/tab-settings.php:505
913
  msgid "Lost Password"
914
  msgstr ""
915
 
916
+ #: admin/includes/tab-settings.php:506
917
  msgid ""
918
  "Action to show prompt to enter a password on password protected post and "
919
  "page."
920
  msgstr ""
921
 
922
+ #: admin/includes/tab-settings.php:506
923
  msgid "Password protected"
924
  msgstr ""
925
 
926
+ #: admin/includes/tab-settings.php:528
927
  msgid ""
928
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
929
  "actions</dfn>"
930
  msgstr ""
931
 
932
+ #: admin/includes/tab-settings.php:534
933
  msgid "Prevent Zero-day Exploit"
934
  msgstr ""
935
 
936
+ #: admin/includes/tab-settings.php:538
937
  msgid ""
938
  "It will block a request related to the services for both public facing pages "
939
  "and the dashboard."
940
  msgstr ""
941
 
942
+ #: admin/includes/tab-settings.php:539
943
  msgid ""
944
  "Regardless of the country code, it will block a malicious request related to "
945
  "the services only for the dashboard."
946
  msgstr ""
947
 
948
+ #: admin/includes/tab-settings.php:545
949
  msgid ""
950
  "This is applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221; when "
951
  "&#8220;IP address cache&#8221; in &#8220;Privacy and record settings&#8221; "
953
  "cache."
954
  msgstr ""
955
 
956
+ #: admin/includes/tab-settings.php:545
957
  msgid "Max failed login attempts per IP address"
958
  msgstr ""
959
 
960
+ #: admin/includes/tab-settings.php:586
961
  msgid "admin post for logged-in user"
962
  msgstr ""
963
 
964
+ #: admin/includes/tab-settings.php:587
965
  msgid "admin post for non logged-in user"
966
  msgstr ""
967
 
968
+ #: admin/includes/tab-settings.php:609
969
  msgid "Admin ajax/post"
970
  msgstr ""
971
 
972
+ #: admin/includes/tab-settings.php:623
973
  msgid ""
974
  "Specify the action name (&#8220;action=&hellip;&#8221;) or the page name "
975
  "(&#8220;page=&hellip;&#8221;) to prevent unintended blocking caused by "
977
  "Zero-day Exploit&#8221; (for logged-in user)."
978
  msgstr ""
979
 
980
+ #: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:701
981
+ #: admin/includes/tab-settings.php:761
982
  msgid "Exceptions"
983
  msgstr ""
984
 
985
+ #: admin/includes/tab-settings.php:624
986
  msgid "Toggle with non logged-in user"
987
  msgstr ""
988
 
989
+ #: admin/includes/tab-settings.php:627
990
  msgid "Candidate actions/pages"
991
  msgstr ""
992
 
993
+ #: admin/includes/tab-settings.php:641
994
  #, php-format
995
  msgid ""
996
  "Regardless of the country code, it will block a malicious request to <code>"
997
  "%s&ctdot;/*.php</code>."
998
  msgstr ""
999
 
1000
+ #: admin/includes/tab-settings.php:642
1001
  msgid ""
1002
  "Select the item which causes unintended blocking in order to exclude from "
1003
  "the validation target. Grayed item indicates &#8220;INACTIVE&#8221;."
1004
  msgstr ""
1005
 
1006
+ #: admin/includes/tab-settings.php:643
1007
  #, php-format
1008
  msgid ""
1009
  "It configures &#8220;%s&#8221; to validate a direct request to the PHP file "
1011
  "hidden files beginning with a dot by the server's configuration."
1012
  msgstr ""
1013
 
1014
+ #: admin/includes/tab-settings.php:644
1015
  msgid "Sorry, but your server type is not supported."
1016
  msgstr ""
1017
 
1018
+ #: admin/includes/tab-settings.php:645
1019
  msgid ""
1020
  "You need to click &#8220;Save Changes&#8221; button for imported settings to "
1021
  "take effect."
1022
  msgstr ""
1023
 
1024
+ #: admin/includes/tab-settings.php:680 admin/includes/tab-settings.php:740
1025
  msgid "Force to load WP core"
1026
  msgstr ""
1027
 
1028
+ #: admin/includes/tab-settings.php:685
1029
  msgid "Plugins area"
1030
  msgstr ""
1031
 
1032
+ #: admin/includes/tab-settings.php:745
1033
  msgid "Themes area"
1034
  msgstr ""
1035
 
1036
+ #: admin/includes/tab-settings.php:780
1037
  msgid "Front-end target settings"
1038
  msgstr ""
1039
 
1040
+ #: admin/includes/tab-settings.php:815
1041
+ msgid "Follow &#8220;Validation rules and behavior&#8221;"
1042
  msgstr ""
1043
 
1044
+ #: admin/includes/tab-settings.php:857
1045
  #, php-format
1046
  msgid ""
1047
  "<dfn title=\"You can configure a different response code from the Back-end. "
1049
  "\">Response code</dfn> %s"
1050
  msgstr ""
1051
 
1052
+ #: admin/includes/tab-settings.php:921
1053
  msgid ""
1054
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
1055
  msgstr ""
1056
 
1057
+ #: admin/includes/tab-settings.php:933
1058
  msgid ""
1059
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
1060
  "target.\">Post type</dfn>"
1061
  msgstr ""
1062
 
1063
+ #: admin/includes/tab-settings.php:945
1064
  msgid ""
1065
  "<dfn title=\"Specify the individual category on a single page or archive "
1066
  "page as a blocking target.\">Category</dfn>"
1067
  msgstr ""
1068
 
1069
+ #: admin/includes/tab-settings.php:957
1070
  msgid ""
1071
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1072
  "a blocking target.\">Tag</dfn>"
1073
  msgstr ""
1074
 
1075
+ #: admin/includes/tab-settings.php:971
1076
  msgid "Specify the validation target on front-end."
1077
  msgstr ""
1078
 
1079
+ #: admin/includes/tab-settings.php:971
1080
  msgid "Validation target"
1081
  msgstr ""
1082
 
1083
+ #: admin/includes/tab-settings.php:982
1084
  msgid "All requests"
1085
  msgstr ""
1086
 
1087
+ #: admin/includes/tab-settings.php:983
1088
  msgid "Specify the targets"
1089
  msgstr ""
1090
 
1091
+ #: admin/includes/tab-settings.php:986
1092
  msgid ""
1093
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1094
  "wp&#8221; action hook. It means that this feature would not be compatible "
1095
  "with any page caching."
1096
  msgstr ""
1097
 
1098
+ #: admin/includes/tab-settings.php:996
1099
  msgid "Specify the name of actions as exception that is invariably blocked."
1100
  msgstr ""
1101
 
1102
+ #: admin/includes/tab-settings.php:996
1103
  msgid "Excluded actions"
1104
  msgstr ""
1105
 
1106
+ #: admin/includes/tab-settings.php:1012
1107
  msgid ""
1108
  "<dfn title=\"Specify the frequency of request for certain period of time."
1109
  "\">Blocking condition</dfn>"
1110
  msgstr ""
1111
 
1112
+ #: admin/includes/tab-settings.php:1014
1113
  #, php-format
1114
  msgid "More than %1$s page view (PV) in %2$s seconds"
1115
  msgstr ""
1116
 
1117
+ #: admin/includes/tab-settings.php:1022
1118
  msgid ""
1119
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1120
  "behaved bots and crawlers</dfn>"
1121
  msgstr ""
1122
 
1123
+ #: admin/includes/tab-settings.php:1039
1124
  msgid ""
1125
  "A part of user agent string and a qualification connected with a separator "
1126
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
1130
  "qualification&#8221;."
1131
  msgstr ""
1132
 
1133
+ #: admin/includes/tab-settings.php:1039
1134
  msgid "UA string and qualification"
1135
  msgstr ""
1136
 
1137
+ #: admin/includes/tab-settings.php:1056
1138
  msgid ""
1139
  "It enables to verify the host by reverse DNS lookup which would spend some "
1140
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
1142
  "return &#8220;true&#8221;."
1143
  msgstr ""
1144
 
1145
+ #: admin/includes/tab-settings.php:1056
1146
  msgid "Reverse DNS lookup"
1147
  msgstr ""
1148
 
1149
+ #: admin/includes/tab-settings.php:1075
 
 
 
 
 
 
 
 
 
 
1150
  msgid "Privacy and record settings"
1151
  msgstr ""
1152
 
1153
+ #: admin/includes/tab-settings.php:1098
1154
  msgid ""
1155
  "<dfn title=\"This option restricts not to send IP address to the external "
1156
  "Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
1157
  msgstr ""
1158
 
1159
+ #: admin/includes/tab-settings.php:1113
 
 
 
 
 
 
 
 
 
 
 
1160
  msgid ""
1161
  "<dfn title=\"This option enables to record the IP address, country code and "
1162
  "failure counter of login attempts into the cache on database to minimize the "
1163
  "impact on site speed.\">Record &#8220;IP address cache&#8221;</dfn>"
1164
  msgstr ""
1165
 
1166
+ #: admin/includes/tab-settings.php:1128
1167
  msgid ""
1168
  "<dfn title=\"If user authentication fails consecutively beyond &#8220;Max "
1169
  "number of failed login attempts per IP address&#8221;, subsequent login will "
1171
  "dfn>"
1172
  msgstr ""
1173
 
1174
+ #: admin/includes/tab-settings.php:1144
1175
  msgid ""
1176
  "<dfn title=\"This option enables to record the validation logs including IP "
1177
  "addresses.\">Record &#8220;Validation logs&#8221;</dfn>"
1178
  msgstr ""
1179
 
1180
+ #: admin/includes/tab-settings.php:1156
1181
  msgid "When blocked"
1182
  msgstr ""
1183
 
1184
+ #: admin/includes/tab-settings.php:1157
1185
  msgid "When passed"
1186
  msgstr ""
1187
 
1188
+ #: admin/includes/tab-settings.php:1158
1189
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1190
  msgstr ""
1191
 
1192
+ #: admin/includes/tab-settings.php:1159
1193
  msgid "Unauthenticated visitor"
1194
  msgstr ""
1195
 
1196
+ #: admin/includes/tab-settings.php:1160
1197
  msgid "Authenticated user"
1198
  msgstr ""
1199
 
1200
+ #: admin/includes/tab-settings.php:1161
1201
  msgid "All the validation"
1202
  msgstr ""
1203
 
1204
+ #: admin/includes/tab-settings.php:1169
1205
  #, php-format
1206
  msgid ""
1207
  "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1208
  "\">Expiration time [days] for each entry</dfn>"
1209
  msgstr ""
1210
 
1211
+ #: admin/includes/tab-settings.php:1186
1212
  msgid ""
1213
  "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
1214
  "with value</dfn>"
1215
  msgstr ""
1216
 
1217
+ #: admin/includes/tab-settings.php:1205
1218
  msgid "Maximum entries in &#8220;Logs&#8221;"
1219
  msgstr ""
1220
 
1221
+ #: admin/includes/tab-settings.php:1222
1222
  msgid ""
1223
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1224
  "&#8220;Live update&#8221;</dfn>"
1225
  msgstr ""
1226
 
1227
+ #: admin/includes/tab-settings.php:1235
1228
  msgid "Ordinary file"
1229
  msgstr ""
1230
 
1231
+ #: admin/includes/tab-settings.php:1236
1232
  msgid "In-Memory"
1233
  msgstr ""
1234
 
1235
+ #: admin/includes/tab-settings.php:1239
1236
  msgid "PDO_SQLITE driver not available"
1237
  msgstr ""
1238
 
1239
+ #: admin/includes/tab-settings.php:1240
1240
  msgid ""
1241
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1242
  "without conflict with other plugins."
1243
  msgstr ""
1244
 
1245
+ #: admin/includes/tab-settings.php:1241
1246
  msgid ""
1247
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1248
  "with other plugins using this method."
1249
  msgstr ""
1250
 
1251
+ #: admin/includes/tab-settings.php:1249
1252
  msgid "Reset database source of &#8220;Live update&#8221;"
1253
  msgstr ""
1254
 
1255
+ #: admin/includes/tab-settings.php:1257
1256
  msgid "Reset now"
1257
  msgstr ""
1258
 
1259
+ #: admin/includes/tab-settings.php:1266 admin/includes/tab-settings.php:1427
1260
  msgid ""
1261
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1262
  "once and activate again."
1263
  msgstr ""
1264
 
1265
+ #: admin/includes/tab-settings.php:1271
1266
  msgid ""
1267
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1268
+ "expired entries from &#8220;IP address cache&#8221; and &#8220;Validation "
1269
+ "logs&#8221;.\">Interval [sec] to cleanup expired entries of IP address</dfn>"
1270
  msgstr ""
1271
 
1272
+ #: admin/includes/tab-settings.php:1280 admin/includes/tab-settings.php:1443
1273
  #, php-format
1274
  msgid "Next schedule: %s"
1275
  msgstr ""
1276
 
1277
+ #: admin/includes/tab-settings.php:1287
1278
+ msgid ""
1279
+ "<dfn title=\"This option enables to record the number blocked countries and "
1280
+ "the number of blocked requests per day.\">Record &#8220;Statistics of "
1281
+ "validation&#8221;</dfn>"
1282
+ msgstr ""
1283
+
1284
+ #: admin/includes/tab-settings.php:1302
1285
+ msgid "Maximum period for &#8220;Statistics&#8221; [days]"
1286
+ msgstr ""
1287
+
1288
+ #: admin/includes/tab-settings.php:1320
1289
  msgid "Remove all settings and records at uninstallation"
1290
  msgstr ""
1291
 
1292
+ #: admin/includes/tab-settings.php:1337
1293
  msgid "Geolocation API settings"
1294
  msgstr ""
1295
 
1311
  msgid "database"
1312
  msgstr ""
1313
 
1314
+ #: admin/includes/tab-settings.php:1410 classes/class-ip-geo-block-cron.php:424
1315
  #, php-format
1316
  msgid "Last update: %s"
1317
  msgstr ""
1348
 
1349
  #: admin/includes/tab-settings.php:1515
1350
  msgid ""
1351
+ "<dfn title=\"Valid key for Google Maps JavaScript API. Maps Embed API in "
1352
+ "iframe can be available without key in case it's empty.\">Google Maps API "
1353
+ "key</dfn>"
1354
  msgstr ""
1355
 
1356
  #: admin/includes/tab-settings.php:1531
1394
  msgstr ""
1395
 
1396
  #: admin/includes/tab-settings.php:1564
1397
+ msgid "Diagnose all DB tables"
1398
  msgstr ""
1399
 
1400
  #: admin/includes/tab-settings.php:1572
1401
+ msgid "Diagnose now"
1402
  msgstr ""
1403
 
1404
  #: admin/includes/tab-settings.php:1581
1438
  "2.0.0+%s."
1439
  msgstr ""
1440
 
1441
+ #: admin/includes/tab-settings.php:1623
1442
+ #, php-format
1443
+ msgid ""
1444
+ "Please refer to \"%sLiving with cache plugin%s\" for compatibility with "
1445
+ "cache plugins."
1446
+ msgstr ""
1447
+
1448
+ #: admin/includes/tab-statistics.php:18
1449
  msgid "Statistics of validation"
1450
  msgstr ""
1451
 
1521
  msgid "Slug in back-end"
1522
  msgstr ""
1523
 
1524
+ #: admin/includes/tab-statistics.php:348
1525
  msgid "Toggle sorting order"
1526
  msgstr ""
1527
 
1528
+ #: admin/includes/tab-statistics.php:404
1529
  #, php-format
1530
  msgid "[ %sRecord &#8220;Statistics of validation&#8221;%s ] is disabled."
1531
  msgstr ""
1532
 
1533
+ #: admin/includes/tab-statistics.php:405
1534
  msgid ""
1535
  "Please set the proper condition to record and analyze the validation "
1536
  "statistics."
1537
  msgstr ""
1538
 
1539
+ #: admin/includes/tab-statistics.php:416
1540
  #, php-format
1541
  msgid "[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled."
1542
  msgstr ""
1543
 
1544
+ #: admin/includes/tab-statistics.php:417
1545
  msgid "Please set the proper condition to record IP address in cache."
1546
  msgstr ""
1547
 
1548
+ #: classes/class-ip-geo-block-cron.php:223
1549
  #, php-format
1550
  msgid "Can't lock <code>%s</code>. Please try again after a while."
1551
  msgstr ""
1552
 
1553
+ #: classes/class-ip-geo-block-cron.php:302
1554
  msgid "Your database file is up-to-date."
1555
  msgstr ""
1556
 
1557
+ #: classes/class-ip-geo-block-cron.php:405
1558
  msgid "gz or zip is not supported on your system."
1559
  msgstr ""
1560
 
1583
  "activate again."
1584
  msgstr ""
1585
 
1586
+ #: classes/class-ip-geo-block-logs.php:243
1587
  #, php-format
1588
  msgid ""
1589
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1590
  "again."
1591
  msgstr ""
1592
 
 
 
 
 
1593
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:151
1594
  #: wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php:144
1595
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
languages/ip-geo-block.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: IP Geo Block 3.0.15\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2018-10-02 22:28+0900\n"
8
- "PO-Revision-Date: 2018-10-02 22:29+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "Language: en\n"
@@ -26,167 +26,167 @@ msgid ""
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
 
29
- #: admin/class-ip-geo-block-admin.php:291
30
  msgid "Are you sure ?"
31
  msgstr ""
32
 
33
- #: admin/class-ip-geo-block-admin.php:292
34
- #: admin/class-ip-geo-block-admin.php:793
35
  msgid "Open a new window"
36
  msgstr ""
37
 
38
- #: admin/class-ip-geo-block-admin.php:293 admin/includes/tab-settings.php:1506
39
  msgid "Generate new link"
40
  msgstr ""
41
 
42
- #: admin/class-ip-geo-block-admin.php:294 admin/includes/tab-settings.php:1507
43
  msgid "Delete current link"
44
  msgstr ""
45
 
46
- #: admin/class-ip-geo-block-admin.php:295
47
  msgid ""
48
  "Please add the following link to favorites / bookmarks in your browser : "
49
  msgstr ""
50
 
51
- #: admin/class-ip-geo-block-admin.php:296
52
  msgid "ajax for logged-in user"
53
  msgstr ""
54
 
55
- #: admin/class-ip-geo-block-admin.php:297
56
  msgid "ajax for non logged-in user"
57
  msgstr ""
58
 
59
- #: admin/class-ip-geo-block-admin.php:298
60
  #, php-format
61
  msgid "[Found: %d]"
62
  msgstr ""
63
 
64
- #: admin/class-ip-geo-block-admin.php:299
65
  #, php-format
66
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
67
  msgstr ""
68
 
69
- #: admin/class-ip-geo-block-admin.php:300
70
  msgid "This feature is available with HTML5 compliant browsers."
71
  msgstr ""
72
 
73
- #: admin/class-ip-geo-block-admin.php:301
74
  msgid "The selected row cannot be found in the table."
75
  msgstr ""
76
 
77
- #: admin/class-ip-geo-block-admin.php:302
78
- #: admin/class-ip-geo-block-admin.php:1571
79
  #, php-format
80
  msgid "An error occurred while executing the ajax command `%s`."
81
  msgstr ""
82
 
83
- #: admin/class-ip-geo-block-admin.php:306
84
  msgid "No data available in table"
85
  msgstr ""
86
 
87
- #: admin/class-ip-geo-block-admin.php:307
88
  msgid "No matching records found"
89
  msgstr ""
90
 
91
- #: admin/class-ip-geo-block-admin.php:308
92
  #: admin/includes/class-admin-ajax.php:107
93
  #: admin/includes/class-admin-ajax.php:240
94
  #: admin/includes/tab-geolocation.php:74
95
  msgid "IP address"
96
  msgstr ""
97
 
98
- #: admin/class-ip-geo-block-admin.php:309
99
  #: admin/includes/class-admin-ajax.php:108
100
  #: admin/includes/class-admin-ajax.php:241
101
  msgid "Code"
102
  msgstr ""
103
 
104
- #: admin/class-ip-geo-block-admin.php:310
105
  #: admin/includes/class-admin-ajax.php:109
106
  #: admin/includes/class-admin-ajax.php:242
107
  msgid "ASN"
108
  msgstr ""
109
 
110
- #: admin/class-ip-geo-block-admin.php:311
111
  #: admin/includes/class-admin-ajax.php:243
112
  msgid "Host name"
113
  msgstr ""
114
 
115
- #: admin/class-ip-geo-block-admin.php:312
116
  #: admin/includes/class-admin-ajax.php:110
117
  #: admin/includes/class-admin-ajax.php:244
118
  msgid "Target"
119
  msgstr ""
120
 
121
- #: admin/class-ip-geo-block-admin.php:313
122
  #: admin/includes/class-admin-ajax.php:245
123
  msgid "Failure / Total"
124
  msgstr ""
125
 
126
- #: admin/class-ip-geo-block-admin.php:314
127
  #: admin/includes/class-admin-ajax.php:246
128
  msgid "Elapsed[sec]"
129
  msgstr ""
130
 
131
- #: admin/class-ip-geo-block-admin.php:315
132
  #: admin/includes/class-admin-ajax.php:106
133
  msgid "Time"
134
  msgstr ""
135
 
136
- #: admin/class-ip-geo-block-admin.php:316
137
  #: admin/includes/class-admin-ajax.php:111
138
  msgid "Result"
139
  msgstr ""
140
 
141
- #: admin/class-ip-geo-block-admin.php:317
142
  #: admin/includes/class-admin-ajax.php:112
143
  msgid "Request"
144
  msgstr ""
145
 
146
- #: admin/class-ip-geo-block-admin.php:318
147
  #: admin/includes/class-admin-ajax.php:113
148
  msgid "User agent"
149
  msgstr ""
150
 
151
- #: admin/class-ip-geo-block-admin.php:319
152
  #: admin/includes/class-admin-ajax.php:114
153
  msgid "HTTP headers"
154
  msgstr ""
155
 
156
- #: admin/class-ip-geo-block-admin.php:320
157
  #: admin/includes/class-admin-ajax.php:115
158
  msgid "$_POST data"
159
  msgstr ""
160
 
161
- #: admin/class-ip-geo-block-admin.php:346
162
  msgid "Contribute on GitHub"
163
  msgstr ""
164
 
165
- #: admin/class-ip-geo-block-admin.php:360
166
- #: admin/class-ip-geo-block-admin.php:478
167
- #: admin/class-ip-geo-block-admin.php:736
168
  msgid "Settings"
169
  msgstr ""
170
 
171
- #: admin/class-ip-geo-block-admin.php:455
172
- #: admin/class-ip-geo-block-admin.php:456
173
- #: admin/class-ip-geo-block-admin.php:466
174
- #: admin/class-ip-geo-block-admin.php:467
175
- #: admin/class-ip-geo-block-admin.php:477
176
- #: admin/class-ip-geo-block-admin.php:487
177
  msgid "IP Geo Block"
178
  msgstr ""
179
 
180
- #: admin/class-ip-geo-block-admin.php:488
181
- #: admin/class-ip-geo-block-admin.php:741
182
- msgid "Site List"
183
  msgstr ""
184
 
185
- #: admin/class-ip-geo-block-admin.php:517
186
  msgid "You need WordPress 3.7+."
187
  msgstr ""
188
 
189
- #: admin/class-ip-geo-block-admin.php:521
190
  #, php-format
191
  msgid ""
192
  "Can not load Geolocation API libraries from <code>%s</code>. It seems to "
@@ -201,7 +201,7 @@ msgid ""
201
  "troubles? | IP Geo Block\">this instruction</a>."
202
  msgstr ""
203
 
204
- #: admin/class-ip-geo-block-admin.php:530
205
  #, php-format
206
  msgid ""
207
  "You should select at least one API at <a href=\"%s\">Geolocation API "
@@ -209,7 +209,7 @@ msgid ""
209
  "expires."
210
  msgstr ""
211
 
212
- #: admin/class-ip-geo-block-admin.php:539
213
  #, php-format
214
  msgid ""
215
  "You should select at least one API for local database at <a href=\"%s"
@@ -217,32 +217,32 @@ msgid ""
217
  "slow down the site."
218
  msgstr ""
219
 
220
- #: admin/class-ip-geo-block-admin.php:550
221
  #, php-format
222
  msgid ""
223
  "Now downloading geolocation databases in background. After a little while, "
224
  "please check your country code and &#8220;<strong>Matching rule</"
225
- "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
226
  msgstr ""
227
 
228
- #: admin/class-ip-geo-block-admin.php:556
229
  #, php-format
230
  msgid ""
231
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
232
- "confirm it at <a href=\"%s\">Validation rule settings</a>."
233
  msgstr ""
234
 
235
- #: admin/class-ip-geo-block-admin.php:565
236
  msgid "Local database and matching rule have been updated."
237
  msgstr ""
238
 
239
- #: admin/class-ip-geo-block-admin.php:576
240
  msgid ""
241
  "Once you logout, you will be unable to login again because the number of "
242
  "login attempts reaches the limit."
243
  msgstr ""
244
 
245
- #: admin/class-ip-geo-block-admin.php:578
246
  #, php-format
247
  msgid ""
248
  "Please remove your IP address in &#8220;%1$sStatistics in IP address cache"
@@ -250,32 +250,32 @@ msgid ""
250
  "yourself out."
251
  msgstr ""
252
 
253
- #: admin/class-ip-geo-block-admin.php:589
254
  msgid ""
255
  "Once you logout, you will be unable to login again because your country code "
256
  "or IP address is in the blacklist."
257
  msgstr ""
258
 
259
- #: admin/class-ip-geo-block-admin.php:590
260
  msgid ""
261
  "Once you logout, you will be unable to login again because your country code "
262
  "or IP address is not in the whitelist."
263
  msgstr ""
264
 
265
- #: admin/class-ip-geo-block-admin.php:594
266
  #, php-format
267
- msgid "Please check your &#8220;%sValidation rule settings%s&#8221;."
268
  msgstr ""
269
 
270
- #: admin/class-ip-geo-block-admin.php:598
271
  #, php-format
272
  msgid ""
273
- "Please confirm your local geolocation databases at &#8220;%sLocal database "
274
- "settings%s&#8221; section and remove your IP address in cache at &#8220;"
275
- "%sStatistics in cache%s&#8221; section."
276
  msgstr ""
277
 
278
- #: admin/class-ip-geo-block-admin.php:620
279
  #, php-format
280
  msgid ""
281
  "Emergency login link is outdated. Please delete it once and generate again "
@@ -283,90 +283,90 @@ msgid ""
283
  "favorites / bookmarks in your browser."
284
  msgstr ""
285
 
286
- #: admin/class-ip-geo-block-admin.php:629
287
  msgid ""
288
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
289
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
290
  "select &#8220;init&#8221; action hook."
291
  msgstr ""
292
 
293
- #: admin/class-ip-geo-block-admin.php:737
294
  msgid "Statistics"
295
  msgstr ""
296
 
297
- #: admin/class-ip-geo-block-admin.php:738
298
  msgid "Logs"
299
  msgstr ""
300
 
301
- #: admin/class-ip-geo-block-admin.php:739
302
  msgid "Search"
303
  msgstr ""
304
 
305
- #: admin/class-ip-geo-block-admin.php:740
306
  msgid "Attribution"
307
  msgstr ""
308
 
309
- #: admin/class-ip-geo-block-admin.php:757
310
- #: admin/class-ip-geo-block-admin.php:773
311
- msgid "Network wide"
312
  msgstr ""
313
 
314
- #: admin/class-ip-geo-block-admin.php:786
315
  msgid "Toggle all"
316
  msgstr ""
317
 
318
- #: admin/class-ip-geo-block-admin.php:789
319
  msgid ""
320
  "Independent of &#8220;Privacy and record settings&#8221;, you can see all "
321
  "the requests validated by this plugin in almost real time."
322
  msgstr ""
323
 
324
- #: admin/class-ip-geo-block-admin.php:789 admin/includes/tab-accesslog.php:39
325
  msgid "Live update"
326
  msgstr ""
327
 
328
- #: admin/class-ip-geo-block-admin.php:793
329
  msgid "Open a new window on clicking the link in the chart."
330
  msgstr ""
331
 
332
- #: admin/class-ip-geo-block-admin.php:817
333
  msgid "Thanks for providing these great services for free."
334
  msgstr ""
335
 
336
- #: admin/class-ip-geo-block-admin.php:818
337
  msgid ""
338
  "(Most browsers will redirect you to each site <a href=\"https://www."
339
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
340
  "when you click the link</a>.)"
341
  msgstr ""
342
 
343
- #: admin/class-ip-geo-block-admin.php:823
344
  msgid "Back to top"
345
  msgstr ""
346
 
347
- #: admin/class-ip-geo-block-admin.php:915
348
  msgid "Enable"
349
  msgstr ""
350
 
351
- #: admin/class-ip-geo-block-admin.php:930
352
  msgid "Select one"
353
  msgstr ""
354
 
355
- #: admin/class-ip-geo-block-admin.php:1349
356
  msgid "You do not have sufficient permissions to access this page."
357
  msgstr ""
358
 
359
- #: admin/class-ip-geo-block-admin.php:1376
360
  #: admin/includes/class-admin-rewrite.php:194
361
- #: classes/class-ip-geo-block-cron.php:216
362
- #: classes/class-ip-geo-block-cron.php:320
363
- #: classes/class-ip-geo-block-cron.php:394
364
- #: classes/class-ip-geo-block-opts.php:471
365
  #, php-format
366
  msgid "Unable to write <code>%s</code>. Please check the permission."
367
  msgstr ""
368
 
369
- #: admin/class-ip-geo-block-admin.php:1406
370
  msgid "Settings saved."
371
  msgstr ""
372
 
@@ -388,8 +388,8 @@ msgid ""
388
  msgstr ""
389
 
390
  #: admin/includes/class-admin-rewrite.php:168
391
- #: classes/class-ip-geo-block-cron.php:211
392
- #: classes/class-ip-geo-block-cron.php:389
393
  #, php-format
394
  msgid "Unable to read <code>%s</code>. Please check the permission."
395
  msgstr ""
@@ -413,23 +413,23 @@ msgstr ""
413
  msgid "Help"
414
  msgstr ""
415
 
416
- #: admin/includes/tab-accesslog.php:55 admin/includes/tab-settings.php:413
417
  msgid "Comment post"
418
  msgstr ""
419
 
420
- #: admin/includes/tab-accesslog.php:56 admin/includes/tab-settings.php:414
421
  msgid "XML-RPC"
422
  msgstr ""
423
 
424
- #: admin/includes/tab-accesslog.php:57 admin/includes/tab-settings.php:415
425
  msgid "Login form"
426
  msgstr ""
427
 
428
- #: admin/includes/tab-accesslog.php:58 admin/includes/tab-settings.php:416
429
  msgid "Admin area"
430
  msgstr ""
431
 
432
- #: admin/includes/tab-accesslog.php:59 admin/includes/tab-settings.php:418
433
  msgid "Public facing pages"
434
  msgstr ""
435
 
@@ -504,14 +504,14 @@ msgstr ""
504
  msgid "Export csv"
505
  msgstr ""
506
 
507
- #: admin/includes/tab-accesslog.php:193 admin/includes/tab-network.php:112
508
- #: admin/includes/tab-statistics.php:413
509
  #, php-format
510
  msgid "[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled."
511
  msgstr ""
512
 
513
- #: admin/includes/tab-accesslog.php:194 admin/includes/tab-network.php:113
514
- #: admin/includes/tab-statistics.php:414
515
  msgid ""
516
  "Please set the proper condition to record and analyze the validation logs."
517
  msgstr ""
@@ -528,7 +528,7 @@ msgstr ""
528
  msgid "Geolocation API"
529
  msgstr ""
530
 
531
- #: admin/includes/tab-geolocation.php:89 admin/includes/tab-settings.php:1084
532
  msgid ""
533
  "<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
534
  "Moreover, this option replaces the end of IP address with &#8220;***&#8221; "
@@ -604,7 +604,7 @@ msgid "Open CIDR calculator for IPv4 / IPv6."
604
  msgstr ""
605
 
606
  #: admin/includes/tab-settings.php:54
607
- msgid "Validation rule settings"
608
  msgstr ""
609
 
610
  #: admin/includes/tab-settings.php:76
@@ -662,7 +662,7 @@ msgid ""
662
  "country code</dfn>"
663
  msgstr ""
664
 
665
- #: admin/includes/tab-settings.php:125 admin/includes/tab-settings.php:790
666
  msgid "Matching rule"
667
  msgstr ""
668
 
@@ -692,26 +692,26 @@ msgstr ""
692
 
693
  #: admin/includes/tab-settings.php:198
694
  msgid ""
 
 
 
 
 
 
 
 
 
695
  "<dfn title=\"e.g. &#8220;192.0.64.0/18&#8221; for Jetpack server, "
696
  "&#8220;69.46.36.0/27&#8221; for WordFence server or &#8220;AS32934&#8221; "
697
  "for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
698
  msgstr ""
699
 
700
- #: admin/includes/tab-settings.php:219
701
  msgid ""
702
  "<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
703
  "\">Blacklist of extra IP addresses prior to country code</dfn>"
704
  msgstr ""
705
 
706
- #: admin/includes/tab-settings.php:240
707
- msgid ""
708
- "<dfn title=\"If your server is placed behind the proxy server or the load "
709
- "balancing server, you need to put the appropriate key such as &#8220;"
710
- "HTTP_X_FORWARDED_FOR&#8221;, &#8220;HTTP_X_REAL_IP&#8221; or something like "
711
- "that to retrieve the client IP address.\">$_SERVER keys to retrieve extra IP "
712
- "addresses</dfn>"
713
- msgstr ""
714
-
715
  #: admin/includes/tab-settings.php:258
716
  msgid ""
717
  "<dfn title=\"It validates malicious signatures independently of &#8220;Block "
@@ -758,8 +758,8 @@ msgid ""
758
  "this validation.\">Prevent malicious file uploading</dfn>"
759
  msgstr ""
760
 
761
- #: admin/includes/tab-settings.php:304 admin/includes/tab-settings.php:479
762
- #: admin/includes/tab-settings.php:624 admin/includes/tab-settings.php:1189
763
  msgid "Disable"
764
  msgstr ""
765
 
@@ -778,7 +778,7 @@ msgid ""
778
  "directory.\">Response code</dfn> %s"
779
  msgstr ""
780
 
781
- #: admin/includes/tab-settings.php:344 admin/includes/tab-settings.php:873
782
  msgid ""
783
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
784
  "to a public facing page, visitors would not be blocked on the page to "
@@ -787,7 +787,7 @@ msgid ""
787
  "\">Redirect URL</dfn>"
788
  msgstr ""
789
 
790
- #: admin/includes/tab-settings.php:361 admin/includes/tab-settings.php:891
791
  msgid ""
792
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
793
  "message</dfn>"
@@ -823,118 +823,129 @@ msgid ""
823
  "restrictions</a>."
824
  msgstr ""
825
 
826
- #: admin/includes/tab-settings.php:405
 
 
 
 
 
 
 
 
 
 
 
827
  msgid "Back-end target settings"
828
  msgstr ""
829
 
830
- #: admin/includes/tab-settings.php:411
831
  #, php-format
832
- msgid "<dfn title=\"Validate request to %s.\">%s</dfn>"
833
  msgstr ""
834
 
835
- #: admin/includes/tab-settings.php:417
836
  msgid "Other areas"
837
  msgstr ""
838
 
839
- #: admin/includes/tab-settings.php:418
840
  msgid "public facing pages"
841
  msgstr ""
842
 
843
- #: admin/includes/tab-settings.php:434 admin/includes/tab-settings.php:480
844
- #: admin/includes/tab-settings.php:512 admin/includes/tab-settings.php:518
845
- #: admin/includes/tab-settings.php:783
846
  msgid "Block by country"
847
  msgstr ""
848
 
849
- #: admin/includes/tab-settings.php:444
850
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
851
  msgstr ""
852
 
853
- #: admin/includes/tab-settings.php:444
854
  msgid "Message on comment form"
855
  msgstr ""
856
 
857
- #: admin/includes/tab-settings.php:457
858
  msgid "None"
859
  msgstr ""
860
 
861
- #: admin/includes/tab-settings.php:458
862
  msgid "Top"
863
  msgstr ""
864
 
865
- #: admin/includes/tab-settings.php:459
866
  msgid "Bottom"
867
  msgstr ""
868
 
869
- #: admin/includes/tab-settings.php:481
870
  msgid "Completely close"
871
  msgstr ""
872
 
873
- #: admin/includes/tab-settings.php:487
874
  msgid "Action to login as a registered user."
875
  msgstr ""
876
 
877
- #: admin/includes/tab-settings.php:487
878
  msgid "Log in"
879
  msgstr ""
880
 
881
- #: admin/includes/tab-settings.php:488
882
  msgid "Action to register new users."
883
  msgstr ""
884
 
885
- #: admin/includes/tab-settings.php:488
886
  msgid "Register"
887
  msgstr ""
888
 
889
- #: admin/includes/tab-settings.php:489
890
  msgid "Action to reset a password to create a new one."
891
  msgstr ""
892
 
893
- #: admin/includes/tab-settings.php:489
894
  msgid "Password Reset"
895
  msgstr ""
896
 
897
- #: admin/includes/tab-settings.php:490
898
  msgid "Action to email a password to a registered user."
899
  msgstr ""
900
 
901
- #: admin/includes/tab-settings.php:490
902
  msgid "Lost Password"
903
  msgstr ""
904
 
905
- #: admin/includes/tab-settings.php:491
906
  msgid ""
907
  "Action to show prompt to enter a password on password protected post and "
908
  "page."
909
  msgstr ""
910
 
911
- #: admin/includes/tab-settings.php:491
912
  msgid "Password protected"
913
  msgstr ""
914
 
915
- #: admin/includes/tab-settings.php:513
916
  msgid ""
917
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
918
  "actions</dfn>"
919
  msgstr ""
920
 
921
- #: admin/includes/tab-settings.php:519
922
  msgid "Prevent Zero-day Exploit"
923
  msgstr ""
924
 
925
- #: admin/includes/tab-settings.php:523
926
  msgid ""
927
  "It will block a request related to the services for both public facing pages "
928
  "and the dashboard."
929
  msgstr ""
930
 
931
- #: admin/includes/tab-settings.php:524
932
  msgid ""
933
  "Regardless of the country code, it will block a malicious request related to "
934
  "the services only for the dashboard."
935
  msgstr ""
936
 
937
- #: admin/includes/tab-settings.php:530
938
  msgid ""
939
  "This is applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221; when "
940
  "&#8220;IP address cache&#8221; in &#8220;Privacy and record settings&#8221; "
@@ -942,23 +953,23 @@ msgid ""
942
  "cache."
943
  msgstr ""
944
 
945
- #: admin/includes/tab-settings.php:530
946
  msgid "Max failed login attempts per IP address"
947
  msgstr ""
948
 
949
- #: admin/includes/tab-settings.php:571
950
  msgid "admin post for logged-in user"
951
  msgstr ""
952
 
953
- #: admin/includes/tab-settings.php:572
954
  msgid "admin post for non logged-in user"
955
  msgstr ""
956
 
957
- #: admin/includes/tab-settings.php:594
958
  msgid "Admin ajax/post"
959
  msgstr ""
960
 
961
- #: admin/includes/tab-settings.php:608
962
  msgid ""
963
  "Specify the action name (&#8220;action=&hellip;&#8221;) or the page name "
964
  "(&#8220;page=&hellip;&#8221;) to prevent unintended blocking caused by "
@@ -966,33 +977,33 @@ msgid ""
966
  "Zero-day Exploit&#8221; (for logged-in user)."
967
  msgstr ""
968
 
969
- #: admin/includes/tab-settings.php:608 admin/includes/tab-settings.php:686
970
- #: admin/includes/tab-settings.php:746
971
  msgid "Exceptions"
972
  msgstr ""
973
 
974
- #: admin/includes/tab-settings.php:609
975
  msgid "Toggle with non logged-in user"
976
  msgstr ""
977
 
978
- #: admin/includes/tab-settings.php:612
979
  msgid "Candidate actions/pages"
980
  msgstr ""
981
 
982
- #: admin/includes/tab-settings.php:626
983
  #, php-format
984
  msgid ""
985
  "Regardless of the country code, it will block a malicious request to <code>"
986
  "%s&ctdot;/*.php</code>."
987
  msgstr ""
988
 
989
- #: admin/includes/tab-settings.php:627
990
  msgid ""
991
  "Select the item which causes unintended blocking in order to exclude from "
992
  "the validation target. Grayed item indicates &#8220;INACTIVE&#8221;."
993
  msgstr ""
994
 
995
- #: admin/includes/tab-settings.php:628
996
  #, php-format
997
  msgid ""
998
  "It configures &#8220;%s&#8221; to validate a direct request to the PHP file "
@@ -1000,37 +1011,37 @@ msgid ""
1000
  "hidden files beginning with a dot by the server's configuration."
1001
  msgstr ""
1002
 
1003
- #: admin/includes/tab-settings.php:629
1004
  msgid "Sorry, but your server type is not supported."
1005
  msgstr ""
1006
 
1007
- #: admin/includes/tab-settings.php:630
1008
  msgid ""
1009
  "You need to click &#8220;Save Changes&#8221; button for imported settings to "
1010
  "take effect."
1011
  msgstr ""
1012
 
1013
- #: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:725
1014
  msgid "Force to load WP core"
1015
  msgstr ""
1016
 
1017
- #: admin/includes/tab-settings.php:670
1018
  msgid "Plugins area"
1019
  msgstr ""
1020
 
1021
- #: admin/includes/tab-settings.php:730
1022
  msgid "Themes area"
1023
  msgstr ""
1024
 
1025
- #: admin/includes/tab-settings.php:765
1026
  msgid "Front-end target settings"
1027
  msgstr ""
1028
 
1029
- #: admin/includes/tab-settings.php:800
1030
- msgid "Follow &#8220;Validation rule settings&#8221;"
1031
  msgstr ""
1032
 
1033
- #: admin/includes/tab-settings.php:842
1034
  #, php-format
1035
  msgid ""
1036
  "<dfn title=\"You can configure a different response code from the Back-end. "
@@ -1038,78 +1049,78 @@ msgid ""
1038
  "\">Response code</dfn> %s"
1039
  msgstr ""
1040
 
1041
- #: admin/includes/tab-settings.php:906
1042
  msgid ""
1043
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
1044
  msgstr ""
1045
 
1046
- #: admin/includes/tab-settings.php:918
1047
  msgid ""
1048
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
1049
  "target.\">Post type</dfn>"
1050
  msgstr ""
1051
 
1052
- #: admin/includes/tab-settings.php:930
1053
  msgid ""
1054
  "<dfn title=\"Specify the individual category on a single page or archive "
1055
  "page as a blocking target.\">Category</dfn>"
1056
  msgstr ""
1057
 
1058
- #: admin/includes/tab-settings.php:942
1059
  msgid ""
1060
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1061
  "a blocking target.\">Tag</dfn>"
1062
  msgstr ""
1063
 
1064
- #: admin/includes/tab-settings.php:956
1065
  msgid "Specify the validation target on front-end."
1066
  msgstr ""
1067
 
1068
- #: admin/includes/tab-settings.php:956
1069
  msgid "Validation target"
1070
  msgstr ""
1071
 
1072
- #: admin/includes/tab-settings.php:967
1073
  msgid "All requests"
1074
  msgstr ""
1075
 
1076
- #: admin/includes/tab-settings.php:968
1077
  msgid "Specify the targets"
1078
  msgstr ""
1079
 
1080
- #: admin/includes/tab-settings.php:971
1081
  msgid ""
1082
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1083
  "wp&#8221; action hook. It means that this feature would not be compatible "
1084
  "with any page caching."
1085
  msgstr ""
1086
 
1087
- #: admin/includes/tab-settings.php:981
1088
  msgid "Specify the name of actions as exception that is invariably blocked."
1089
  msgstr ""
1090
 
1091
- #: admin/includes/tab-settings.php:981
1092
  msgid "Excluded actions"
1093
  msgstr ""
1094
 
1095
- #: admin/includes/tab-settings.php:997
1096
  msgid ""
1097
  "<dfn title=\"Specify the frequency of request for certain period of time."
1098
  "\">Blocking condition</dfn>"
1099
  msgstr ""
1100
 
1101
- #: admin/includes/tab-settings.php:999
1102
  #, php-format
1103
  msgid "More than %1$s page view (PV) in %2$s seconds"
1104
  msgstr ""
1105
 
1106
- #: admin/includes/tab-settings.php:1007
1107
  msgid ""
1108
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1109
  "behaved bots and crawlers</dfn>"
1110
  msgstr ""
1111
 
1112
- #: admin/includes/tab-settings.php:1024
1113
  msgid ""
1114
  "A part of user agent string and a qualification connected with a separator "
1115
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
@@ -1119,11 +1130,11 @@ msgid ""
1119
  "qualification&#8221;."
1120
  msgstr ""
1121
 
1122
- #: admin/includes/tab-settings.php:1024
1123
  msgid "UA string and qualification"
1124
  msgstr ""
1125
 
1126
- #: admin/includes/tab-settings.php:1041
1127
  msgid ""
1128
  "It enables to verify the host by reverse DNS lookup which would spend some "
1129
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
@@ -1131,49 +1142,28 @@ msgid ""
1131
  "return &#8220;true&#8221;."
1132
  msgstr ""
1133
 
1134
- #: admin/includes/tab-settings.php:1041
1135
  msgid "Reverse DNS lookup"
1136
  msgstr ""
1137
 
1138
- #: admin/includes/tab-settings.php:1058
1139
- msgid ""
1140
- "It enables to simulate validation without deployment. The results can be "
1141
- "found as &#8220;public&#8221; in Logs."
1142
- msgstr ""
1143
-
1144
- #: admin/includes/tab-settings.php:1058
1145
- msgid "Simulation mode"
1146
- msgstr ""
1147
-
1148
- #: admin/includes/tab-settings.php:1076
1149
  msgid "Privacy and record settings"
1150
  msgstr ""
1151
 
1152
- #: admin/includes/tab-settings.php:1099
1153
  msgid ""
1154
  "<dfn title=\"This option restricts not to send IP address to the external "
1155
  "Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
1156
  msgstr ""
1157
 
1158
- #: admin/includes/tab-settings.php:1114
1159
- msgid ""
1160
- "<dfn title=\"This option enables to record the number blocked countries and "
1161
- "the number of blocked requests per day.\">Record &#8220;Statistics of "
1162
- "validation&#8221;</dfn>"
1163
- msgstr ""
1164
-
1165
- #: admin/includes/tab-settings.php:1129
1166
- msgid "Maximum period for &#8220;Statistics&#8221; [days]"
1167
- msgstr ""
1168
-
1169
- #: admin/includes/tab-settings.php:1147
1170
  msgid ""
1171
  "<dfn title=\"This option enables to record the IP address, country code and "
1172
  "failure counter of login attempts into the cache on database to minimize the "
1173
  "impact on site speed.\">Record &#8220;IP address cache&#8221;</dfn>"
1174
  msgstr ""
1175
 
1176
- #: admin/includes/tab-settings.php:1162
1177
  msgid ""
1178
  "<dfn title=\"If user authentication fails consecutively beyond &#8220;Max "
1179
  "number of failed login attempts per IP address&#8221;, subsequent login will "
@@ -1181,114 +1171,125 @@ msgid ""
1181
  "dfn>"
1182
  msgstr ""
1183
 
1184
- #: admin/includes/tab-settings.php:1178
1185
  msgid ""
1186
  "<dfn title=\"This option enables to record the validation logs including IP "
1187
  "addresses.\">Record &#8220;Validation logs&#8221;</dfn>"
1188
  msgstr ""
1189
 
1190
- #: admin/includes/tab-settings.php:1190
1191
  msgid "When blocked"
1192
  msgstr ""
1193
 
1194
- #: admin/includes/tab-settings.php:1191
1195
  msgid "When passed"
1196
  msgstr ""
1197
 
1198
- #: admin/includes/tab-settings.php:1192
1199
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1200
  msgstr ""
1201
 
1202
- #: admin/includes/tab-settings.php:1193
1203
  msgid "Unauthenticated visitor"
1204
  msgstr ""
1205
 
1206
- #: admin/includes/tab-settings.php:1194
1207
  msgid "Authenticated user"
1208
  msgstr ""
1209
 
1210
- #: admin/includes/tab-settings.php:1195
1211
  msgid "All the validation"
1212
  msgstr ""
1213
 
1214
- #: admin/includes/tab-settings.php:1203
1215
  #, php-format
1216
  msgid ""
1217
  "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1218
  "\">Expiration time [days] for each entry</dfn>"
1219
  msgstr ""
1220
 
1221
- #: admin/includes/tab-settings.php:1220
1222
  msgid ""
1223
  "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
1224
  "with value</dfn>"
1225
  msgstr ""
1226
 
1227
- #: admin/includes/tab-settings.php:1239
1228
  msgid "Maximum entries in &#8220;Logs&#8221;"
1229
  msgstr ""
1230
 
1231
- #: admin/includes/tab-settings.php:1256
1232
  msgid ""
1233
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1234
  "&#8220;Live update&#8221;</dfn>"
1235
  msgstr ""
1236
 
1237
- #: admin/includes/tab-settings.php:1269
1238
  msgid "Ordinary file"
1239
  msgstr ""
1240
 
1241
- #: admin/includes/tab-settings.php:1270
1242
  msgid "In-Memory"
1243
  msgstr ""
1244
 
1245
- #: admin/includes/tab-settings.php:1273
1246
  msgid "PDO_SQLITE driver not available"
1247
  msgstr ""
1248
 
1249
- #: admin/includes/tab-settings.php:1274
1250
  msgid ""
1251
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1252
  "without conflict with other plugins."
1253
  msgstr ""
1254
 
1255
- #: admin/includes/tab-settings.php:1275
1256
  msgid ""
1257
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1258
  "with other plugins using this method."
1259
  msgstr ""
1260
 
1261
- #: admin/includes/tab-settings.php:1283
1262
  msgid "Reset database source of &#8220;Live update&#8221;"
1263
  msgstr ""
1264
 
1265
- #: admin/includes/tab-settings.php:1291
1266
  msgid "Reset now"
1267
  msgstr ""
1268
 
1269
- #: admin/includes/tab-settings.php:1300 admin/includes/tab-settings.php:1427
1270
  msgid ""
1271
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1272
  "once and activate again."
1273
  msgstr ""
1274
 
1275
- #: admin/includes/tab-settings.php:1305
1276
  msgid ""
1277
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1278
- "expired entries in &#8220;IP address cache&#8221; and &#8220;Logs&#8221;."
1279
- "\">Interval [sec] to cleanup expired entries of IP address</dfn>"
1280
  msgstr ""
1281
 
1282
- #: admin/includes/tab-settings.php:1314 admin/includes/tab-settings.php:1443
1283
  #, php-format
1284
  msgid "Next schedule: %s"
1285
  msgstr ""
1286
 
1287
- #: admin/includes/tab-settings.php:1321
 
 
 
 
 
 
 
 
 
 
 
1288
  msgid "Remove all settings and records at uninstallation"
1289
  msgstr ""
1290
 
1291
- #: admin/includes/tab-settings.php:1338
1292
  msgid "Geolocation API settings"
1293
  msgstr ""
1294
 
@@ -1310,7 +1311,7 @@ msgstr ""
1310
  msgid "database"
1311
  msgstr ""
1312
 
1313
- #: admin/includes/tab-settings.php:1410 classes/class-ip-geo-block-cron.php:418
1314
  #, php-format
1315
  msgid "Last update: %s"
1316
  msgstr ""
@@ -1347,9 +1348,9 @@ msgstr ""
1347
 
1348
  #: admin/includes/tab-settings.php:1515
1349
  msgid ""
1350
- "<dfn title=\"Valid key for Google Maps JavaScript API. A free tier has limit "
1351
- "even if it's &#8220;default&#8221;. Maps Embed API without key can be "
1352
- "available in case of empty.\">Google Maps API key</dfn>"
1353
  msgstr ""
1354
 
1355
  #: admin/includes/tab-settings.php:1531
@@ -1393,11 +1394,11 @@ msgid "Best for Back-end"
1393
  msgstr ""
1394
 
1395
  #: admin/includes/tab-settings.php:1564
1396
- msgid "DB tables for this plugin"
1397
  msgstr ""
1398
 
1399
  #: admin/includes/tab-settings.php:1572
1400
- msgid "Initialize now"
1401
  msgstr ""
1402
 
1403
  #: admin/includes/tab-settings.php:1581
@@ -1437,7 +1438,14 @@ msgid ""
1437
  "2.0.0+%s."
1438
  msgstr ""
1439
 
1440
- #: admin/includes/tab-statistics.php:19
 
 
 
 
 
 
 
1441
  msgid "Statistics of validation"
1442
  msgstr ""
1443
 
@@ -1513,40 +1521,40 @@ msgstr ""
1513
  msgid "Slug in back-end"
1514
  msgstr ""
1515
 
1516
- #: admin/includes/tab-statistics.php:355
1517
  msgid "Toggle sorting order"
1518
  msgstr ""
1519
 
1520
- #: admin/includes/tab-statistics.php:406
1521
  #, php-format
1522
  msgid "[ %sRecord &#8220;Statistics of validation&#8221;%s ] is disabled."
1523
  msgstr ""
1524
 
1525
- #: admin/includes/tab-statistics.php:407
1526
  msgid ""
1527
  "Please set the proper condition to record and analyze the validation "
1528
  "statistics."
1529
  msgstr ""
1530
 
1531
- #: admin/includes/tab-statistics.php:420
1532
  #, php-format
1533
  msgid "[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled."
1534
  msgstr ""
1535
 
1536
- #: admin/includes/tab-statistics.php:421
1537
  msgid "Please set the proper condition to record IP address in cache."
1538
  msgstr ""
1539
 
1540
- #: classes/class-ip-geo-block-cron.php:221
1541
  #, php-format
1542
  msgid "Can't lock <code>%s</code>. Please try again after a while."
1543
  msgstr ""
1544
 
1545
- #: classes/class-ip-geo-block-cron.php:300
1546
  msgid "Your database file is up-to-date."
1547
  msgstr ""
1548
 
1549
- #: classes/class-ip-geo-block-cron.php:399
1550
  msgid "gz or zip is not supported on your system."
1551
  msgstr ""
1552
 
@@ -1575,17 +1583,13 @@ msgid ""
1575
  "activate again."
1576
  msgstr ""
1577
 
1578
- #: classes/class-ip-geo-block-logs.php:241
1579
  #, php-format
1580
  msgid ""
1581
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1582
  "again."
1583
  msgstr ""
1584
 
1585
- #: classes/class-ip-geo-block.php:417
1586
- msgid "Dashboard"
1587
- msgstr ""
1588
-
1589
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:151
1590
  #: wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php:144
1591
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: IP Geo Block 3.0.16\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2018-11-01 22:01+0900\n"
8
+ "PO-Revision-Date: 2018-11-01 22:01+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "Language: en\n"
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
 
29
+ #: admin/class-ip-geo-block-admin.php:297
30
  msgid "Are you sure ?"
31
  msgstr ""
32
 
33
+ #: admin/class-ip-geo-block-admin.php:298
34
+ #: admin/class-ip-geo-block-admin.php:790
35
  msgid "Open a new window"
36
  msgstr ""
37
 
38
+ #: admin/class-ip-geo-block-admin.php:299 admin/includes/tab-settings.php:1506
39
  msgid "Generate new link"
40
  msgstr ""
41
 
42
+ #: admin/class-ip-geo-block-admin.php:300 admin/includes/tab-settings.php:1507
43
  msgid "Delete current link"
44
  msgstr ""
45
 
46
+ #: admin/class-ip-geo-block-admin.php:301
47
  msgid ""
48
  "Please add the following link to favorites / bookmarks in your browser : "
49
  msgstr ""
50
 
51
+ #: admin/class-ip-geo-block-admin.php:302
52
  msgid "ajax for logged-in user"
53
  msgstr ""
54
 
55
+ #: admin/class-ip-geo-block-admin.php:303
56
  msgid "ajax for non logged-in user"
57
  msgstr ""
58
 
59
+ #: admin/class-ip-geo-block-admin.php:304
60
  #, php-format
61
  msgid "[Found: %d]"
62
  msgstr ""
63
 
64
+ #: admin/class-ip-geo-block-admin.php:305
65
  #, php-format
66
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
67
  msgstr ""
68
 
69
+ #: admin/class-ip-geo-block-admin.php:306
70
  msgid "This feature is available with HTML5 compliant browsers."
71
  msgstr ""
72
 
73
+ #: admin/class-ip-geo-block-admin.php:307
74
  msgid "The selected row cannot be found in the table."
75
  msgstr ""
76
 
77
+ #: admin/class-ip-geo-block-admin.php:308
78
+ #: admin/class-ip-geo-block-admin.php:1568
79
  #, php-format
80
  msgid "An error occurred while executing the ajax command `%s`."
81
  msgstr ""
82
 
83
+ #: admin/class-ip-geo-block-admin.php:312
84
  msgid "No data available in table"
85
  msgstr ""
86
 
87
+ #: admin/class-ip-geo-block-admin.php:313
88
  msgid "No matching records found"
89
  msgstr ""
90
 
91
+ #: admin/class-ip-geo-block-admin.php:314
92
  #: admin/includes/class-admin-ajax.php:107
93
  #: admin/includes/class-admin-ajax.php:240
94
  #: admin/includes/tab-geolocation.php:74
95
  msgid "IP address"
96
  msgstr ""
97
 
98
+ #: admin/class-ip-geo-block-admin.php:315
99
  #: admin/includes/class-admin-ajax.php:108
100
  #: admin/includes/class-admin-ajax.php:241
101
  msgid "Code"
102
  msgstr ""
103
 
104
+ #: admin/class-ip-geo-block-admin.php:316
105
  #: admin/includes/class-admin-ajax.php:109
106
  #: admin/includes/class-admin-ajax.php:242
107
  msgid "ASN"
108
  msgstr ""
109
 
110
+ #: admin/class-ip-geo-block-admin.php:317
111
  #: admin/includes/class-admin-ajax.php:243
112
  msgid "Host name"
113
  msgstr ""
114
 
115
+ #: admin/class-ip-geo-block-admin.php:318
116
  #: admin/includes/class-admin-ajax.php:110
117
  #: admin/includes/class-admin-ajax.php:244
118
  msgid "Target"
119
  msgstr ""
120
 
121
+ #: admin/class-ip-geo-block-admin.php:319
122
  #: admin/includes/class-admin-ajax.php:245
123
  msgid "Failure / Total"
124
  msgstr ""
125
 
126
+ #: admin/class-ip-geo-block-admin.php:320
127
  #: admin/includes/class-admin-ajax.php:246
128
  msgid "Elapsed[sec]"
129
  msgstr ""
130
 
131
+ #: admin/class-ip-geo-block-admin.php:321
132
  #: admin/includes/class-admin-ajax.php:106
133
  msgid "Time"
134
  msgstr ""
135
 
136
+ #: admin/class-ip-geo-block-admin.php:322
137
  #: admin/includes/class-admin-ajax.php:111
138
  msgid "Result"
139
  msgstr ""
140
 
141
+ #: admin/class-ip-geo-block-admin.php:323
142
  #: admin/includes/class-admin-ajax.php:112
143
  msgid "Request"
144
  msgstr ""
145
 
146
+ #: admin/class-ip-geo-block-admin.php:324
147
  #: admin/includes/class-admin-ajax.php:113
148
  msgid "User agent"
149
  msgstr ""
150
 
151
+ #: admin/class-ip-geo-block-admin.php:325
152
  #: admin/includes/class-admin-ajax.php:114
153
  msgid "HTTP headers"
154
  msgstr ""
155
 
156
+ #: admin/class-ip-geo-block-admin.php:326
157
  #: admin/includes/class-admin-ajax.php:115
158
  msgid "$_POST data"
159
  msgstr ""
160
 
161
+ #: admin/class-ip-geo-block-admin.php:352
162
  msgid "Contribute on GitHub"
163
  msgstr ""
164
 
165
+ #: admin/class-ip-geo-block-admin.php:366
166
+ #: admin/class-ip-geo-block-admin.php:483
167
+ #: admin/class-ip-geo-block-admin.php:733
168
  msgid "Settings"
169
  msgstr ""
170
 
171
+ #: admin/class-ip-geo-block-admin.php:460
172
+ #: admin/class-ip-geo-block-admin.php:461
173
+ #: admin/class-ip-geo-block-admin.php:471
174
+ #: admin/class-ip-geo-block-admin.php:472
175
+ #: admin/class-ip-geo-block-admin.php:482
176
+ #: admin/class-ip-geo-block-admin.php:492
177
  msgid "IP Geo Block"
178
  msgstr ""
179
 
180
+ #: admin/class-ip-geo-block-admin.php:493
181
+ #: admin/class-ip-geo-block-admin.php:738
182
+ msgid "Sites list"
183
  msgstr ""
184
 
185
+ #: admin/class-ip-geo-block-admin.php:522
186
  msgid "You need WordPress 3.7+."
187
  msgstr ""
188
 
189
+ #: admin/class-ip-geo-block-admin.php:526
190
  #, php-format
191
  msgid ""
192
  "Can not load Geolocation API libraries from <code>%s</code>. It seems to "
201
  "troubles? | IP Geo Block\">this instruction</a>."
202
  msgstr ""
203
 
204
+ #: admin/class-ip-geo-block-admin.php:535
205
  #, php-format
206
  msgid ""
207
  "You should select at least one API at <a href=\"%s\">Geolocation API "
209
  "expires."
210
  msgstr ""
211
 
212
+ #: admin/class-ip-geo-block-admin.php:544
213
  #, php-format
214
  msgid ""
215
  "You should select at least one API for local database at <a href=\"%s"
217
  "slow down the site."
218
  msgstr ""
219
 
220
+ #: admin/class-ip-geo-block-admin.php:555
221
  #, php-format
222
  msgid ""
223
  "Now downloading geolocation databases in background. After a little while, "
224
  "please check your country code and &#8220;<strong>Matching rule</"
225
+ "strong>&#8221; at <a href=\"%s\">Validation rules and behavior</a>."
226
  msgstr ""
227
 
228
+ #: admin/class-ip-geo-block-admin.php:561
229
  #, php-format
230
  msgid ""
231
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
232
+ "confirm it at <a href=\"%s\">Validation rules and behavior</a>."
233
  msgstr ""
234
 
235
+ #: admin/class-ip-geo-block-admin.php:570
236
  msgid "Local database and matching rule have been updated."
237
  msgstr ""
238
 
239
+ #: admin/class-ip-geo-block-admin.php:581
240
  msgid ""
241
  "Once you logout, you will be unable to login again because the number of "
242
  "login attempts reaches the limit."
243
  msgstr ""
244
 
245
+ #: admin/class-ip-geo-block-admin.php:583
246
  #, php-format
247
  msgid ""
248
  "Please remove your IP address in &#8220;%1$sStatistics in IP address cache"
250
  "yourself out."
251
  msgstr ""
252
 
253
+ #: admin/class-ip-geo-block-admin.php:594
254
  msgid ""
255
  "Once you logout, you will be unable to login again because your country code "
256
  "or IP address is in the blacklist."
257
  msgstr ""
258
 
259
+ #: admin/class-ip-geo-block-admin.php:595
260
  msgid ""
261
  "Once you logout, you will be unable to login again because your country code "
262
  "or IP address is not in the whitelist."
263
  msgstr ""
264
 
265
+ #: admin/class-ip-geo-block-admin.php:599
266
  #, php-format
267
+ msgid "Please check your &#8220;%sValidation rules and behavior%s&#8221;."
268
  msgstr ""
269
 
270
+ #: admin/class-ip-geo-block-admin.php:603
271
  #, php-format
272
  msgid ""
273
+ "Please confirm your local geolocation database files exist at &#8220;%sLocal "
274
+ "database settings%s&#8221; section, or remove your IP address in cache at "
275
+ "&#8220;%sStatistics in cache%s&#8221; section."
276
  msgstr ""
277
 
278
+ #: admin/class-ip-geo-block-admin.php:617
279
  #, php-format
280
  msgid ""
281
  "Emergency login link is outdated. Please delete it once and generate again "
283
  "favorites / bookmarks in your browser."
284
  msgstr ""
285
 
286
+ #: admin/class-ip-geo-block-admin.php:626
287
  msgid ""
288
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
289
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
290
  "select &#8220;init&#8221; action hook."
291
  msgstr ""
292
 
293
+ #: admin/class-ip-geo-block-admin.php:734
294
  msgid "Statistics"
295
  msgstr ""
296
 
297
+ #: admin/class-ip-geo-block-admin.php:735
298
  msgid "Logs"
299
  msgstr ""
300
 
301
+ #: admin/class-ip-geo-block-admin.php:736
302
  msgid "Search"
303
  msgstr ""
304
 
305
+ #: admin/class-ip-geo-block-admin.php:737
306
  msgid "Attribution"
307
  msgstr ""
308
 
309
+ #: admin/class-ip-geo-block-admin.php:754
310
+ #: admin/class-ip-geo-block-admin.php:770
311
+ msgid "Network"
312
  msgstr ""
313
 
314
+ #: admin/class-ip-geo-block-admin.php:783
315
  msgid "Toggle all"
316
  msgstr ""
317
 
318
+ #: admin/class-ip-geo-block-admin.php:786
319
  msgid ""
320
  "Independent of &#8220;Privacy and record settings&#8221;, you can see all "
321
  "the requests validated by this plugin in almost real time."
322
  msgstr ""
323
 
324
+ #: admin/class-ip-geo-block-admin.php:786 admin/includes/tab-accesslog.php:39
325
  msgid "Live update"
326
  msgstr ""
327
 
328
+ #: admin/class-ip-geo-block-admin.php:790
329
  msgid "Open a new window on clicking the link in the chart."
330
  msgstr ""
331
 
332
+ #: admin/class-ip-geo-block-admin.php:814
333
  msgid "Thanks for providing these great services for free."
334
  msgstr ""
335
 
336
+ #: admin/class-ip-geo-block-admin.php:815
337
  msgid ""
338
  "(Most browsers will redirect you to each site <a href=\"https://www."
339
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
340
  "when you click the link</a>.)"
341
  msgstr ""
342
 
343
+ #: admin/class-ip-geo-block-admin.php:820
344
  msgid "Back to top"
345
  msgstr ""
346
 
347
+ #: admin/class-ip-geo-block-admin.php:912
348
  msgid "Enable"
349
  msgstr ""
350
 
351
+ #: admin/class-ip-geo-block-admin.php:927
352
  msgid "Select one"
353
  msgstr ""
354
 
355
+ #: admin/class-ip-geo-block-admin.php:1346
356
  msgid "You do not have sufficient permissions to access this page."
357
  msgstr ""
358
 
359
+ #: admin/class-ip-geo-block-admin.php:1373
360
  #: admin/includes/class-admin-rewrite.php:194
361
+ #: classes/class-ip-geo-block-cron.php:218
362
+ #: classes/class-ip-geo-block-cron.php:322
363
+ #: classes/class-ip-geo-block-cron.php:400
364
+ #: classes/class-ip-geo-block-opts.php:469
365
  #, php-format
366
  msgid "Unable to write <code>%s</code>. Please check the permission."
367
  msgstr ""
368
 
369
+ #: admin/class-ip-geo-block-admin.php:1403
370
  msgid "Settings saved."
371
  msgstr ""
372
 
388
  msgstr ""
389
 
390
  #: admin/includes/class-admin-rewrite.php:168
391
+ #: classes/class-ip-geo-block-cron.php:213
392
+ #: classes/class-ip-geo-block-cron.php:395
393
  #, php-format
394
  msgid "Unable to read <code>%s</code>. Please check the permission."
395
  msgstr ""
413
  msgid "Help"
414
  msgstr ""
415
 
416
+ #: admin/includes/tab-accesslog.php:55 admin/includes/tab-settings.php:428
417
  msgid "Comment post"
418
  msgstr ""
419
 
420
+ #: admin/includes/tab-accesslog.php:56 admin/includes/tab-settings.php:429
421
  msgid "XML-RPC"
422
  msgstr ""
423
 
424
+ #: admin/includes/tab-accesslog.php:57 admin/includes/tab-settings.php:430
425
  msgid "Login form"
426
  msgstr ""
427
 
428
+ #: admin/includes/tab-accesslog.php:58 admin/includes/tab-settings.php:431
429
  msgid "Admin area"
430
  msgstr ""
431
 
432
+ #: admin/includes/tab-accesslog.php:59 admin/includes/tab-settings.php:433
433
  msgid "Public facing pages"
434
  msgstr ""
435
 
504
  msgid "Export csv"
505
  msgstr ""
506
 
507
+ #: admin/includes/tab-accesslog.php:198 admin/includes/tab-network.php:112
508
+ #: admin/includes/tab-statistics.php:410
509
  #, php-format
510
  msgid "[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled."
511
  msgstr ""
512
 
513
+ #: admin/includes/tab-accesslog.php:199 admin/includes/tab-network.php:113
514
+ #: admin/includes/tab-statistics.php:411
515
  msgid ""
516
  "Please set the proper condition to record and analyze the validation logs."
517
  msgstr ""
528
  msgid "Geolocation API"
529
  msgstr ""
530
 
531
+ #: admin/includes/tab-geolocation.php:89 admin/includes/tab-settings.php:1083
532
  msgid ""
533
  "<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
534
  "Moreover, this option replaces the end of IP address with &#8220;***&#8221; "
604
  msgstr ""
605
 
606
  #: admin/includes/tab-settings.php:54
607
+ msgid "Validation rules and behavior"
608
  msgstr ""
609
 
610
  #: admin/includes/tab-settings.php:76
662
  "country code</dfn>"
663
  msgstr ""
664
 
665
+ #: admin/includes/tab-settings.php:125 admin/includes/tab-settings.php:805
666
  msgid "Matching rule"
667
  msgstr ""
668
 
692
 
693
  #: admin/includes/tab-settings.php:198
694
  msgid ""
695
+ "<dfn title=\"If your server is placed behind the proxy server or the load "
696
+ "balancing server, you need to put the appropriate key such as &#8220;"
697
+ "HTTP_X_FORWARDED_FOR&#8221;, &#8220;HTTP_X_REAL_IP&#8221; or something like "
698
+ "that to retrieve the client IP address.\">$_SERVER keys to retrieve extra IP "
699
+ "addresses</dfn>"
700
+ msgstr ""
701
+
702
+ #: admin/includes/tab-settings.php:216
703
+ msgid ""
704
  "<dfn title=\"e.g. &#8220;192.0.64.0/18&#8221; for Jetpack server, "
705
  "&#8220;69.46.36.0/27&#8221; for WordFence server or &#8220;AS32934&#8221; "
706
  "for Facebook.\">Whitelist of extra IP addresses prior to country code</dfn>"
707
  msgstr ""
708
 
709
+ #: admin/includes/tab-settings.php:237
710
  msgid ""
711
  "<dfn title=\"Server level access control is recommended (e.g. .htaccess)."
712
  "\">Blacklist of extra IP addresses prior to country code</dfn>"
713
  msgstr ""
714
 
 
 
 
 
 
 
 
 
 
715
  #: admin/includes/tab-settings.php:258
716
  msgid ""
717
  "<dfn title=\"It validates malicious signatures independently of &#8220;Block "
758
  "this validation.\">Prevent malicious file uploading</dfn>"
759
  msgstr ""
760
 
761
+ #: admin/includes/tab-settings.php:304 admin/includes/tab-settings.php:494
762
+ #: admin/includes/tab-settings.php:639 admin/includes/tab-settings.php:1155
763
  msgid "Disable"
764
  msgstr ""
765
 
778
  "directory.\">Response code</dfn> %s"
779
  msgstr ""
780
 
781
+ #: admin/includes/tab-settings.php:344 admin/includes/tab-settings.php:888
782
  msgid ""
783
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
784
  "to a public facing page, visitors would not be blocked on the page to "
787
  "\">Redirect URL</dfn>"
788
  msgstr ""
789
 
790
+ #: admin/includes/tab-settings.php:361 admin/includes/tab-settings.php:906
791
  msgid ""
792
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
793
  "message</dfn>"
823
  "restrictions</a>."
824
  msgstr ""
825
 
826
+ #: admin/includes/tab-settings.php:403
827
+ msgid ""
828
+ "It enables to simulate the validation rules without actual blocking in order "
829
+ "to check the behavior of this plugin. The results can be found on &#8220;"
830
+ "Logs&#8221; tab."
831
+ msgstr ""
832
+
833
+ #: admin/includes/tab-settings.php:403
834
+ msgid "Simulation mode"
835
+ msgstr ""
836
+
837
+ #: admin/includes/tab-settings.php:420
838
  msgid "Back-end target settings"
839
  msgstr ""
840
 
841
+ #: admin/includes/tab-settings.php:426
842
  #, php-format
843
+ msgid "<dfn title=\"It enables to validate requests to %s.\">%s</dfn>"
844
  msgstr ""
845
 
846
+ #: admin/includes/tab-settings.php:432
847
  msgid "Other areas"
848
  msgstr ""
849
 
850
+ #: admin/includes/tab-settings.php:433
851
  msgid "public facing pages"
852
  msgstr ""
853
 
854
+ #: admin/includes/tab-settings.php:449 admin/includes/tab-settings.php:495
855
+ #: admin/includes/tab-settings.php:527 admin/includes/tab-settings.php:533
856
+ #: admin/includes/tab-settings.php:798
857
  msgid "Block by country"
858
  msgstr ""
859
 
860
+ #: admin/includes/tab-settings.php:459
861
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
862
  msgstr ""
863
 
864
+ #: admin/includes/tab-settings.php:459
865
  msgid "Message on comment form"
866
  msgstr ""
867
 
868
+ #: admin/includes/tab-settings.php:472
869
  msgid "None"
870
  msgstr ""
871
 
872
+ #: admin/includes/tab-settings.php:473
873
  msgid "Top"
874
  msgstr ""
875
 
876
+ #: admin/includes/tab-settings.php:474
877
  msgid "Bottom"
878
  msgstr ""
879
 
880
+ #: admin/includes/tab-settings.php:496
881
  msgid "Completely close"
882
  msgstr ""
883
 
884
+ #: admin/includes/tab-settings.php:502
885
  msgid "Action to login as a registered user."
886
  msgstr ""
887
 
888
+ #: admin/includes/tab-settings.php:502
889
  msgid "Log in"
890
  msgstr ""
891
 
892
+ #: admin/includes/tab-settings.php:503
893
  msgid "Action to register new users."
894
  msgstr ""
895
 
896
+ #: admin/includes/tab-settings.php:503
897
  msgid "Register"
898
  msgstr ""
899
 
900
+ #: admin/includes/tab-settings.php:504
901
  msgid "Action to reset a password to create a new one."
902
  msgstr ""
903
 
904
+ #: admin/includes/tab-settings.php:504
905
  msgid "Password Reset"
906
  msgstr ""
907
 
908
+ #: admin/includes/tab-settings.php:505
909
  msgid "Action to email a password to a registered user."
910
  msgstr ""
911
 
912
+ #: admin/includes/tab-settings.php:505
913
  msgid "Lost Password"
914
  msgstr ""
915
 
916
+ #: admin/includes/tab-settings.php:506
917
  msgid ""
918
  "Action to show prompt to enter a password on password protected post and "
919
  "page."
920
  msgstr ""
921
 
922
+ #: admin/includes/tab-settings.php:506
923
  msgid "Password protected"
924
  msgstr ""
925
 
926
+ #: admin/includes/tab-settings.php:528
927
  msgid ""
928
  "<dfn title=\"Specify the individual action as a blocking target.\">Target "
929
  "actions</dfn>"
930
  msgstr ""
931
 
932
+ #: admin/includes/tab-settings.php:534
933
  msgid "Prevent Zero-day Exploit"
934
  msgstr ""
935
 
936
+ #: admin/includes/tab-settings.php:538
937
  msgid ""
938
  "It will block a request related to the services for both public facing pages "
939
  "and the dashboard."
940
  msgstr ""
941
 
942
+ #: admin/includes/tab-settings.php:539
943
  msgid ""
944
  "Regardless of the country code, it will block a malicious request related to "
945
  "the services only for the dashboard."
946
  msgstr ""
947
 
948
+ #: admin/includes/tab-settings.php:545
949
  msgid ""
950
  "This is applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221; when "
951
  "&#8220;IP address cache&#8221; in &#8220;Privacy and record settings&#8221; "
953
  "cache."
954
  msgstr ""
955
 
956
+ #: admin/includes/tab-settings.php:545
957
  msgid "Max failed login attempts per IP address"
958
  msgstr ""
959
 
960
+ #: admin/includes/tab-settings.php:586
961
  msgid "admin post for logged-in user"
962
  msgstr ""
963
 
964
+ #: admin/includes/tab-settings.php:587
965
  msgid "admin post for non logged-in user"
966
  msgstr ""
967
 
968
+ #: admin/includes/tab-settings.php:609
969
  msgid "Admin ajax/post"
970
  msgstr ""
971
 
972
+ #: admin/includes/tab-settings.php:623
973
  msgid ""
974
  "Specify the action name (&#8220;action=&hellip;&#8221;) or the page name "
975
  "(&#8220;page=&hellip;&#8221;) to prevent unintended blocking caused by "
977
  "Zero-day Exploit&#8221; (for logged-in user)."
978
  msgstr ""
979
 
980
+ #: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:701
981
+ #: admin/includes/tab-settings.php:761
982
  msgid "Exceptions"
983
  msgstr ""
984
 
985
+ #: admin/includes/tab-settings.php:624
986
  msgid "Toggle with non logged-in user"
987
  msgstr ""
988
 
989
+ #: admin/includes/tab-settings.php:627
990
  msgid "Candidate actions/pages"
991
  msgstr ""
992
 
993
+ #: admin/includes/tab-settings.php:641
994
  #, php-format
995
  msgid ""
996
  "Regardless of the country code, it will block a malicious request to <code>"
997
  "%s&ctdot;/*.php</code>."
998
  msgstr ""
999
 
1000
+ #: admin/includes/tab-settings.php:642
1001
  msgid ""
1002
  "Select the item which causes unintended blocking in order to exclude from "
1003
  "the validation target. Grayed item indicates &#8220;INACTIVE&#8221;."
1004
  msgstr ""
1005
 
1006
+ #: admin/includes/tab-settings.php:643
1007
  #, php-format
1008
  msgid ""
1009
  "It configures &#8220;%s&#8221; to validate a direct request to the PHP file "
1011
  "hidden files beginning with a dot by the server's configuration."
1012
  msgstr ""
1013
 
1014
+ #: admin/includes/tab-settings.php:644
1015
  msgid "Sorry, but your server type is not supported."
1016
  msgstr ""
1017
 
1018
+ #: admin/includes/tab-settings.php:645
1019
  msgid ""
1020
  "You need to click &#8220;Save Changes&#8221; button for imported settings to "
1021
  "take effect."
1022
  msgstr ""
1023
 
1024
+ #: admin/includes/tab-settings.php:680 admin/includes/tab-settings.php:740
1025
  msgid "Force to load WP core"
1026
  msgstr ""
1027
 
1028
+ #: admin/includes/tab-settings.php:685
1029
  msgid "Plugins area"
1030
  msgstr ""
1031
 
1032
+ #: admin/includes/tab-settings.php:745
1033
  msgid "Themes area"
1034
  msgstr ""
1035
 
1036
+ #: admin/includes/tab-settings.php:780
1037
  msgid "Front-end target settings"
1038
  msgstr ""
1039
 
1040
+ #: admin/includes/tab-settings.php:815
1041
+ msgid "Follow &#8220;Validation rules and behavior&#8221;"
1042
  msgstr ""
1043
 
1044
+ #: admin/includes/tab-settings.php:857
1045
  #, php-format
1046
  msgid ""
1047
  "<dfn title=\"You can configure a different response code from the Back-end. "
1049
  "\">Response code</dfn> %s"
1050
  msgstr ""
1051
 
1052
+ #: admin/includes/tab-settings.php:921
1053
  msgid ""
1054
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
1055
  msgstr ""
1056
 
1057
+ #: admin/includes/tab-settings.php:933
1058
  msgid ""
1059
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
1060
  "target.\">Post type</dfn>"
1061
  msgstr ""
1062
 
1063
+ #: admin/includes/tab-settings.php:945
1064
  msgid ""
1065
  "<dfn title=\"Specify the individual category on a single page or archive "
1066
  "page as a blocking target.\">Category</dfn>"
1067
  msgstr ""
1068
 
1069
+ #: admin/includes/tab-settings.php:957
1070
  msgid ""
1071
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1072
  "a blocking target.\">Tag</dfn>"
1073
  msgstr ""
1074
 
1075
+ #: admin/includes/tab-settings.php:971
1076
  msgid "Specify the validation target on front-end."
1077
  msgstr ""
1078
 
1079
+ #: admin/includes/tab-settings.php:971
1080
  msgid "Validation target"
1081
  msgstr ""
1082
 
1083
+ #: admin/includes/tab-settings.php:982
1084
  msgid "All requests"
1085
  msgstr ""
1086
 
1087
+ #: admin/includes/tab-settings.php:983
1088
  msgid "Specify the targets"
1089
  msgstr ""
1090
 
1091
+ #: admin/includes/tab-settings.php:986
1092
  msgid ""
1093
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1094
  "wp&#8221; action hook. It means that this feature would not be compatible "
1095
  "with any page caching."
1096
  msgstr ""
1097
 
1098
+ #: admin/includes/tab-settings.php:996
1099
  msgid "Specify the name of actions as exception that is invariably blocked."
1100
  msgstr ""
1101
 
1102
+ #: admin/includes/tab-settings.php:996
1103
  msgid "Excluded actions"
1104
  msgstr ""
1105
 
1106
+ #: admin/includes/tab-settings.php:1012
1107
  msgid ""
1108
  "<dfn title=\"Specify the frequency of request for certain period of time."
1109
  "\">Blocking condition</dfn>"
1110
  msgstr ""
1111
 
1112
+ #: admin/includes/tab-settings.php:1014
1113
  #, php-format
1114
  msgid "More than %1$s page view (PV) in %2$s seconds"
1115
  msgstr ""
1116
 
1117
+ #: admin/includes/tab-settings.php:1022
1118
  msgid ""
1119
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1120
  "behaved bots and crawlers</dfn>"
1121
  msgstr ""
1122
 
1123
+ #: admin/includes/tab-settings.php:1039
1124
  msgid ""
1125
  "A part of user agent string and a qualification connected with a separator "
1126
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
1130
  "qualification&#8221;."
1131
  msgstr ""
1132
 
1133
+ #: admin/includes/tab-settings.php:1039
1134
  msgid "UA string and qualification"
1135
  msgstr ""
1136
 
1137
+ #: admin/includes/tab-settings.php:1056
1138
  msgid ""
1139
  "It enables to verify the host by reverse DNS lookup which would spend some "
1140
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
1142
  "return &#8220;true&#8221;."
1143
  msgstr ""
1144
 
1145
+ #: admin/includes/tab-settings.php:1056
1146
  msgid "Reverse DNS lookup"
1147
  msgstr ""
1148
 
1149
+ #: admin/includes/tab-settings.php:1075
 
 
 
 
 
 
 
 
 
 
1150
  msgid "Privacy and record settings"
1151
  msgstr ""
1152
 
1153
+ #: admin/includes/tab-settings.php:1098
1154
  msgid ""
1155
  "<dfn title=\"This option restricts not to send IP address to the external "
1156
  "Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
1157
  msgstr ""
1158
 
1159
+ #: admin/includes/tab-settings.php:1113
 
 
 
 
 
 
 
 
 
 
 
1160
  msgid ""
1161
  "<dfn title=\"This option enables to record the IP address, country code and "
1162
  "failure counter of login attempts into the cache on database to minimize the "
1163
  "impact on site speed.\">Record &#8220;IP address cache&#8221;</dfn>"
1164
  msgstr ""
1165
 
1166
+ #: admin/includes/tab-settings.php:1128
1167
  msgid ""
1168
  "<dfn title=\"If user authentication fails consecutively beyond &#8220;Max "
1169
  "number of failed login attempts per IP address&#8221;, subsequent login will "
1171
  "dfn>"
1172
  msgstr ""
1173
 
1174
+ #: admin/includes/tab-settings.php:1144
1175
  msgid ""
1176
  "<dfn title=\"This option enables to record the validation logs including IP "
1177
  "addresses.\">Record &#8220;Validation logs&#8221;</dfn>"
1178
  msgstr ""
1179
 
1180
+ #: admin/includes/tab-settings.php:1156
1181
  msgid "When blocked"
1182
  msgstr ""
1183
 
1184
+ #: admin/includes/tab-settings.php:1157
1185
  msgid "When passed"
1186
  msgstr ""
1187
 
1188
+ #: admin/includes/tab-settings.php:1158
1189
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1190
  msgstr ""
1191
 
1192
+ #: admin/includes/tab-settings.php:1159
1193
  msgid "Unauthenticated visitor"
1194
  msgstr ""
1195
 
1196
+ #: admin/includes/tab-settings.php:1160
1197
  msgid "Authenticated user"
1198
  msgstr ""
1199
 
1200
+ #: admin/includes/tab-settings.php:1161
1201
  msgid "All the validation"
1202
  msgstr ""
1203
 
1204
+ #: admin/includes/tab-settings.php:1169
1205
  #, php-format
1206
  msgid ""
1207
  "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1208
  "\">Expiration time [days] for each entry</dfn>"
1209
  msgstr ""
1210
 
1211
+ #: admin/includes/tab-settings.php:1186
1212
  msgid ""
1213
  "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
1214
  "with value</dfn>"
1215
  msgstr ""
1216
 
1217
+ #: admin/includes/tab-settings.php:1205
1218
  msgid "Maximum entries in &#8220;Logs&#8221;"
1219
  msgstr ""
1220
 
1221
+ #: admin/includes/tab-settings.php:1222
1222
  msgid ""
1223
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1224
  "&#8220;Live update&#8221;</dfn>"
1225
  msgstr ""
1226
 
1227
+ #: admin/includes/tab-settings.php:1235
1228
  msgid "Ordinary file"
1229
  msgstr ""
1230
 
1231
+ #: admin/includes/tab-settings.php:1236
1232
  msgid "In-Memory"
1233
  msgstr ""
1234
 
1235
+ #: admin/includes/tab-settings.php:1239
1236
  msgid "PDO_SQLITE driver not available"
1237
  msgstr ""
1238
 
1239
+ #: admin/includes/tab-settings.php:1240
1240
  msgid ""
1241
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1242
  "without conflict with other plugins."
1243
  msgstr ""
1244
 
1245
+ #: admin/includes/tab-settings.php:1241
1246
  msgid ""
1247
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1248
  "with other plugins using this method."
1249
  msgstr ""
1250
 
1251
+ #: admin/includes/tab-settings.php:1249
1252
  msgid "Reset database source of &#8220;Live update&#8221;"
1253
  msgstr ""
1254
 
1255
+ #: admin/includes/tab-settings.php:1257
1256
  msgid "Reset now"
1257
  msgstr ""
1258
 
1259
+ #: admin/includes/tab-settings.php:1266 admin/includes/tab-settings.php:1427
1260
  msgid ""
1261
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1262
  "once and activate again."
1263
  msgstr ""
1264
 
1265
+ #: admin/includes/tab-settings.php:1271
1266
  msgid ""
1267
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1268
+ "expired entries from &#8220;IP address cache&#8221; and &#8220;Validation "
1269
+ "logs&#8221;.\">Interval [sec] to cleanup expired entries of IP address</dfn>"
1270
  msgstr ""
1271
 
1272
+ #: admin/includes/tab-settings.php:1280 admin/includes/tab-settings.php:1443
1273
  #, php-format
1274
  msgid "Next schedule: %s"
1275
  msgstr ""
1276
 
1277
+ #: admin/includes/tab-settings.php:1287
1278
+ msgid ""
1279
+ "<dfn title=\"This option enables to record the number blocked countries and "
1280
+ "the number of blocked requests per day.\">Record &#8220;Statistics of "
1281
+ "validation&#8221;</dfn>"
1282
+ msgstr ""
1283
+
1284
+ #: admin/includes/tab-settings.php:1302
1285
+ msgid "Maximum period for &#8220;Statistics&#8221; [days]"
1286
+ msgstr ""
1287
+
1288
+ #: admin/includes/tab-settings.php:1320
1289
  msgid "Remove all settings and records at uninstallation"
1290
  msgstr ""
1291
 
1292
+ #: admin/includes/tab-settings.php:1337
1293
  msgid "Geolocation API settings"
1294
  msgstr ""
1295
 
1311
  msgid "database"
1312
  msgstr ""
1313
 
1314
+ #: admin/includes/tab-settings.php:1410 classes/class-ip-geo-block-cron.php:424
1315
  #, php-format
1316
  msgid "Last update: %s"
1317
  msgstr ""
1348
 
1349
  #: admin/includes/tab-settings.php:1515
1350
  msgid ""
1351
+ "<dfn title=\"Valid key for Google Maps JavaScript API. Maps Embed API in "
1352
+ "iframe can be available without key in case it's empty.\">Google Maps API "
1353
+ "key</dfn>"
1354
  msgstr ""
1355
 
1356
  #: admin/includes/tab-settings.php:1531
1394
  msgstr ""
1395
 
1396
  #: admin/includes/tab-settings.php:1564
1397
+ msgid "Diagnose all DB tables"
1398
  msgstr ""
1399
 
1400
  #: admin/includes/tab-settings.php:1572
1401
+ msgid "Diagnose now"
1402
  msgstr ""
1403
 
1404
  #: admin/includes/tab-settings.php:1581
1438
  "2.0.0+%s."
1439
  msgstr ""
1440
 
1441
+ #: admin/includes/tab-settings.php:1623
1442
+ #, php-format
1443
+ msgid ""
1444
+ "Please refer to \"%sLiving with cache plugin%s\" for compatibility with "
1445
+ "cache plugins."
1446
+ msgstr ""
1447
+
1448
+ #: admin/includes/tab-statistics.php:18
1449
  msgid "Statistics of validation"
1450
  msgstr ""
1451
 
1521
  msgid "Slug in back-end"
1522
  msgstr ""
1523
 
1524
+ #: admin/includes/tab-statistics.php:348
1525
  msgid "Toggle sorting order"
1526
  msgstr ""
1527
 
1528
+ #: admin/includes/tab-statistics.php:404
1529
  #, php-format
1530
  msgid "[ %sRecord &#8220;Statistics of validation&#8221;%s ] is disabled."
1531
  msgstr ""
1532
 
1533
+ #: admin/includes/tab-statistics.php:405
1534
  msgid ""
1535
  "Please set the proper condition to record and analyze the validation "
1536
  "statistics."
1537
  msgstr ""
1538
 
1539
+ #: admin/includes/tab-statistics.php:416
1540
  #, php-format
1541
  msgid "[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled."
1542
  msgstr ""
1543
 
1544
+ #: admin/includes/tab-statistics.php:417
1545
  msgid "Please set the proper condition to record IP address in cache."
1546
  msgstr ""
1547
 
1548
+ #: classes/class-ip-geo-block-cron.php:223
1549
  #, php-format
1550
  msgid "Can't lock <code>%s</code>. Please try again after a while."
1551
  msgstr ""
1552
 
1553
+ #: classes/class-ip-geo-block-cron.php:302
1554
  msgid "Your database file is up-to-date."
1555
  msgstr ""
1556
 
1557
+ #: classes/class-ip-geo-block-cron.php:405
1558
  msgid "gz or zip is not supported on your system."
1559
  msgstr ""
1560
 
1583
  "activate again."
1584
  msgstr ""
1585
 
1586
+ #: classes/class-ip-geo-block-logs.php:243
1587
  #, php-format
1588
  msgid ""
1589
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1590
  "again."
1591
  msgstr ""
1592
 
 
 
 
 
1593
  #: wp-content/ip-geo-api/ip2location/class-ip2location.php:151
1594
  #: wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php:144
1595
  #: wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php:228