IP Geo Block - Version 3.0.17

Version Description

  • Fix issue: Avoid the error of "Can not load Geolocation API libraries" caused by the race condition on upgrading this plugin.
  • New feature: Enhance protecting against certain types of attacks by privilege escalation.
  • New feature: Add a new option of "Network wide settings" in "Plugin settings" section to synchronize all the settings with the main blog on multisite.
  • New feature: Add "Preset filters" using ip-geo-block-logs[-preset] filter hook to make analyze logs easy on "Logs" tab.
  • Improvement: When pwd is set at "$_POST key to record with value" in "Privacy and record settings" section, mask the password in logs unless the login attempt is blocked.
  • Improvement: Flush out the buffer of "Live update" on "Logs" tab when stop button is activated to avoid data remains.
  • Improvement: Update the geolocation API service "geoip.nekudo.com" to "ipapi.com".
  • Improvement: Update the class for Maxmind GeoLite Legacy databases to prepare against the upcoming expiry of support.
  • See 3.0.17 release note for some details.
Download this release

Release Info

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

Code changes from version 3.0.16 to 3.0.17

Files changed (39) hide show
  1. README.txt +41 -183
  2. admin/class-ip-geo-block-admin.php +169 -67
  3. admin/css/admin-icons.css +23 -55
  4. admin/css/admin-icons.min.css +1 -1
  5. admin/css/admin.css +3 -0
  6. admin/css/admin.min.css +1 -1
  7. admin/css/fonts/icomoon.eot +0 -0
  8. admin/css/fonts/icomoon.svg +6 -14
  9. admin/css/fonts/icomoon.ttf +0 -0
  10. admin/css/fonts/icomoon.woff +0 -0
  11. admin/includes/class-admin-ajax.php +13 -9
  12. admin/includes/class-admin-rewrite.php +3 -3
  13. admin/includes/tab-accesslog.php +10 -2
  14. admin/includes/tab-geolocation.php +2 -2
  15. admin/includes/tab-settings.php +26 -4
  16. admin/js/admin.js +17 -9
  17. admin/js/admin.min.js +1 -1
  18. admin/js/whois.js +2 -2
  19. admin/js/whois.min.js +1 -1
  20. classes/class-ip-geo-block-apis.php +104 -102
  21. classes/class-ip-geo-block-cron.php +11 -1
  22. classes/class-ip-geo-block-file.php +30 -0
  23. classes/class-ip-geo-block-logs.php +6 -6
  24. classes/class-ip-geo-block-opts.php +55 -35
  25. classes/class-ip-geo-block-util.php +3 -1
  26. classes/class-ip-geo-block.php +136 -64
  27. ip-geo-block.php +1 -1
  28. languages/ip-geo-block-ja.mo +0 -0
  29. languages/ip-geo-block-ja.po +348 -266
  30. languages/ip-geo-block.mo +0 -0
  31. languages/ip-geo-block.po +324 -257
  32. languages/ip-geo-block.pot +324 -257
  33. uninstall.php +1 -0
  34. wp-content/ip-geo-api/drop-in-admin-sample.php +100 -0
  35. wp-content/ip-geo-api/ip2location/bcmath.php +4 -4
  36. wp-content/ip-geo-api/ip2location/class-ip2location.php +20 -15
  37. wp-content/ip-geo-api/maxmind/class-maxmind-geolite2.php +39 -24
  38. wp-content/ip-geo-api/maxmind/class-maxmind-legacy.php +120 -96
  39. wp-content/ip-geo-api/maxmind/class-maxmind.php +11 -5
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.16
8
License: GPLv3
9
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
10
@@ -12,15 +12,17 @@ It blocks spam posts, login attempts and malicious access to the back-end reques
12
13
== Description ==
14
15
- A considerable number of WordPress vulnerabilities in plugins and themes have been disclosed every month on a site like [WPScan Vulnerability Database](https://wpvulndb.com/ "WPScan Vulnerability Database") and [Exploits Database](https://www.exploit-db.com/ "Exploits Database by Offensive Security"). It means that we're always exposed to the threats of being exploited caused by them.
16
17
- This plugin guards your site against threats of attack to the back-end of your site such as login form, XML-RPC (login attempt) and admin area. It also blocks undesired comment spam, trackback and pingback spam and any requests to public facing pages aka front-end from undesired countries.
18
19
- After several days of installation, you'll be supprised to find many malicious or undesirable accesses are blocked especially if you enable Zero-day Expoit Prevention.
20
21
= Features =
22
23
- * **Privacy friendly:**
24
IP address is always encrypted on recording in logs/cache. Moreover, it can be anonymized and restricted on sending to the 3rd parties such as geolocation APIs or whois service.
25
26
* **Immigration control:**
@@ -77,13 +79,13 @@ This package includes GeoLite2 library distributed by MaxMind, available from [M
77
78
Also thanks for providing the following great services and REST APIs for free.
79
80
- * [https://ipdata.co/](https://ipdata.co/ "ipdata.co - IP Geolocation and Threat Data API") (IPv4, IPv6 / free)
81
- * [https://ipinfo.io/](https://ipinfo.io/ "IP Address API and Data Solutions") (IPv4, IPv6 / free)
82
- * [https://geoip.nekudo.com/](https://geoip.nekudo.com/ "Free IP GeoLocation/GeoIp API - geoip.nekudo.com") (IPv4, IPv6 / free)
83
- * [http://geoiplookup.net/](http://geoiplookup.net/ "What Is My IP Address | GeoIP Lookup") (IPv4, IPv6 / free)
84
* [http://ip-api.com/](http://ip-api.com/ "IP-API.com - Free Geolocation API") (IPv4, IPv6 / free for non-commercial use)
85
- * [https://ipinfodb.com/](https://ipinfodb.com/ "Free IP Geolocation Tools and API| IPInfoDB") (IPv4, IPv6 / free for registered user, need API key)
86
* [https://ipstack.com/](https://ipstack.com/ "ipstack - Free IP Geolocation API") (IPv4, IPv6 / free for registered user, need API key)
87
88
= Development =
89
@@ -99,150 +101,18 @@ All contributions will always be welcome. Or visit my [development blog](https:/
99
2. Search for 'IP Geo Block'
100
3. Click 'Install Now'
101
4. Activate the plugin on the Plugin dashboard
102
- 5. Try 'Best for Back-end' button for easy setup at the bottom of this plugin's setting page.
103
-
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.
111
-
112
- * **Whitelist/Blacklist of country code**
113
- Specify the country code with two letters (see [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements "ISO 3166-1 alpha-2 - Wikipedia, the free encyclopedia")). Each of them should be separated by comma.
114
-
115
- * **Use Autonomous System Number (ASN)**
116
- It enables you to use "AS number" in the whitelist and blacklist of extra IP addresses to specify a group of IP networks.
117
-
118
- * **Whitelist/Blacklist of extra IP addresses prior to country code**
119
- The list of extra IP addresses prior to the validation of country code. [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing "Classless Inter-Domain Routing - Wikipedia, the free encyclopedia") and [AS number](https://en.wikipedia.org/wiki/Autonomous_system_(Internet) "Autonomous system (Internet) - Wikipedia") are also acceptable to specify the range.
120
-
121
- * **$_SERVER keys to retrieve extra IP addresses**
122
- Additional IP addresses will be validated if some of keys in `$_SERVER` variable are specified in this textfield. Typically `HTTP_X_FORWARDED_FOR`.
123
-
124
- * **Bad signatures in query**
125
- It validates malicious signatures independently of **Block by country** and **Prevent Zero-day Exploit** for the target **Admin area**, **Admin ajax/post**, **Plugins area** and **Themes area**. Typically, `/wp-config.php` and `/passwd`.
126
-
127
- * **Prevent malicious file uploading**
128
- It restricts the file types on upload to block malware and backdoor via both back-end and front-end.
129
-
130
- * **Response code**
131
- Choose one of the [response code](https://tools.ietf.org/html/rfc2616#section-10 "RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1") to be sent when it blocks a comment.
132
- The 2xx code will lead to your top page, the 3xx code will redirect to [Black Hole Server](http://blackhole.webpagetest.org/), the 4xx code will lead to WordPress error page, and the 5xx will pretend an server error.
133
-
134
- * **Max number of failed login attempts per IP address**
135
- Set the maximum number of login attempts to accept the requests to the login process.
136
-
137
- * **Validation timing**
138
- Choose **"init" action hook** or **"mu-plugins" (ip-geo-block-mu.php)** to specify the timing of validation.
139
-
140
- = Back-end target settings =
141
-
142
- * **Comment post**
143
- Validate post to `wp-comment-post.php`. Comment post and trackback will be validated.
144
-
145
- * **XML-RPC**
146
- Validate access to `xmlrpc.php`. Pingback and other remote command with username and password will be validated.
147
-
148
- * **Login form**
149
- Validate access to `wp-login.php` and `wp-signup.php`.
150
-
151
- * **Admin area**
152
- Validate access to `wp-admin/*.php`.
153
-
154
- * **Admin ajax/post**
155
- Validate access to `wp-admin/admin-(ajax|post)*.php`.
156
-
157
- * **Plugins area**
158
- Validate direct access to plugins. Typically `wp-content/plugins/…/*.php`.
159
-
160
- * **Themes area**
161
- Validate direct access to themes. Typically `wp-content/themes/…/*.php`.
162
-
163
- = Front-end target settings =
164
-
165
- * **Block by country**
166
- Enables validation of country code on public facing pages.
167
-
168
- * **Matching rule**
169
- Same as **Validation target settings** but can be set independently.
170
-
171
- * **Validation target**
172
- Specify the single and archive page by post type, category and tag as blocking target.
173
-
174
- * **Block badly-behaved bots and crawlers**
175
- Specify the allowable request frequency over a period of time.
176
-
177
- * **UA string and qualification**
178
- Additional rules targeted at SEO which can specify acceptable requests based on user agent.
179
180
- * **DNS reverse lookup**
181
- It enables to verify the host by reverse DNS lookup which would spend some server resources.
182
-
183
- * **Simulation mode**
184
- You can simulate the 'blocking on front-end' functionality before deploying.
185
-
186
- = Geolocation API settings =
187
-
188
- * **API selection and key settings**
189
- If you wish to use `IPInfoDB`, you should register at [their site](https://ipinfodb.com/ "IPInfoDB | Free IP Address Geolocation Tools") to get a free API key and set it into the textfield. And `ip-api.com` and `Smart-IP.net` require non-commercial use.
190
-
191
- = Local database settings settings =
192
-
193
- * **Auto updating (once a month)**
194
- If `Enable`, geolocation databases will be downloaded automatically by WordPress cron job.
195
-
196
- * **Download database**
197
- Fetch all the databases from their server if those are updated.
198
-
199
- = Privacy and record settings =
200
-
201
- * **Privacy friendly**
202
- It makes an IP address anonymous on recording into the database (e.g. logs, IP address cache) and restricted on sending to the 3rd parties (e.g. geolocation APIs, whois).
203
-
204
- * **Record "Statistics"**
205
- If `Enable`, you can see `Statistics of validation` on Statistics tab.
206
-
207
- * **Record "Logs"**
208
- If you choose anything but `Disable`, you can see `Validation logs` on Logs tab.
209
-
210
- * **$_POST keys to be recorded with their values in "Logs"**
211
- Normally, you can see just keys at `$_POST data:` on Logs tab. If you put some of interested keys into this textfield, you can see the value of key like `key=value`.
212
-
213
- * **Record "IP address cache"**
214
- It enables to record the pare of IP address and country code into the cache on database to minimize the impact on site speed.
215
-
216
- * **Expiration time [sec] for IP address cache**
217
- Maximum time in sec to keep cache.
218
-
219
- * **Garbage collection period [sec] for IP address cache**
220
- Period of garbage collection to clean cache.
221
-
222
- = Submission settings =
223
-
224
- * **Text position on comment form**
225
- If you want to put some text message on your comment form, please choose `Top` or `Bottom` and put text with some tags into the **Text message on comment form** textfield.
226
-
227
- = Plugin settings =
228
-
229
- * **Network wide settings**
230
- Synchronize all settings over the network wide based on the settings of main blog.
231
-
232
- * **Remove all settings at uninstallation**
233
- If you checked this option, all settings will be removed when this plugin is uninstalled for clean uninstalling.
234
-
235
- * **Export / Import settings**
236
- All settings data can be saved as json file which enables to export/import to the dashboard.
237
-
238
- * **Import pre-defined settings**
239
- Reset all settings data as initial values, or set as recommended values for "Back-end target settings".
240
241
== Frequently Asked Questions ==
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
@@ -252,31 +122,7 @@ Yes. You can synchronize the settings with all the sites on the network when you
252
253
The short answer is **YES**, especially for the purpose of security e.g. blocking malicious access both on the back-end and on the front-end.
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**".
265
-
266
- - [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/ "W3 Total Cache — WordPress Plugins")
267
- Select "**Disk: Basic**" and enable "**Late initialization**" for page cache. "**Disk: Enhanced**" (where "**Late initialization**" is not available) in W3TC 0.9.5.1 seems to work good without any imcompatibility with this plugin.
268
-
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.
278
-
279
- For more details, please refer to some documents at "[Blocking on front-end](https://www.ipgeoblock.com/codex/#blocking-on-front-end 'Codex | IP Geo Block')".
280
281
= I still have access from blacklisted country. Does it work correctly? =
282
@@ -372,19 +218,31 @@ Please refer to "[How can I fix permission troubles?](https://www.ipgeoblock.com
372
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
380
- 6. **IP Geo Plugin** - IP address cache settings
381
- 7. **IP Geo Plugin** - Statistics tab
382
- 8. **IP Geo Plugin** - Logs tab
383
- 9. **IP Geo Plugin** - Search tab
384
- 10. **IP Geo Plugin** - Attribution tab
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.
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.17
8
License: GPLv3
9
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
10
12
13
== Description ==
14
15
+ The more you install themes and plugins, the more likely your sites will be vulnerable, even if you [securely harden your sites](https://codex.wordpress.org/Hardening_WordPress "Hardening WordPress « WordPress Codex").
16
17
+ While WordPress.org [provides](https://wordpress.org/about/security/ "Security | WordPress.org") [excellent](https://developer.wordpress.org/themes/theme-security/ "Theme Security | Theme Developer Handbook | WordPress Developer Resources") [resources](https://developer.wordpress.org/plugins/security/ "Plugin Security | Plugin Developer Handbook | WordPress Developer Resources"), themes and plugins may often get vulnerable due to developers' [human factors](https://www.google.com/search?q=human+factors+in+security "human factors in security - Google Search") such as lack of security awareness, misuse and disuse of the best practices in those resources.
18
19
+ This plugin focuses on insights into such developers' human factors instead of detecting the specific attack vectors after they were disclosed. This brings a smart and powerful methods named as "**WP Zero-day Exploit Prevention**" and "**WP Metadata Exploit Protection**".
20
+
21
+ Combined with those methods and IP address geolocation, you'll be surprised to find a bunch of malicious or undesirable access blocked in the logs of this plugin after several days of installation.
22
23
= Features =
24
25
+ * **Privacy by design:**
26
IP address is always encrypted on recording in logs/cache. Moreover, it can be anonymized and restricted on sending to the 3rd parties such as geolocation APIs or whois service.
27
28
* **Immigration control:**
79
80
Also thanks for providing the following great services and REST APIs for free.
81
82
* [http://ip-api.com/](http://ip-api.com/ "IP-API.com - Free Geolocation API") (IPv4, IPv6 / free for non-commercial use)
83
+ * [http://geoiplookup.net/](http://geoiplookup.net/ "What Is My IP Address | GeoIP Lookup") (IPv4, IPv6 / free)
84
+ * [https://ipinfo.io/](https://ipinfo.io/ "IP Address API and Data Solutions") (IPv4, IPv6 / free)
85
+ * [https://ipapi.com/](https://ipapi.com/ "ipapi - IP Address Lookup and Geolocation API) (IPv4, IPv6 / free, need API key)
86
+ * [https://ipdata.co/](https://ipdata.co/ "ipdata.co - IP Geolocation and Threat Data API") (IPv4, IPv6 / free, need API key)
87
* [https://ipstack.com/](https://ipstack.com/ "ipstack - Free IP Geolocation API") (IPv4, IPv6 / free for registered user, need API key)
88
+ * [https://ipinfodb.com/](https://ipinfodb.com/ "Free IP Geolocation Tools and API| IPInfoDB") (IPv4, IPv6 / free for registered user, need API key)
89
90
= Development =
91
101
2. Search for 'IP Geo Block'
102
3. Click 'Install Now'
103
4. Activate the plugin on the Plugin dashboard
104
+ 5. Stay cool for a while and go to 'Settings' » 'IP Geo Block'
105
+ 6. Try 'Best for Back-end' button for easy setup at the bottom of this plugin's setting page.
106
107
+ Please refer to [the document](https://www.ipgeoblock.com/codex/ "Codex | IP Geo Block") for your best setup.
108
109
== Frequently Asked Questions ==
110
111
= Does the site using this plugin comply with GDPR? =
112
113
+ This plugin is designed based on the principle of "Privacy by design" so that you can compliantly run it to GDPR. As guarding against personal data breach, IP addresses in this plugin are encrypted and also can be anonymized by default. 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.
114
+
115
+ However, these are the part of GDPR requirements 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.
116
117
= Does this plugin support multisite? =
118
122
123
The short answer is **YES**, especially for the purpose of security e.g. blocking malicious access both on the back-end and on the front-end.
124
125
+ You can find the long answer and the compatibility list of cache plugins at "[Compatibility with cache plugins](https://www.ipgeoblock.com/codex/living-with-caching-plugin.html 'Compatibility with cache plugins | IP Geo Block')".
126
127
= I still have access from blacklisted country. Does it work correctly? =
128
218
219
== Screenshots ==
220
221
+ 1. **IP Geo Plugin** - Multisite list on network
222
+ 2. **IP Geo Plugin** - Settings tab
223
+ 3. **IP Geo Plugin** - Validation rules and behavior
224
+ 4. **IP Geo Plugin** - Back-end target settings
225
+ 5. **IP Geo Plugin** - Front-end target settings
226
+ 6. **IP Geo Plugin** - Geolocation API settings
227
+ 7. **IP Geo Plugin** - IP address cache settings
228
+ 8. **IP Geo Plugin** - Statistics tab
229
+ 9. **IP Geo Plugin** - Logs tab
230
+ 10. **IP Geo Plugin** - Search tab
231
+ 11. **IP Geo Plugin** - Attribution tab
232
233
== Changelog ==
234
235
+ = 3.0.17 =
236
+ * **Fix issue:** Avoid the error of "Can not load Geolocation API libraries" caused by the race condition on upgrading this plugin.
237
+ * **New feature:** Enhance protecting against certain types of attacks by privilege escalation.
238
+ * **New feature:** Add a new option of "**Network wide settings**" in "**Plugin settings**" section to synchronize all the settings with the main blog on multisite.
239
+ * **New feature:** Add "**Preset filters**" using [`ip-geo-block-logs[-preset]`](https://www.ipgeoblock.com/codex/ip-geo-block-logs-preset.html "ip-geo-block-logs[-preset] | IP Geo Block") filter hook to make analyze logs easy on "**Logs**" tab.
240
+ * **Improvement:** When `pwd` is set at "**$_POST key to record with value**" in "**Privacy and record settings**" section, mask the password in logs unless the login attempt is blocked.
241
+ * **Improvement:** Flush out the buffer of "**Live update**" on "**Logs**" tab when stop button is activated to avoid data remains.
242
+ * **Improvement:** Update the geolocation API service "geoip.nekudo.com" to "ipapi.com".
243
+ * **Improvement:** Update the class for Maxmind GeoLite Legacy databases to prepare against the upcoming expiry of support.
244
+ * See [3.0.17 release note](https://www.ipgeoblock.com/changelog/release-3.0.17.html) for some details.
245
+
246
= 3.0.16 =
247
* **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.
248
* **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.
admin/class-ip-geo-block-admin.php CHANGED
@@ -8,7 +8,6 @@
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
@@ -444,7 +443,7 @@ class IP_Geo_Block_Admin {
444
}
445
446
if ( $admin_menu ) {
447
- // `settings-updated` would be added just after settings updated.
448
if ( ! empty( $_REQUEST['page'] ) && IP_Geo_Block::PLUGIN_NAME === $_REQUEST['page'] &&
449
! empty( $_REQUEST['settings-updated'] ) && $this->is_network_admin && $settings['network_wide'] ) {
450
$this->update_multisite_settings( $settings );
@@ -465,7 +464,7 @@ class IP_Geo_Block_Admin {
465
);
466
}
467
468
- elseif ( IP_GEO_BLOCK_NETWORK && $this->is_network_admin ) {
469
// Add a settings page for this plugin to the Settings menu.
470
$hook = add_menu_page(
471
__( 'IP Geo Block', 'ip-geo-block' ),
@@ -476,17 +475,6 @@ class IP_Geo_Block_Admin {
476
//, 'dashicons-admin-site' // or 'data:image/svg+xml;base64...'
477
);
478
479
- if ( $settings['network_wide'] ) {
480
- add_submenu_page(
481
- IP_Geo_Block::PLUGIN_NAME,
482
- __( 'IP Geo Block', 'ip-geo-block' ),
483
- __( 'Settings', 'ip-geo-block' ),
484
- 'manage_network_options',
485
- IP_Geo_Block::PLUGIN_NAME,
486
- array( $this, 'display_plugin_admin_page' )
487
- );
488
- }
489
-
490
add_submenu_page(
491
IP_Geo_Block::PLUGIN_NAME,
492
__( 'IP Geo Block', 'ip-geo-block' ),
@@ -496,6 +484,17 @@ class IP_Geo_Block_Admin {
496
array( $this, 'display_plugin_admin_page' )
497
);
498
499
wp_enqueue_style( IP_Geo_Block::PLUGIN_NAME . '-admin-icons',
500
plugins_url( ! defined( 'IP_GEO_BLOCK_DEBUG' ) || ! IP_GEO_BLOCK_DEBUG ?
501
'css/admin-icons.min.css' : 'css/admin-icons.css', __FILE__
@@ -523,7 +522,7 @@ class IP_Geo_Block_Admin {
523
524
if ( ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) ) {
525
$this->add_admin_notice( 'error', sprintf(
526
- __( 'Can not load Geolocation API libraries from <code>%s</code>. It seems to have failed downloading <a rel="noreferrer" href="https://github.com/tokkonopapa/WordPress-IP-Geo-API/archive/master.zip" title="Download the contents of tokkonopapa/WordPress-IP-Geo-API as a zip file">ZIP file</a> from <a rel="noreferrer" href="https://github.com/tokkonopapa/WordPress-IP-Geo-API" title="tokkonopapa/WordPress-IP-Geo-API - GitHub">WordPress-IP-Geo-API</a>. Please install <code>ip-geo-api</code> with write permission according to <a rel="noreferrer" href="https://www.ipgeoblock.com/codex/how-to-fix-permission-troubles.html" title="How can I fix permission troubles? | IP Geo Block">this instruction</a>.', 'ip-geo-block' ),
527
apply_filters( 'ip-geo-block-api-dir', $settings['api_dir'] ? $settings['api_dir'] : basename( WP_CONTENT_DIR ) )
528
) );
529
}
@@ -532,8 +531,8 @@ class IP_Geo_Block_Admin {
532
$providers = IP_Geo_Block_Provider::get_valid_providers( $settings, FALSE, FALSE, TRUE );
533
if ( empty( $providers ) ) {
534
$this->add_admin_notice( 'error', sprintf(
535
- __( 'You should select at least one API at <a href="%s">Geolocation API settings</a>. Otherwise <strong>you\'ll be blocked</strong> after the cache expires.', 'ip-geo-block' ),
536
- esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 4 ), $adminurl ) ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-4'
537
) );
538
}
539
@@ -541,7 +540,7 @@ class IP_Geo_Block_Admin {
541
$providers = IP_Geo_Block_Provider::get_addons( $settings['providers'] );
542
if ( empty( $providers ) ) {
543
$this->add_admin_notice( 'error', sprintf(
544
- __( 'You should select at least one API for local database at <a href="%s">Geolocation API settings</a>. Otherwise access to the external API may slow down the site.', 'ip-geo-block' ),
545
esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 4 ), $adminurl ) ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-4'
546
) );
547
}
@@ -573,7 +572,7 @@ class IP_Geo_Block_Admin {
573
// Check self blocking (skip during updating)
574
if ( FALSE === $updating && 1 === (int)$settings['validation']['login'] ) {
575
$instance = IP_Geo_Block::get_instance();
576
- $validate = $instance->validate_ip( 'login', $settings, TRUE, FALSE, FALSE ); // skip authentication check
577
578
switch( $validate['result'] ) {
579
case 'limited':
@@ -705,8 +704,6 @@ class IP_Geo_Block_Admin {
705
($stat ? ' ' . IP_Geo_Block::PLUGIN_NAME . '-border"' : '"'),
706
($stat || (4 === $tab && $index) ? '>' : ' style="display:none">'), "\n";
707
708
- ++$index;
709
-
710
if ( $section['callback'] )
711
call_user_func( $section['callback'], $section );
712
@@ -719,6 +716,7 @@ class IP_Geo_Block_Admin {
719
}
720
721
echo "</div>\n</fieldset>\n";
722
}
723
}
724
}
@@ -730,12 +728,12 @@ class IP_Geo_Block_Admin {
730
public function display_plugin_admin_page() {
731
$tab = $this->admin_tab;
732
$tabs = array(
733
0 => __( 'Settings', 'ip-geo-block' ),
734
1 => __( 'Statistics', 'ip-geo-block' ),
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();
@@ -746,13 +744,14 @@ class IP_Geo_Block_Admin {
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
@@ -762,13 +761,15 @@ class IP_Geo_Block_Admin {
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'] ) {
766
- unset( $tabs[0] ); // remove Settings
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
}
774
@@ -889,7 +890,7 @@ class IP_Geo_Block_Admin {
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>';
@@ -905,7 +906,7 @@ class IP_Geo_Block_Admin {
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'];
@@ -1060,6 +1061,17 @@ class IP_Geo_Block_Admin {
1060
}
1061
break;
1062
1063
default: // checkbox, select, text
1064
// single field
1065
if ( ! is_array( $default[ $key ] ) ) {
@@ -1227,15 +1239,20 @@ class IP_Geo_Block_Admin {
1227
}
1228
1229
// 3.0.4 AS number, 3.0.8 Geolite2
1230
- $output['Geolite2']['use_asn'] = $output['Maxmind']['use_asn'];
1231
if ( $output['Maxmind']['use_asn'] && ( ! $output['Maxmind']['asn4_path'] || ! $output['Geolite2']['asn_path'] ) ) {
1232
- // force to update in case of using asn
1233
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-cron.php';
1234
- IP_Geo_Block_Cron::start_update_db( $output, TRUE );
1235
- } else {
1236
- // reset path if file does not exist
1237
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
1238
- $fs = IP_Geo_Block_FS::init( 'postprocess_options' );
1239
if ( ! $output['Maxmind']['use_asn'] && ! $fs->exists( $output['Maxmind']['asn4_path'] ) ) {
1240
$output['Maxmind']['asn4_path'] = NULL;
1241
$output['Maxmind']['asn6_path'] = NULL;
@@ -1377,6 +1394,9 @@ class IP_Geo_Block_Admin {
1377
// Force to finish update matching rule
1378
delete_transient( IP_Geo_Block::CRON_NAME );
1379
1380
return $options;
1381
}
1382
@@ -1395,8 +1415,9 @@ class IP_Geo_Block_Admin {
1395
1396
// Go through the posted data and save the targetted options.
1397
foreach ( $options as $option ) {
1398
- if ( isset( $_POST[ $option ] ) )
1399
$this->update_multisite_settings( $_POST[ $option ] );
1400
}
1401
1402
// Register a settings error to be displayed to the user
@@ -1418,7 +1439,7 @@ class IP_Geo_Block_Admin {
1418
*
1419
* @note: This function triggers `validate_settings()` on register_setting() in wp-include/option.php.
1420
*/
1421
- private function update_multisite_settings( $settings ) {
1422
global $wpdb;
1423
$blog_ids = $wpdb->get_col( "SELECT `blog_id` FROM `$wpdb->blogs`" );
1424
$ret = TRUE;
@@ -1434,6 +1455,86 @@ class IP_Geo_Block_Admin {
1434
return $ret;
1435
}
1436
1437
/**
1438
* Ajax callback function
1439
*
@@ -1498,9 +1599,34 @@ class IP_Geo_Block_Admin {
1498
break;
1499
1500
case 'restore-logs': // Get logs from MySQL DB
1501
$res = IP_Geo_Block_Admin_Ajax::restore_logs( $which );
1502
break;
1503
1504
case 'validate': // Validate settings
1505
IP_Geo_Block_Admin_Ajax::validate_settings( $this );
1506
break;
@@ -1594,29 +1720,6 @@ class IP_Geo_Block_Admin {
1594
$res = IP_Geo_Block_Admin_Ajax::restore_network( $which, (int)$_POST['offset'], (int)$_POST['length'], FALSE );
1595
break;
1596
1597
- case 'live-start': // Restore live log
1598
- if ( is_wp_error( $res = IP_Geo_Block_Admin_Ajax::restore_live_log( $which, $settings ) ) )
1599
- $res = array( 'error' => $res->get_error_message() );
1600
- break;
1601
-
1602
- case 'live-pause': // Pause live log
1603
- if ( ! is_wp_error( $res = IP_Geo_Block_Admin_Ajax::catch_live_log() ) )
1604
- $res = array( 'data' => array() );
1605
- else
1606
- $res = array( 'error' => $res->get_error_message() );
1607
- break;
1608
-
1609
- case 'live-stop': // Stop live log
1610
- if ( ! is_wp_error( $res = IP_Geo_Block_Admin_Ajax::release_live_log() ) )
1611
- $res = array( 'data' => array() );
1612
- else
1613
- $res = array( 'error' => $res->get_error_message() );
1614
- break;
1615
-
1616
- case 'reset-live': // Reset data source of live log
1617
- $res = IP_Geo_Block_Admin_Ajax::reset_live_log();
1618
- break;
1619
-
1620
case 'find-admin':
1621
case 'find-plugins':
1622
case 'find-themes':
@@ -1624,8 +1727,7 @@ class IP_Geo_Block_Admin {
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;
8
* @link https://www.ipgeoblock.com/
9
* @copyright 2013-2018 tokkonopapa
10
*/
11
12
class IP_Geo_Block_Admin {
13
443
}
444
445
if ( $admin_menu ) {
446
+ // `options-general.php` ==> `options.php` ==> `settings-updated` is added as query just after settings updated.
447
if ( ! empty( $_REQUEST['page'] ) && IP_Geo_Block::PLUGIN_NAME === $_REQUEST['page'] &&
448
! empty( $_REQUEST['settings-updated'] ) && $this->is_network_admin && $settings['network_wide'] ) {
449
$this->update_multisite_settings( $settings );
464
);
465
}
466
467
+ elseif ( $this->is_network_admin ) {
468
// Add a settings page for this plugin to the Settings menu.
469
$hook = add_menu_page(
470
__( 'IP Geo Block', 'ip-geo-block' ),
475
//, 'dashicons-admin-site' // or 'data:image/svg+xml;base64...'
476
);
477
478
add_submenu_page(
479
IP_Geo_Block::PLUGIN_NAME,
480
__( 'IP Geo Block', 'ip-geo-block' ),
484
array( $this, 'display_plugin_admin_page' )
485
);
486
487
+ if ( $settings['network_wide'] ) {
488
+ add_submenu_page(
489
+ IP_Geo_Block::PLUGIN_NAME,
490
+ __( 'IP Geo Block', 'ip-geo-block' ),
491
+ __( 'Settings', 'ip-geo-block' ),
492
+ 'manage_network_options',
493
+ IP_Geo_Block::PLUGIN_NAME,
494
+ array( $this, 'display_plugin_admin_page' )
495
+ );
496
+ }
497
+
498
wp_enqueue_style( IP_Geo_Block::PLUGIN_NAME . '-admin-icons',
499
plugins_url( ! defined( 'IP_GEO_BLOCK_DEBUG' ) || ! IP_GEO_BLOCK_DEBUG ?
500
'css/admin-icons.min.css' : 'css/admin-icons.css', __FILE__
522
523
if ( ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) ) {
524
$this->add_admin_notice( 'error', sprintf(
525
+ __( 'Can not load Geolocation API libraries from <code>%s</code>. It seems to have failed downloading <a rel="noreferrer" href="https://github.com/tokkonopapa/WordPress-IP-Geo-API/archive/master.zip" title="Download the contents of tokkonopapa/WordPress-IP-Geo-API as a zip file">ZIP file</a> from <a rel="noreferrer" href="https://github.com/tokkonopapa/WordPress-IP-Geo-API" title="tokkonopapa/WordPress-IP-Geo-API - GitHub">WordPress-IP-Geo-API</a>. Try to deactivate IP Geo Block once and activate it again, or install <code>ip-geo-api</code> with write permission according to <a rel="noreferrer" href="https://www.ipgeoblock.com/codex/how-to-fix-permission-troubles.html" title="How can I fix permission troubles? | IP Geo Block">this instruction</a>.', 'ip-geo-block' ),
526
apply_filters( 'ip-geo-block-api-dir', $settings['api_dir'] ? $settings['api_dir'] : basename( WP_CONTENT_DIR ) )
527
) );
528
}
531
$providers = IP_Geo_Block_Provider::get_valid_providers( $settings, FALSE, FALSE, TRUE );
532
if ( empty( $providers ) ) {
533
$this->add_admin_notice( 'error', sprintf(
534
+ __( 'You should select at least one API at <a href="%s">Geolocation API settings</a>. Otherwise <strong>you\'ll be blocked</strong> after the cache expires.', 'ip-geo-block' ),
535
+ esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 4 ), $adminurl ) ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-4'
536
) );
537
}
538
540
$providers = IP_Geo_Block_Provider::get_addons( $settings['providers'] );
541
if ( empty( $providers ) ) {
542
$this->add_admin_notice( 'error', sprintf(
543
+ __( 'You should select at least one API for local database at <a href="%s">Geolocation API settings</a>. Otherwise access to the external API may slow down the site.', 'ip-geo-block' ),
544
esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0, 'sec' => 4 ), $adminurl ) ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-4'
545
) );
546
}
572
// Check self blocking (skip during updating)
573
if ( FALSE === $updating && 1 === (int)$settings['validation']['login'] ) {
574
$instance = IP_Geo_Block::get_instance();
575
+ $validate = $instance->validate_ip( 'login', $settings, TRUE, FALSE ); // skip authentication check
576
577
switch( $validate['result'] ) {
578
case 'limited':
704
($stat ? ' ' . IP_Geo_Block::PLUGIN_NAME . '-border"' : '"'),
705
($stat || (4 === $tab && $index) ? '>' : ' style="display:none">'), "\n";
706
707
if ( $section['callback'] )
708
call_user_func( $section['callback'], $section );
709
716
}
717
718
echo "</div>\n</fieldset>\n";
719
+ ++$index;
720
}
721
}
722
}
728
public function display_plugin_admin_page() {
729
$tab = $this->admin_tab;
730
$tabs = array(
731
+ 5 => __( 'Sites list', 'ip-geo-block' ),
732
0 => __( 'Settings', 'ip-geo-block' ),
733
1 => __( 'Statistics', 'ip-geo-block' ),
734
4 => __( 'Logs', 'ip-geo-block' ),
735
2 => __( 'Search', 'ip-geo-block' ),
736
3 => __( 'Attribution', 'ip-geo-block' ),
737
);
738
739
$settings = IP_Geo_Block::get_option();
744
if ( 'options-general.php' === $GLOBALS['pagenow'] ) {
745
$action = 'options.php';
746
unset( $tabs[5] ); // Sites list
747
+ if ( $this->is_network_admin ) {
748
+ $title .= ' <span class="ip-geo-block-menu-link"> [ ';
749
+ $title .= '<a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 5 ), $this->dashboard_url( TRUE ) ) ) . '" target="_self">' . __( 'Sites list', 'ip-geo-block' ) . '</a>';
750
if ( $settings['network_wide'] ) {
751
unset( $tabs[0] ); // Settings
752
+ $title .= ' / <a href="' . esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 0 ), $this->dashboard_url( TRUE ) ) ) . '" target="_self">' . __( 'Settings', 'ip-geo-block' ) . '</a>';
753
}
754
+ $title .= ' ]</span>';
755
}
756
}
757
761
// `edit.php` ==> do action `network_admin_edit_ip-geo-block` ==> `validate_network_settings()`
762
$action = 'edit.php?action=' . IP_Geo_Block::PLUGIN_NAME;
763
if ( $this->is_network_admin ) {
764
unset( $tabs[1], $tabs[4], $tabs[2], $tabs[3] ); // Statistics, Logs, Search, Attribution
765
+ $title .= ' <span class="ip-geo-block-menu-link"> [ ';
766
+ $title .= __( 'Sites list', 'ip-geo-block' );
767
+ if ( $settings['network_wide'] ) {
768
+ $title .= ' / ' . __( 'Settings', 'ip-geo-block' );
769
+ } else {
770
+ unset( $tabs[0] ); // Settings
771
+ }
772
+ $title .= ' ]</span>';
773
}
774
}
775
890
foreach ( $args['list'] as $key => $val ) { ?>
891
<li>
892
<input type="checkbox" id="<?php echo $id, $sub_id, '_', $key; ?>" name="<?php echo $name, $sub_name, '[', $key, ']'; ?>" value="<?php echo $key; ?>"<?php
893
+ checked( is_array( $args['value'] ) ? ! empty( $args['value'][ $key ] ) : ( $key & $args['value'] ? TRUE : FALSE ) ); ?> /><label for="<?php
894
echo $id, $sub_id, '_', $key; ?>"><?php
895
if ( isset( $args['desc'][ $key ] ) )
896
echo '<dfn title="', $args['desc'][ $key ], '">', $val, '</dfn>';
906
case 'checkbox': ?>
907
<input type="checkbox" id="<?php echo $id, $sub_id; ?>" name="<?php echo $name, $sub_name; ?>" value="1"<?php
908
checked( esc_attr( $args['value'] ) );
909
+ disabled( ! empty( $args['disabled'] ), TRUE ); ?> /><label for="<?php
910
echo $id, $sub_id; ?>"><?php
911
if ( isset( $args['text'] ) ) echo esc_attr( $args['text'] );
912
else if ( isset( $args['html'] ) ) echo $args['html'];
1061
}
1062
break;
1063
1064
+ case 'metadata':
1065
+ if ( isset( $input[ $key ] ) ) {
1066
+ if ( is_string( $input[ $key ]['pre_update_option' ] ) ) {
1067
+ $output[ $key ]['pre_update_option' ] = array_map( 'sanitize_key', explode( ',', trim( $input[ $key ]['pre_update_option' ], ',' ) ) ); // @since 3.0.17
1068
+ }
1069
+ if ( is_string( $input[ $key ]['pre_update_site_option'] ) ) {
1070
+ $output[ $key ]['pre_update_site_option'] = array_map( 'sanitize_key', explode( ',', trim( $input[ $key ]['pre_update_site_option'], ',' ) ) ); // @since 3.0.17
1071
+ }
1072
+ }
1073
+ break;
1074
+
1075
default: // checkbox, select, text
1076
// single field
1077
if ( ! is_array( $default[ $key ] ) ) {
1239
}
1240
1241
// 3.0.4 AS number, 3.0.8 Geolite2
1242
+ if ( version_compare( PHP_VERSION, '5.4' ) >= 0 )
1243
+ $output['Geolite2']['use_asn'] = $output['Maxmind']['use_asn'];
1244
+
1245
+ // force to update asn file not immediately but after `validate_settings()` and `validate_network_settings()`
1246
if ( $output['Maxmind']['use_asn'] && ( ! $output['Maxmind']['asn4_path'] || ! $output['Geolite2']['asn_path'] ) ) {
1247
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-cron.php';
1248
+ add_action( IP_Geo_Block::PLUGIN_NAME . '-settings-updated', array( 'IP_Geo_Block_Cron', 'start_update_db' ), 10, 2 );
1249
+ }
1250
+
1251
+ // reset path if asn file does not exist
1252
+ else {
1253
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
1254
+ $fs = IP_Geo_Block_FS::init( __FUNCTION__ );
1255
+
1256
if ( ! $output['Maxmind']['use_asn'] && ! $fs->exists( $output['Maxmind']['asn4_path'] ) ) {
1257
$output['Maxmind']['asn4_path'] = NULL;
1258
$output['Maxmind']['asn6_path'] = NULL;
1394
// Force to finish update matching rule
1395
delete_transient( IP_Geo_Block::CRON_NAME );
1396
1397
+ // start to update databases immediately
1398
+ do_action( IP_Geo_Block::PLUGIN_NAME . '-settings-updated', $options, TRUE );
1399
+
1400
return $options;
1401
}
1402
1415
1416
// Go through the posted data and save the targetted options.
1417
foreach ( $options as $option ) {
1418
+ if ( isset( $_POST[ $option ] ) ) {
1419
$this->update_multisite_settings( $_POST[ $option ] );
1420
+ }
1421
}
1422
1423
// Register a settings error to be displayed to the user
1439
*
1440
* @note: This function triggers `validate_settings()` on register_setting() in wp-include/option.php.
1441
*/
1442
+ public function update_multisite_settings( $settings ) {
1443
global $wpdb;
1444
$blog_ids = $wpdb->get_col( "SELECT `blog_id` FROM `$wpdb->blogs`" );
1445
$ret = TRUE;
1455
return $ret;
1456
}
1457
1458
+ /**
1459
+ * Analyze entries in "Validation logs"
1460
+ *
1461
+ * @param array $logs An array including each entry where:
1462
+ * Array (
1463
+ * [0 DB row number] => 154
1464
+ * [1 Target ] => comment
1465
+ * [2 Time ] => 1534580897
1466
+ * [3 IP address ] => 102.177.147.***
1467
+ * [4 Country code ] => ZA
1468
+ * [5 Result ] => blocked
1469
+ * [6 AS number ] => AS328239
1470
+ * [7 Request ] => POST[80]:/wp-comments-post.php
1471
+ * [8 User agent ] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) ...
1472
+ * [9 HTTP headers ] => HTTP_ORIGIN=http://localhost,HTTP_X_FORWARDED_FOR=102.177.147.***
1473
+ * [10 $_POST data ] => comment=Hello.,author,email,url,comment_post_ID,comment_parent
1474
+ * )
1475
+ * And put a mark at "Target"
1476
+ * ¹¹: Passed in Whitelist
1477
+ * ¹²: Passed in Blacklist
1478
+ * ¹³: Passed not in list
1479
+ * ²¹: Blocked in Whitelist
1480
+ * ²²: Blocked in Blacklist
1481
+ * ²³: Blocked not in list
1482
+ */
1483
+ public function filter_logs( $logs ) {
1484
+ $settings = IP_Geo_Block::get_option();
1485
+
1486
+ // White/Black list for back-end
1487
+ $white_backend = $settings['white_list'];
1488
+ $black_backend = $settings['black_list'];
1489
+
1490
+ // White/Black list for front-end
1491
+ if ( $settings['public']['matching_rule'] < 0 ) {
1492
+ // Follow "Validation rule settings"
1493
+ $white_frontend = $white_backend;
1494
+ $black_frontend = $black_backend;
1495
+ } else {
1496
+ // Whitelist or Blacklist for "Public facing pages"
1497
+ $white_frontend = $settings['public']['white_list'];
1498
+ $black_frontend = $settings['public']['black_list'];
1499
+ }
1500
+
1501
+ foreach ( $logs as $key => $log ) {
1502
+ // Passed or Blocked
1503
+ $mark = IP_Geo_Block::is_passed( $log[5] ) ? '&sup1;' : '&sup2;';
1504
+
1505
+ // Whitelisted, Blacklisted or N/A
1506
+ if ( 'public' === $log[1] ) {
1507
+ $mark .= IP_Geo_Block::is_listed( $log[4], $white_frontend ) ? '&sup1;' : (
1508
+ IP_Geo_Block::is_listed( $log[4], $black_frontend ) ? '&sup2;' : '&sup3;' );
1509
+ } else {
1510
+ $mark .= IP_Geo_Block::is_listed( $log[4], $white_backend ) ? '&sup1;' : (
1511
+ IP_Geo_Block::is_listed( $log[4], $black_backend ) ? '&sup2;' : '&sup3;' );
1512
+ }
1513
+
1514
+ // Put a mark at "Target"
1515
+ $logs[ $key ][1] .= $mark;
1516
+ }
1517
+
1518
+ return $logs;
1519
+ }
1520
+
1521
+ /**
1522
+ * Register UI "Preset filters" at "Search in logs"
1523
+ *
1524
+ * @param array $filters An empty array by default.
1525
+ * @return array $filters The array of paired with 'title' and 'value'.
1526
+ */
1527
+ public function preset_filters( $filters = array() ) {
1528
+ return array(
1529
+ array( 'title' => '<span class="ip-geo-block-icon ip-geo-block-icon-happy" >&nbsp;</span>' . __( '<span title="Show only passed entries whose country codes are in Whitelist.">Passed in Whitelist</span>', 'ip-geo-block' ), 'value' => '&sup1;&sup1;' ),
1530
+ array( 'title' => '<span class="ip-geo-block-icon ip-geo-block-icon-grin2" >&nbsp;</span>' . __( '<span title="Show only passed entries whose country codes are in Blacklist.">Passed in Blacklist</span>', 'ip-geo-block' ), 'value' => '&sup1;&sup2;' ),
1531
+ array( 'title' => '<span class="ip-geo-block-icon ip-geo-block-icon-cool" >&nbsp;</span>' . __( '<span title="Show only passed entries whose country codes are not in either list.">Passed not in List</span>', 'ip-geo-block' ), 'value' => '&sup1;&sup3;' ),
1532
+ array( 'title' => '<span class="ip-geo-block-icon ip-geo-block-icon-confused" >&nbsp;</span>' . __( '<span title="Show only blocked entries whose country codes are in Whitelist.">Blocked in Whitelist</span>', 'ip-geo-block' ), 'value' => '&sup2;&sup1;' ),
1533
+ array( 'title' => '<span class="ip-geo-block-icon ip-geo-block-icon-confused2">&nbsp;</span>' . __( '<span title="Show only blocked entries whose country codes are in Blacklist.">Blocked in Blacklist</span>', 'ip-geo-block' ), 'value' => '&sup2;&sup2;' ),
1534
+ array( 'title' => '<span class="ip-geo-block-icon ip-geo-block-icon-crying" >&nbsp;</span>' . __( '<span title="Show only blocked entries whose country codes are not in either list.">Blocked not in List</span>', 'ip-geo-block' ), 'value' => '&sup2;&sup3;' ),
1535
+ );
1536
+ }
1537
+
1538
/**
1539
* Ajax callback function
1540
*
1599
break;
1600
1601
case 'restore-logs': // Get logs from MySQL DB
1602
+ has_filter( $cmd = IP_Geo_Block::PLUGIN_NAME . '-logs' ) or add_filter( $cmd, array( $this, 'filter_logs' ) );
1603
$res = IP_Geo_Block_Admin_Ajax::restore_logs( $which );
1604
break;
1605
1606
+ case 'live-start': // Restore live log
1607
+ has_filter( $cmd = IP_Geo_Block::PLUGIN_NAME . '-logs' ) or add_filter( $cmd, array( $this, 'filter_logs' ) );
1608
+ if ( is_wp_error( $res = IP_Geo_Block_Admin_Ajax::restore_live_log( $which, $settings ) ) )
1609
+ $res = array( 'error' => $res->get_error_message() );
1610
+ break;
1611
+
1612
+ case 'live-pause': // Pause live log
1613
+ if ( ! is_wp_error( $res = IP_Geo_Block_Admin_Ajax::catch_live_log() ) )
1614
+ $res = array( 'data' => array() );
1615
+ else
1616
+ $res = array( 'error' => $res->get_error_message() );
1617
+ break;
1618
+
1619
+ case 'live-stop': // Stop live log
1620
+ if ( ! is_wp_error( $res = IP_Geo_Block_Admin_Ajax::release_live_log() ) )
1621
+ $res = array( 'data' => array() );
1622
+ else
1623
+ $res = array( 'error' => $res->get_error_message() );
1624
+ break;
1625
+
1626
+ case 'reset-live': // Reset data source of live log
1627
+ $res = IP_Geo_Block_Admin_Ajax::reset_live_log();
1628
+ break;
1629
+
1630
case 'validate': // Validate settings
1631
IP_Geo_Block_Admin_Ajax::validate_settings( $this );
1632
break;
1720
$res = IP_Geo_Block_Admin_Ajax::restore_network( $which, (int)$_POST['offset'], (int)$_POST['length'], FALSE );
1721
break;
1722
1723
case 'find-admin':
1724
case 'find-plugins':
1725
case 'find-themes':
1727
$res = IP_Geo_Block_Admin_Ajax::find_exceptions( $cmd );
1728
break;
1729
1730
+ case 'diag-tables': // Check database tables
1731
IP_Geo_Block_Logs::diag_tables() or IP_Geo_Block_Logs::create_tables();
1732
$res = array( 'page' => 'options-general.php?page=' . IP_Geo_Block::PLUGIN_NAME );
1733
break;
admin/css/admin-icons.css CHANGED
@@ -6,11 +6,11 @@
6
*/
7
@font-face {
8
font-family: 'icomoon';
9
- src: url('fonts/icomoon.eot?119jp3');
10
- src: url('fonts/icomoon.eot?119jp3#iefix') format('embedded-opentype'),
11
- url('fonts/icomoon.ttf?119jp3') format('truetype'),
12
- url('fonts/icomoon.woff?119jp3') format('woff'),
13
- url('fonts/icomoon.svg?119jp3#icomoon') format('svg');
14
font-weight: normal;
15
font-style: normal;
16
}
@@ -39,42 +39,6 @@
39
.ip-geo-block-icon-vpn_lock:before {
40
content: "\e62f";
41
}
42
- .ip-geo-block-icon-search:before {
43
- content: "\e986";
44
- }
45
- .ip-geo-block-icon-key:before {
46
- content: "\e98d";
47
- }
48
- .ip-geo-block-icon-lock:before {
49
- content: "\e98f";
50
- }
51
- .ip-geo-block-icon-unlocked:before {
52
- content: "\e990";
53
- }
54
- .ip-geo-block-icon-cogs:before {
55
- content: "\e995";
56
- }
57
- .ip-geo-block-icon-pie-chart:before {
58
- content: "\e99a";
59
- }
60
- .ip-geo-block-icon-stats-dots:before {
61
- content: "\e99b";
62
- }
63
- .ip-geo-block-icon-stats-bars:before {
64
- content: "\e99c";
65
- }
66
- .ip-geo-block-icon-stats-bars2:before {
67
- content: "\e99d";
68
- }
69
- .ip-geo-block-icon-switch:before {
70
- content: "\e9b6";
71
- }
72
- .ip-geo-block-icon-sphere:before {
73
- content: "\e9c9";
74
- }
75
- .ip-geo-block-icon-earth:before {
76
- content: "\e9ca";
77
- }
78
.ip-geo-block-icon-play:before {
79
content: "\ea1c";
80
}
@@ -84,15 +48,27 @@
84
.ip-geo-block-icon-stop:before {
85
content: "\ea1e";
86
}
87
- .ip-geo-block-icon-eject:before {
88
- content: "\ea25";
89
- }
90
- .ip-geo-block-icon-new-tab:before {
91
- content: "\ea7e";
92
- }
93
.ip-geo-block-icon-warning:before {
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 {
@@ -101,11 +77,3 @@
101
font-size: 18px;
102
margin-left: 2px;
103
}
104
- /*
105
- #toplevel_page_ip-geo-block .dashicons-admin-generic:before {
106
- font-family: 'icomoon';
107
- content: "\e9c9";
108
- font-size: 18px;
109
- margin-left: 2px;
110
- }
111
- */
6
*/
7
@font-face {
8
font-family: 'icomoon';
9
+ src: url('fonts/icomoon.eot?jihakz');
10
+ src: url('fonts/icomoon.eot?jihakz#iefix') format('embedded-opentype'),
11
+ url('fonts/icomoon.ttf?jihakz') format('truetype'),
12
+ url('fonts/icomoon.woff?jihakz') format('woff'),
13
+ url('fonts/icomoon.svg?jihakz#icomoon') format('svg');
14
font-weight: normal;
15
font-style: normal;
16
}
39
.ip-geo-block-icon-vpn_lock:before {
40
content: "\e62f";
41
}
42
.ip-geo-block-icon-play:before {
43
content: "\ea1c";
44
}
48
.ip-geo-block-icon-stop:before {
49
content: "\ea1e";
50
}
51
.ip-geo-block-icon-warning:before {
52
content: "\e900";
53
}
54
+ .ip-geo-block-icon-happy:before {
55
+ content: "\e9df";
56
+ }
57
+ .ip-geo-block-icon-grin2:before {
58
+ content: "\e9ea";
59
+ }
60
+ .ip-geo-block-icon-cool:before {
61
+ content: "\e9eb";
62
+ }
63
+ .ip-geo-block-icon-confused:before {
64
+ content: "\e9f5";
65
+ }
66
+ .ip-geo-block-icon-confused2:before {
67
+ content: "\e9f6";
68
+ }
69
+ .ip-geo-block-icon-crying:before {
70
+ content: "\ea01";
71
+ }
72
73
/* Dashicons is the official icon font of the WordPress admin as of 3.8+. */
74
#toplevel_page_ip-geo-block .dashicons-admin-generic:before {
77
font-size: 18px;
78
margin-left: 2px;
79
}
admin/css/admin-icons.min.css CHANGED
@@ -4,4 +4,4 @@
4
* Zondicons / Designer: Steve Schoger / License: CC BY 4.0
5
* Material Icons / Designer: Google / License: Apache License 2.0
6
*/
7
- @font-face{font-family:icomoon;src:url(fonts/icomoon.eot?119jp3);src:url(fonts/icomoon.eot?119jp3#iefix) format('embedded-opentype'),url(fonts/icomoon.ttf?119jp3) format('truetype'),url(fonts/icomoon.woff?119jp3) format('woff'),url(fonts/icomoon.svg?119jp3#icomoon) format('svg');font-weight:400;font-style:normal}[class*=" ip-geo-block-icon-"],[class^=ip-geo-block-icon-]{font-family:icomoon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ip-geo-block-icon-calc{margin-top:.2em!important}.ip-geo-block-icon-calc:before{content:"\e901"}.ip-geo-block-icon-vpn_lock:before{content:"\e62f"}.ip-geo-block-icon-search:before{content:"\e986"}.ip-geo-block-icon-key:before{content:"\e98d"}.ip-geo-block-icon-lock:before{content:"\e98f"}.ip-geo-block-icon-unlocked:before{content:"\e990"}.ip-geo-block-icon-cogs:before{content:"\e995"}.ip-geo-block-icon-pie-chart:before{content:"\e99a"}.ip-geo-block-icon-stats-dots:before{content:"\e99b"}.ip-geo-block-icon-stats-bars:before{content:"\e99c"}.ip-geo-block-icon-stats-bars2:before{content:"\e99d"}.ip-geo-block-icon-switch:before{content:"\e9b6"}.ip-geo-block-icon-sphere:before{content:"\e9c9"}.ip-geo-block-icon-earth:before{content:"\e9ca"}.ip-geo-block-icon-play:before{content:"\ea1c"}.ip-geo-block-icon-pause:before{content:"\ea1d"}.ip-geo-block-icon-stop:before{content:"\ea1e"}.ip-geo-block-icon-eject:before{content:"\ea25"}.ip-geo-block-icon-new-tab:before{content:"\ea7e"}.ip-geo-block-icon-warning:before{content:"\e900"}#toplevel_page_ip-geo-block .dashicons-admin-generic:before{font-family:icomoon;content:"\e62f";font-size:18px;margin-left:2px}
4
* Zondicons / Designer: Steve Schoger / License: CC BY 4.0
5
* Material Icons / Designer: Google / License: Apache License 2.0
6
*/
7
+ @font-face{font-family:icomoon;src:url(fonts/icomoon.eot?jihakz);src:url(fonts/icomoon.eot?jihakz#iefix) format('embedded-opentype'),url(fonts/icomoon.ttf?jihakz) format('truetype'),url(fonts/icomoon.woff?jihakz) format('woff'),url(fonts/icomoon.svg?jihakz#icomoon) format('svg');font-weight:400;font-style:normal}[class*=" ip-geo-block-icon-"],[class^=ip-geo-block-icon-]{font-family:icomoon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ip-geo-block-icon-calc{margin-top:.2em!important}.ip-geo-block-icon-calc:before{content:"\e901"}.ip-geo-block-icon-vpn_lock:before{content:"\e62f"}.ip-geo-block-icon-play:before{content:"\ea1c"}.ip-geo-block-icon-pause:before{content:"\ea1d"}.ip-geo-block-icon-stop:before{content:"\ea1e"}.ip-geo-block-icon-warning:before{content:"\e900"}.ip-geo-block-icon-happy:before{content:"\e9df"}.ip-geo-block-icon-grin2:before{content:"\e9ea"}.ip-geo-block-icon-cool:before{content:"\e9eb"}.ip-geo-block-icon-confused:before{content:"\e9f5"}.ip-geo-block-icon-confused2:before{content:"\e9f6"}.ip-geo-block-icon-crying:before{content:"\ea01"}#toplevel_page_ip-geo-block .dashicons-admin-generic:before{font-family:icomoon;content:"\e62f";font-size:18px;margin-left:2px}
admin/css/admin.css CHANGED
@@ -232,10 +232,13 @@ input[id*="ip_geo_block_settings_providers"] + label {
232
}
233
ul#ip-geo-block-logs-preset {
234
margin: 0.25em 0;
235
}
236
ul#ip-geo-block-logs-preset li {
237
float: left;
238
margin-right: 1em;
239
}
240
241
/* Loading image */
232
}
233
ul#ip-geo-block-logs-preset {
234
margin: 0.25em 0;
235
+ max-width: 600px;
236
}
237
ul#ip-geo-block-logs-preset li {
238
float: left;
239
+ line-height: 1.6;
240
margin-right: 1em;
241
+ min-width: 160px;
242
}
243
244
/* Loading image */
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%}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}
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;max-width:600px}ul#ip-geo-block-logs-preset li{float:left;line-height:1.6;margin-right:1em;min-width:160px}#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/css/fonts/icomoon.eot CHANGED
Binary file
admin/css/fonts/icomoon.svg CHANGED
@@ -10,21 +10,13 @@
10
<glyph unicode="&#xe62f;" glyph-name="vpn_lock" d="M426 44.667v84c-46 0-84 38-84 84v44l-206 204c-6-24-8-50-8-76 0-174 130-320 298-340zM808 426.667h86c2-14 2-28 2-42 0-236-190-428-426-428s-428 192-428 428 192 426 428 426c44 0 88-8 128-20v-108c0-46-40-86-86-86h-86v-84c0-24-18-44-42-44h-86v-84h256c24 0 44-20 44-44v-128h42c38 0 70-24 82-58 56 60 88 142 88 230 0 14 0 28-2 42zM904 768.667v20c0 40-32 74-72 74s-72-34-72-74v-20h144zM938 768.667c24 0 44-20 44-44v-170c0-24-20-42-44-42h-212c-24 0-44 18-44 42v170c0 24 20 44 44 44v20c0 58 48 108 106 108s106-50 106-108v-20z" />
11
<glyph unicode="&#xe900;" glyph-name="warning" d="M1010.432 121.248l-383.968 768c-21.664 43.36-65.952 70.752-114.464 70.752s-92.8-27.392-114.464-70.752l-383.968-768c-19.84-39.68-17.728-86.816 5.6-124.576 23.328-37.696 64.512-60.672 108.864-60.672h767.904c44.384 0 85.568 22.976 108.864 60.672 23.328 37.76 25.44 84.896 5.632 124.576zM575.936 96c0-17.696-14.304-32-32-32h-64c-17.696 0-32 14.304-32 32v64c0 17.696 14.304 32 32 32h64c17.696 0 32-14.304 32-32v-64zM575.936 352c0-17.696-14.304-32-32-32h-64c-17.696 0-32 14.304-32 32v320c0 17.664 14.304 32 32 32h64c17.696 0 32-14.336 32-32v-320z" />
12
<glyph unicode="&#xe901;" glyph-name="calculator" d="M102.4 870.4c0 56.32 46.080 102.4 102.4 102.4h614.4c56.554 0 102.4-45.846 102.4-102.4v0-819.2c0-56.554-45.846-102.4-102.4-102.4v0h-614.4c-56.554 0-102.4 45.846-102.4 102.4v0 819.2zM256 819.2v-102.4h512v102.4h-512zM256 614.4v-102.4h102.4v102.4h-102.4zM460.8 614.4v-102.4h102.4v102.4h-102.4zM665.6 614.4v-102.4h102.4v102.4h-102.4zM256 409.6v-102.4h102.4v102.4h-102.4zM460.8 409.6v-102.4h102.4v102.4h-102.4zM665.6 409.6v-307.2h102.4v307.2h-102.4zM256 204.8v-102.4h102.4v102.4h-102.4zM460.8 204.8v-102.4h102.4v102.4h-102.4z" />
13
- <glyph unicode="&#xe986;" glyph-name="search" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256z" />
14
- <glyph unicode="&#xe98d;" glyph-name="key" d="M704 960c-176.73 0-320-143.268-320-320 0-20.026 1.858-39.616 5.376-58.624l-389.376-389.376v-192c0-35.346 28.654-64 64-64h64v64h128v128h128v128h128l83.042 83.042c34.010-12.316 70.696-19.042 108.958-19.042 176.73 0 320 143.268 320 320s-143.27 320-320 320zM799.874 639.874c-53.020 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96-42.98-96-96-96z" />
15
- <glyph unicode="&#xe98f;" glyph-name="lock" d="M592 512h-16v192c0 105.87-86.13 192-192 192h-128c-105.87 0-192-86.13-192-192v-192h-16c-26.4 0-48-21.6-48-48v-480c0-26.4 21.6-48 48-48h544c26.4 0 48 21.6 48 48v480c0 26.4-21.6 48-48 48zM192 704c0 35.29 28.71 64 64 64h128c35.29 0 64-28.71 64-64v-192h-256v192z" />
16
- <glyph unicode="&#xe990;" glyph-name="unlocked" d="M768 896c105.87 0 192-86.13 192-192v-192h-128v192c0 35.29-28.71 64-64 64h-128c-35.29 0-64-28.71-64-64v-192h16c26.4 0 48-21.6 48-48v-480c0-26.4-21.6-48-48-48h-544c-26.4 0-48 21.6-48 48v480c0 26.4 21.6 48 48 48h400v192c0 105.87 86.13 192 192 192h128z" />
17
- <glyph unicode="&#xe995;" glyph-name="cogs" d="M363.722 237.948l41.298 57.816-45.254 45.256-57.818-41.296c-10.722 5.994-22.204 10.774-34.266 14.192l-11.682 70.084h-64l-11.68-70.086c-12.062-3.418-23.544-8.198-34.266-14.192l-57.818 41.298-45.256-45.256 41.298-57.816c-5.994-10.72-10.774-22.206-14.192-34.266l-70.086-11.682v-64l70.086-11.682c3.418-12.060 8.198-23.544 14.192-34.266l-41.298-57.816 45.254-45.256 57.818 41.296c10.722-5.994 22.204-10.774 34.266-14.192l11.682-70.084h64l11.68 70.086c12.062 3.418 23.544 8.198 34.266 14.192l57.818-41.296 45.254 45.256-41.298 57.816c5.994 10.72 10.774 22.206 14.192 34.266l70.088 11.68v64l-70.086 11.682c-3.418 12.060-8.198 23.544-14.192 34.266zM224 96c-35.348 0-64 28.654-64 64s28.652 64 64 64 64-28.654 64-64-28.652-64-64-64zM1024 576v64l-67.382 12.25c-1.242 8.046-2.832 15.978-4.724 23.79l57.558 37.1-24.492 59.128-66.944-14.468c-4.214 6.91-8.726 13.62-13.492 20.13l39.006 56.342-45.256 45.254-56.342-39.006c-6.512 4.766-13.22 9.276-20.13 13.494l14.468 66.944-59.128 24.494-37.1-57.558c-7.812 1.892-15.744 3.482-23.79 4.724l-12.252 67.382h-64l-12.252-67.382c-8.046-1.242-15.976-2.832-23.79-4.724l-37.098 57.558-59.128-24.492 14.468-66.944c-6.91-4.216-13.62-8.728-20.13-13.494l-56.342 39.006-45.254-45.254 39.006-56.342c-4.766-6.51-9.278-13.22-13.494-20.13l-66.944 14.468-24.492-59.128 57.558-37.1c-1.892-7.812-3.482-15.742-4.724-23.79l-67.384-12.252v-64l67.382-12.25c1.242-8.046 2.832-15.978 4.724-23.79l-57.558-37.1 24.492-59.128 66.944 14.468c4.216-6.91 8.728-13.618 13.494-20.13l-39.006-56.342 45.254-45.256 56.342 39.006c6.51-4.766 13.22-9.276 20.13-13.492l-14.468-66.944 59.128-24.492 37.102 57.558c7.81-1.892 15.742-3.482 23.788-4.724l12.252-67.384h64l12.252 67.382c8.044 1.242 15.976 2.832 23.79 4.724l37.1-57.558 59.128 24.492-14.468 66.944c6.91 4.216 13.62 8.726 20.13 13.492l56.342-39.006 45.256 45.256-39.006 56.342c4.766 6.512 9.276 13.22 13.492 20.13l66.944-14.468 24.492 59.13-57.558 37.1c1.892 7.812 3.482 15.742 4.724 23.79l67.382 12.25zM672 468.8c-76.878 0-139.2 62.322-139.2 139.2s62.32 139.2 139.2 139.2 139.2-62.322 139.2-139.2c0-76.878-62.32-139.2-139.2-139.2z" />
18
- <glyph unicode="&#xe99a;" glyph-name="pie-chart" d="M448 384v448c-247.424 0-448-200.576-448-448s200.576-448 448-448 448 200.576 448 448c0 72.034-17.028 140.084-47.236 200.382l-400.764-200.382zM912.764 712.382c-73.552 146.816-225.374 247.618-400.764 247.618v-448l400.764 200.382z" />
19
- <glyph unicode="&#xe99b;" glyph-name="stats-dots" d="M128 64h896v-128h-1024v1024h128zM288 128c-53.020 0-96 42.98-96 96s42.98 96 96 96c2.828 0 5.622-0.148 8.388-0.386l103.192 171.986c-9.84 15.070-15.58 33.062-15.58 52.402 0 53.020 42.98 96 96 96s96-42.98 96-96c0-19.342-5.74-37.332-15.58-52.402l103.192-171.986c2.766 0.238 5.56 0.386 8.388 0.386 2.136 0 4.248-0.094 6.35-0.23l170.356 298.122c-10.536 15.408-16.706 34.036-16.706 54.11 0 53.020 42.98 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96-2.14 0-4.248 0.094-6.35 0.232l-170.356-298.124c10.536-15.406 16.706-34.036 16.706-54.11 0-53.020-42.98-96-96-96s-96 42.98-96 96c0 19.34 5.74 37.332 15.578 52.402l-103.19 171.984c-2.766-0.238-5.56-0.386-8.388-0.386s-5.622 0.146-8.388 0.386l-103.192-171.986c9.84-15.068 15.58-33.060 15.58-52.4 0-53.020-42.98-96-96-96z" />
20
- <glyph unicode="&#xe99c;" glyph-name="stats-bars" d="M0 128h1024v-128h-1024zM128 384h128v-192h-128zM320 640h128v-448h-128zM512 448h128v-256h-128zM704 832h128v-640h-128z" />
21
- <glyph unicode="&#xe99d;" glyph-name="stats-bars2" d="M288 576h-192c-17.6 0-32-14.4-32-32v-576c0-17.6 14.4-32 32-32h192c17.6 0 32 14.4 32 32v576c0 17.6-14.4 32-32 32zM288 0h-192v256h192v-256zM608 704h-192c-17.6 0-32-14.4-32-32v-704c0-17.6 14.4-32 32-32h192c17.6 0 32 14.4 32 32v704c0 17.6-14.4 32-32 32zM608 0h-192v320h192v-320zM928 832h-192c-17.6 0-32-14.4-32-32v-832c0-17.6 14.4-32 32-32h192c17.6 0 32 14.4 32 32v832c0 17.6-14.4 32-32 32zM928 0h-192v384h192v-384z" />
22
- <glyph unicode="&#xe9b6;" glyph-name="switch" d="M640 813.412v-135.958c36.206-15.804 69.5-38.408 98.274-67.18 60.442-60.44 93.726-140.8 93.726-226.274s-33.286-165.834-93.726-226.274c-60.44-60.44-140.798-93.726-226.274-93.726s-165.834 33.286-226.274 93.726c-60.44 60.44-93.726 140.8-93.726 226.274s33.286 165.834 93.726 226.274c28.774 28.774 62.068 51.378 98.274 67.182v135.956c-185.048-55.080-320-226.472-320-429.412 0-247.424 200.578-448 448-448 247.424 0 448 200.576 448 448 0 202.94-134.95 374.332-320 429.412zM448 960h128v-512h-128z" />
23
- <glyph unicode="&#xe9c9;" glyph-name="sphere" d="M480 896c-265.096 0-480-214.904-480-480 0-265.098 214.904-480 480-480 265.098 0 480 214.902 480 480 0 265.096-214.902 480-480 480zM751.59 256c8.58 40.454 13.996 83.392 15.758 128h127.446c-3.336-44.196-13.624-87.114-30.68-128h-112.524zM208.41 576c-8.58-40.454-13.996-83.392-15.758-128h-127.444c3.336 44.194 13.622 87.114 30.678 128h112.524zM686.036 576c9.614-40.962 15.398-83.854 17.28-128h-191.316v128h174.036zM512 640v187.338c14.59-4.246 29.044-11.37 43.228-21.37 26.582-18.74 52.012-47.608 73.54-83.486 14.882-24.802 27.752-52.416 38.496-82.484h-155.264zM331.232 722.484c21.528 35.878 46.956 64.748 73.54 83.486 14.182 10 28.638 17.124 43.228 21.37v-187.34h-155.264c10.746 30.066 23.616 57.68 38.496 82.484zM448 576v-128h-191.314c1.88 44.146 7.666 87.038 17.278 128h174.036zM95.888 256c-17.056 40.886-27.342 83.804-30.678 128h127.444c1.762-44.608 7.178-87.546 15.758-128h-112.524zM256.686 384h191.314v-128h-174.036c-9.612 40.96-15.398 83.854-17.278 128zM448 192v-187.34c-14.588 4.246-29.044 11.372-43.228 21.37-26.584 18.74-52.014 47.61-73.54 83.486-14.882 24.804-27.75 52.418-38.498 82.484h155.266zM628.768 109.516c-21.528-35.876-46.958-64.746-73.54-83.486-14.184-9.998-28.638-17.124-43.228-21.37v187.34h155.266c-10.746-30.066-23.616-57.68-38.498-82.484zM512 256v128h191.314c-1.88-44.146-7.666-87.040-17.28-128h-174.034zM767.348 448c-1.762 44.608-7.178 87.546-15.758 128h112.524c17.056-40.886 27.344-83.806 30.68-128h-127.446zM830.658 640h-95.9c-18.638 58.762-44.376 110.294-75.316 151.428 42.536-20.34 81.058-47.616 114.714-81.272 21.48-21.478 40.362-44.938 56.502-70.156zM185.844 710.156c33.658 33.658 72.18 60.932 114.714 81.272-30.942-41.134-56.676-92.666-75.316-151.428h-95.898c16.138 25.218 35.022 48.678 56.5 70.156zM129.344 192h95.898c18.64-58.762 44.376-110.294 75.318-151.43-42.536 20.34-81.058 47.616-114.714 81.274-21.48 21.478-40.364 44.938-56.502 70.156zM774.156 121.844c-33.656-33.658-72.18-60.934-114.714-81.274 30.942 41.134 56.678 92.668 75.316 151.43h95.9c-16.14-25.218-35.022-48.678-56.502-70.156z" />
24
- <glyph unicode="&#xe9ca;" glyph-name="earth" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512-0.002c-62.958 0-122.872 13.012-177.23 36.452l233.148 262.29c5.206 5.858 8.082 13.422 8.082 21.26v96c0 17.674-14.326 32-32 32-112.99 0-232.204 117.462-233.374 118.626-6 6.002-14.14 9.374-22.626 9.374h-128c-17.672 0-32-14.328-32-32v-192c0-12.122 6.848-23.202 17.69-28.622l110.31-55.156v-187.886c-116.052 80.956-192 215.432-192 367.664 0 68.714 15.49 133.806 43.138 192h116.862c8.488 0 16.626 3.372 22.628 9.372l128 128c6 6.002 9.372 14.14 9.372 22.628v77.412c40.562 12.074 83.518 18.588 128 18.588 70.406 0 137.004-16.26 196.282-45.2-4.144-3.502-8.176-7.164-12.046-11.036-36.266-36.264-56.236-84.478-56.236-135.764s19.97-99.5 56.236-135.764c36.434-36.432 85.218-56.264 135.634-56.26 3.166 0 6.342 0.080 9.518 0.236 13.814-51.802 38.752-186.656-8.404-372.334-0.444-1.744-0.696-3.488-0.842-5.224-81.324-83.080-194.7-134.656-320.142-134.656z" />
25
<glyph unicode="&#xea1c;" glyph-name="play3" d="M192 832l640-384-640-384z" />
26
<glyph unicode="&#xea1d;" glyph-name="pause2" d="M128 832h320v-768h-320zM576 832h320v-768h-320z" />
27
<glyph unicode="&#xea1e;" glyph-name="stop2" d="M128 832h768v-768h-768z" />
28
- <glyph unicode="&#xea25;" glyph-name="eject" d="M0 192h1024v-128h-1024zM512 832l512-512h-1024z" />
29
- <glyph unicode="&#xea7e;" glyph-name="new-tab" d="M192 896v-768h768v768h-768zM896 192h-640v640h640v-640zM128 64v672l-64 64v-800h800l-64 64h-672zM352 704l160-160-192-192 96-96 192 192 160-160v416z" />
30
</font></defs></svg>
10
<glyph unicode="&#xe62f;" glyph-name="vpn_lock" d="M426 44.667v84c-46 0-84 38-84 84v44l-206 204c-6-24-8-50-8-76 0-174 130-320 298-340zM808 426.667h86c2-14 2-28 2-42 0-236-190-428-426-428s-428 192-428 428 192 426 428 426c44 0 88-8 128-20v-108c0-46-40-86-86-86h-86v-84c0-24-18-44-42-44h-86v-84h256c24 0 44-20 44-44v-128h42c38 0 70-24 82-58 56 60 88 142 88 230 0 14 0 28-2 42zM904 768.667v20c0 40-32 74-72 74s-72-34-72-74v-20h144zM938 768.667c24 0 44-20 44-44v-170c0-24-20-42-44-42h-212c-24 0-44 18-44 42v170c0 24 20 44 44 44v20c0 58 48 108 106 108s106-50 106-108v-20z" />
11
<glyph unicode="&#xe900;" glyph-name="warning" d="M1010.432 121.248l-383.968 768c-21.664 43.36-65.952 70.752-114.464 70.752s-92.8-27.392-114.464-70.752l-383.968-768c-19.84-39.68-17.728-86.816 5.6-124.576 23.328-37.696 64.512-60.672 108.864-60.672h767.904c44.384 0 85.568 22.976 108.864 60.672 23.328 37.76 25.44 84.896 5.632 124.576zM575.936 96c0-17.696-14.304-32-32-32h-64c-17.696 0-32 14.304-32 32v64c0 17.696 14.304 32 32 32h64c17.696 0 32-14.304 32-32v-64zM575.936 352c0-17.696-14.304-32-32-32h-64c-17.696 0-32 14.304-32 32v320c0 17.664 14.304 32 32 32h64c17.696 0 32-14.336 32-32v-320z" />
12
<glyph unicode="&#xe901;" glyph-name="calculator" d="M102.4 870.4c0 56.32 46.080 102.4 102.4 102.4h614.4c56.554 0 102.4-45.846 102.4-102.4v0-819.2c0-56.554-45.846-102.4-102.4-102.4v0h-614.4c-56.554 0-102.4 45.846-102.4 102.4v0 819.2zM256 819.2v-102.4h512v102.4h-512zM256 614.4v-102.4h102.4v102.4h-102.4zM460.8 614.4v-102.4h102.4v102.4h-102.4zM665.6 614.4v-102.4h102.4v102.4h-102.4zM256 409.6v-102.4h102.4v102.4h-102.4zM460.8 409.6v-102.4h102.4v102.4h-102.4zM665.6 409.6v-307.2h102.4v307.2h-102.4zM256 204.8v-102.4h102.4v102.4h-102.4zM460.8 204.8v-102.4h102.4v102.4h-102.4z" />
13
+ <glyph unicode="&#xe9df;" glyph-name="happy" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM512 361.24c115.95 0 226.23 30.806 320 84.92-14.574-178.438-153.128-318.16-320-318.16-166.868 0-305.422 139.872-320 318.304 93.77-54.112 204.050-85.064 320-85.064zM256 608c0 53.019 28.654 96 64 96s64-42.981 64-96c0-53.019-28.654-96-64-96s-64 42.981-64 96zM640 608c0 53.019 28.654 96 64 96s64-42.981 64-96c0-53.019-28.654-96-64-96s-64 42.981-64 96z" />
14
+ <glyph unicode="&#xe9ea;" glyph-name="grin2" d="M512 960c-282.77 0-512-229.23-512-512s229.226-512 512-512c282.77 0 512 229.23 512 512s-229.23 512-512 512zM704 724c63.962 0 116-52.038 116-116 0-6.378-0.546-12.876-1.628-19.312-1.618-9.632-9.958-16.688-19.724-16.688s-18.108 7.056-19.722 16.69c-6.16 36.684-37.67 53.31-74.926 53.31s-68.766-16.626-74.924-53.31c-1.616-9.632-9.956-16.69-19.722-16.69-0.002 0 0 0-0.002 0-9.766 0-18.106 7.056-19.722 16.688-1.084 6.436-1.63 12.934-1.63 19.312 0 63.962 52.038 116 116 116zM320 724c63.962 0 116-52.038 116-116 0-6.378-0.548-12.876-1.628-19.312-1.618-9.632-9.956-16.688-19.724-16.688s-18.106 7.056-19.722 16.69c-6.16 36.684-37.67 53.31-74.926 53.31s-68.766-16.626-74.924-53.31c-1.616-9.632-9.956-16.69-19.722-16.69 0 0 0 0 0 0-9.766 0-18.106 7.056-19.724 16.688-1.082 6.436-1.63 12.934-1.63 19.312 0 63.962 52.038 116 116 116zM192 384h192v-247.846c-110.094 28.606-192 129.124-192 247.846zM448 128v256h128v-256h-128zM640 136.154v247.846h192c0-118.722-81.904-219.24-192-247.846z" />
15
+ <glyph unicode="&#xe9eb;" glyph-name="cool" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM800 704c17.6 0 32-14.4 32-32v-96c0-35.2-28.8-64-64-64h-128c-35.2 0-64 28.8-64 64h-128c0-35.2-28.8-64-64-64h-128c-35.2 0-64 28.8-64 64v96c0 17.6 14.4 32 32 32h192c17.6 0 32-14.4 32-32v-32h128v32c0 17.6 14.4 32 32 32h192zM512 192c93.208 0 174.772 49.818 219.546 124.278l54.88-32.934c-55.966-93.070-157.916-155.344-274.426-155.344-48.458 0-94.384 10.796-135.54 30.082l33.162 55.278c31.354-13.714 65.964-21.36 102.378-21.36z" />
16
+ <glyph unicode="&#xe9f5;" glyph-name="confused" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM256 640c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM640 640c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM726.106 320h64.864c9.246-72.506-32.452-144.53-103.958-170.56-82.904-30.176-174.9 12.716-205.080 95.616-18.108 49.744-73.306 75.482-123.048 57.372-45.562-16.588-70.956-64.298-60.988-110.424h-64.86c-9.242 72.508 32.45 144.528 103.956 170.56 82.904 30.178 174.902-12.716 205.082-95.614 18.104-49.748 73.306-75.482 123.044-57.372 45.562 16.584 70.956 64.298 60.988 110.422z" />
17
+ <glyph unicode="&#xe9f6;" glyph-name="confused2" d="M512 960c-282.77 0-512-229.23-512-512s229.226-512 512-512c282.77 0 512 229.23 512 512s-229.23 512-512 512zM704 704c35.346 0 64-28.654 64-64s-28.654-64-64-64-64 28.654-64 64c0 35.346 28.654 64 64 64zM320 704c35.346 0 64-28.654 64-64s-28.654-64-64-64-64 28.654-64 64c0 35.346 28.654 64 64 64zM687.010 149.44c-82.902-30.18-174.9 12.712-205.080 95.614-18.108 49.742-73.306 75.478-123.048 57.372-45.562-16.588-70.958-64.296-60.988-110.424h-64.86c-9.244 72.508 32.45 144.532 103.956 170.56 82.904 30.18 174.902-12.712 205.082-95.614 18.108-49.742 73.306-75.476 123.046-57.37 45.562 16.584 70.958 64.294 60.988 110.422h64.864c9.24-72.506-32.454-144.532-103.96-170.56z" />
18
+ <glyph unicode="&#xea01;" glyph-name="crying" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM800 576h-128c-17.674 0-32 14.328-32 32s14.326 32 32 32h128c17.674 0 32-14.328 32-32s-14.326-32-32-32zM352 576h-128c-17.672 0-32 14.328-32 32s14.328 32 32 32h128c17.672 0 32-14.328 32-32s-14.328-32-32-32zM608 104c-8.19 0-16.378 3.124-22.626 9.374-4.582 4.582-29.42 14.626-73.374 14.626s-68.79-10.044-73.374-14.626c-12.496-12.496-32.758-12.496-45.254 0-12.498 12.496-12.498 32.758 0 45.254 30.122 30.12 92.994 33.372 118.628 33.372 25.632 0 88.506-3.252 118.626-33.374 12.498-12.496 12.498-32.758 0-45.254-6.248-6.248-14.436-9.372-22.626-9.372zM736 384c-17.674 0-32 14.326-32 32v64c0 17.672 14.326 32 32 32s32-14.328 32-32v-64c0-17.674-14.326-32-32-32zM736 192c-17.674 0-32 14.326-32 32v64c0 17.674 14.326 32 32 32s32-14.326 32-32v-64c0-17.674-14.326-32-32-32zM288 384c-17.672 0-32 14.326-32 32v64c0 17.672 14.328 32 32 32s32-14.328 32-32v-64c0-17.674-14.328-32-32-32zM288 192c-17.672 0-32 14.326-32 32v64c0 17.674 14.328 32 32 32s32-14.326 32-32v-64c0-17.674-14.328-32-32-32z" />
19
<glyph unicode="&#xea1c;" glyph-name="play3" d="M192 832l640-384-640-384z" />
20
<glyph unicode="&#xea1d;" glyph-name="pause2" d="M128 832h320v-768h-320zM576 832h320v-768h-320z" />
21
<glyph unicode="&#xea1e;" glyph-name="stop2" d="M128 832h768v-768h-768z" />
22
</font></defs></svg>
admin/css/fonts/icomoon.ttf CHANGED
Binary file
admin/css/fonts/icomoon.woff CHANGED
Binary file
admin/includes/class-admin-ajax.php CHANGED
@@ -223,7 +223,7 @@ class IP_Geo_Block_Admin_Ajax {
223
return $ret;
224
225
if ( ! is_wp_error( $res = IP_Geo_Block_Logs::restore_live_log( $hook, $settings ) ) )
226
- return array( 'data' => self::format_logs( $res ) ); // DataTables requires `data`
227
else
228
return array( 'error' => $res->get_error_message() );
229
}
@@ -347,7 +347,7 @@ endif;
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;
@@ -600,6 +600,9 @@ endif; // TEST_RESTORE_NETWORK
600
'[mimetype][capability][$]', // 3.0.4
601
'[Maxmind][use_asn]', // 3.0.4
602
'[live_update][in_memory]', // 3.0.5
603
);
604
$json = array();
605
$prfx = IP_Geo_Block::OPTION_NAME;
@@ -814,7 +817,7 @@ endif; // TEST_RESTORE_NETWORK
814
public static function get_wp_info() {
815
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-lkup.php';
816
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
817
- $fs = IP_Geo_Block_FS::init( 'get_wp_info' );
818
819
// DNS reverse lookup
820
$key = microtime( TRUE );
@@ -833,9 +836,11 @@ endif; // TEST_RESTORE_NETWORK
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
@@ -844,6 +849,8 @@ endif; // TEST_RESTORE_NETWORK
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(),
@@ -879,9 +886,7 @@ endif; // TEST_RESTORE_NETWORK
879
880
foreach ( $installed as $key => $val ) {
881
if ( isset( $activated[ $key ] ) ) {
882
- $res += array(
883
- esc_html( $val['Name'] ) => esc_html( $val['Version'] )
884
- );
885
}
886
}
887
@@ -896,8 +901,7 @@ endif; // TEST_RESTORE_NETWORK
896
// add post data
897
$query = array();
898
foreach ( explode( ',', $val['data'] ) as $str ) {
899
- if ( FALSE !== strpos( $str, '=' ) )
900
- $query[] = $str;
901
}
902
903
if ( ! empty( $query ) )
223
return $ret;
224
225
if ( ! is_wp_error( $res = IP_Geo_Block_Logs::restore_live_log( $hook, $settings ) ) )
226
+ return array( 'data' => self::format_logs( apply_filters( IP_Geo_Block::PLUGIN_NAME . '-logs', $res ) ) );
227
else
228
return array( 'error' => $res->get_error_message() );
229
}
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;
600
'[mimetype][capability][$]', // 3.0.4
601
'[Maxmind][use_asn]', // 3.0.4
602
'[live_update][in_memory]', // 3.0.5
603
+ '[monitor][metadata]', // 3.0.17
604
+ '[metadata][pre_update_option][$]', // 3.0.17
605
+ '[metadata][pre_update_site_option][$]', // 3.0.17
606
);
607
$json = array();
608
$prfx = IP_Geo_Block::OPTION_NAME;
817
public static function get_wp_info() {
818
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-lkup.php';
819
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
820
+ $fs = IP_Geo_Block_FS::init( __FUNCTION__ );
821
822
// DNS reverse lookup
823
$key = microtime( TRUE );
836
@ini_set( 'error_log', $log );
837
@error_reporting( $err );
838
839
+ // Human readable size, Proces owner
840
+ // https://gist.github.com/mehdichaouch/341a151dd5f469002a021c9396aa2615
841
// https://secure.php.net/manual/function.get-current-user.php#57624
842
// https://secure.php.net/manual/function.posix-getpwuid.php#82387
843
+ $siz = array( 'B', 'K', 'M', 'G', 'T', 'P' );
844
$usr = function_exists( 'posix_getpwuid' ) ? posix_getpwuid( posix_geteuid() ) : array( 'name' => getenv( 'USERNAME' ) );
845
846
// Server, PHP, WordPress
849
'MySQL:' => $ver . ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG && $bem ? ' (' . $bem . ')' : '' ),
850
'PHP:' => PHP_VERSION,
851
'PHP SAPI:' => php_sapi_name(),
852
+ 'Memory limit:' => ini_get( 'memory_limit' ),
853
+ 'Peak usage:' => @round( ( $m = memory_get_peak_usage() ) / pow( 1024, ( $i = floor( log( $m, 1024 ) ) ) ), 2 ) . $siz[ $i ],
854
'WordPress:' => $GLOBALS['wp_version'],
855
'Multisite:' => is_multisite() ? 'yes' : 'no',
856
'File system:' => $fs->get_method(),
886
887
foreach ( $installed as $key => $val ) {
888
if ( isset( $activated[ $key ] ) ) {
889
+ $res += array( esc_html( $val['Name'] ) => esc_html( $val['Version'] ) );
890
}
891
}
892
901
// add post data
902
$query = array();
903
foreach ( explode( ',', $val['data'] ) as $str ) {
904
+ FALSE !== strpos( $str, '=' ) and $query[] = $str;
905
}
906
907
if ( ! empty( $query ) )
admin/includes/class-admin-rewrite.php CHANGED
@@ -155,7 +155,7 @@ class IP_Geo_Block_Admin_Rewrite {
155
*/
156
private function get_rewrite_rule( $which ) {
157
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
158
- $fs = IP_Geo_Block_FS::init( 'get_rewrite_rule' );
159
160
// check the existence of configuration file
161
$file = $this->get_rewrite_file( $which );
@@ -185,7 +185,7 @@ class IP_Geo_Block_Admin_Rewrite {
185
*/
186
private function put_rewrite_rule( $which, $content ) {
187
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
188
- $fs = IP_Geo_Block_FS::init( 'put_rewrite_rule' );
189
190
$file = $this->get_rewrite_file( $which );
191
@@ -285,7 +285,7 @@ class IP_Geo_Block_Admin_Rewrite {
285
$additional = '';
286
if ( '.user.ini' === $type ) {
287
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
288
- $fs = IP_Geo_Block_FS::init( 'append_rewrite_block' );
289
290
$dir = dirname( IP_GEO_BLOCK_PATH ); // `/wp-content/plugins`
291
$ini = $this->config_file;
155
*/
156
private function get_rewrite_rule( $which ) {
157
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
158
+ $fs = IP_Geo_Block_FS::init( __FUNCTION__ );
159
160
// check the existence of configuration file
161
$file = $this->get_rewrite_file( $which );
185
*/
186
private function put_rewrite_rule( $which, $content ) {
187
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
188
+ $fs = IP_Geo_Block_FS::init( __FUNCTION__ );
189
190
$file = $this->get_rewrite_file( $which );
191
285
$additional = '';
286
if ( '.user.ini' === $type ) {
287
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
288
+ $fs = IP_Geo_Block_FS::init( __FUNCTION__ );
289
290
$dir = dirname( IP_GEO_BLOCK_PATH ); // `/wp-content/plugins`
291
$ini = $this->config_file;
admin/includes/tab-accesslog.php CHANGED
@@ -97,11 +97,19 @@ endif; // extension_loaded( 'pdo_sqlite' )
97
);
98
99
// Preset filters
100
- $filters = apply_filters( $plugin_slug . '-logs-preset', array() );
101
if ( ! empty( $filters ) ) {
102
$html = '<ul id="ip-geo-block-logs-preset">';
103
foreach ( $filters as $filter ) {
104
- $html .= '<li><a href="#!" data-value="' . esc_attr( $filter['value'] ) . '">' . esc_html( $filter['title'] ) . '</a></li>';
105
}
106
107
add_settings_field(
97
);
98
99
// Preset filters
100
+ $filters = has_filter( $plugin_slug . '-logs-preset' ) ? apply_filters( $plugin_slug . '-logs-preset', array() ) : $context->preset_filters();
101
if ( ! empty( $filters ) ) {
102
+ // allowed tags and attributes
103
+ $allow_tags = array(
104
+ 'span' => array(
105
+ 'class' => 1,
106
+ 'title' => 1,
107
+ )
108
+ );
109
+
110
$html = '<ul id="ip-geo-block-logs-preset">';
111
foreach ( $filters as $filter ) {
112
+ $html .= '<li><a href="#!" data-value="' . esc_attr( $filter['value'] ) . '">' . IP_Geo_Block_Util::kses( $filter['title'], $allow_tags ) . '</a></li>';
113
}
114
115
add_settings_field(
admin/includes/tab-geolocation.php CHANGED
@@ -23,8 +23,8 @@ class IP_Geo_Block_Admin_Tab {
23
$list = array();
24
$providers = IP_Geo_Block_Provider::get_providers( 'key' );
25
foreach ( $providers as $provider => $key ) {
26
- if ( ! is_string( $key ) ||
27
- ! empty( $options['providers'][ $provider ] ) ) {
28
$list += array( $provider => $provider );
29
}
30
}
23
$list = array();
24
$providers = IP_Geo_Block_Provider::get_providers( 'key' );
25
foreach ( $providers as $provider => $key ) {
26
+ if ( ! is_string( $key ) || // provider that does not need api key
27
+ ! empty( $options['providers'][ $provider ] ) ) { // provider that has api key
28
$list += array( $provider => $provider );
29
}
30
}
admin/includes/tab-settings.php CHANGED
@@ -309,6 +309,28 @@ endif;
309
)
310
);
311
312
// Response code (RFC 2616)
313
add_settings_field(
314
$option_name.'_response_code',
@@ -535,8 +557,8 @@ endif;
535
);
536
537
$desc = array(
538
- 1 => __( 'It will block a request related to the services for both public facing pages and the dashboard.', 'ip-geo-block' ),
539
- 2 => __( 'Regardless of the country code, it will block a malicious request related to the services only for the dashboard.', 'ip-geo-block' ),
540
);
541
542
// Max failed login attempts per IP address
@@ -1470,7 +1492,7 @@ endif;
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' ) );
@@ -1491,7 +1513,7 @@ if ( IP_GEO_BLOCK_NETWORK && FALSE ):
1491
)
1492
);
1493
}
1494
- endif;
1495
// Emergency login link
1496
$key = IP_Geo_Block_Util::get_link();
1497
add_settings_field(
309
)
310
);
311
312
+ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
313
+ // Prevent metadata alteration
314
+ $list = '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup" style="margin-top:0.4em">' . __( '<dfn title="Specify the table names to be verified for single site. This verification will be skipped if empty.">pre_update_option</dfn>', 'ip-geo-block' ) . "\n";
315
+ $list .= '<li class="ip-geo-block-hide"><ul><li><input type="text" id="ip_geo_block_settings_metadata_pre_update_option" name="ip_geo_block_settings[metadata][pre_update_option]" class="regular-text code" value="' . esc_attr( implode( ',', $options['metadata']['pre_update_option'] ) ) . '" />' . $common[0] . '</li></ul></li></ul>' . "\n";
316
+ $list .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the table names to be verified for multisite. This verification will be skipped if empty.">pre_update_site_option</dfn>', 'ip-geo-block' ) . "\n";
317
+ $list .= '<li class="ip-geo-block-hide"><ul><li><input type="text" id="ip_geo_block_settings_metadata_pre_update_site_option" name="ip_geo_block_settings[metadata][pre_update_site_option]" class="regular-text code" value="' . esc_attr( implode( ',', $options['metadata']['pre_update_site_option'] ) ) . '" />' . $common[0] . '</li></ul></li></ul>' . "\n";
318
+
319
+ add_settings_field(
320
+ $option_name.'_metadata',
321
+ __( '<dfn title="It prevents to manipulate metadata in database without admin privilege.">Prevent metadata alteration</dfn>', 'ip-geo-block' ),
322
+ array( $context, 'callback_field' ),
323
+ $option_slug,
324
+ $section,
325
+ array(
326
+ 'type' => 'html',
327
+ 'option' => $option_name,
328
+ 'field' => 'metadata',
329
+ 'value' => $list,
330
+ )
331
+ );
332
+ endif;
333
+
334
// Response code (RFC 2616)
335
add_settings_field(
336
$option_name.'_response_code',
557
);
558
559
$desc = array(
560
+ 1 => __( 'It will block a request related to the services for both &#8220;non-logged in user&#8221; and &#8220;logged-in user&#8221;.', 'ip-geo-block' ),
561
+ 2 => __( 'Regardless of the country code, it will block a malicious request related to the services only for &#8220;logged-in user&#8221;.', 'ip-geo-block' ),
562
);
563
564
// Max failed login attempts per IP address
1492
NULL,
1493
$option_slug
1494
);
1495
+
1496
// @see https://vedovini.net/2015/10/using-the-wordpress-settings-api-with-network-admin-pages/
1497
if ( $context->is_network_admin() ) {
1498
add_action( 'network_admin_edit_' . IP_Geo_Block::PLUGIN_NAME, array( $context, 'validate_network_settings' ) );
1513
)
1514
);
1515
}
1516
+
1517
// Emergency login link
1518
$key = IP_Geo_Block_Util::get_link();
1519
add_settings_field(
admin/js/admin.js CHANGED
@@ -94,7 +94,12 @@
94
request.action = ip_geo_block.action;
95
request.nonce = ip_geo_block.nonce;
96
97
- $.post(ip_geo_block.url, request)
98
99
.done(function (data/*, textStatus, jqXHR*/) {
100
if (callback) {
@@ -461,7 +466,7 @@
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' } ]);
465
chart.dataStacked[id] = window.google.visualization.arrayToDataTable(data);
466
}
467
}
@@ -482,8 +487,8 @@
482
483
for (i = 0; i < n; i++) {
484
info.push({
485
- label: data.getValue(i, 0),
486
- link: data.getValue(i, 6)
487
});
488
}
489
@@ -1722,9 +1727,9 @@
1722
timer_pause = null;
1723
}
1724
},
1725
- live_start = function () {
1726
clear_timer();
1727
- ajax_post('live-loading', {
1728
cmd: 'live-start'
1729
}, function (res) {
1730
if (res.error) {
@@ -1737,11 +1742,14 @@
1737
}
1738
table.draw(false); // the current page will still be shown.
1739
}
1740
- timer_start = window.setTimeout(live_start, ip_geo_block.interval * 1000);
1741
});
1742
},
1743
live_stop = function (cmd, callback) {
1744
- clear_timer();
1745
ajax_post(null, {
1746
cmd: cmd || 'live-stop',
1747
callback: callback
@@ -1751,8 +1759,8 @@
1751
live_stop('live-pause', function () {
1752
$timer_pause.addClass(ID('live-timer'));
1753
timer_pause = window.setTimeout(function () {
1754
- clear_timer();
1755
$(ID('#', 'live-log-stop')).prop('checked', true);
1756
}, ip_geo_block.timeout * 1000);
1757
});
1758
},
94
request.action = ip_geo_block.action;
95
request.nonce = ip_geo_block.nonce;
96
97
+ $.ajax({
98
+ type: 'POST',
99
+ url: ip_geo_block.url,
100
+ data: request,
101
+ dataType: 'json'
102
+ })
103
104
.done(function (data/*, textStatus, jqXHR*/) {
105
if (callback) {
466
if (chart.dataStacked[id] === undefined) {
467
data = $.parseJSON($id.attr('data-' + id));
468
if (data) {
469
+ data.unshift(['site', 'comment', 'xmlrpc', 'login', 'admin', 'public', { role: 'link' } ]);
470
chart.dataStacked[id] = window.google.visualization.arrayToDataTable(data);
471
}
472
}
487
488
for (i = 0; i < n; i++) {
489
info.push({
490
+ label: /*escapeHTML(*/data.getValue(i, 0)/*)*/,
491
+ link: /*escapeHTML(*/data.getValue(i, 6)/*)*/
492
});
493
}
494
1727
timer_pause = null;
1728
}
1729
},
1730
+ live_start = function (cmd) {
1731
clear_timer();
1732
+ ajax_post(cmd === undefined ? 'live-loading' : null, {
1733
cmd: 'live-start'
1734
}, function (res) {
1735
if (res.error) {
1742
}
1743
table.draw(false); // the current page will still be shown.
1744
}
1745
+ if (cmd === undefined) {
1746
+ // keep updating
1747
+ timer_start = window.setTimeout(live_start, ip_geo_block.interval * 1000);
1748
+ }
1749
});
1750
},
1751
live_stop = function (cmd, callback) {
1752
+ live_start(false); // once read out the buffer
1753
ajax_post(null, {
1754
cmd: cmd || 'live-stop',
1755
callback: callback
1759
live_stop('live-pause', function () {
1760
$timer_pause.addClass(ID('live-timer'));
1761
timer_pause = window.setTimeout(function () {
1762
$(ID('#', 'live-log-stop')).prop('checked', true);
1763
+ live_stop();
1764
}, ip_geo_block.timeout * 1000);
1765
});
1766
},
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,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+#x2F;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+#x2F;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("quot;,"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+)\)#x2F;,"$1"))<=Number(e(n).text().replace(/^.*\((\d+)\)#x2F;,"$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),amp;&$.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+#x2F;,".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);
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.ajax({type:"POST",url:l.url,data:n,dataType:"json"}).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","public",{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+#x2F;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+#x2F;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("quot;,"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+)\)#x2F;,"$1"))<=Number(e(n).text().replace(/^.*\((\d+)\)#x2F;,"$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(e){M&&(t.clearTimeout(M),M=null),z&&(E.removeClass(s("live-timer")),t.clearTimeout(z),z=null),v(e===i?"live-loading":null,{cmd:"live-start"},function(n){if(n.error)f(null,n.error);else if(n.data.length){var a,o=n.data.length;for(a=0;a<o;a++)$.row.add(n.data[a]);$.draw(!1)}e===i&&(M=t.setTimeout(J,1e3*l.interval))})},B=function(e,t){J(!1),v(null,{cmd:e||"live-stop",callback:t})},q=s(""),H=function(t,n,i){-1===n[7].indexOf("pass")?e(t).addClass(q+i+"blocked"):e(t).addClass(q+i+"passed")},V=e(s("#","live-log")),G=e(s("#","live-update"));e(s("#","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="'+s("live-log")+'"]:checked').val()){case"start":J();break;case"pause":B("live-pause",function(){E.addClass(s("live-timer")),z=t.setTimeout(function(){e(s("#","live-log-stop")).prop("checked",!0),B()},1e3*l.timeout)});break;case"stop":B()}}),G.on("change",function(){var t=V.closest("tr"),n=G.prop("checked");return r[o][1]=n?"o":"x",D(r),amp;&$.clear().destroy(),n?(t.show().next().next().next().nextAll().hide(),_.ajaxCMD="live-stop",I.order=[1,"desc"],I.createdRow=function(e,t){H(e,t,"new-")}):(t.hide().next().next().next().nextAll().show(),_.ajaxCMD="restore-logs",I.order=[0,""],I.createdRow=function(e,t){H(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 U=e(s("#","map"));"object"==typeof t.google?U.each(function(){e(this).GmapRS()}):U.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+#x2F;,".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?U.GmapRS("deleteMarkers").GmapRS("addMarker",{latitude:p,longitude:h,title:u,content:"<ul>"+c+"</ul>",show:!0,zoom:f}):(U.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/whois.js CHANGED
@@ -77,14 +77,14 @@
77
78
if (value.link) {
79
if ((value['referenced-type'] || false) && 'aut-num' === value['referenced-type']) {
80
- value.value += ' [ <a href="https://ipinfo.io/' + escapeHTML(value.value) + '" target=_blank>Search on ipinfo.io</a> ]';
81
} else {
82
value.value = '<a href="' + escapeHTML(value.link.href) + '.json" target=_blank>' + escapeHTML(value.value) + '</a>';
83
}
84
}
85
86
else if (value.value.match(/^AS\d+#x2F;)) {
87
- value.value += ' [ <a href="https://ipinfo.io/' + escapeHTML(value.value) + '" target=_blank>Search on ipinfo.io</a> ]';
88
}
89
90
else if ('remarks' === value.name) {
77
78
if (value.link) {
79
if ((value['referenced-type'] || false) && 'aut-num' === value['referenced-type']) {
80
+ value.value += ' [ <a href="https://ipinfo.io/' + escapeHTML(value.value) + '" target=_blank>Search at ipinfo.io</a> ]';
81
} else {
82
value.value = '<a href="' + escapeHTML(value.link.href) + '.json" target=_blank>' + escapeHTML(value.value) + '</a>';
83
}
84
}
85
86
else if (value.value.match(/^AS\d+#x2F;)) {
87
+ value.value += ' [ <a href="https://ipinfo.io/' + escapeHTML(value.value) + '" target=_blank>Search at ipinfo.io</a> ]';
88
}
89
90
else if ('remarks' === value.name) {
admin/js/whois.min.js CHANGED
@@ -5,4 +5,4 @@
5
* Copyright (c) 2016 tokkonopapa (tokkonopapa@yahoo.com)
6
* This software is released under the MIT License.
7
*/
8
- !function(e){e.extend({whois:function(a,r){var t=[];function n(e){return e?e.toString().replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]}):""}return e.ajax({url:'https://query.yahooapis.com/v1/public/yql?q=select * from xml where url="%URL%"&format=json&jsonCompat=new'.replace(/%URL%/,"https://rest.db.ripe.net/search%3fflags=no-filtering%26flags=resource%26query-string="+a),method:"GET",dataType:"json"}).done(function(a,r,u){var l,o=a.query.results,i=[];for(l in o)if(o.hasOwnProperty(l)){i=o[l];break}!function a(r,u){if(u&&"object"==typeof u)if(u.errormessage){var l=u.errormessage,o=l.text.split(/\n+/);t.push({name:n(l.severity),value:n(o[1].replace(/%s/,l.args.value))})}else u.href?(u.href=n(u.href),t.push({name:n(r),value:'<a href="'+u.href+'.json" target=_blank>'+u.href+"</a>"})):u.name&&u.value?(u.link?u["referenced-type"]&&"aut-num"===u["referenced-type"]?u.value+=' [ <a href="https://ipinfo.io/'+n(u.value)+'" target=_blank>Search on ipinfo.io</a> ]':u.value='<a href="'+n(u.link.href)+'.json" target=_blank>'+n(u.value)+"</a>":u.value.match(/^AS\d+#x2F;)?u.value+=' [ <a href="https://ipinfo.io/'+n(u.value)+'" target=_blank>Search on ipinfo.io</a> ]':"remarks"===u.name&&(u.value=n(u.value),u.value=u.value.replace(/(https?:\/\/[^\s]+)/gi,'<a href="$1" target=_blank>$1</a>')),t.push({name:n(u.name),value:u.value})):"primary-key"!==r&&e.each(u,function(e,r){a(e,r)})}(null,i)}).fail(function(e,a,r){t.push({name:n(a),value:n(r)})}).always(function(){t.push({name:"copyright",value:'<a href="https://apps.db.ripe.net/search/query.html" title="Database Query - RIPE Network Coordination Centre">RIPE NCC</a>'}),r&&r(t)})}})}(jQuery);
5
* Copyright (c) 2016 tokkonopapa (tokkonopapa@yahoo.com)
6
* This software is released under the MIT License.
7
*/
8
+ !function(e){e.extend({whois:function(a,r){var t=[];function n(e){return e?e.toString().replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]}):""}return e.ajax({url:'https://query.yahooapis.com/v1/public/yql?q=select * from xml where url="%URL%"&format=json&jsonCompat=new'.replace(/%URL%/,"https://rest.db.ripe.net/search%3fflags=no-filtering%26flags=resource%26query-string="+a),method:"GET",dataType:"json"}).done(function(a,r,u){var l,o=a.query.results,i=[];for(l in o)if(o.hasOwnProperty(l)){i=o[l];break}!function a(r,u){if(u&&"object"==typeof u)if(u.errormessage){var l=u.errormessage,o=l.text.split(/\n+/);t.push({name:n(l.severity),value:n(o[1].replace(/%s/,l.args.value))})}else u.href?(u.href=n(u.href),t.push({name:n(r),value:'<a href="'+u.href+'.json" target=_blank>'+u.href+"</a>"})):u.name&&u.value?(u.link?u["referenced-type"]&&"aut-num"===u["referenced-type"]?u.value+=' [ <a href="https://ipinfo.io/'+n(u.value)+'" target=_blank>Search at ipinfo.io</a> ]':u.value='<a href="'+n(u.link.href)+'.json" target=_blank>'+n(u.value)+"</a>":u.value.match(/^AS\d+#x2F;)?u.value+=' [ <a href="https://ipinfo.io/'+n(u.value)+'" target=_blank>Search at ipinfo.io</a> ]':"remarks"===u.name&&(u.value=n(u.value),u.value=u.value.replace(/(https?:\/\/[^\s]+)/gi,'<a href="$1" target=_blank>$1</a>')),t.push({name:n(u.name),value:u.value})):"primary-key"!==r&&e.each(u,function(e,r){a(e,r)})}(null,i)}).fail(function(e,a,r){t.push({name:n(a),value:n(r)})}).always(function(){t.push({name:"copyright",value:'<a href="https://apps.db.ripe.net/search/query.html" title="Database Query - RIPE Network Coordination Centre">RIPE NCC</a>'}),r&&r(t)})}})}(jQuery);
classes/class-ip-geo-block-apis.php CHANGED
@@ -103,7 +103,6 @@ abstract class IP_Geo_Block_API {
103
}
104
105
switch ( $tmp ) {
106
-
107
// decode json
108
case 'json':
109
case 'html': // ipinfo.io, Xhanch
@@ -198,56 +197,56 @@ abstract class IP_Geo_Block_API {
198
}
199
200
/**
201
- * Class for Ipdata.co
202
*
203
- * URL : https://ipdata.co/
204
- * Term of use : https://ipdata.co/terms.html
205
- * Licence fee : free
206
- * Rate limit : 1500 requests free daily
207
- * Sample URL : https://api.ipdata.co/8.8.8.8?api-key=...
208
- * Input type : IP address (IPv4, IPv6)
209
- * Output type : json
210
*/
211
- class IP_Geo_Block_API_Ipdataco extends IP_Geo_Block_API {
212
protected $template = array(
213
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
214
- 'url' => 'https://api.ipdata.co/%API_IP%?api-key=%API_KEY%',
215
'api' => array(
216
'%API_FORMAT%' => 'json',
217
),
218
'transform' => array(
219
- 'countryCode' => 'country_code',
220
- 'countryName' => 'country_name',
221
- 'regionName' => 'region',
222
- 'cityName' => 'city',
223
- 'latitude' => 'latitude',
224
- 'longitude' => 'longitude',
225
)
226
);
227
}
228
229
/**
230
- * Class for ipstack
231
*
232
- * URL : https://ipstack.com/
233
- * Term of use : https://ipstack.com/terms
234
- * Licence fee : free for registered user
235
- * Rate limit : 10,000 queries per month for free (https can be available for premium users)
236
- * Sample URL : http://api.ipstack.com/186.116.207.169?access_key=YOUR_ACCESS_KEY&output=json&legacy=1
237
- * Input type : IP address (IPv4, IPv6) / domain name
238
- * Output type : json, xml
239
*/
240
- class IP_Geo_Block_API_ipstack extends IP_Geo_Block_API {
241
protected $template = array(
242
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
243
- 'url' => 'http://api.ipstack.com/%API_IP%?access_key=%API_KEY%&output=%API_FORMAT%',
244
- 'api' => array(
245
- '%API_FORMAT%' => 'json',
246
- ),
247
'transform' => array(
248
- 'countryCode' => 'country_code',
249
- 'countryName' => 'country_name',
250
- 'regionName' => 'region_name',
251
'cityName' => 'city',
252
'latitude' => 'latitude',
253
'longitude' => 'longitude',
@@ -261,7 +260,7 @@ class IP_Geo_Block_API_ipstack extends IP_Geo_Block_API {
261
* URL : https://ipinfo.io/
262
* Term of use : https://ipinfo.io/developers#terms
263
* Licence fee : free
264
- * Rate limit :
265
* Sample URL : https://ipinfo.io/124.83.187.140/json
266
* Sample URL : https://ipinfo.io/124.83.187.140/country
267
* Input type : IP address (IPv4)
@@ -303,64 +302,67 @@ class IP_Geo_Block_API_ipinfoio extends IP_Geo_Block_API {
303
}
304
305
/**
306
- * Class for Nekudo
307
*
308
- * URL : https://geoip.nekudo.com/
309
- * Term of use : https://nekudo.com/blog/new-project-shiny-geoip
310
* Licence fee : free to use the API
311
- * Rate limit : none
312
- * Sample URL : http://geoip.nekudo.com/api/2a00:1210:fffe:200::1
313
* Input type : IP address (IPv4, IPv6)
314
* Output type : json
315
*/
316
- class IP_Geo_Block_API_Nekudo extends IP_Geo_Block_API {
317
protected $template = array(
318
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
319
- 'url' => 'https://geoip.nekudo.com/api/%API_IP%',
320
'api' => array(),
321
'transform' => array(
322
- 'countryCode' => 'country',
323
- 'countryName' => 'country',
324
'cityName' => 'city',
325
- 'latitude' => 'location',
326
- 'longitude' => 'location',
327
)
328
);
329
330
public function get_location( $ip, $args = array() ) {
331
$res = parent::get_location( $ip, $args );
332
- if ( isset( $res['countryName'] ) && is_array( $res['countryName'] ) ) {
333
- $res['countryCode'] = esc_html( $res['countryCode']['code'] );
334
- $res['countryName'] = esc_html( $res['countryName']['name'] );
335
- $res['latitude' ] = esc_html( $res['latitude' ]['latitude' ] );
336
- $res['longitude' ] = esc_html( $res['longitude' ]['longitude'] );
337
return $res;
338
} else {
339
- return array( 'errorMessage' => 'Not Found' ); // 404
340
}
341
}
342
}
343
344
/**
345
- * Class for GeoIPLookup.net
346
*
347
- * URL : http://geoiplookup.net/
348
- * Term of use : http://geoiplookup.net/terms-of-use.php
349
* Licence fee : free
350
- * Rate limit : none
351
- * Sample URL : http://api.geoiplookup.net/?query=2a00:1210:fffe:200::1
352
* Input type : IP address (IPv4, IPv6)
353
- * Output type : xml
354
*/
355
- class IP_Geo_Block_API_GeoIPLookup extends IP_Geo_Block_API {
356
protected $template = array(
357
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
358
- 'url' => 'http://api.geoiplookup.net/?query=%API_IP%',
359
- 'api' => array(),
360
'transform' => array(
361
- 'countryCode' => 'countrycode',
362
- 'countryName' => 'countryname',
363
- 'regionName' => 'countryname',
364
'cityName' => 'city',
365
'latitude' => 'latitude',
366
'longitude' => 'longitude',
@@ -369,32 +371,30 @@ class IP_Geo_Block_API_GeoIPLookup extends IP_Geo_Block_API {
369
}
370
371
/**
372
- * Class for ip-api.com
373
*
374
- * URL : http://ip-api.com/
375
- * Term of use : http://ip-api.com/docs/#usage_limits
376
- * Licence fee : free for non-commercial use
377
- * Rate limit : 240 requests per minute
378
- * Sample URL : http://ip-api.com/json/2a00:1210:fffe:200::1
379
- * Sample URL : http://ip-api.com/xml/yahoo.co.jp
380
- * Input type : IP address (IPv4, IPv6 with limited coverage) / domain name
381
* Output type : json, xml
382
*/
383
- class IP_Geo_Block_API_ipapicom extends IP_Geo_Block_API {
384
protected $template = array(
385
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
386
- 'url' => 'http://ip-api.com/%API_FORMAT%/%API_IP%',
387
'api' => array(
388
'%API_FORMAT%' => 'json',
389
),
390
'transform' => array(
391
- 'errorMessage' => 'error',
392
- 'countryCode' => 'countryCode',
393
- 'countryName' => 'country',
394
- 'regionName' => 'regionName',
395
- 'cityName' => 'city',
396
- 'latitude' => 'lat',
397
- 'longitude' => 'lon',
398
)
399
);
400
}
@@ -450,13 +450,13 @@ class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
450
// memory cache
451
protected static $memcache = array();
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 );
459
- $call = $cache['reqs'] + ( 'failed' !== $validate['result'] ? 1 : 0 );
460
$last = $cache['last'];
461
$view = $cache['view'];
462
} else { // if new cache then reset these values
@@ -526,34 +526,34 @@ class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
526
class IP_Geo_Block_Provider {
527
528
protected static $providers = array(
529
- 'ipinfo.io' => array(
530
- 'key' => NULL,
531
- 'type' => 'IPv4, IPv6 / free',
532
- 'link' => '<a rel="noreferrer" href="https://ipinfo.io/" title="IP Address API and Data Solutions">https://ipinfo.io/</a>&nbsp;(IPv4, IPv6 / free up to 1000 requests daily)',
533
),
534
535
- 'Nekudo' => array(
536
'key' => NULL,
537
'type' => 'IPv4, IPv6 / free',
538
- 'link' => '<a rel="noreferrer" href="https://geoip.nekudo.com/" title="geoip.nekudo.com | Free IP to geolocation API">https://geoip.nekudo.com/</a>&nbsp;(IPv4, IPv6 / free)',
539
),
540
541
- 'GeoIPLookup' => array(
542
'key' => NULL,
543
'type' => 'IPv4, IPv6 / free',
544
- 'link' => '<a rel="noreferrer" href="http://geoiplookup.net/" title="What Is My IP Address | GeoIP Lookup">GeoIPLookup.net</a>&nbsp;(IPv4, IPv6 / free)',
545
),
546
547
- 'ip-api.com' => array(
548
- 'key' => FALSE,
549
- 'type' => 'IPv4, IPv6 / free for non-commercial use',
550
- 'link' => '<a rel="noreferrer" href="http://ip-api.com/" title="IP-API.com - Free Geolocation API">http://ip-api.com/</a>&nbsp;(IPv4, IPv6 / free for non-commercial use)',
551
),
552
553
'Ipdata.co' => array(
554
'key' => '',
555
'type' => 'IPv4, IPv6 / free',
556
- 'link' => '<a rel="noreferrer" href="https://ipdata.co/" title="ipdata.co - IP Geolocation and Threat Data API">https://ipdata.co/</a>&nbsp;(IPv4, IPv6 / free up to 1500 requests daily for registered user)',
557
),
558
559
'ipstack' => array(
@@ -628,14 +628,16 @@ class IP_Geo_Block_Provider {
628
* Returns providers name list which are checked in settings
629
*
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 ) )
638
- $list[] = $key;
639
}
640
641
return $list;
@@ -659,7 +661,7 @@ if ( class_exists( 'IP_Geo_Block', FALSE ) ) {
659
);
660
661
// Scan API directory
662
- $plugins = is_dir( $dir ) ? scandir( $dir, defined( 'SCANDIR_SORT_DESCENDING' ) ? SCANDIR_SORT_DESCENDING : 1 ) : FALSE;
663
664
// Load addons by heigher priority order
665
if ( FALSE !== $plugins ) {
103
}
104
105
switch ( $tmp ) {
106
// decode json
107
case 'json':
108
case 'html': // ipinfo.io, Xhanch
197
}
198
199
/**
200
+ * Class for IP-API.com
201
*
202
+ * URL : http://ip-api.com/
203
+ * Term of use : http://ip-api.com/docs/#usage_limits
204
+ * Licence fee : free for non-commercial use
205
+ * Rate limit : 240 requests per minute
206
+ * Sample URL : http://ip-api.com/json/2a00:1210:fffe:200::1
207
+ * Sample URL : http://ip-api.com/xml/yahoo.co.jp
208
+ * Input type : IP address (IPv4, IPv6 with limited coverage) / domain name
209
+ * Output type : json, xml
210
*/
211
+ class IP_Geo_Block_API_IPAPIcom extends IP_Geo_Block_API {
212
protected $template = array(
213
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
214
+ 'url' => 'http://ip-api.com/%API_FORMAT%/%API_IP%',
215
'api' => array(
216
'%API_FORMAT%' => 'json',
217
),
218
'transform' => array(
219
+ 'errorMessage' => 'error',
220
+ 'countryCode' => 'countryCode',
221
+ 'countryName' => 'country',
222
+ 'regionName' => 'regionName',
223
+ 'cityName' => 'city',
224
+ 'latitude' => 'lat',
225
+ 'longitude' => 'lon',
226
)
227
);
228
}
229
230
/**
231
+ * Class for GeoIPLookup.net
232
*
233
+ * URL : http://geoiplookup.net/
234
+ * Term of use : http://geoiplookup.net/terms-of-use.php
235
+ * Licence fee : free
236
+ * Rate limit : none
237
+ * Sample URL : http://api.geoiplookup.net/?query=2a00:1210:fffe:200::1
238
+ * Input type : IP address (IPv4, IPv6)
239
+ * Output type : xml
240
*/
241
+ class IP_Geo_Block_API_GeoIPLookup extends IP_Geo_Block_API {
242
protected $template = array(
243
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
244
+ 'url' => 'http://api.geoiplookup.net/?query=%API_IP%',
245
+ 'api' => array(),
246
'transform' => array(
247
+ 'countryCode' => 'countrycode',
248
+ 'countryName' => 'countryname',
249
+ 'regionName' => 'countryname',
250
'cityName' => 'city',
251
'latitude' => 'latitude',
252
'longitude' => 'longitude',
260
* URL : https://ipinfo.io/
261
* Term of use : https://ipinfo.io/developers#terms
262
* Licence fee : free
263
+ * Rate limit : 1,000 lookups daily
264
* Sample URL : https://ipinfo.io/124.83.187.140/json
265
* Sample URL : https://ipinfo.io/124.83.187.140/country
266
* Input type : IP address (IPv4)
302
}
303
304
/**
305
+ * Class for ipapi
306
*
307
+ * URL : https://ipapi.com/
308
+ * Term of use : https://ipapi.com/terms
309
* Licence fee : free to use the API
310
+ * Rate limit : 10,000 reqests per month
311
+ * Sample URL : http://api.ipapi.com/2a00:1210:fffe:200::1?access_key=...
312
* Input type : IP address (IPv4, IPv6)
313
* Output type : json
314
*/
315
+ class IP_Geo_Block_API_ipapi extends IP_Geo_Block_API {
316
protected $template = array(
317
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
318
+ 'url' => 'http://api.ipapi.com/%API_IP%?access_key=%API_KEY%',
319
'api' => array(),
320
'transform' => array(
321
+ 'countryCode' => 'country_code',
322
+ 'countryName' => 'country_name',
323
'cityName' => 'city',
324
+ 'latitude' => 'latitude',
325
+ 'longitude' => 'longitude',
326
+ 'error' => 'error',
327
)
328
);
329
330
public function get_location( $ip, $args = array() ) {
331
$res = parent::get_location( $ip, $args );
332
+ if ( isset( $res['countryName'] ) ) {
333
+ $res['countryCode'] = esc_html( $res['countryCode'] );
334
+ $res['countryName'] = esc_html( $res['countryName'] );
335
+ $res['latitude' ] = esc_html( $res['latitude' ] );
336
+ $res['longitude' ] = esc_html( $res['longitude' ] );
337
return $res;
338
} else {
339
+ return array( 'errorMessage' => esc_html( $res['error']['info'] ) );
340
}
341
}
342
}
343
344
/**
345
+ * Class for Ipdata.co
346
*
347
+ * URL : https://ipdata.co/
348
+ * Term of use : https://ipdata.co/terms.html
349
* Licence fee : free
350
+ * Rate limit : 1,500 lookups free daily
351
+ * Sample URL : https://api.ipdata.co/8.8.8.8?api-key=...
352
* Input type : IP address (IPv4, IPv6)
353
+ * Output type : json
354
*/
355
+ class IP_Geo_Block_API_Ipdataco extends IP_Geo_Block_API {
356
protected $template = array(
357
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
358
+ 'url' => 'https://api.ipdata.co/%API_IP%?api-key=%API_KEY%',
359
+ 'api' => array(
360
+ '%API_FORMAT%' => 'json',
361
+ ),
362
'transform' => array(
363
+ 'countryCode' => 'country_code',
364
+ 'countryName' => 'country_name',
365
+ 'regionName' => 'region',
366
'cityName' => 'city',
367
'latitude' => 'latitude',
368
'longitude' => 'longitude',
371
}
372
373
/**
374
+ * Class for ipstack
375
*
376
+ * URL : https://ipstack.com/
377
+ * Term of use : https://ipstack.com/terms
378
+ * Licence fee : free for registered user
379
+ * Rate limit : 10,000 queries per month for free (https can be available for premium users)
380
+ * Sample URL : http://api.ipstack.com/186.116.207.169?access_key=YOUR_ACCESS_KEY&output=json&legacy=1
381
+ * Input type : IP address (IPv4, IPv6) / domain name
382
* Output type : json, xml
383
*/
384
+ class IP_Geo_Block_API_ipstack extends IP_Geo_Block_API {
385
protected $template = array(
386
'type' => IP_GEO_BLOCK_API_TYPE_BOTH,
387
+ 'url' => 'http://api.ipstack.com/%API_IP%?access_key=%API_KEY%&output=%API_FORMAT%',
388
'api' => array(
389
'%API_FORMAT%' => 'json',
390
),
391
'transform' => array(
392
+ 'countryCode' => 'country_code',
393
+ 'countryName' => 'country_name',
394
+ 'regionName' => 'region_name',
395
+ 'cityName' => 'city',
396
+ 'latitude' => 'latitude',
397
+ 'longitude' => 'longitude',
398
)
399
);
400
}
450
// memory cache
451
protected static $memcache = array();
452
453
+ public static function update_cache( $hook, $validate, $settings, $countup = TRUE ) {
454
$time = $_SERVER['REQUEST_TIME'];
455
$cache = self::get_cache( $ip = $validate['ip'], $settings['cache_hold'] );
456
457
if ( $cache ) {
458
+ $fail = isset( $validate['fail'] ) ? $validate['fail'] : 0;
459
+ $call = $cache['reqs'] + ( $countup ? 1 : 0 ); // prevent duplicate count up
460
$last = $cache['last'];
461
$view = $cache['view'];
462
} else { // if new cache then reset these values
526
class IP_Geo_Block_Provider {
527
528
protected static $providers = array(
529
+ 'IP-API.com' => array(
530
+ 'key' => FALSE,
531
+ 'type' => 'IPv4, IPv6 / free for non-commercial use',
532
+ 'link' => '<a rel="noreferrer" href="http://ip-api.com/" title="IP-API.com - Free Geolocation API">http://ip-api.com/</a>&nbsp;(IPv4, IPv6 / free for non-commercial use)',
533
),
534
535
+ 'GeoIPLookup' => array(
536
'key' => NULL,
537
'type' => 'IPv4, IPv6 / free',
538
+ 'link' => '<a rel="noreferrer" href="http://geoiplookup.net/" title="What Is My IP Address | GeoIP Lookup">GeoIPLookup.net</a>&nbsp;(IPv4, IPv6 / free)',
539
),
540
541
+ 'ipinfo.io' => array(
542
'key' => NULL,
543
'type' => 'IPv4, IPv6 / free',
544
+ 'link' => '<a rel="noreferrer" href="https://ipinfo.io/" title="IP Address API and Data Solutions">https://ipinfo.io/</a>&nbsp;(IPv4, IPv6 / free up to 1,000 lookups daily)',
545
),
546
547
+ 'ipapi' => array(
548
+ 'key' => '',
549
+ 'type' => 'IPv4, IPv6 / free',
550
+ 'link' => '<a rel="noreferrer" href="https://ipapi.com/" title="ipapi - IP Address Lookup and Geolocation API">https://ipapi.com/</a>&nbsp;(IPv4, IPv6 / free up to 10,000 lookups monthly for registered user)',
551
),
552
553
'Ipdata.co' => array(
554
'key' => '',
555
'type' => 'IPv4, IPv6 / free',
556
+ 'link' => '<a rel="noreferrer" href="https://ipdata.co/" title="ipdata.co - IP Geolocation and Threat Data API">https://ipdata.co/</a>&nbsp;(IPv4, IPv6 / free up to 1,500 lookups daily for registered user)',
557
),
558
559
'ipstack' => array(
628
* Returns providers name list which are checked in settings
629
*
630
*/
631
+ public static function get_valid_providers( $settings, $rand = TRUE, $cache = TRUE, $all = FALSE ) {
632
$list = array();
633
+ $providers = $settings['providers' ]; // list of not selected and selected with api key
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 $name => $key ) {
637
+ // ( if $name has api key ) || ( if $name that does not need api key is selected )
638
+ if ( ! empty( $providers[ $name ] ) || ( ! isset( $providers[ $name ] ) && NULL === $key ) ) {
639
+ $list[] = $name;
640
+ }
641
}
642
643
return $list;
661
);
662
663
// Scan API directory
664
+ $plugins = ( is_dir( $dir ) ? scandir( $dir, defined( 'SCANDIR_SORT_DESCENDING' ) ? SCANDIR_SORT_DESCENDING : 1 ) : FALSE );
665
666
// Load addons by heigher priority order
667
if ( FALSE !== $plugins ) {
classes/class-ip-geo-block-cron.php CHANGED
@@ -171,6 +171,16 @@ class IP_Geo_Block_Cron {
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
/**
@@ -258,7 +268,7 @@ class IP_Geo_Block_Cron {
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 ) );
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
+ // wait until updating has finished to avoid race condition with IP_Geo_Block_Opts::install_api()
176
+ $time = 0;
177
+ while ( ( $stat = get_transient( IP_Geo_Block::CRON_NAME ) ) && 'done' !== $stat ) {
178
+ sleep( 1 );
179
+
180
+ if ( ++$time > 5 * MINUTE_IN_SECONDS ) {
181
+ break;
182
+ }
183
+ }
184
}
185
186
/**
268
*/
269
public static function download_zip( $url, $args, $files, $modified ) {
270
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
271
+ $fs = IP_Geo_Block_FS::init( __FUNCTION__ );
272
273
// get extension
274
$ext = strtolower( pathinfo( $url, PATHINFO_EXTENSION ) );
classes/class-ip-geo-block-file.php CHANGED
@@ -297,4 +297,34 @@ if (0) {
297
return unzip_file( $src, $this->absolute_path( $dst ) );
298
}
299