IP Geo Block - Version 3.0.13

Version Description

  • Deprecate: Remove the hotfix in 3.0.12.1 because of WordPress 4.9.7 Security and Maintenance Release.
  • Fix issue: Local databases settings will be updated when Geolocation API folder can not be found on activation. (forum topic)
  • Fix issue: Fix the issue of "ip_geo_block_cache doesn't exist" at activation on clean installation.
  • Fix issue: Fix the issue that "Remove entries by IP address" did not work when "Anonymize IP address" in "Privacy and record settings" section was enabled.
  • Fix issue: Ipdata.co became to require API key for registered user to make up to 1500 requests daily.
  • Improvement: AES256 is applied to encrypt IP address if the algorithm is available. (PHP 5.3.3+)
  • Improvement: Add "Do not send IP address to external APIs" apart from "Anonymize IP address" in "Privacy and record settings" section.
Download this release

Release Info

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

Code changes from version 3.0.12.1 to 3.0.13

Files changed (96) hide show
  1. README.txt +16 -7
  2. admin/class-ip-geo-block-admin.php +26 -4
  3. admin/css/admin-icons.css +90 -34
  4. admin/css/admin-icons.min.css +7 -2
  5. admin/css/admin.css +69 -58
  6. admin/css/admin.min.css +1 -1
  7. admin/css/cidr.min.css +1 -1
  8. admin/css/fonts/icomoon.eot +0 -0
  9. admin/css/fonts/icomoon.svg +2 -7
  10. admin/css/fonts/icomoon.ttf +0 -0
  11. admin/css/fonts/icomoon.woff +0 -0
  12. admin/datatables/css/datatables-all.css +218 -181
  13. admin/datatables/css/datatables-all.min.css +5 -3
  14. admin/includes/class-admin-ajax.php +33 -23
  15. admin/includes/tab-accesslog.php +1 -1
  16. admin/includes/tab-geolocation.php +5 -4
  17. admin/includes/tab-settings.php +117 -104
  18. admin/includes/tab-statistics.php +6 -6
  19. admin/js/admin.js +4 -4
  20. admin/js/admin.min.js +1 -1
  21. classes/class-ip-geo-block-apis.php +10 -10
  22. classes/class-ip-geo-block-cron.php +2 -2
  23. classes/class-ip-geo-block-logs.php +320 -102
  24. classes/class-ip-geo-block-opts.php +18 -8
  25. classes/class-ip-geo-block-util.php +46 -62
  26. classes/class-ip-geo-block.php +1 -13
  27. includes/Net/DNS2.php +1 -1
  28. includes/Net/DNS2/BitMap.php +0 -254
  29. includes/Net/DNS2/Cache.php +0 -311
  30. includes/Net/DNS2/Cache/File.php +0 -247
  31. includes/Net/DNS2/Cache/Shm.php +0 -318
  32. includes/Net/DNS2/PrivateKey.php +0 -424
  33. includes/Net/DNS2/RR/A.php +0 -156
  34. includes/Net/DNS2/RR/AAAA.php +0 -177
  35. includes/Net/DNS2/RR/AFSDB.php +0 -174
  36. includes/Net/DNS2/RR/ANY.php +0 -129
  37. includes/Net/DNS2/RR/APL.php +0 -343
  38. includes/Net/DNS2/RR/ATMA.php +0 -210
  39. includes/Net/DNS2/RR/AVC.php +0 -75
  40. includes/Net/DNS2/RR/CAA.php +0 -179
  41. includes/Net/DNS2/RR/CDNSKEY.php +0 -77
  42. includes/Net/DNS2/RR/CDS.php +0 -77
  43. includes/Net/DNS2/RR/CERT.php +0 -292
  44. includes/Net/DNS2/RR/CSYNC.php +0 -203
  45. includes/Net/DNS2/RR/DHCID.php +0 -207
  46. includes/Net/DNS2/RR/DLV.php +0 -75
  47. includes/Net/DNS2/RR/DNAME.php +0 -153
  48. includes/Net/DNS2/RR/DNSKEY.php +0 -198
  49. includes/Net/DNS2/RR/DS.php +0 -209
  50. includes/Net/DNS2/RR/EID.php +0 -130
  51. includes/Net/DNS2/RR/EUI48.php +0 -187
  52. includes/Net/DNS2/RR/EUI64.php +0 -188
  53. includes/Net/DNS2/RR/HINFO.php +0 -175
  54. includes/Net/DNS2/RR/HIP.php +0 -287
  55. includes/Net/DNS2/RR/IPSECKEY.php +0 -386
  56. includes/Net/DNS2/RR/ISDN.php +0 -190
  57. includes/Net/DNS2/RR/KEY.php +0 -85
  58. includes/Net/DNS2/RR/KX.php +0 -179
  59. includes/Net/DNS2/RR/L32.php +0 -180
  60. includes/Net/DNS2/RR/L64.php +0 -187
  61. includes/Net/DNS2/RR/LOC.php +0 -440
  62. includes/Net/DNS2/RR/LP.php +0 -177
  63. includes/Net/DNS2/RR/MX.php +0 -175
  64. includes/Net/DNS2/RR/NAPTR.php +0 -231
  65. includes/Net/DNS2/RR/NID.php +0 -187
  66. includes/Net/DNS2/RR/NIMLOC.php +0 -130
  67. includes/Net/DNS2/RR/NS.php +0 -153
  68. includes/Net/DNS2/RR/NSAP.php +0 -262
  69. includes/Net/DNS2/RR/NSEC.php +0 -184
  70. includes/Net/DNS2/RR/NSEC3.php +0 -310
  71. includes/Net/DNS2/RR/NSEC3PARAM.php +0 -220
  72. includes/Net/DNS2/RR/OPENPGPKEY.php +0 -159
  73. includes/Net/DNS2/RR/PX.php +0 -186
  74. includes/Net/DNS2/RR/RP.php +0 -167
  75. includes/Net/DNS2/RR/RRSIG.php +0 -329
  76. includes/Net/DNS2/RR/RT.php +0 -175
  77. includes/Net/DNS2/RR/SMIMEA.php +0 -75
  78. includes/Net/DNS2/RR/SPF.php +0 -75
  79. includes/Net/DNS2/RR/SRV.php +0 -186
  80. includes/Net/DNS2/RR/SSHFP.php +0 -250
  81. includes/Net/DNS2/RR/TA.php +0 -75
  82. includes/Net/DNS2/RR/TALINK.php +0 -171
  83. includes/Net/DNS2/RR/TKEY.php +0 -307
  84. includes/Net/DNS2/RR/TLSA.php +0 -194
  85. includes/Net/DNS2/RR/TXT.php +0 -177
  86. includes/Net/DNS2/RR/URI.php +0 -183
  87. includes/Net/DNS2/RR/WKS.php +0 -235
  88. includes/Net/DNS2/RR/X25.php +0 -160
  89. includes/Net/DNS2/Updater.php +0 -654
  90. includes/Net/IPv4.php +0 -0
  91. ip-geo-block.php +1 -1
  92. languages/ip-geo-block-ja.mo +0 -0
  93. languages/ip-geo-block-ja.po +331 -326
  94. languages/ip-geo-block.mo +0 -0
  95. languages/ip-geo-block.po +266 -260
  96. languages/ip-geo-block.pot +266 -260
README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: tokkonopapa
3
  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.6
7
- Stable tag: 3.0.12.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
10
 
@@ -113,7 +113,7 @@ or following descriptions for your best setup.
113
  Specify the country code with two letters (see [ISO 3166-1 alpha-2](http://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.
@@ -382,11 +382,20 @@ Please refer to "[How can I fix permission troubles?](http://www.ipgeoblock.com/
382
 
383
  == Changelog ==
384
 
 
 
 
 
 
 
 
 
 
385
  = 3.0.12.1 =
386
- * **Issue fix:** Unexpected blocking cause by an extra slash at the end of `$_SERVER['DOCUMENT_ROOT']` that might be added by server's configuration. ([forum topic](https://wordpress.org/support/topic/wpwebinar/ "Topic: WPWebinar | WordPress.org"))
387
- * **Issue fix:** [Human friendly error page](http://www.ipgeoblock.com/codex/customizing-the-response.html#human-friendly-error-page) now works properly. ([forum topic](https://wordpress.org/support/topic/problem-with-permalinks-51/ "Topic: Problem with Permalinks | WordPress.org"))
388
- * **Issue fix:** Fix the conflict with WP hide & Security Enhancer. ([forum topic](https://wordpress.org/support/topic/problem-with-permalinks-51/ "Topic: Problem with Permalinks | WordPress.org"))
389
- * **Issue fix:** Hotfix [WordPress File Delete to Code Execution](https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/ "WARNING: WordPress File Delete to Code Execution") by RIPS Technologies.
390
 
391
  = 3.0.12 =
392
  * **Improvement:** Enhance "Privacy and record settings" where "Expiration time [sec] for Logs" can be specified.
3
  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.13
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
10
 
113
  Specify the country code with two letters (see [ISO 3166-1 alpha-2](http://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.
382
 
383
  == Changelog ==
384
 
385
+ = 3.0.13 =
386
+ * **Deprecate:** Remove the hotfix in 3.0.12.1 because of [WordPress 4.9.7 Security and Maintenance Release](https://wordpress.org/news/2018/07/wordpress-4-9-7-security-and-maintenance-release/ "WordPress 4.9.7 Security and Maintenance Release").
387
+ * **Fix issue:** Local databases settings will be updated when Geolocation API folder can not be found on activation. ([forum topic](https://wordpress.org/support/topic/local-database-settings-wrong-after-server-move/ "Topic: Local Database settings wrong after server move | WordPress.org"))
388
+ * **Fix issue:** Fix the issue of "ip_geo_block_cache doesn't exist" at activation on clean installation.
389
+ * **Fix issue:** Fix the issue that "Remove entries by IP address" did not work when "Anonymize IP address" in "Privacy and record settings" section was enabled.
390
+ * **Fix issue:** Ipdata.co became to require API key for registered user to make up to 1500 requests daily.
391
+ * **Improvement:** AES256 is applied to encrypt IP address if the algorithm is available. (PHP 5.3.3+)
392
+ * **Improvement:** Add "Do not send IP address to external APIs" apart from "Anonymize IP address" in "Privacy and record settings" section.
393
+
394
  = 3.0.12.1 =
395
+ * **Fix issue:** Unexpected blocking cause by an extra slash at the end of `$_SERVER['DOCUMENT_ROOT']` that might be added by server's configuration. ([forum topic](https://wordpress.org/support/topic/wpwebinar/ "Topic: WPWebinar | WordPress.org"))
396
+ * **Fix issue:** [Human friendly error page](http://www.ipgeoblock.com/codex/customizing-the-response.html#human-friendly-error-page) now works properly. ([forum topic](https://wordpress.org/support/topic/problem-with-permalinks-51/ "Topic: Problem with Permalinks | WordPress.org"))
397
+ * **Fix issue:** Fix the conflict with WP hide & Security Enhancer. ([forum topic](https://wordpress.org/support/topic/problem-with-permalinks-51/ "Topic: Problem with Permalinks | WordPress.org"))
398
+ * **Fix issue:** Hotfix [WordPress File Delete to Code Execution](https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/ "WARNING: WordPress File Delete to Code Execution") by RIPS Technologies.
399
 
400
  = 3.0.12 =
401
  * **Improvement:** Enhance "Privacy and record settings" where "Expiration time [sec] for Logs" can be specified.
admin/class-ip-geo-block-admin.php CHANGED
@@ -39,6 +39,9 @@ class IP_Geo_Block_Admin {
39
  // Load plugin text domain and add body class
40
  add_action( 'init', array( $this, 'admin_init' ) );
41
 
 
 
 
42
  // Setup a nonce to validate authentication.
43
  add_filter( 'wp_redirect', array( $this, 'add_redirect_nonce' ), 10, 2 );
44
  }
@@ -355,6 +358,17 @@ class IP_Geo_Block_Admin {
355
  );
356
  }
357
 
 
 
 
 
 
 
 
 
 
 
 
358
  /**
359
  * Show global notice.
360
  *
@@ -729,7 +743,7 @@ endif;
729
  <p class="ip-geo-block-navi-link">[ <a id="ip-geo-block-toggle-sections" href="#!"><?php _e( 'Toggle all', 'ip-geo-block' ); ?></a> ]
730
  <?php if ( 4 === $tab ) { /* Logs tab */ ?>
731
  <input id="ip-geo-block-live-update" type="checkbox"<?php checked( isset( $cookie[4][1] ) && 'o' === $cookie[4][1] ); disabled( $settings['validation']['reclogs'] && extension_loaded( 'pdo_sqlite' ), FALSE ); ?> /><label for="ip-geo-block-live-update">
732
- <dfn title="<?php _e( 'Independent of &#8220;Statistics and Logs settings&#8221;, you can see all the requests validated by this plugin in almost real time.', 'ip-geo-block' ); ?>"><?php _e( 'Live update', 'ip-geo-block' ); ?></dfn>
733
  </label>
734
  <?php } elseif (5 === $tab ) { /* Site List tab */ ?>
735
  <input id="ip-geo-block-open-new" type="checkbox"<?php checked( isset( $cookie[5][1] ) && 'o' === $cookie[5][1] );?> /><label for="ip-geo-block-open-new">
@@ -1076,7 +1090,7 @@ endif;
1076
  // Initialize not on the form (mainly unchecked checkbox)
1077
  public function preprocess_options( $output, $default ) {
1078
  // initialize checkboxes not in the form (added after 2.0.0, just in case)
1079
- foreach ( array( 'providers', 'save_statistics', 'cache_hold', 'anonymize', 'network_wide', 'clean_uninstall' ) as $key ) {
1080
  $output[ $key ] = is_array( $default[ $key ] ) ? array() : 0;
1081
  }
1082
 
@@ -1201,6 +1215,14 @@ endif;
1201
  IP_Geo_Block_Cron::stop_update_db();
1202
  }
1203
 
 
 
 
 
 
 
 
 
1204
  return $output;
1205
  }
1206
 
@@ -1501,8 +1523,8 @@ endif;
1501
  foreach ( array_unique( (array)$which[ $src ] ) as $val ) {
1502
  // replace anonymized IP address with CIDR (IPv4:256, IPv6:4096)
1503
  $val = preg_replace(
1504
- array( '/\.\*\*\*.*$/', '/\*\*\*.*$/' ),
1505
- array( '.0/24', '000/116' ),
1506
  $val
1507
  );
1508
  if ( ( filter_var( preg_replace( '/\/\d+$/', '', $val ), FILTER_VALIDATE_IP ) || preg_match( '/^AS\d+$/', $val ) ) &&
39
  // Load plugin text domain and add body class
40
  add_action( 'init', array( $this, 'admin_init' ) );
41
 
42
+ // Add suggest text for inclusion in the site's privacy policy. @since 4.9.6
43
+ // add_action( 'admin_init', array( $this, 'add_privacy_policy' ) );
44
+
45
  // Setup a nonce to validate authentication.
46
  add_filter( 'wp_redirect', array( $this, 'add_redirect_nonce' ), 10, 2 );
47
  }
358
  );
359
  }
360
 
361
+ /**
362
+ * Add suggest text for inclusion in the site's privacy policy. @since 4.9.6
363
+ *
364
+ * /wp-admin/tools.php?wp-privacy-policy-guide
365
+ * https://developer.wordpress.org/plugins/privacy/privacy-related-options-hooks-and-capabilities/
366
+ */
367
+ public function add_privacy_policy() {
368
+ if ( function_exists( 'wp_add_privacy_policy_content' ) )
369
+ wp_add_privacy_policy_content( 'IP Geo Block', __( 'suggested text.', 'ip-geo-block' ) );
370
+ }
371
+
372
  /**
373
  * Show global notice.
374
  *
743
  <p class="ip-geo-block-navi-link">[ <a id="ip-geo-block-toggle-sections" href="#!"><?php _e( 'Toggle all', 'ip-geo-block' ); ?></a> ]
744
  <?php if ( 4 === $tab ) { /* Logs tab */ ?>
745
  <input id="ip-geo-block-live-update" type="checkbox"<?php checked( isset( $cookie[4][1] ) && 'o' === $cookie[4][1] ); disabled( $settings['validation']['reclogs'] && extension_loaded( 'pdo_sqlite' ), FALSE ); ?> /><label for="ip-geo-block-live-update">
746
+ <dfn title="<?php _e( 'Independent of &#8220;Privacy and record settings&#8221;, you can see all the requests validated by this plugin in almost real time.', 'ip-geo-block' ); ?>"><?php _e( 'Live update', 'ip-geo-block' ); ?></dfn>
747
  </label>
748
  <?php } elseif (5 === $tab ) { /* Site List tab */ ?>
749
  <input id="ip-geo-block-open-new" type="checkbox"<?php checked( isset( $cookie[5][1] ) && 'o' === $cookie[5][1] );?> /><label for="ip-geo-block-open-new">
1090
  // Initialize not on the form (mainly unchecked checkbox)
1091
  public function preprocess_options( $output, $default ) {
1092
  // initialize checkboxes not in the form (added after 2.0.0, just in case)
1093
+ foreach ( array( 'providers', 'save_statistics', 'cache_hold', 'anonymize', 'restrict_api', 'network_wide', 'clean_uninstall' ) as $key ) {
1094
  $output[ $key ] = is_array( $default[ $key ] ) ? array() : 0;
1095
  }
1096
 
1215
  IP_Geo_Block_Cron::stop_update_db();
1216
  }
1217
 
1218
+ // expiration time [days]
1219
+ if ( version_compare( $output['version'], '3.0.13' ) < 0 )
1220
+ $output['validation']['explogs'] /= DAY_IN_SECONDS;
1221
+ $output['validation']['explogs'] = min( 365, max( 1, $output['validation']['explogs'] ) );
1222
+
1223
+ // reset the version number
1224
+ $output['version'] = $default['version'];
1225
+
1226
  return $output;
1227
  }
1228
 
1523
  foreach ( array_unique( (array)$which[ $src ] ) as $val ) {
1524
  // replace anonymized IP address with CIDR (IPv4:256, IPv6:4096)
1525
  $val = preg_replace(
1526
+ array( '/\.\*\*\*.*$/', '/\*\*\*.*$/', '/:000\/116$/' ),
1527
+ array( '.0/24', '000/116', '::/116' ),
1528
  $val
1529
  );
1530
  if ( ( filter_var( preg_replace( '/\/\d+$/', '', $val ), FILTER_VALIDATE_IP ) || preg_match( '/^AS\d+$/', $val ) ) &&
admin/css/admin-icons.css CHANGED
@@ -1,54 +1,110 @@
1
- /*! IP Geo Block admin icons */
 
 
 
 
 
2
  @font-face {
3
- font-family: 'icomoon';
4
- src: url('fonts/icomoon.eot?astkh8');
5
- src: url('fonts/icomoon.eot?astkh8#iefix') format('embedded-opentype'),
6
- url('fonts/icomoon.ttf?astkh8') format('truetype'),
7
- url('fonts/icomoon.woff?astkh8') format('woff'),
8
- url('fonts/icomoon.svg?astkh8#icomoon') format('svg');
9
- font-weight: normal;
10
- font-style: normal;
11
  }
12
 
13
  [class^="ip-geo-block-icon-"], [class*=" ip-geo-block-icon-"] {
14
- /* use !important to prevent issues with browser extensions that change fonts */
15
- font-family: 'icomoon' !important;
16
- speak: none;
17
- font-style: normal;
18
- font-weight: normal;
19
- font-variant: normal;
20
- text-transform: none;
21
- line-height: 1;
22
- /* Better Font Rendering =========== */
23
- -webkit-font-smoothing: antialiased;
24
- -moz-osx-font-smoothing: grayscale;
 
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  .ip-geo-block-icon-play:before {
28
- content: "\ea1c";
29
  }
30
  .ip-geo-block-icon-pause:before {
31
- content: "\ea1d";
32
  }
33
  .ip-geo-block-icon-stop:before {
34
- content: "\ea1e";
 
 
 
 
 
 
35
  }
36
- .ip-geo-block-icon-warn:before {
37
- content: "\ea07";
38
- color: #c43322;
39
  }
40
 
41
  #toplevel_page_ip-geo-block .dashicons-admin-generic:before {
42
  font-family: 'icomoon';
43
- content: "\e9c9";
44
  font-size: 18px;
45
  margin-left: 2px;
46
  }
47
- /*#toplevel_page_ip-geo-block .dashicons-admin-generic:after {
 
48
  font-family: 'icomoon';
49
- content: "\e9b4";
50
- font-size: 10px;
51
- position: absolute;
52
- top: 1.4em;
53
- left: 2em;
54
- }*/
1
+ /*! IP Geo Block admin icons
2
+ * This package includes the following icon font.
3
+ * IcoMoon - Free / Designer: Keyamoon / License: GPL / CC BY 4.0
4
+ * Zondicons / Designer: Steve Schoger / License: CC BY 4.0
5
+ * Material Icons / Designer: Google / License: Apache License 2.0
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
  }
17
 
18
  [class^="ip-geo-block-icon-"], [class*=" ip-geo-block-icon-"] {
19
+ /* use !important to prevent issues with browser extensions that change fonts */
20
+ font-family: 'icomoon' !important;
21
+ speak: none;
22
+ font-style: normal;
23
+ font-weight: normal;
24
+ font-variant: normal;
25
+ text-transform: none;
26
+ line-height: 1;
27
+
28
+ /* Better Font Rendering =========== */
29
+ -webkit-font-smoothing: antialiased;
30
+ -moz-osx-font-smoothing: grayscale;
31
  }
32
 
33
+ .ip-geo-block-icon-calc {
34
+ margin-top: 0.2em !important;
35
+ }
36
+ .ip-geo-block-icon-calc:before {
37
+ content: "\e901";
38
+ }
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
  }
81
  .ip-geo-block-icon-pause:before {
82
+ content: "\ea1d";
83
  }
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
  #toplevel_page_ip-geo-block .dashicons-admin-generic:before {
98
  font-family: 'icomoon';
99
+ content: "\e62f";
100
  font-size: 18px;
101
  margin-left: 2px;
102
  }
103
+ /*
104
+ #toplevel_page_ip-geo-block .dashicons-admin-generic:before {
105
  font-family: 'icomoon';
106
+ content: "\e9c9";
107
+ font-size: 18px;
108
+ margin-left: 2px;
109
+ }
110
+ */
 
admin/css/admin-icons.min.css CHANGED
@@ -1,2 +1,7 @@
1
- /*! IP Geo Block admin icons */
2
- @font-face{font-family:icomoon;src:url(fonts/icomoon.eot?astkh8);src:url(fonts/icomoon.eot?astkh8#iefix) format('embedded-opentype'),url(fonts/icomoon.ttf?astkh8) format('truetype'),url(fonts/icomoon.woff?astkh8) format('woff'),url(fonts/icomoon.svg?astkh8#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-play:before{content:"\ea1c"}.ip-geo-block-icon-pause:before{content:"\ea1d"}.ip-geo-block-icon-stop:before{content:"\ea1e"}.ip-geo-block-icon-warn:before{content:"\ea07";color:#c43322}#toplevel_page_ip-geo-block .dashicons-admin-generic:before{font-family:icomoon;content:"\e9c9";font-size:18px;margin-left:2px}
 
 
 
 
 
1
+ /*! IP Geo Block admin icons
2
+ * This package includes the following icon font.
3
+ * IcoMoon - Free / Designer: Keyamoon / License: GPL / CC BY 4.0
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}
admin/css/admin.css CHANGED
@@ -359,7 +359,7 @@ table.ip-geo-block-table td:first-child {
359
 
360
  /* Icons */
361
  dfn ~ .ip-geo-block-icon {
362
- margin-left: 0.6em;
363
  }
364
  .ip-geo-block-icon {
365
  position: relative;
@@ -383,9 +383,6 @@ dfn ~ .ip-geo-block-icon {
383
  background-position: center center;
384
  background-repeat: no-repeat;
385
  }
386
- .ip-geo-block-icon-cidr span {
387
- vertical-align: text-top;
388
- }
389
  .ip-geo-block-icon-cycle span {
390
  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);
391
  }
@@ -539,33 +536,33 @@ input#ip_geo_block_settings_behavior_time {
539
  /*------------------------------------------------------------
540
  * Customizing based on jquery.dataTables.css
541
  *------------------------------------------------------------*/
542
- table.dataTable {
543
  clear: none !important;
544
  }
545
- table.dataTable th,
546
- table.dataTable td {
547
  text-align: right;
548
  }
549
- table.dataTable th:nth-child(n+2),
550
- table.dataTable td:nth-child(n+2) {
551
  padding-left: 0 !important;
552
  }
553
- table.dataTable th {
554
  white-space: nowrap;
555
  }
556
- table.dataTable > thead > tr {
557
  line-height: 1.8em;
558
  }
559
- table.dataTable > tbody > tr {
560
  cursor: pointer;
561
  }
562
- table.dataTable > thead > tr > th,
563
- table.dataTable > thead > tr > td,
564
- table.dataTable.no-footer {
565
  border-bottom: 1px solid #ddd;
566
  }
567
- table.dataTable thead th,
568
- table.dataTable thead td {
569
  padding: 10px 16px;
570
  }
571
  /* country code */
@@ -575,18 +572,18 @@ table.dataTable thead td {
575
  }
576
 
577
  /* Scroll bar */
578
- .dataTables_wrapper.no-footer .dataTables_scrollBody {
579
  border-bottom: 1px solid #ddd;
580
  }
581
 
582
  /* Size of column */
583
- table.dataTable.nowrap td,
584
- table.dataTable > tbody > tr > td span {
585
  white-space: normal !important;
586
  word-wrap: break-word !important;
587
  word-break: break-all !important;
588
  }
589
- table.dataTable > tbody > tr > td span {
590
  display: inline-block;
591
  }
592
 
@@ -594,36 +591,36 @@ table.dataTable > tbody > tr > td span {
594
  .ip-geo-block-settings-folding input[type="checkbox"] {
595
  margin-right: 0.5em;
596
  }
597
- table.dataTable input[type="checkbox"] {
598
  max-height: 16px;
599
  max-width: 16px;
600
  margin: 0;
601
  }
602
- table.dataTable > thead > tr > th:first-child,
603
- table.dataTable > tbody > tr > td:first-child {
604
  padding: 8px 4px 8px 1.4em;
605
  text-align: left;
606
  }
607
 
608
  /* No data available in table */
609
- table.dataTable > tbody > tr > td.dataTables_empty,
610
  table.collapsed > tbody > tr > td.dataTables_empty:first-child::before {
611
  border: none;
612
  text-align: center;
613
  }
614
 
615
  /* Checkbox column */
616
- table.dataTable thead > tr > th:first-child.sorting_asc {
617
  background-image: none !important;
618
  }
619
- table.dataTable.display tbody tr.even > .sorting_1,
620
- table.dataTable.display tbody tr.odd > .sorting_1,
621
- table.dataTable.display tbody tr:hover > .sorting_1 {
622
  background-color: inherit !important;
623
  }
624
 
625
  /* Collapsed */
626
- table.dataTable.collapsed > tbody > tr > td:first-child {
627
  padding: 8px 4px 8px 8px !important;
628
  }
629
  table.collapsed > tbody > tr > td:first-child::before,
@@ -671,21 +668,21 @@ table.collapsed > tbody > tr.child > td.child > ul li span.dtr-data {
671
  }
672
 
673
  /* Pagenation */
674
- .dataTables_wrapper .dataTables_paginate {
675
  float: none;
676
  text-align: center;
677
  margin-bottom: 1em;
678
  }
679
- .dataTables_wrapper .dataTables_paginate span.ellipsis,
680
- .dataTables_wrapper .dataTables_paginate a.paginate_button,
681
- .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,
682
- .dataTables_wrapper .dataTables_paginate a.paginate_button:active,
683
- .dataTables_wrapper .dataTables_paginate a.paginate_button.current,
684
- .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,
685
- .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,
686
- .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,
687
- .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,
688
- .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active {
689
  min-width: 2em;
690
  background: inherit;
691
  border-color: #ddd;
@@ -699,37 +696,37 @@ table.collapsed > tbody > tr.child > td.child > ul li span.dtr-data {
699
  display: inline-block;
700
  text-decoration: none;
701
  }
702
- .dataTables_wrapper .dataTables_paginate > a.paginate_button:first-child,
703
- .dataTables_wrapper .dataTables_paginate:hover > a.paginate_button:first-child,
704
- .dataTables_wrapper .dataTables_paginate:active > a.paginate_button:first-child {
705
  border-left-width: 1px;
706
  border-bottom-left-radius: 4px;
707
  border-top-left-radius: 4px;
708
  }
709
- .dataTables_wrapper .dataTables_paginate > a.paginate_button:last-child,
710
- .dataTables_wrapper .dataTables_paginate:hover > a.paginate_button:last-child,
711
- .dataTables_wrapper .dataTables_paginate:active > a.paginate_button:last-child {
712
  border-bottom-right-radius: 4px;
713
  border-top-right-radius: 4px;
714
  }
715
- .dataTables_wrapper .dataTables_paginate a.paginate_button {
716
  color: #0073aa !important;
717
  }
718
- .dataTables_wrapper .dataTables_paginate a.paginate_button:hover {
719
  color: #0096dd !important;
720
  background-color: #fff;
721
  }
722
- .dataTables_wrapper .dataTables_paginate span.ellipsis,
723
- .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,
724
- .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,
725
- .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active {
726
  cursor: default;
727
  color: #999 !important;
728
  background-color: transparent;
729
  }
730
- .dataTables_wrapper .dataTables_paginate a.paginate_button.current,
731
- .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,
732
- .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active {
733
  cursor: default;
734
  color: #444 !important;
735
  background-color: #fff !important;
@@ -770,10 +767,10 @@ table.collapsed > tbody > tr.child > td.child > ul li span.dtr-data {
770
  }
771
 
772
  /* Transition for new row */
773
- table.dataTable.display tbody tr.ip-geo-block-passed {
774
  background-color: #edf6ff !important;
775
  }
776
- table.dataTable.display tbody tr.ip-geo-block-blocked {
777
  background-color: #ffefef !important;
778
  }
779
  .ip-geo-block-new-passed {
@@ -907,6 +904,20 @@ mark {
907
  100% {transform: rotate(180deg);}
908
  }
909
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
910
  :placeholder-shown { color: #888; }
911
  ::-webkit-input-placeholder { color: #888; } /* Google Chrome, Safari, Opera 15+, Android, iOS */
912
  :-moz-placeholder { color: #888; opacity: 1; } /* Firefox 18- */
359
 
360
  /* Icons */
361
  dfn ~ .ip-geo-block-icon {
362
+ margin-left: 0.4em;
363
  }
364
  .ip-geo-block-icon {
365
  position: relative;
383
  background-position: center center;
384
  background-repeat: no-repeat;
385
  }
 
 
 
386
  .ip-geo-block-icon-cycle span {
387
  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);
388
  }
536
  /*------------------------------------------------------------
537
  * Customizing based on jquery.dataTables.css
538
  *------------------------------------------------------------*/
539
+ table.ip-geo-block-dataTable {
540
  clear: none !important;
541
  }
542
+ table.ip-geo-block-dataTable th,
543
+ table.ip-geo-block-dataTable td {
544
  text-align: right;
545
  }
546
+ table.ip-geo-block-dataTable th:nth-child(n+2),
547
+ table.ip-geo-block-dataTable td:nth-child(n+2) {
548
  padding-left: 0 !important;
549
  }
550
+ table.ip-geo-block-dataTable th {
551
  white-space: nowrap;
552
  }
553
+ table.ip-geo-block-dataTable > thead > tr {
554
  line-height: 1.8em;
555
  }
556
+ table.ip-geo-block-dataTable > tbody > tr {
557
  cursor: pointer;
558
  }
559
+ table.ip-geo-block-dataTable > thead > tr > th,
560
+ table.ip-geo-block-dataTable > thead > tr > td,
561
+ table.ip-geo-block-dataTable.no-footer {
562
  border-bottom: 1px solid #ddd;
563
  }
564
+ table.ip-geo-block-dataTable thead th,
565
+ table.ip-geo-block-dataTable thead td {
566
  padding: 10px 16px;
567
  }
568
  /* country code */
572
  }
573
 
574
  /* Scroll bar */
575
+ div[class*="ip-geo-block"] .dataTables_wrapper.no-footer .dataTables_scrollBody {
576
  border-bottom: 1px solid #ddd;
577
  }
578
 
579
  /* Size of column */
580
+ table.ip-geo-block-dataTable.nowrap td,
581
+ table.ip-geo-block-dataTable > tbody > tr > td span {
582
  white-space: normal !important;
583
  word-wrap: break-word !important;
584
  word-break: break-all !important;
585
  }
586
+ table.ip-geo-block-dataTable > tbody > tr > td span {
587
  display: inline-block;
588
  }
589
 
591
  .ip-geo-block-settings-folding input[type="checkbox"] {
592
  margin-right: 0.5em;
593
  }
594
+ table.ip-geo-block-dataTable input[type="checkbox"] {
595
  max-height: 16px;
596
  max-width: 16px;
597
  margin: 0;
598
  }
599
+ table.ip-geo-block-dataTable > thead > tr > th:first-child,
600
+ table.ip-geo-block-dataTable > tbody > tr > td:first-child {
601
  padding: 8px 4px 8px 1.4em;
602
  text-align: left;
603
  }
604
 
605
  /* No data available in table */
606
+ table.ip-geo-block-dataTable > tbody > tr > td.dataTables_empty,
607
  table.collapsed > tbody > tr > td.dataTables_empty:first-child::before {
608
  border: none;
609
  text-align: center;
610
  }
611
 
612
  /* Checkbox column */
613
+ table.ip-geo-block-dataTable thead > tr > th:first-child.sorting_asc {
614
  background-image: none !important;
615
  }
616
+ table.ip-geo-block-dataTable.display tbody tr.even > .sorting_1,
617
+ table.ip-geo-block-dataTable.display tbody tr.odd > .sorting_1,
618
+ table.ip-geo-block-dataTable.display tbody tr:hover > .sorting_1 {
619
  background-color: inherit !important;
620
  }
621
 
622
  /* Collapsed */
623
+ table.ip-geo-block-dataTable.collapsed > tbody > tr > td:first-child {
624
  padding: 8px 4px 8px 8px !important;
625
  }
626
  table.collapsed > tbody > tr > td:first-child::before,
668
  }
669
 
670
  /* Pagenation */
671
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
672
  float: none;
673
  text-align: center;
674
  margin-bottom: 1em;
675
  }
676
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate span.ellipsis,
677
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button,
678
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,
679
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button:active,
680
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,
681
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,
682
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,
683
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,
684
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,
685
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active {
686
  min-width: 2em;
687
  background: inherit;
688
  border-color: #ddd;
696
  display: inline-block;
697
  text-decoration: none;
698
  }
699
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate > a.paginate_button:first-child,
700
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate:hover > a.paginate_button:first-child,
701
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate:active > a.paginate_button:first-child {
702
  border-left-width: 1px;
703
  border-bottom-left-radius: 4px;
704
  border-top-left-radius: 4px;
705
  }
706
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate > a.paginate_button:last-child,
707
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate:hover > a.paginate_button:last-child,
708
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate:active > a.paginate_button:last-child {
709
  border-bottom-right-radius: 4px;
710
  border-top-right-radius: 4px;
711
  }
712
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button {
713
  color: #0073aa !important;
714
  }
715
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button:hover {
716
  color: #0096dd !important;
717
  background-color: #fff;
718
  }
719
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate span.ellipsis,
720
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,
721
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,
722
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active {
723
  cursor: default;
724
  color: #999 !important;
725
  background-color: transparent;
726
  }
727
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.current,
728
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,
729
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate a.paginate_button.current:active {
730
  cursor: default;
731
  color: #444 !important;
732
  background-color: #fff !important;
767
  }
768
 
769
  /* Transition for new row */
770
+ table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-passed {
771
  background-color: #edf6ff !important;
772
  }
773
+ table.ip-geo-block-dataTable.display tbody tr.ip-geo-block-blocked {
774
  background-color: #ffefef !important;
775
  }
776
  .ip-geo-block-new-passed {
904
  100% {transform: rotate(180deg);}
905
  }
906
 
907
+ /* sub items in settings */
908
+ .ip-geo-block-subitem {
909
+ margin-left:1.7em
910
+ }
911
+ .ip-geo-block-subitem:before {
912
+ content: "\00bb"; /* &raquo; */
913
+ position: absolute;
914
+ left: 2em;
915
+ }
916
+ .ip-geo-block-subitem dfn {
917
+ vertical-align: middle;
918
+ }
919
+
920
+ /* placeholder */
921
  :placeholder-shown { color: #888; }
922
  ::-webkit-input-placeholder { color: #888; } /* Google Chrome, Safari, Opera 15+, Android, iOS */
923
  :-moz-placeholder { color: #888; opacity: 1; } /* Firefox 18- */
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}.ip-geo-block-icon,svg a,table.dataTable>tbody>tr{cursor:pointer}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%}.panel-body,label{display:inline-block}label{max-width:100%}.panel{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}#ip-geo-block-back-to-top a,#ip-geo-block-toggle-sections,.ip-geo-block-help-link a{box-shadow:none}.panel-heading{float:left!important;background:#fff}.panel-default>.panel-heading{border-color:inherit}.panel-body{width:100%;padding:0 1em;-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}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}fieldset.ip-geo-block-field legend.panel-heading{padding:10px}fieldset.ip-geo-block-field .ip-geo-block-dropdown,fieldset.ip-geo-block-field .ip-geo-block-dropup{cursor:pointer;position:relative;padding-left:1em}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before,fieldset.ip-geo-block-field .ip-geo-block-dropup:before{content:'';height:0;width:0;border:.4em solid transparent;position:absolute}fieldset.ip-geo-block-field .ip-geo-block-dropup:before{border-left:.4em solid #555;left:2px;top:18%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:-2px;top:38%}fieldset.ip-geo-block-field .form-table .ip-geo-block-dropdown,fieldset.ip-geo-block-field .form-table .ip-geo-block-dropup{margin-top:.75em}fieldset.ip-geo-block-field ul.ip-geo-block-dropup:before{top:.25em}fieldset.ip-geo-block-field ul.ip-geo-block-dropdown:before{top:.5em}fieldset.ip-geo-block-field table.form-table{margin:0 0 .5em;width:100%}textarea.regular-text{width:25em}fieldset.ip-geo-block-field input.regular-text,fieldset.ip-geo-block-field textarea.regular-text{font-size:95%}input[id*=ip_geo_block_settings_rewrite_]+label{margin-left:.25em}input[id*=ip_geo_block_settings_providers]+label{min-width:7em}.ip-geo-block-settings-folding{margin:.5em 0}.ip-geo-block-settings-folding ul{margin-bottom:0}.ip-geo-block-settings-folding li{margin:.5em 0}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-float li{display:inline-block;width:18em;margin-top:0}.ip-geo-block-checked{list-style-type:disc}.ip-geo-block-ip-addr{display:inline-block;padding-top:5px}.ip-geo-block-hide{display:none}.ip-geo-block-sup{margin-left:.2em;display:inline-block}.ip-geo-block-note{margin-top:1em;list-style:disc inside}.ip-geo-block-note li{text-indent:-1em;padding-left:1em}.ip-geo-block-border{border-top:inherit}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px;display:inline-block}.ip-geo-block-result{color:#2786C2;display:inline-block}#ip-geo-block-live-loading,.ip-geo-block-loading{background-size:16px 16px;background-position:center center;background-repeat:no-repeat;height:16px;width:16px;margin-left:1em;margin-top:.2em;display:inline-block;vertical-align:top}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPIGAAAAAMLCwkJCQpKSkmJiYoKCgv///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAGACwAAAAAEAAQAAADM2i63P4wyklrC0IEKgAQnAdOmGYFBLExwboQWcG2rlHEwTDQLUsUOd2mBxkUCgNKa+dIAAAh+QQJCgAGACwAAAIACgAOAAADLWgWIqHQCABEVLPe1R4MBOFFRFNsRUNsYDFewTC8iixvQ1EMyxjEvyBLODQkAAAh+QQJCgAGACwAAAAACgAOAAADLWi6IRJrCQCECoU0ag1xxeBARuEQ0UUU5DUM7fK+qTEUYR0EcM3Ev51uB7wAEwAh+QQJCgAGACwAAAAADgAKAAADLWi6URQrLiJEkSaM0eqrkLFtAVEEAgAIylAUQ5SuSqCFNZjhWG3zmB8wOJQkAAAh+QQJCgAGACwCAAAADgAKAAADK2hqMRMrLuekCnCU8gqBDCZ2glBcYkSUxIJJgQdaUVDOtAAAAr3oPN/llgAAIfkECQoABgAsBgAAAAoADgAAAytoEdauiz0Yx5BQFTvN2EMXWNgUFETZFIJQdERLiGgZtKohAIDQ7T0RrpEAACH5BAkKAAYALAYAAgAKAA4AAAMqaKoR+609Fie1K4zhZiibNRSg1XAQUXQPIQgE835voQgAIARqh+ummSUBACH5BAUKAAYALAIABgAOAAoAAAMsaLpsES2+F9mEddEgBFbBMGACAAiMOCrlGRBFWBQD2L0dYYjfUuQZEKynSAAAOw==)}#ip-geo-block-map{height:400px;margin:1em auto}.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: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-wp-info textarea{margin-top:.5em;overflow:auto;width:100%;word-wrap:normal;word-break:normal;white-space:pre}#ip-geo-block-preferred{color:#fff;background:#00838f!important;border-color:#00707a!important;text-shadow:none}#ip-geo-block-preferred:hover{background-color:#00919e!important;border-color:#00525a!important}.ip-geo-block-icon,.ip-geo-block-list-exceptions a.ip-geo-block-icon{background-color:transparent;box-shadow:none;text-decoration:none;outline:0}#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:.6em}.ip-geo-block-icon{position:relative}.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-cidr span{vertical-align:text-top}.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}.dataTables_wrapper.no-footer .dataTables_scrollBody,table.dataTable.no-footer,table.dataTable>thead>tr>td,table.dataTable>thead>tr>th{border-bottom:1px solid #ddd}.ip-geo-block-list-exceptions span.dashicons{font-size:14px}.ip-geo-block-list-exceptions a.ip-geo-block-icon{margin-left:.3em}.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.dataTable{clear:none!important}table.dataTable td,table.dataTable th{text-align:right}table.dataTable td:nth-child(n+2),table.dataTable th:nth-child(n+2){padding-left:0!important}table.dataTable th{white-space:nowrap}table.dataTable>thead>tr{line-height:1.8em}table.dataTable thead td,table.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}table.dataTable.nowrap td,table.dataTable>tbody>tr>td span{white-space:normal!important;word-wrap:break-word!important;word-break:break-all!important}table.dataTable>tbody>tr>td span{display:inline-block}.ip-geo-block-settings-folding input[type=checkbox]{margin-right:.5em}table.dataTable input[type=checkbox]{max-height:16px;max-width:16px;margin:0}table.dataTable>tbody>tr>td:first-child,table.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.dataTable>tbody>tr>td.dataTables_empty{border:none;text-align:center}table.dataTable thead>tr>th:first-child.sorting_asc{background-image:none!important}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.display tbody tr:hover>.sorting_1{background-color:inherit!important}table.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}.dataTables_wrapper .dataTables_paginate{float:none;text-align:center;margin-bottom:1em}.dataTables_wrapper .dataTables_paginate a.paginate_button,.dataTables_wrapper .dataTables_paginate a.paginate_button.current,.dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,.dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover,.dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,.dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,.dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate a.paginate_button:active,.dataTables_wrapper .dataTables_paginate a.paginate_button:hover,.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;padding:.25em 0;display:inline-block;text-decoration:none}#ip-geo-block-1 #ip-geo-block-section-2 .panel-body,#ip-geo-block-4 #ip-geo-block-section-0 .panel-body,mark{padding:0}.dataTables_wrapper .dataTables_paginate:active>a.paginate_button:first-child,.dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:first-child,.dataTables_wrapper .dataTables_paginate>a.paginate_button:first-child{border-left-width:1px;border-bottom-left-radius:4px;border-top-left-radius:4px}.dataTables_wrapper .dataTables_paginate:active>a.paginate_button:last-child,.dataTables_wrapper .dataTables_paginate:hover>a.paginate_button:last-child,.dataTables_wrapper .dataTables_paginate>a.paginate_button:last-child{border-bottom-right-radius:4px;border-top-right-radius:4px}.dataTables_wrapper .dataTables_paginate a.paginate_button{color:#0073aa!important}.dataTables_wrapper .dataTables_paginate a.paginate_button:hover{color:#0096dd!important;background-color:#fff}.dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,.dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,.dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate span.ellipsis{cursor:default;color:#999!important;background-color:transparent}.dataTables_wrapper .dataTables_paginate a.paginate_button.current,.dataTables_wrapper .dataTables_paginate a.paginate_button.current:active,.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 table.form-table,#ip-geo-block-4 #ip-geo-block-section-0 table.form-table{margin-left:1em;max-width:95%}#ip-geo-block-live-log,#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.dataTable.display tbody tr.ip-geo-block-passed{background-color:#edf6ff!important}table.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{background:gold}#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 -2px 0;padding:4px 12px;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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-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:radial-gradient(#0073aa,#72777c);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(.00001deg);animation:30s spin-timer linear 30s forwards}@keyframes spin-timer{0%{transform:rotate(0)}100%{transform:rotate(180deg)}}: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}.ip-geo-block-icon,svg a,table.ip-geo-block-dataTable>tbody>tr{cursor:pointer}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%}.panel-body,label{display:inline-block}label{max-width:100%}.panel{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}#ip-geo-block-back-to-top a,#ip-geo-block-toggle-sections,.ip-geo-block-help-link a{box-shadow:none}.panel-heading{float:left!important;background:#fff}.panel-default>.panel-heading{border-color:inherit}.panel-body{width:100%;padding:0 1em;-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}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}fieldset.ip-geo-block-field legend.panel-heading{padding:10px}fieldset.ip-geo-block-field .ip-geo-block-dropdown,fieldset.ip-geo-block-field .ip-geo-block-dropup{cursor:pointer;position:relative;padding-left:1em}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before,fieldset.ip-geo-block-field .ip-geo-block-dropup:before{content:'';height:0;width:0;border:.4em solid transparent;position:absolute}fieldset.ip-geo-block-field .ip-geo-block-dropup:before{border-left:.4em solid #555;left:2px;top:18%}fieldset.ip-geo-block-field .ip-geo-block-dropdown:before{border-top:.4em solid #555;left:-2px;top:38%}fieldset.ip-geo-block-field .form-table .ip-geo-block-dropdown,fieldset.ip-geo-block-field .form-table .ip-geo-block-dropup{margin-top:.75em}fieldset.ip-geo-block-field ul.ip-geo-block-dropup:before{top:.25em}fieldset.ip-geo-block-field ul.ip-geo-block-dropdown:before{top:.5em}fieldset.ip-geo-block-field table.form-table{margin:0 0 .5em;width:100%}textarea.regular-text{width:25em}fieldset.ip-geo-block-field input.regular-text,fieldset.ip-geo-block-field textarea.regular-text{font-size:95%}input[id*=ip_geo_block_settings_rewrite_]+label{margin-left:.25em}input[id*=ip_geo_block_settings_providers]+label{min-width:7em}.ip-geo-block-settings-folding{margin:.5em 0}.ip-geo-block-settings-folding ul{margin-bottom:0}.ip-geo-block-settings-folding li{margin:.5em 0}.folding-disable{pointer-events:none;opacity:.5}.folding-inactive{opacity:.5;font-style:oblique!important}.ip-geo-block-float li{display:inline-block;width:18em;margin-top:0}.ip-geo-block-checked{list-style-type:disc}.ip-geo-block-ip-addr{display:inline-block;padding-top:5px}.ip-geo-block-hide{display:none}.ip-geo-block-sup{margin-left:.2em;display:inline-block}.ip-geo-block-note{margin-top:1em;list-style:disc inside}.ip-geo-block-note li{text-indent:-1em;padding-left:1em}.ip-geo-block-border{border-top:inherit}.ip-geo-block-notice{color:#dd3d36}.ip-geo-block-title{width:100px;display:inline-block}.ip-geo-block-result{color:#2786C2;display:inline-block}#ip-geo-block-live-loading,.ip-geo-block-loading{background-size:16px 16px;background-position:center center;background-repeat:no-repeat;height:16px;width:16px;margin-left:1em;margin-top:.2em;display:inline-block;vertical-align:top}.ip-geo-block-loading{background-image:url(data:image/gif;base64,R0lGODlhEAAQAPIGAAAAAMLCwkJCQpKSkmJiYoKCgv///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAGACwAAAAAEAAQAAADM2i63P4wyklrC0IEKgAQnAdOmGYFBLExwboQWcG2rlHEwTDQLUsUOd2mBxkUCgNKa+dIAAAh+QQJCgAGACwAAAIACgAOAAADLWgWIqHQCABEVLPe1R4MBOFFRFNsRUNsYDFewTC8iixvQ1EMyxjEvyBLODQkAAAh+QQJCgAGACwAAAAACgAOAAADLWi6IRJrCQCECoU0ag1xxeBARuEQ0UUU5DUM7fK+qTEUYR0EcM3Ev51uB7wAEwAh+QQJCgAGACwAAAAADgAKAAADLWi6URQrLiJEkSaM0eqrkLFtAVEEAgAIylAUQ5SuSqCFNZjhWG3zmB8wOJQkAAAh+QQJCgAGACwCAAAADgAKAAADK2hqMRMrLuekCnCU8gqBDCZ2glBcYkSUxIJJgQdaUVDOtAAAAr3oPN/llgAAIfkECQoABgAsBgAAAAoADgAAAytoEdauiz0Yx5BQFTvN2EMXWNgUFETZFIJQdERLiGgZtKohAIDQ7T0RrpEAACH5BAkKAAYALAYAAgAKAA4AAAMqaKoR+609Fie1K4zhZiibNRSg1XAQUXQPIQgE835voQgAIARqh+ummSUBACH5BAUKAAYALAIABgAOAAoAAAMsaLpsES2+F9mEddEgBFbBMGACAAiMOCrlGRBFWBQD2L0dYYjfUuQZEKynSAAAOw==)}#ip-geo-block-map{height:400px;margin:1em auto}.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: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-wp-info textarea{margin-top:.5em;overflow:auto;width:100%;word-wrap:normal;word-break:normal;white-space:pre}#ip-geo-block-preferred{color:#fff;background:#00838f!important;border-color:#00707a!important;text-shadow:none}#ip-geo-block-preferred:hover{background-color:#00919e!important;border-color:#00525a!important}.ip-geo-block-icon,.ip-geo-block-list-exceptions a.ip-geo-block-icon{background-color:transparent;box-shadow:none;text-decoration:none;outline:0}#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}.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}div[class*=ip-geo-block] .dataTables_wrapper.no-footer .dataTables_scrollBody,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}.ip-geo-block-list-exceptions span.dashicons{font-size:14px}.ip-geo-block-list-exceptions a.ip-geo-block-icon{margin-left:.3em}.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 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}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_paginate{float:none;text-align:center;margin-bottom:1em}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;padding:.25em 0;display:inline-block;text-decoration:none}#ip-geo-block-1 #ip-geo-block-section-2 .panel-body,#ip-geo-block-4 #ip-geo-block-section-0 .panel-body,mark{padding:0}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 table.form-table,#ip-geo-block-4 #ip-geo-block-section-0 table.form-table{margin-left:1em;max-width:95%}#ip-geo-block-live-log,#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{background:gold}#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 -2px 0;padding:4px 12px;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;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-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:radial-gradient(#0073aa,#72777c);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(.00001deg);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}: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/cidr.min.css CHANGED
@@ -1 +1 @@
1
- *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:8xp;font-size:14px;line-height:1.4}#g,textarea{border:1px solid #ccc;font-size:12px;font-family:Consolas,Monaco,monospace}.container{margin:0;padding:0}.clr:after,.col:after,.container:after,.row:after{content:"";display:table;clear:both}.row{padding-bottom:0}#g,fieldset{padding:.5rem}.col{display:block;float:left;width:100%}.span_2{width:8.33333333333%}.span_11{width:45.8333333333%}.span_24,textarea{width:100%}fieldset{border:none;margin:0}textarea{height:4.5rem;resize:horizontal}legend input[type=button]{margin-left:.5rem;vertical-align:middle}#j,#i{display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;justify-content:center;align-items:center}#j{padding:0 .5rem}ul#h{padding:1.5rem 0 0;list-style:none}ul#h li{width:100%;margin:.1rem 0;display:inline-block}ul#h li input{padding:0}#g{text-align:center}
1
+ *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:8xp;font-size:14px;line-height:1.4}#g,textarea{border:1px solid #ccc;font-size:12px;font-family:Consolas,Monaco,monospace}.container{margin:0;padding:0}.clr:after,.col:after,.container:after,.row:after{content:"";display:table;clear:both}.row{padding-bottom:0}#g,fieldset{padding:.5rem}.col{display:block;float:left;width:100%}.span_2{width:8.33333333333%}.span_11{width:45.8333333333%}.span_24,textarea{width:100%}fieldset{border:none;margin:0}textarea{height:4.5rem;resize:horizontal}legend input[type=button]{margin-left:.5rem;vertical-align:middle}#j,#i{display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;justify-content:center;align-items:center}#j{padding:0 .5rem}ul#h{padding:1.5rem 0 0;list-style:none}ul#h li{width:100%;margin:.1rem 0;display:inline-block}ul#h li input{padding:0}#g{height:3em;text-align:center}
admin/css/fonts/icomoon.eot CHANGED
Binary file
admin/css/fonts/icomoon.svg CHANGED
@@ -7,12 +7,9 @@
7
  <font-face units-per-em="1024" ascent="960" descent="-64" />
8
  <missing-glyph horiz-adv-x="1024" />
9
  <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
 
10
  <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" />
11
- <glyph unicode="&#xe933;" glyph-name="folder-download" d="M576 704l-128 128h-448v-832h1024v704h-448zM512 96l-224 224h160v256h128v-256h160l-224-224z" />
12
- <glyph unicode="&#xe948;" glyph-name="location2" d="M512 960c-176.732 0-320-143.268-320-320 0-320 320-704 320-704s320 384 320 704c0 176.732-143.27 320-320 320zM512 444c-108.248 0-196 87.752-196 196s87.752 196 196 196 196-87.752 196-196-87.752-196-196-196zM388 640c0 68.483 55.517 124 124 124s124-55.517 124-124c0-68.483-55.517-124-124-124s-124 55.517-124 124z" />
13
- <glyph unicode="&#xe94b;" glyph-name="map" d="M0 768l320 128v-768l-320-128zM384 928l320-192v-736l-320 160zM768 736l256 192v-768l-256-192z" />
14
- <glyph unicode="&#xe964;" glyph-name="database" d="M512 960c-282.77 0-512-71.634-512-160v-128c0-88.366 229.23-160 512-160s512 71.634 512 160v128c0 88.366-229.23 160-512 160zM512 416c-282.77 0-512 71.634-512 160v-192c0-88.366 229.23-160 512-160s512 71.634 512 160v192c0-88.366-229.23-160-512-160zM512 128c-282.77 0-512 71.634-512 160v-192c0-88.366 229.23-160 512-160s512 71.634 512 160v192c0-88.366-229.23-160-512-160z" />
15
- <glyph unicode="&#xe985;" glyph-name="binoculars" d="M64 960h384v-64h-384zM576 960h384v-64h-384zM952 640h-56v256h-256v-256h-256v256h-256v-256h-56c-39.6 0-72-32.4-72-72v-560c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v376h128v-376c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v560c0 39.6-32.4 72-72 72zM348 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32zM544 448h-64c-17.6 0-32 14.4-32 32s14.4 32 32 32h64c17.6 0 32-14.4 32-32s-14.4-32-32-32zM924 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32z" />
16
  <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" />
17
  <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" />
18
  <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" />
@@ -22,9 +19,7 @@
22
  <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" />
23
  <glyph unicode="&#xe99c;" glyph-name="stats-bars" d="M0 128h1024v-128h-1024zM128 384h128v-192h-128zM320 640h128v-448h-128zM512 448h128v-256h-128zM704 832h128v-640h-128z" />
24
  <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" />
25
- <glyph unicode="&#xe9b4;" glyph-name="shield" d="M960 960l-448-128-448 128c0 0-4.5-51.698 0-128l448-140.090 448 140.090c4.498 76.302 0 128 0 128zM72.19 764.894c23.986-250.696 113.49-672.234 439.81-828.894 326.32 156.66 415.824 578.198 439.81 828.894l-439.81-165.358-439.81 165.358z" />
26
  <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" />
27
- <glyph unicode="&#xe9b7;" glyph-name="power-cord" d="M1024 677.5l-90.506 90.5-178.746-178.752-101.5 101.502 178.75 178.75-90.5 90.5-178.75-178.75-114.748 114.75-86.626-86.624 512.002-512 86.624 86.622-114.752 114.752 178.752 178.75zM794.040 286.21l-443.824 443.824c-95.818-114.904-204.52-292.454-129.396-445.216l-132.248-132.248c-31.112-31.114-31.112-82.024 0-113.136l14.858-14.858c31.114-31.114 82.026-31.114 113.138 0l132.246 132.244c152.764-75.132 330.318 33.566 445.226 129.39z" />
28
  <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" />
29
  <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" />
30
  <glyph unicode="&#xea1c;" glyph-name="play3" d="M192 832l640-384-640-384z" />
7
  <font-face units-per-em="1024" ascent="960" descent="-64" />
8
  <missing-glyph horiz-adv-x="1024" />
9
  <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
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" />
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" />
admin/css/fonts/icomoon.ttf CHANGED
Binary file
admin/css/fonts/icomoon.woff CHANGED
Binary file
admin/datatables/css/datatables-all.css CHANGED
@@ -1,8 +1,8 @@
1
  /*! DataTables 1.10.16
2
  * 2008-2017 SpryMedia Ltd - datatables.net/license
3
  */
4
-
5
- table.dataTable {
6
  width: 100%;
7
  margin: 0 auto;
8
  clear: both;
@@ -15,285 +15,315 @@ table.dataTable {
15
  * Body styles
16
  */
17
  }
18
- table.dataTable thead th,
19
- table.dataTable tfoot th {
20
  font-weight: bold;
21
  }
22
- table.dataTable thead th,
23
- table.dataTable thead td {
24
  padding: 10px 18px;
25
  border-bottom: 1px solid #111;
26
  }
27
- table.dataTable thead th:active,
28
- table.dataTable thead td:active {
29
  outline: none;
30
  }
31
- table.dataTable tfoot th,
32
- table.dataTable tfoot td {
33
  padding: 10px 18px 6px 18px;
34
  border-top: 1px solid #111;
35
  }
36
- table.dataTable thead .sorting,
37
- table.dataTable thead .sorting_asc,
38
- table.dataTable thead .sorting_desc,
39
- table.dataTable thead .sorting_asc_disabled,
40
- table.dataTable thead .sorting_desc_disabled {
41
  cursor: pointer;
42
  *cursor: hand;
43
  background-repeat: no-repeat;
44
  background-position: center right;
45
  }
46
- table.dataTable thead .sorting {
47
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAAN0lEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpaQBhPES8gE/z0ElI9M9MA1+gAAD5jWGc4eZ87AAAAABJRU5ErkJggg==); /*url("../images/sort_both.png");*/
48
  }
49
- table.dataTable thead .sorting_asc {
50
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAdUlEQVR4AWO4QyKgWMONG3eWrrh76xbRGtZvulPTdHfzVuI0nDl7p7XrblXD3Y7eu+fPE6FhwWKgaihasuIuAQ2Hj95pbENoqG+9e/QYbg3Xr9+ZPB2iFIGmzrp78yYODdt3gvxa24yCgCK79pAcD8NEw6gGAPv5+lejjyPQAAAAAElFTkSuQmCC); /*url("../images/sort_asc.png");*/
51
  }
52
- table.dataTable thead .sorting_desc {
53
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAcklEQVR4AWO4QyIY2hpGNezac6em6W5tMwoCimzfiUPDzZt3ps66W9WAgiZPv3v9Om4nHT12p74Vobqx7e7ho4T8sGQFQsOCxXcJe/r8+TsdvSDVrV13z5wlLpQ2bwX5fv0mooP11q07S1fcvXFjACMOAM7v+leNDkNAAAAAAElFTkSuQmCC); /*url("../images/sort_desc.png");*/
54
  }
55
- table.dataTable thead .sorting_asc_disabled {
56
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALklEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpZsDAJ6RRA0YNAAAd2DjFaOCLnQAAAABJRU5ErkJggg==); /*url("../images/sort_asc_disabled.png");*/
57
  }
58
- table.dataTable thead .sorting_desc_disabled {
59
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALUlEQVR4AWO4c+cORZjqBowaMGrAf0KYlgYQNoToMMClma4GMKBrpqsB9E9IAFTzOMWpD7f6AAAAAElFTkSuQmCC); /*url("../images/sort_desc_disabled.png");*/
60
  }
61
- table.dataTable tbody tr {
62
  background-color: #ffffff;
63
  }
64
- table.dataTable tbody tr.selected {
65
  background-color: #B0BED9;
66
  }
67
- table.dataTable tbody th,
68
- table.dataTable tbody td {
69
  padding: 8px 10px;
70
  }
71
- table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
 
 
 
72
  border-top: 1px solid #ddd;
73
  }
74
- table.dataTable.row-border tbody tr:first-child th,
75
- table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
76
- table.dataTable.display tbody tr:first-child td {
 
77
  border-top: none;
78
  }
79
- table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
 
80
  border-top: 1px solid #ddd;
81
  border-right: 1px solid #ddd;
82
  }
83
- table.dataTable.cell-border tbody tr th:first-child,
84
- table.dataTable.cell-border tbody tr td:first-child {
85
  border-left: 1px solid #ddd;
86
  }
87
- table.dataTable.cell-border tbody tr:first-child th,
88
- table.dataTable.cell-border tbody tr:first-child td {
89
  border-top: none;
90
  }
91
- table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
 
92
  background-color: #f9f9f9;
93
  }
94
- table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
 
95
  background-color: #acbad4;
96
  }
97
- table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
 
98
  background-color: #f6f6f6;
99
  }
100
- table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected {
 
101
  background-color: #aab7d1;
102
  }
103
- table.dataTable.order-column tbody tr > .sorting_1,
104
- table.dataTable.order-column tbody tr > .sorting_2,
105
- table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
106
- table.dataTable.display tbody tr > .sorting_2,
107
- table.dataTable.display tbody tr > .sorting_3 {
 
108
  background-color: #fafafa;
109
  }
110
- table.dataTable.order-column tbody tr.selected > .sorting_1,
111
- table.dataTable.order-column tbody tr.selected > .sorting_2,
112
- table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
113
- table.dataTable.display tbody tr.selected > .sorting_2,
114
- table.dataTable.display tbody tr.selected > .sorting_3 {
 
115
  background-color: #acbad5;
116
  }
117
- table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
 
118
  background-color: #f1f1f1;
119
  }
120
- table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
 
121
  background-color: #f3f3f3;
122
  }
123
- table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
 
124
  background-color: whitesmoke;
125
  }
126
- table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
 
127
  background-color: #a6b4cd;
128
  }
129
- table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
 
130
  background-color: #a8b5cf;
131
  }
132
- table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
 
133
  background-color: #a9b7d1;
134
  }
135
- table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
 
136
  background-color: #fafafa;
137
  }
138
- table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
 
139
  background-color: #fcfcfc;
140
  }
141
- table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
 
142
  background-color: #fefefe;
143
  }
144
- table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
 
145
  background-color: #acbad5;
146
  }
147
- table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
 
148
  background-color: #aebcd6;
149
  }
150
- table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
 
151
  background-color: #afbdd8;
152
  }
153
- table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
 
154
  background-color: #eaeaea;
155
  }
156
- table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {
 
157
  background-color: #ececec;
158
  }
159
- table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {
 
160
  background-color: #efefef;
161
  }
162
- table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
 
163
  background-color: #a2aec7;
164
  }
165
- table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
 
166
  background-color: #a3b0c9;
167
  }
168
- table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
 
169
  background-color: #a5b2cb;
170
  }
171
- table.dataTable.no-footer {
172
  border-bottom: 1px solid #111;
173
  }
174
- table.dataTable.nowrap th, table.dataTable.nowrap td {
 
175
  white-space: nowrap;
176
  }
177
- table.dataTable.compact thead th,
178
- table.dataTable.compact thead td {
179
  padding: 4px 17px 4px 4px;
180
  }
181
- table.dataTable.compact tfoot th,
182
- table.dataTable.compact tfoot td {
183
  padding: 4px;
184
  }
185
- table.dataTable.compact tbody th,
186
- table.dataTable.compact tbody td {
187
  padding: 4px;
188
  }
189
- table.dataTable th.dt-left,
190
- table.dataTable td.dt-left {
191
  text-align: left;
192
  }
193
- table.dataTable th.dt-center,
194
- table.dataTable td.dt-center,
195
- table.dataTable td.dataTables_empty {
196
  text-align: center;
197
  }
198
- table.dataTable th.dt-right,
199
- table.dataTable td.dt-right {
200
  text-align: right;
201
  }
202
- table.dataTable th.dt-justify,
203
- table.dataTable td.dt-justify {
204
  text-align: justify;
205
  }
206
- table.dataTable th.dt-nowrap,
207
- table.dataTable td.dt-nowrap {
208
  white-space: nowrap;
209
  }
210
- table.dataTable thead th.dt-head-left,
211
- table.dataTable thead td.dt-head-left,
212
- table.dataTable tfoot th.dt-head-left,
213
- table.dataTable tfoot td.dt-head-left {
214
  text-align: left;
215
  }
216
- table.dataTable thead th.dt-head-center,
217
- table.dataTable thead td.dt-head-center,
218
- table.dataTable tfoot th.dt-head-center,
219
- table.dataTable tfoot td.dt-head-center {
220
  text-align: center;
221
  }
222
- table.dataTable thead th.dt-head-right,
223
- table.dataTable thead td.dt-head-right,
224
- table.dataTable tfoot th.dt-head-right,
225
- table.dataTable tfoot td.dt-head-right {
226
  text-align: right;
227
  }
228
- table.dataTable thead th.dt-head-justify,
229
- table.dataTable thead td.dt-head-justify,
230
- table.dataTable tfoot th.dt-head-justify,
231
- table.dataTable tfoot td.dt-head-justify {
232
  text-align: justify;
233
  }
234
- table.dataTable thead th.dt-head-nowrap,
235
- table.dataTable thead td.dt-head-nowrap,
236
- table.dataTable tfoot th.dt-head-nowrap,
237
- table.dataTable tfoot td.dt-head-nowrap {
238
  white-space: nowrap;
239
  }
240
- table.dataTable tbody th.dt-body-left,
241
- table.dataTable tbody td.dt-body-left {
242
  text-align: left;
243
  }
244
- table.dataTable tbody th.dt-body-center,
245
- table.dataTable tbody td.dt-body-center {
246
  text-align: center;
247
  }
248
- table.dataTable tbody th.dt-body-right,
249
- table.dataTable tbody td.dt-body-right {
250
  text-align: right;
251
  }
252
- table.dataTable tbody th.dt-body-justify,
253
- table.dataTable tbody td.dt-body-justify {
254
  text-align: justify;
255
  }
256
- table.dataTable tbody th.dt-body-nowrap,
257
- table.dataTable tbody td.dt-body-nowrap {
258
  white-space: nowrap;
259
  }
260
 
261
- table.dataTable,
262
- table.dataTable th,
263
- table.dataTable td {
264
  box-sizing: content-box;
265
  }
266
 
267
  /*
268
  * Control feature layout
269
  */
270
- .dataTables_wrapper {
271
  position: relative;
272
  clear: both;
273
  *zoom: 1;
274
  zoom: 1;
275
  }
276
- .dataTables_wrapper .dataTables_length {
277
  float: left;
278
  }
279
- .dataTables_wrapper .dataTables_filter {
280
  float: right;
281
  text-align: right;
282
  }
283
- .dataTables_wrapper .dataTables_filter input {
284
  margin-left: 0.5em;
285
  }
286
- .dataTables_wrapper .dataTables_info {
287
  clear: both;
288
  float: left;
289
  padding-top: 0.755em;
290
  }
291
- .dataTables_wrapper .dataTables_paginate {
292
  float: right;
293
  text-align: right;
294
  padding-top: 0.25em;
295
  }
296
- .dataTables_wrapper .dataTables_paginate .paginate_button {
297
  box-sizing: border-box;
298
  display: inline-block;
299
  min-width: 1.5em;
@@ -307,7 +337,8 @@ table.dataTable td {
307
  border: 1px solid transparent;
308
  border-radius: 2px;
309
  }
310
- .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
 
311
  color: #333 !important;
312
  border: 1px solid #979797;
313
  background-color: white;
@@ -324,14 +355,16 @@ table.dataTable td {
324
  background: linear-gradient(to bottom, white 0%, #dcdcdc 100%);
325
  /* W3C */
326
  }
327
- .dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
 
 
328
  cursor: default;
329
  color: #666 !important;
330
  border: 1px solid transparent;
331
  background: transparent;
332
  box-shadow: none;
333
  }
334
- .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
335
  color: white !important;
336
  border: 1px solid #111;
337
  background-color: #585858;
@@ -348,7 +381,7 @@ table.dataTable td {
348
  background: linear-gradient(to bottom, #585858 0%, #111 100%);
349
  /* W3C */
350
  }
351
- .dataTables_wrapper .dataTables_paginate .paginate_button:active {
352
  outline: none;
353
  background-color: #2b2b2b;
354
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
@@ -365,10 +398,10 @@ table.dataTable td {
365
  /* W3C */
366
  box-shadow: inset 0 0 3px #111;
367
  }
368
- .dataTables_wrapper .dataTables_paginate .ellipsis {
369
  padding: 0 1em;
370
  }
371
- .dataTables_wrapper .dataTables_processing {
372
  position: absolute;
373
  top: 50%;
374
  left: 50%;
@@ -387,39 +420,43 @@ table.dataTable td {
387
  background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
388
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
389
  }
390
- .dataTables_wrapper .dataTables_length,
391
- .dataTables_wrapper .dataTables_filter,
392
- .dataTables_wrapper .dataTables_info,
393
- .dataTables_wrapper .dataTables_processing,
394
- .dataTables_wrapper .dataTables_paginate {
395
  color: #333;
396
  }
397
- .dataTables_wrapper .dataTables_scroll {
398
  clear: both;
399
  }
400
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
401
  *margin-top: -1px;
402
  -webkit-overflow-scrolling: touch;
403
  }
404
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {
 
 
 
405
  vertical-align: middle;
406
  }
407
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,
408
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,
409
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing {
 
410
  height: 0;
411
  overflow: hidden;
412
  margin: 0 !important;
413
  padding: 0 !important;
414
  }
415
- .dataTables_wrapper.no-footer .dataTables_scrollBody {
416
  border-bottom: 1px solid #111;
417
  }
418
- .dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,
419
- .dataTables_wrapper.no-footer div.dataTables_scrollBody > table {
420
  border-bottom: none;
421
  }
422
- .dataTables_wrapper:after {
423
  visibility: hidden;
424
  display: block;
425
  content: "";
@@ -428,22 +465,22 @@ table.dataTable td {
428
  }
429
 
430
  @media screen and (max-width: 767px) {
431
- .dataTables_wrapper .dataTables_info,
432
- .dataTables_wrapper .dataTables_paginate {
433
  float: none;
434
  text-align: center;
435
  }
436
- .dataTables_wrapper .dataTables_paginate {
437
  margin-top: 0.5em;
438
  }
439
  }
440
  @media screen and (max-width: 640px) {
441
- .dataTables_wrapper .dataTables_length,
442
- .dataTables_wrapper .dataTables_filter {
443
  float: none;
444
  text-align: center;
445
  }
446
- .dataTables_wrapper .dataTables_filter {
447
  margin-top: 0.5em;
448
  }
449
  }
@@ -452,24 +489,24 @@ table.dataTable td {
452
  * 2014-2016 SpryMedia Ltd - datatables.net/license
453
  */
454
 
455
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
456
- table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
457
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
458
  cursor: default !important;
459
  }
460
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
461
- table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
462
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
463
  display: none !important;
464
  }
465
- table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child,
466
- table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child {
467
  position: relative;
468
  padding-left: 30px;
469
  cursor: pointer;
470
  }
471
- table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
472
- table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
473
  top: 9px;
474
  left: 4px;
475
  height: 14px;
@@ -487,20 +524,20 @@ table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
487
  content: '+';
488
  background-color: #31b131;
489
  }
490
- table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
491
- table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
492
  content: '-';
493
  background-color: #d33333;
494
  }
495
- table.dataTable.dtr-inline.collapsed > tbody > tr.child td:before {
496
  display: none;
497
  }
498
- table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child,
499
- table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child {
500
  padding-left: 27px;
501
  }
502
- table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child:before,
503
- table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child:before {
504
  top: 5px;
505
  left: 4px;
506
  height: 14px;
@@ -509,13 +546,13 @@ table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child:befor
509
  line-height: 14px;
510
  text-indent: 3px;
511
  }
512
- table.dataTable.dtr-column > tbody > tr > td.control,
513
- table.dataTable.dtr-column > tbody > tr > th.control {
514
  position: relative;
515
  cursor: pointer;
516
  }
517
- table.dataTable.dtr-column > tbody > tr > td.control:before,
518
- table.dataTable.dtr-column > tbody > tr > th.control:before {
519
  top: 50%;
520
  left: 50%;
521
  height: 16px;
@@ -535,34 +572,34 @@ table.dataTable.dtr-column > tbody > tr > th.control:before {
535
  content: '+';
536
  background-color: #31b131;
537
  }
538
- table.dataTable.dtr-column > tbody > tr.parent td.control:before,
539
- table.dataTable.dtr-column > tbody > tr.parent th.control:before {
540
  content: '-';
541
  background-color: #d33333;
542
  }
543
- table.dataTable > tbody > tr.child {
544
  padding: 0.5em 1em;
545
  }
546
- table.dataTable > tbody > tr.child:hover {
547
  background: transparent !important;
548
  }
549
- table.dataTable > tbody > tr.child ul.dtr-details {
550
  display: inline-block;
551
  list-style-type: none;
552
  margin: 0;
553
  padding: 0;
554
  }
555
- table.dataTable > tbody > tr.child ul.dtr-details li {
556
  border-bottom: 1px solid #efefef;
557
  padding: 0.5em 0;
558
  }
559
- table.dataTable > tbody > tr.child ul.dtr-details li:first-child {
560
  padding-top: 0;
561
  }
562
- table.dataTable > tbody > tr.child ul.dtr-details li:last-child {
563
  border-bottom: none;
564
  }
565
- table.dataTable > tbody > tr.child span.dtr-title {
566
  display: inline-block;
567
  min-width: 75px;
568
  font-weight: bold;
1
  /*! DataTables 1.10.16
2
  * 2008-2017 SpryMedia Ltd - datatables.net/license
3
  */
4
+
5
+ table.ip-geo-block-dataTable {
6
  width: 100%;
7
  margin: 0 auto;
8
  clear: both;
15
  * Body styles
16
  */
17
  }
18
+ table.ip-geo-block-dataTable thead th,
19
+ table.ip-geo-block-dataTable tfoot th {
20
  font-weight: bold;
21
  }
22
+ table.ip-geo-block-dataTable thead th,
23
+ table.ip-geo-block-dataTable thead td {
24
  padding: 10px 18px;
25
  border-bottom: 1px solid #111;
26
  }
27
+ table.ip-geo-block-dataTable thead th:active,
28
+ table.ip-geo-block-dataTable thead td:active {
29
  outline: none;
30
  }
31
+ table.ip-geo-block-dataTable tfoot th,
32
+ table.ip-geo-block-dataTable tfoot td {
33
  padding: 10px 18px 6px 18px;
34
  border-top: 1px solid #111;
35
  }
36
+ table.ip-geo-block-dataTable thead .sorting,
37
+ table.ip-geo-block-dataTable thead .sorting_asc,
38
+ table.ip-geo-block-dataTable thead .sorting_desc,
39
+ table.ip-geo-block-dataTable thead .sorting_asc_disabled,
40
+ table.ip-geo-block-dataTable thead .sorting_desc_disabled {
41
  cursor: pointer;
42
  *cursor: hand;
43
  background-repeat: no-repeat;
44
  background-position: center right;
45
  }
46
+ table.ip-geo-block-dataTable thead .sorting {
47
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAAN0lEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpaQBhPES8gE/z0ElI9M9MA1+gAAD5jWGc4eZ87AAAAABJRU5ErkJggg==); /*url("../images/sort_both.png");*/
48
  }
49
+ table.ip-geo-block-dataTable thead .sorting_asc {
50
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAdUlEQVR4AWO4QyKgWMONG3eWrrh76xbRGtZvulPTdHfzVuI0nDl7p7XrblXD3Y7eu+fPE6FhwWKgaihasuIuAQ2Hj95pbENoqG+9e/QYbg3Xr9+ZPB2iFIGmzrp78yYODdt3gvxa24yCgCK79pAcD8NEw6gGAPv5+lejjyPQAAAAAElFTkSuQmCC); /*url("../images/sort_asc.png");*/
51
  }
52
+ table.ip-geo-block-dataTable thead .sorting_desc {
53
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAcklEQVR4AWO4QyIY2hpGNezac6em6W5tMwoCimzfiUPDzZt3ps66W9WAgiZPv3v9Om4nHT12p74Vobqx7e7ho4T8sGQFQsOCxXcJe/r8+TsdvSDVrV13z5wlLpQ2bwX5fv0mooP11q07S1fcvXFjACMOAM7v+leNDkNAAAAAAElFTkSuQmCC); /*url("../images/sort_desc.png");*/
54
  }
55
+ table.ip-geo-block-dataTable thead .sorting_asc_disabled {
56
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALklEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpZsDAJ6RRA0YNAAAd2DjFaOCLnQAAAABJRU5ErkJggg==); /*url("../images/sort_asc_disabled.png");*/
57
  }
58
+ table.ip-geo-block-dataTable thead .sorting_desc_disabled {
59
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALUlEQVR4AWO4c+cORZjqBowaMGrAf0KYlgYQNoToMMClma4GMKBrpqsB9E9IAFTzOMWpD7f6AAAAAElFTkSuQmCC); /*url("../images/sort_desc_disabled.png");*/
60
  }
61
+ table.ip-geo-block-dataTable tbody tr {
62
  background-color: #ffffff;
63
  }
64
+ table.ip-geo-block-dataTable tbody tr.selected {
65
  background-color: #B0BED9;
66
  }
67
+ table.ip-geo-block-dataTable tbody th,
68
+ table.ip-geo-block-dataTable tbody td {
69
  padding: 8px 10px;
70
  }
71
+ table.ip-geo-block-dataTable.row-border tbody th,
72
+ table.ip-geo-block-dataTable.row-border tbody td,
73
+ table.ip-geo-block-dataTable.display tbody th,
74
+ table.ip-geo-block-dataTable.display tbody td {
75
  border-top: 1px solid #ddd;
76
  }
77
+ table.ip-geo-block-dataTable.row-border tbody tr:first-child th,
78
+ table.ip-geo-block-dataTable.row-border tbody tr:first-child td,
79
+ table.ip-geo-block-dataTable.display tbody tr:first-child th,
80
+ table.ip-geo-block-dataTable.display tbody tr:first-child td {
81
  border-top: none;
82
  }
83
+ table.ip-geo-block-dataTable.cell-border tbody th,
84
+ table.ip-geo-block-dataTable.cell-border tbody td {
85
  border-top: 1px solid #ddd;
86
  border-right: 1px solid #ddd;
87
  }
88
+ table.ip-geo-block-dataTable.cell-border tbody tr th:first-child,
89
+ table.ip-geo-block-dataTable.cell-border tbody tr td:first-child {
90
  border-left: 1px solid #ddd;
91
  }
92
+ table.ip-geo-block-dataTable.cell-border tbody tr:first-child th,
93
+ table.ip-geo-block-dataTable.cell-border tbody tr:first-child td {
94
  border-top: none;
95
  }
96
+ table.ip-geo-block-dataTable.stripe tbody tr.odd,
97
+ table.ip-geo-block-dataTable.display tbody tr.odd {
98
  background-color: #f9f9f9;
99
  }
100
+ table.ip-geo-block-dataTable.stripe tbody tr.odd.selected,
101
+ table.ip-geo-block-dataTable.display tbody tr.odd.selected {
102
  background-color: #acbad4;
103
  }
104
+ table.ip-geo-block-dataTable.hover tbody tr:hover,
105
+ table.ip-geo-block-dataTable.display tbody tr:hover {
106
  background-color: #f6f6f6;
107
  }
108
+ table.ip-geo-block-dataTable.hover tbody tr:hover.selected,
109
+ table.ip-geo-block-dataTable.display tbody tr:hover.selected {
110
  background-color: #aab7d1;
111
  }
112
+ table.ip-geo-block-dataTable.order-column tbody tr > .sorting_1,
113
+ table.ip-geo-block-dataTable.order-column tbody tr > .sorting_2,
114
+ table.ip-geo-block-dataTable.order-column tbody tr > .sorting_3,
115
+ table.ip-geo-block-dataTable.display tbody tr > .sorting_1,
116
+ table.ip-geo-block-dataTable.display tbody tr > .sorting_2,
117
+ table.ip-geo-block-dataTable.display tbody tr > .sorting_3 {
118
  background-color: #fafafa;
119
  }
120
+ table.ip-geo-block-dataTable.order-column tbody tr.selected > .sorting_1,
121
+ table.ip-geo-block-dataTable.order-column tbody tr.selected > .sorting_2,
122
+ table.ip-geo-block-dataTable.order-column tbody tr.selected > .sorting_3,
123
+ table.ip-geo-block-dataTable.display tbody tr.selected > .sorting_1,
124
+ table.ip-geo-block-dataTable.display tbody tr.selected > .sorting_2,
125
+ table.ip-geo-block-dataTable.display tbody tr.selected > .sorting_3 {
126
  background-color: #acbad5;
127
  }
128
+ table.ip-geo-block-dataTable.display tbody tr.odd > .sorting_1,
129
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
130
  background-color: #f1f1f1;
131
  }
132
+ table.ip-geo-block-dataTable.display tbody tr.odd > .sorting_2,
133
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
134
  background-color: #f3f3f3;
135
  }
136
+ table.ip-geo-block-dataTable.display tbody tr.odd > .sorting_3,
137
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
138
  background-color: whitesmoke;
139
  }
140
+ table.ip-geo-block-dataTable.display tbody tr.odd.selected > .sorting_1,
141
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
142
  background-color: #a6b4cd;
143
  }
144
+ table.ip-geo-block-dataTable.display tbody tr.odd.selected > .sorting_2,
145
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
146
  background-color: #a8b5cf;
147
  }
148
+ table.ip-geo-block-dataTable.display tbody tr.odd.selected > .sorting_3,
149
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
150
  background-color: #a9b7d1;
151
  }
152
+ table.ip-geo-block-dataTable.display tbody tr.even > .sorting_1,
153
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.even > .sorting_1 {
154
  background-color: #fafafa;
155
  }
156
+ table.ip-geo-block-dataTable.display tbody tr.even > .sorting_2,
157
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.even > .sorting_2 {
158
  background-color: #fcfcfc;
159
  }
160
+ table.ip-geo-block-dataTable.display tbody tr.even > .sorting_3,
161
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.even > .sorting_3 {
162
  background-color: #fefefe;
163
  }
164
+ table.ip-geo-block-dataTable.display tbody tr.even.selected > .sorting_1,
165
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
166
  background-color: #acbad5;
167
  }
168
+ table.ip-geo-block-dataTable.display tbody tr.even.selected > .sorting_2,
169
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
170
  background-color: #aebcd6;
171
  }
172
+ table.ip-geo-block-dataTable.display tbody tr.even.selected > .sorting_3,
173
+ table.ip-geo-block-dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
174
  background-color: #afbdd8;
175
  }
176
+ table.ip-geo-block-dataTable.display tbody tr:hover > .sorting_1,
177
+ table.ip-geo-block-dataTable.order-column.hover tbody tr:hover > .sorting_1 {
178
  background-color: #eaeaea;
179
  }
180
+ table.ip-geo-block-dataTable.display tbody tr:hover > .sorting_2,
181
+ table.ip-geo-block-dataTable.order-column.hover tbody tr:hover > .sorting_2 {
182
  background-color: #ececec;
183
  }
184
+ table.ip-geo-block-dataTable.display tbody tr:hover > .sorting_3,
185
+ table.ip-geo-block-dataTable.order-column.hover tbody tr:hover > .sorting_3 {
186
  background-color: #efefef;
187
  }
188
+ table.ip-geo-block-dataTable.display tbody tr:hover.selected > .sorting_1,
189
+ table.ip-geo-block-dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
190
  background-color: #a2aec7;
191
  }
192
+ table.ip-geo-block-dataTable.display tbody tr:hover.selected > .sorting_2,
193
+ table.ip-geo-block-dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
194
  background-color: #a3b0c9;
195
  }
196
+ table.ip-geo-block-dataTable.display tbody tr:hover.selected > .sorting_3,
197
+ table.ip-geo-block-dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
198
  background-color: #a5b2cb;
199
  }
200
+ table.ip-geo-block-dataTable.no-footer {
201
  border-bottom: 1px solid #111;
202
  }
203
+ table.ip-geo-block-dataTable.nowrap th,
204
+ table.ip-geo-block-dataTable.nowrap td {
205
  white-space: nowrap;
206
  }
207
+ table.ip-geo-block-dataTable.compact thead th,
208
+ table.ip-geo-block-dataTable.compact thead td {
209
  padding: 4px 17px 4px 4px;
210
  }
211
+ table.ip-geo-block-dataTable.compact tfoot th,
212
+ table.ip-geo-block-dataTable.compact tfoot td {
213
  padding: 4px;
214
  }
215
+ table.ip-geo-block-dataTable.compact tbody th,
216
+ table.ip-geo-block-dataTable.compact tbody td {
217
  padding: 4px;
218
  }
219
+ table.ip-geo-block-dataTable th.dt-left,
220
+ table.ip-geo-block-dataTable td.dt-left {
221
  text-align: left;
222
  }
223
+ table.ip-geo-block-dataTable th.dt-center,
224
+ table.ip-geo-block-dataTable td.dt-center,
225
+ table.ip-geo-block-dataTable td.dataTables_empty {
226
  text-align: center;
227
  }
228
+ table.ip-geo-block-dataTable th.dt-right,
229
+ table.ip-geo-block-dataTable td.dt-right {
230
  text-align: right;
231
  }
232
+ table.ip-geo-block-dataTable th.dt-justify,
233
+ table.ip-geo-block-dataTable td.dt-justify {
234
  text-align: justify;
235
  }
236
+ table.ip-geo-block-dataTable th.dt-nowrap,
237
+ table.ip-geo-block-dataTable td.dt-nowrap {
238
  white-space: nowrap;
239
  }
240
+ table.ip-geo-block-dataTable thead th.dt-head-left,
241
+ table.ip-geo-block-dataTable thead td.dt-head-left,
242
+ table.ip-geo-block-dataTable tfoot th.dt-head-left,
243
+ table.ip-geo-block-dataTable tfoot td.dt-head-left {
244
  text-align: left;
245
  }
246
+ table.ip-geo-block-dataTable thead th.dt-head-center,
247
+ table.ip-geo-block-dataTable thead td.dt-head-center,
248
+ table.ip-geo-block-dataTable tfoot th.dt-head-center,
249
+ table.ip-geo-block-dataTable tfoot td.dt-head-center {
250
  text-align: center;
251
  }
252
+ table.ip-geo-block-dataTable thead th.dt-head-right,
253
+ table.ip-geo-block-dataTable thead td.dt-head-right,
254
+ table.ip-geo-block-dataTable tfoot th.dt-head-right,
255
+ table.ip-geo-block-dataTable tfoot td.dt-head-right {
256
  text-align: right;
257
  }
258
+ table.ip-geo-block-dataTable thead th.dt-head-justify,
259
+ table.ip-geo-block-dataTable thead td.dt-head-justify,
260
+ table.ip-geo-block-dataTable tfoot th.dt-head-justify,
261
+ table.ip-geo-block-dataTable tfoot td.dt-head-justify {
262
  text-align: justify;
263
  }
264
+ table.ip-geo-block-dataTable thead th.dt-head-nowrap,
265
+ table.ip-geo-block-dataTable thead td.dt-head-nowrap,
266
+ table.ip-geo-block-dataTable tfoot th.dt-head-nowrap,
267
+ table.ip-geo-block-dataTable tfoot td.dt-head-nowrap {
268
  white-space: nowrap;
269
  }
270
+ table.ip-geo-block-dataTable tbody th.dt-body-left,
271
+ table.ip-geo-block-dataTable tbody td.dt-body-left {
272
  text-align: left;
273
  }
274
+ table.ip-geo-block-dataTable tbody th.dt-body-center,
275
+ table.ip-geo-block-dataTable tbody td.dt-body-center {
276
  text-align: center;
277
  }
278
+ table.ip-geo-block-dataTable tbody th.dt-body-right,
279
+ table.ip-geo-block-dataTable tbody td.dt-body-right {
280
  text-align: right;
281
  }
282
+ table.ip-geo-block-dataTable tbody th.dt-body-justify,
283
+ table.ip-geo-block-dataTable tbody td.dt-body-justify {
284
  text-align: justify;
285
  }
286
+ table.ip-geo-block-dataTable tbody th.dt-body-nowrap,
287
+ table.ip-geo-block-dataTable tbody td.dt-body-nowrap {
288
  white-space: nowrap;
289
  }
290
 
291
+ table.ip-geo-block-dataTable,
292
+ table.ip-geo-block-dataTable th,
293
+ table.ip-geo-block-dataTable td {
294
  box-sizing: content-box;
295
  }
296
 
297
  /*
298
  * Control feature layout
299
  */
300
+ div[class*="ip-geo-block"] .dataTables_wrapper {
301
  position: relative;
302
  clear: both;
303
  *zoom: 1;
304
  zoom: 1;
305
  }
306
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length {
307
  float: left;
308
  }
309
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter {
310
  float: right;
311
  text-align: right;
312
  }
313
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter input {
314
  margin-left: 0.5em;
315
  }
316
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_info {
317
  clear: both;
318
  float: left;
319
  padding-top: 0.755em;
320
  }
321
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
322
  float: right;
323
  text-align: right;
324
  padding-top: 0.25em;
325
  }
326
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button {
327
  box-sizing: border-box;
328
  display: inline-block;
329
  min-width: 1.5em;
337
  border: 1px solid transparent;
338
  border-radius: 2px;
339
  }
340
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
341
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
342
  color: #333 !important;
343
  border: 1px solid #979797;
344
  background-color: white;
355
  background: linear-gradient(to bottom, white 0%, #dcdcdc 100%);
356
  /* W3C */
357
  }
358
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
359
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
360
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
361
  cursor: default;
362
  color: #666 !important;
363
  border: 1px solid transparent;
364
  background: transparent;
365
  box-shadow: none;
366
  }
367
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
368
  color: white !important;
369
  border: 1px solid #111;
370
  background-color: #585858;
381
  background: linear-gradient(to bottom, #585858 0%, #111 100%);
382
  /* W3C */
383
  }
384
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button:active {
385
  outline: none;
386
  background-color: #2b2b2b;
387
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
398
  /* W3C */
399
  box-shadow: inset 0 0 3px #111;
400
  }
401
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .ellipsis {
402
  padding: 0 1em;
403
  }
404
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_processing {
405
  position: absolute;
406
  top: 50%;
407
  left: 50%;
420
  background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
421
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
422
  }
423
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length,
424
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter,
425
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_info,
426
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_processing,
427
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
428
  color: #333;
429
  }
430
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll {
431
  clear: both;
432
  }
433
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
434
  *margin-top: -1px;
435
  -webkit-overflow-scrolling: touch;
436
  }
437
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th,
438
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td,
439
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th,
440
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {
441
  vertical-align: middle;
442
  }
443
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,
444
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing,
445
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,
446
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing {
447
  height: 0;
448
  overflow: hidden;
449
  margin: 0 !important;
450
  padding: 0 !important;
451
  }
452
+ div[class*="ip-geo-block"] .dataTables_wrapper.no-footer .dataTables_scrollBody {
453
  border-bottom: 1px solid #111;
454
  }
455
+ div[class*="ip-geo-block"] .dataTables_wrapper.no-footer div.dataTables_scrollHead table.ip-geo-block-dataTable,
456
+ div[class*="ip-geo-block"] .dataTables_wrapper.no-footer div.dataTables_scrollBody > table {
457
  border-bottom: none;
458
  }
459
+ div[class*="ip-geo-block"] .dataTables_wrapper:after {
460
  visibility: hidden;
461
  display: block;
462
  content: "";
465
  }
466
 
467
  @media screen and (max-width: 767px) {
468
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_info,
469
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
470
  float: none;
471
  text-align: center;
472
  }
473
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
474
  margin-top: 0.5em;
475
  }
476
  }
477
  @media screen and (max-width: 640px) {
478
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length,
479
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter {
480
  float: none;
481
  text-align: center;
482
  }
483
+ div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter {
484
  margin-top: 0.5em;
485
  }
486
  }
489
  * 2014-2016 SpryMedia Ltd - datatables.net/license
490
  */
491
 
492
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td.child,
493
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > th.child,
494
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
495
  cursor: default !important;
496
  }
497
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
498
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
499
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
500
  display: none !important;
501
  }
502
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td:first-child,
503
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > th:first-child {
504
  position: relative;
505
  padding-left: 30px;
506
  cursor: pointer;
507
  }
508
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
509
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
510
  top: 9px;
511
  left: 4px;
512
  height: 14px;
524
  content: '+';
525
  background-color: #31b131;
526
  }
527
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
528
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
529
  content: '-';
530
  background-color: #d33333;
531
  }
532
+ table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr.child td:before {
533
  display: none;
534
  }
535
+ table.ip-geo-block-dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child,
536
+ table.ip-geo-block-dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child {
537
  padding-left: 27px;
538
  }
539
+ table.ip-geo-block-dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child:before,
540
+ table.ip-geo-block-dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child:before {
541
  top: 5px;
542
  left: 4px;
543
  height: 14px;
546
  line-height: 14px;
547
  text-indent: 3px;
548
  }
549
+ table.ip-geo-block-dataTable.dtr-column > tbody > tr > td.control,
550
+ table.ip-geo-block-dataTable.dtr-column > tbody > tr > th.control {
551
  position: relative;
552
  cursor: pointer;
553
  }
554
+ table.ip-geo-block-dataTable.dtr-column > tbody > tr > td.control:before,
555
+ table.ip-geo-block-dataTable.dtr-column > tbody > tr > th.control:before {
556
  top: 50%;
557
  left: 50%;
558
  height: 16px;
572
  content: '+';
573
  background-color: #31b131;
574
  }
575
+ table.ip-geo-block-dataTable.dtr-column > tbody > tr.parent td.control:before,
576
+ table.ip-geo-block-dataTable.dtr-column > tbody > tr.parent th.control:before {
577
  content: '-';
578
  background-color: #d33333;
579
  }
580
+ table.ip-geo-block-dataTable > tbody > tr.child {
581
  padding: 0.5em 1em;
582
  }
583
+ table.ip-geo-block-dataTable > tbody > tr.child:hover {
584
  background: transparent !important;
585
  }
586
+ table.ip-geo-block-dataTable > tbody > tr.child ul.dtr-details {
587
  display: inline-block;
588
  list-style-type: none;
589
  margin: 0;
590
  padding: 0;
591
  }
592
+ table.ip-geo-block-dataTable > tbody > tr.child ul.dtr-details li {
593
  border-bottom: 1px solid #efefef;
594
  padding: 0.5em 0;
595
  }
596
+ table.ip-geo-block-dataTable > tbody > tr.child ul.dtr-details li:first-child {
597
  padding-top: 0;
598
  }
599
+ table.ip-geo-block-dataTable > tbody > tr.child ul.dtr-details li:last-child {
600
  border-bottom: none;
601
  }
602
+ table.ip-geo-block-dataTable > tbody > tr.child span.dtr-title {
603
  display: inline-block;
604
  min-width: 75px;
605
  font-weight: bold;
admin/datatables/css/datatables-all.min.css CHANGED
@@ -1,13 +1,15 @@
1
  /*! DataTables 1.10.16
2
  * 2008-2017 SpryMedia Ltd - datatables.net/license
3
  */
4
- table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;*cursor:hand;background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAAN0lEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpaQBhPES8gE/z0ElI9M9MA1+gAAD5jWGc4eZ87AAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAdUlEQVR4AWO4QyKgWMONG3eWrrh76xbRGtZvulPTdHfzVuI0nDl7p7XrblXD3Y7eu+fPE6FhwWKgaihasuIuAQ2Hj95pbENoqG+9e/QYbg3Xr9+ZPB2iFIGmzrp78yYODdt3gvxa24yCgCK79pAcD8NEw6gGAPv5+lejjyPQAAAAAElFTkSuQmCC)}table.dataTable thead .sorting_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAcklEQVR4AWO4QyIY2hpGNezac6em6W5tMwoCimzfiUPDzZt3ps66W9WAgiZPv3v9Om4nHT12p74Vobqx7e7ho4T8sGQFQsOCxXcJe/r8+TsdvSDVrV13z5wlLpQ2bwX5fv0mooP11q07S1fcvXFjACMOAM7v+leNDkNAAAAAAElFTkSuQmCC)}table.dataTable thead .sorting_asc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALklEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpZsDAJ6RRA0YNAAAd2DjFaOCLnQAAAABJRU5ErkJggg==)}table.dataTable thead .sorting_desc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALUlEQVR4AWO4c+cORZjqBowaMGrAf0KYlgYQNoToMMClma4GMKBrpqsB9E9IAFTzOMWpD7f6AAAAAElFTkSuQmCC)}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,.dataTables_wrapper.no-footer div.dataTables_scrollBody>table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}}
 
5
  /*! Responsive 2.1.1
6
  * 2014-2016 SpryMedia Ltd - datatables.net/license
7
  */
8
- table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before{top:9px;left:4px;height:14px;width:14px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#31b131}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{content:'-';background-color:#d33333}table.dataTable.dtr-inline.collapsed>tbody>tr.child td:before{display:none}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before{top:5px;left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#31b131}table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:'-';background-color:#d33333}table.dataTable>tbody>tr.child{padding:0.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul.dtr-details li{border-bottom:1px solid #efefef;padding:0.5em 0}table.dataTable>tbody>tr.child ul.dtr-details li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul.dtr-details li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:0.5em;box-shadow:0 12px 30px rgba(0,0,0,0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0,0,0,0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}
 
9
  /*! datatables.mark.js v2.0.1
10
  * Copyright (c) 2016-2017 Julian Motz
11
  * https://github.com/julmot/datatables.mark.js/blob/master/LICENSE
12
  */
13
- mark{background:orange;color:black;}
1
  /*! DataTables 1.10.16
2
  * 2008-2017 SpryMedia Ltd - datatables.net/license
3
  */
4
+ table.ip-geo-block-dataTable tbody td.dt-body-nowrap,table.ip-geo-block-dataTable tbody th.dt-body-nowrap,table.ip-geo-block-dataTable td.dt-nowrap,table.ip-geo-block-dataTable tfoot td.dt-head-nowrap,table.ip-geo-block-dataTable tfoot th.dt-head-nowrap,table.ip-geo-block-dataTable th.dt-nowrap,table.ip-geo-block-dataTable thead td.dt-head-nowrap,table.ip-geo-block-dataTable thead th.dt-head-nowrap,table.ip-geo-block-dataTable.nowrap td,table.ip-geo-block-dataTable.nowrap th{white-space:nowrap}table.ip-geo-block-dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.ip-geo-block-dataTable tfoot th,table.ip-geo-block-dataTable thead th{font-weight:700}table.ip-geo-block-dataTable thead td,table.ip-geo-block-dataTable thead th{padding:10px 18px;border-bottom:1px solid #111}table.ip-geo-block-dataTable thead td:active,table.ip-geo-block-dataTable thead th:active{outline:0}table.ip-geo-block-dataTable tfoot td,table.ip-geo-block-dataTable tfoot th{padding:10px 18px 6px;border-top:1px solid #111}table.ip-geo-block-dataTable thead .sorting,table.ip-geo-block-dataTable thead .sorting_asc,table.ip-geo-block-dataTable thead .sorting_asc_disabled,table.ip-geo-block-dataTable thead .sorting_desc,table.ip-geo-block-dataTable thead .sorting_desc_disabled{cursor:pointer;background-repeat:no-repeat;background-position:center right}table.ip-geo-block-dataTable thead .sorting{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAAN0lEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpaQBhPES8gE/z0ElI9M9MA1+gAAD5jWGc4eZ87AAAAABJRU5ErkJggg==)}table.ip-geo-block-dataTable thead .sorting_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAdUlEQVR4AWO4QyKgWMONG3eWrrh76xbRGtZvulPTdHfzVuI0nDl7p7XrblXD3Y7eu+fPE6FhwWKgaihasuIuAQ2Hj95pbENoqG+9e/QYbg3Xr9+ZPB2iFIGmzrp78yYODdt3gvxa24yCgCK79pAcD8NEw6gGAPv5+lejjyPQAAAAAElFTkSuQmCC)}table.ip-geo-block-dataTable thead .sorting_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAcklEQVR4AWO4QyIY2hpGNezac6em6W5tMwoCimzfiUPDzZt3ps66W9WAgiZPv3v9Om4nHT12p74Vobqx7e7ho4T8sGQFQsOCxXcJe/r8+TsdvSDVrV13z5wlLpQ2bwX5fv0mooP11q07S1fcvXFjACMOAM7v+leNDkNAAAAAAElFTkSuQmCC)}table.ip-geo-block-dataTable thead .sorting_asc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALklEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpZsDAJ6RRA0YNAAAd2DjFaOCLnQAAAABJRU5ErkJggg==)}table.ip-geo-block-dataTable thead .sorting_desc_disabled{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALUlEQVR4AWO4c+cORZjqBowaMGrAf0KYlgYQNoToMMClma4GMKBrpqsB9E9IAFTzOMWpD7f6AAAAAElFTkSuQmCC)}table.ip-geo-block-dataTable tbody tr{background-color:#fff}table.ip-geo-block-dataTable tbody tr.selected{background-color:#B0BED9}table.ip-geo-block-dataTable tbody td,table.ip-geo-block-dataTable tbody th{padding:8px 10px}table.ip-geo-block-dataTable.display tbody td,table.ip-geo-block-dataTable.display tbody th,table.ip-geo-block-dataTable.row-border tbody td,table.ip-geo-block-dataTable.row-border tbody th{border-top:1px solid #ddd}table.ip-geo-block-dataTable.display tbody tr:first-child td,table.ip-geo-block-dataTable.display tbody tr:first-child th,table.ip-geo-block-dataTable.row-border tbody tr:first-child td,table.ip-geo-block-dataTable.row-border tbody tr:first-child th{border-top:none}table.ip-geo-block-dataTable.cell-border tbody td,table.ip-geo-block-dataTable.cell-border tbody th{border-top:1px solid #ddd;border-right:1px solid #ddd}table.ip-geo-block-dataTable.cell-border tbody tr td:first-child,table.ip-geo-block-dataTable.cell-border tbody tr th:first-child{border-left:1px solid #ddd}table.ip-geo-block-dataTable.cell-border tbody tr:first-child td,table.ip-geo-block-dataTable.cell-border tbody tr:first-child th{border-top:none}table.ip-geo-block-dataTable.display tbody tr.odd,table.ip-geo-block-dataTable.stripe tbody tr.odd{background-color:#f9f9f9}table.ip-geo-block-dataTable.display tbody tr.odd.selected,table.ip-geo-block-dataTable.stripe tbody tr.odd.selected{background-color:#acbad4}table.ip-geo-block-dataTable.display tbody tr:hover,table.ip-geo-block-dataTable.hover tbody tr:hover{background-color:#f6f6f6}table.ip-geo-block-dataTable.display tbody tr:hover.selected,table.ip-geo-block-dataTable.hover tbody tr:hover.selected{background-color:#aab7d1}table.ip-geo-block-dataTable.display tbody tr>.sorting_1,table.ip-geo-block-dataTable.display tbody tr>.sorting_2,table.ip-geo-block-dataTable.display tbody tr>.sorting_3,table.ip-geo-block-dataTable.order-column tbody tr>.sorting_1,table.ip-geo-block-dataTable.order-column tbody tr>.sorting_2,table.ip-geo-block-dataTable.order-column tbody tr>.sorting_3{background-color:#fafafa}table.ip-geo-block-dataTable.display tbody tr.selected>.sorting_1,table.ip-geo-block-dataTable.display tbody tr.selected>.sorting_2,table.ip-geo-block-dataTable.display tbody tr.selected>.sorting_3,table.ip-geo-block-dataTable.order-column tbody tr.selected>.sorting_1,table.ip-geo-block-dataTable.order-column tbody tr.selected>.sorting_2,table.ip-geo-block-dataTable.order-column tbody tr.selected>.sorting_3{background-color:#acbad5}table.ip-geo-block-dataTable.display tbody tr.odd>.sorting_1,table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.ip-geo-block-dataTable.display tbody tr.odd>.sorting_2,table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.ip-geo-block-dataTable.display tbody tr.odd>.sorting_3,table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:#f5f5f5}table.ip-geo-block-dataTable.display tbody tr.odd.selected>.sorting_1,table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.ip-geo-block-dataTable.display tbody tr.odd.selected>.sorting_2,table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.ip-geo-block-dataTable.display tbody tr.odd.selected>.sorting_3,table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.ip-geo-block-dataTable.display tbody tr.even>.sorting_1,table.ip-geo-block-dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.ip-geo-block-dataTable.display tbody tr.even>.sorting_2,table.ip-geo-block-dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.ip-geo-block-dataTable.display tbody tr.even>.sorting_3,table.ip-geo-block-dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.ip-geo-block-dataTable.display tbody tr.even.selected>.sorting_1,table.ip-geo-block-dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.ip-geo-block-dataTable.display tbody tr.even.selected>.sorting_2,table.ip-geo-block-dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.ip-geo-block-dataTable.display tbody tr.even.selected>.sorting_3,table.ip-geo-block-dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.ip-geo-block-dataTable.display tbody tr:hover>.sorting_1,table.ip-geo-block-dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.ip-geo-block-dataTable.display tbody tr:hover>.sorting_2,table.ip-geo-block-dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.ip-geo-block-dataTable.display tbody tr:hover>.sorting_3,table.ip-geo-block-dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.ip-geo-block-dataTable.display tbody tr:hover.selected>.sorting_1,table.ip-geo-block-dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.ip-geo-block-dataTable.display tbody tr:hover.selected>.sorting_2,table.ip-geo-block-dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.ip-geo-block-dataTable.display tbody tr:hover.selected>.sorting_3,table.ip-geo-block-dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.ip-geo-block-dataTable.no-footer{border-bottom:1px solid #111}table.ip-geo-block-dataTable.compact thead td,table.ip-geo-block-dataTable.compact thead th{padding:4px 17px 4px 4px}table.ip-geo-block-dataTable.compact tbody td,table.ip-geo-block-dataTable.compact tbody th,table.ip-geo-block-dataTable.compact tfoot td,table.ip-geo-block-dataTable.compact tfoot th{padding:4px}table.ip-geo-block-dataTable td.dt-left,table.ip-geo-block-dataTable th.dt-left{text-align:left}table.ip-geo-block-dataTable td.dataTables_empty,table.ip-geo-block-dataTable td.dt-center,table.ip-geo-block-dataTable th.dt-center{text-align:center}table.ip-geo-block-dataTable td.dt-right,table.ip-geo-block-dataTable th.dt-right{text-align:right}table.ip-geo-block-dataTable td.dt-justify,table.ip-geo-block-dataTable th.dt-justify{text-align:justify}table.ip-geo-block-dataTable tfoot td.dt-head-left,table.ip-geo-block-dataTable tfoot th.dt-head-left,table.ip-geo-block-dataTable thead td.dt-head-left,table.ip-geo-block-dataTable thead th.dt-head-left{text-align:left}table.ip-geo-block-dataTable tfoot td.dt-head-center,table.ip-geo-block-dataTable tfoot th.dt-head-center,table.ip-geo-block-dataTable thead td.dt-head-center,table.ip-geo-block-dataTable thead th.dt-head-center{text-align:center}table.ip-geo-block-dataTable tfoot td.dt-head-right,table.ip-geo-block-dataTable tfoot th.dt-head-right,table.ip-geo-block-dataTable thead td.dt-head-right,table.ip-geo-block-dataTable thead th.dt-head-right{text-align:right}table.ip-geo-block-dataTable tfoot td.dt-head-justify,table.ip-geo-block-dataTable tfoot th.dt-head-justify,table.ip-geo-block-dataTable thead td.dt-head-justify,table.ip-geo-block-dataTable thead th.dt-head-justify{text-align:justify}table.ip-geo-block-dataTable tbody td.dt-body-left,table.ip-geo-block-dataTable tbody th.dt-body-left{text-align:left}table.ip-geo-block-dataTable tbody td.dt-body-center,table.ip-geo-block-dataTable tbody th.dt-body-center{text-align:center}table.ip-geo-block-dataTable tbody td.dt-body-right,table.ip-geo-block-dataTable tbody th.dt-body-right{text-align:right}table.ip-geo-block-dataTable tbody td.dt-body-justify,table.ip-geo-block-dataTable tbody th.dt-body-justify{text-align:justify}table.ip-geo-block-dataTable,table.ip-geo-block-dataTable td,table.ip-geo-block-dataTable th{box-sizing:content-box}div[class*=ip-geo-block] .dataTables_wrapper{position:relative;clear:both;zoom:1}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{float:left}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_filter{float:right;text-align:right}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_filter input{margin-left:.5em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:.755em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:.25em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:.5em 1em;margin-left:2px;text-align:center;text-decoration:none!important;cursor:pointer;color:#333!important;border:1px solid transparent;border-radius:2px}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate .paginate_button.current,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333!important;border:1px solid #979797;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(100%,#dcdcdc));background:-webkit-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-moz-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-ms-linear-gradient(top,#fff 0,#dcdcdc 100%);background:-o-linear-gradient(top,#fff 0,#dcdcdc 100%);background:linear-gradient(to bottom,#fff 0,#dcdcdc 100%)}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{cursor:default;color:#666!important;border:1px solid transparent;background:0 0;box-shadow:none}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:#fff!important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#585858),color-stop(100%,#111));background:-webkit-linear-gradient(top,#585858 0,#111 100%);background:-moz-linear-gradient(top,#585858 0,#111 100%);background:-ms-linear-gradient(top,#585858 0,#111 100%);background:-o-linear-gradient(top,#585858 0,#111 100%);background:linear-gradient(to bottom,#585858 0,#111 100%)}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:0;background-color:#2b2b2b;background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#2b2b2b),color-stop(100%,#0c0c0c));background:-webkit-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-moz-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-ms-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:-o-linear-gradient(top,#2b2b2b 0,#0c0c0c 100%);background:linear-gradient(to bottom,#2b2b2b 0,#0c0c0c 100%);box-shadow:inset 0 0 3px #111}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:#fff;background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,.9)),color-stop(75%,rgba(255,255,255,.9)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%)}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_filter,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_info,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_processing{color:#333}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll{clear:both}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{-webkit-overflow-scrolling:touch}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th{vertical-align:middle}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}div[class*=ip-geo-block] .dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}div[class*=ip-geo-block] .dataTables_wrapper.no-footer div.dataTables_scrollBody>table,div[class*=ip-geo-block] .dataTables_wrapper.no-footer div.dataTables_scrollHead table.ip-geo-block-dataTable{border-bottom:none}div[class*=ip-geo-block] .dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width:767px){div[class*=ip-geo-block] .dataTables_wrapper .dataTables_info,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{float:none;text-align:center}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_paginate{margin-top:.5em}}@media screen and (max-width:640px){div[class*=ip-geo-block] .dataTables_wrapper .dataTables_filter,div[class*=ip-geo-block] .dataTables_wrapper .dataTables_length{float:none;text-align:center}div[class*=ip-geo-block] .dataTables_wrapper .dataTables_filter{margin-top:.5em}}
5
+
6
  /*! Responsive 2.1.1
7
  * 2014-2016 SpryMedia Ltd - datatables.net/license
8
  */
9
+ table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty,table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>th.child{cursor:default!important}table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before,table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>th.child:before{display:none!important}table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>td:first-child,table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>th:first-child{position:relative;padding-left:30px;cursor:pointer}table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before{top:9px;left:4px;height:14px;width:14px;display:block;position:absolute;color:#fff;border:2px solid #fff;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New',Courier,monospace;line-height:14px;content:'+';background-color:#31b131}table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{content:'-';background-color:#d33333}table.ip-geo-block-dataTable.dtr-inline.collapsed>tbody>tr.child td:before{display:none}table.ip-geo-block-dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,table.ip-geo-block-dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child{padding-left:27px}table.ip-geo-block-dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,table.ip-geo-block-dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before{top:5px;left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.ip-geo-block-dataTable.dtr-column>tbody>tr>td.control,table.ip-geo-block-dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.ip-geo-block-dataTable.dtr-column>tbody>tr>td.control:before,table.ip-geo-block-dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:#fff;border:2px solid #fff;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New',Courier,monospace;line-height:14px;content:'+';background-color:#31b131}table.ip-geo-block-dataTable.dtr-column>tbody>tr.parent td.control:before,table.ip-geo-block-dataTable.dtr-column>tbody>tr.parent th.control:before{content:'-';background-color:#d33333}table.ip-geo-block-dataTable>tbody>tr.child{padding:.5em 1em}table.ip-geo-block-dataTable>tbody>tr.child:hover{background:0 0!important}table.ip-geo-block-dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.ip-geo-block-dataTable>tbody>tr.child ul.dtr-details li{border-bottom:1px solid #efefef;padding:.5em 0}table.ip-geo-block-dataTable>tbody>tr.child ul.dtr-details li:first-child{padding-top:0}table.ip-geo-block-dataTable>tbody>tr.child ul.dtr-details li:last-child{border-bottom:none}table.ip-geo-block-dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:700}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid #000;border-radius:.5em;box-shadow:0 12px 30px rgba(0,0,0,.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0,0,0,.6)}@media screen and (max-width:767px){div.dtr-modal div.dtr-modal-display{width:95%}}
10
+
11
  /*! datatables.mark.js v2.0.1
12
  * Copyright (c) 2016-2017 Julian Motz
13
  * https://github.com/julmot/datatables.mark.js/blob/master/LICENSE
14
  */
15
+ mark{background:orange;color:#000}
admin/includes/class-admin-ajax.php CHANGED
@@ -90,11 +90,7 @@ class IP_Geo_Block_Admin_Ajax {
90
  $insert_value = array( $insert_value );
91
 
92
  $position = is_null( $position ) ? count( $base_array ) : intval( $position );
93
-
94
- $base_array = array_merge(
95
- array_splice( $base_array, 0, $position ),
96
- $insert_value, $base_array
97
- );
98
  }
99
 
100
  /**
@@ -120,7 +116,8 @@ class IP_Geo_Block_Admin_Ajax {
120
  ) ) . PHP_EOL;
121
 
122
  foreach ( IP_Geo_Block_Logs::restore_logs( $which ) as $data ) {
123
- $hook = array_shift( $data );
 
124
  self::array_insert( $data, $hook, 3 );
125
  $data[0] = IP_Geo_Block_Util::localdate( $data[0], 'Y-m-d H:i:s' );
126
  $data[7] = str_replace( ',', '‚', $data[7] ); // &#044; --> &#130;
@@ -149,11 +146,12 @@ class IP_Geo_Block_Admin_Ajax {
149
  $res = array();
150
 
151
  foreach ( $rows as $row ) {
 
152
  $row = array_map( 'esc_html', $row );
153
 
154
  if ( $options['anonymize'] ) {
155
- $row[2] = IP_Geo_Block_Util::anonymize_ip( $row[2] );
156
- $row[8] = IP_Geo_Block_Util::anonymize_ip( $row[8] );
157
  }
158
 
159
  $res[] = array(
@@ -248,8 +246,8 @@ class IP_Geo_Block_Admin_Ajax {
248
 
249
  foreach ( IP_Geo_Block_Logs::restore_cache() as $key => $val ) {
250
  if ( $anonymize ) {
251
- $key = IP_Geo_Block_Util::anonymize_ip( $key );
252
- $val['host'] = IP_Geo_Block_Util::anonymize_ip( $val['host'] );
253
  }
254
 
255
  $csv .= implode( ',', array(
@@ -284,8 +282,8 @@ class IP_Geo_Block_Admin_Ajax {
284
 
285
  foreach ( IP_Geo_Block_Logs::restore_cache() as $key => $val ) {
286
  if ( $anonymize ) {
287
- $key = IP_Geo_Block_Util::anonymize_ip( $key );
288
- $val['host'] = IP_Geo_Block_Util::anonymize_ip( $val['host'] );
289
  }
290
 
291
  $res[] = array(
@@ -428,7 +426,6 @@ endif; // TEST_RESTORE_NETWORK
428
 
429
  // Convert json to setting data
430
  $input = self::json_to_settings( $json );
431
- unset( $input['version'] );
432
 
433
  // Integrate posted data into current settings because if can be a part of hole data
434
  $input = $parent->array_replace_recursive(
@@ -517,6 +514,7 @@ endif; // TEST_RESTORE_NETWORK
517
  '[response_code]',
518
  '[response_msg]', // 3.0.0
519
  '[redirect_uri]', // 3.0.0
 
520
  '[validation][timing]', // 2.2.9
521
  '[validation][proxy]',
522
  '[validation][comment]',
@@ -564,6 +562,7 @@ endif; // TEST_RESTORE_NETWORK
564
  '[public][simulate]', // 3.0.0
565
  '[public][dnslkup]', // 3.0.3
566
  '[public][response_code]', // 3.0.3
 
567
  '[public][redirect_uri]', // 3.0.3
568
  '[public][behavior]', // 3.0.10
569
  '[behavior][time]', // 3.0.10
@@ -766,7 +765,6 @@ endif; // TEST_RESTORE_NETWORK
766
  $result += array( $matches[1] => $which );
767
  }
768
  }
769
- break;
770
  }
771
 
772
  return $result;
@@ -777,25 +775,22 @@ endif; // TEST_RESTORE_NETWORK
777
  *
778
  */
779
  public static function find_exceptions( $target ) {
780
- $res = array();
781
-
782
  switch ( $target ) {
783
  case 'find-admin':
 
784
  foreach ( array( 'action', 'page' ) as $which ) {
785
  $res += self::get_blocked_queries( $which );
786
  }
787
- break;
788
 
789
  case 'find-plugins':
790
- $res = self::get_blocked_queries( 'plugins' );
791
- break;
792
 
793
  case 'find-themes':
794
- $res = self::get_blocked_queries( 'themes' );
795
- break;
796
  }
797
 
798
- return $res;
799
  }
800
 
801
  /**
@@ -812,9 +807,23 @@ endif; // TEST_RESTORE_NETWORK
812
  $val = IP_Geo_Block_Lkup::gethostbyaddr( '8.8.8.8' );
813
  $key = microtime( TRUE ) - $key;
814
 
 
 
 
 
 
 
 
 
 
 
 
 
 
815
  // Server, PHP, WordPress
816
  $res = array(
817
  'Server:' => $_SERVER['SERVER_SOFTWARE'],
 
818
  'PHP:' => PHP_VERSION,
819
  'PHP SAPI:' => php_sapi_name(),
820
  'WordPress:' => $GLOBALS['wp_version'],
@@ -826,7 +835,8 @@ endif; // TEST_RESTORE_NETWORK
826
  'ZipArchive:' => class_exists( 'ZipArchive', FALSE ) ? 'yes' : 'no',
827
  'PECL phar:' => class_exists( 'PharData', FALSE ) ? 'yes' : 'no',
828
  'BC Math:' => (extension_loaded('gmp') ? 'gmp ' : '') . (function_exists('bcadd') ? 'yes' : 'no'),
829
- 'mb_strcut:' => function_exists( 'mb_strcut' ) ? 'yes' : 'no',
 
830
  'SQLite(PDO):' => extension_loaded( 'pdo_sqlite' ) ? 'yes' : 'no',
831
  'DNS lookup:' => ('8.8.8.8' !== $val ? 'available' : 'n/a') . sprintf( ' [%.1f msec]', $key * 1000.0 ),
832
  'User agent:' => $_SERVER['HTTP_USER_AGENT'],
90
  $insert_value = array( $insert_value );
91
 
92
  $position = is_null( $position ) ? count( $base_array ) : intval( $position );
93
+ $base_array = array_merge( array_splice( $base_array, 0, $position ), $insert_value, $base_array );
 
 
 
 
94
  }
95
 
96
  /**
116
  ) ) . PHP_EOL;
117
 
118
  foreach ( IP_Geo_Block_Logs::restore_logs( $which ) as $data ) {
119
+ $hook = array_shift( $data ); // remove `No`
120
+ $hook = array_shift( $data ); // extract `hook`
121
  self::array_insert( $data, $hook, 3 );
122
  $data[0] = IP_Geo_Block_Util::localdate( $data[0], 'Y-m-d H:i:s' );
123
  $data[7] = str_replace( ',', '‚', $data[7] ); // &#044; --> &#130;
146
  $res = array();
147
 
148
  foreach ( $rows as $row ) {
149
+ array_shift( $row ); // remove `No`
150
  $row = array_map( 'esc_html', $row );
151
 
152
  if ( $options['anonymize'] ) {
153
+ $row[2] = IP_Geo_Block_Util::anonymize_ip( $row[2], TRUE );
154
+ $row[8] = IP_Geo_Block_Util::anonymize_ip( $row[8], FALSE );
155
  }
156
 
157
  $res[] = array(
246
 
247
  foreach ( IP_Geo_Block_Logs::restore_cache() as $key => $val ) {
248
  if ( $anonymize ) {
249
+ $key = IP_Geo_Block_Util::anonymize_ip( $key, TRUE );
250
+ $val['host'] = IP_Geo_Block_Util::anonymize_ip( $val['host'], FALSE );
251
  }
252
 
253
  $csv .= implode( ',', array(
282
 
283
  foreach ( IP_Geo_Block_Logs::restore_cache() as $key => $val ) {
284
  if ( $anonymize ) {
285
+ $key = IP_Geo_Block_Util::anonymize_ip( $key, TRUE );
286
+ $val['host'] = IP_Geo_Block_Util::anonymize_ip( $val['host'], FALSE );
287
  }
288
 
289
  $res[] = array(
426
 
427
  // Convert json to setting data
428
  $input = self::json_to_settings( $json );
 
429
 
430
  // Integrate posted data into current settings because if can be a part of hole data
431
  $input = $parent->array_replace_recursive(
514
  '[response_code]',
515
  '[response_msg]', // 3.0.0
516
  '[redirect_uri]', // 3.0.0
517
+ '[restrict_api]', // 3.0.13
518
  '[validation][timing]', // 2.2.9
519
  '[validation][proxy]',
520
  '[validation][comment]',
562
  '[public][simulate]', // 3.0.0
563
  '[public][dnslkup]', // 3.0.3
564
  '[public][response_code]', // 3.0.3
565
+ '[public][response_msg]', // 3.0.3
566
  '[public][redirect_uri]', // 3.0.3
567
  '[public][behavior]', // 3.0.10
568
  '[behavior][time]', // 3.0.10
765
  $result += array( $matches[1] => $which );
766
  }
767
  }
 
768
  }
769
 
770
  return $result;
775
  *
776
  */
777
  public static function find_exceptions( $target ) {
 
 
778
  switch ( $target ) {
779
  case 'find-admin':
780
+ $res = array();
781
  foreach ( array( 'action', 'page' ) as $which ) {
782
  $res += self::get_blocked_queries( $which );
783
  }
784
+ return $res;
785
 
786
  case 'find-plugins':
787
+ return self::get_blocked_queries( 'plugins' );
 
788
 
789
  case 'find-themes':
790
+ return self::get_blocked_queries( 'themes' );
 
791
  }
792
 
793
+ return array();
794
  }
795
 
796
  /**
807
  $val = IP_Geo_Block_Lkup::gethostbyaddr( '8.8.8.8' );
808
  $key = microtime( TRUE ) - $key;
809
 
810
+ // MySQL (supress WordPress error: Unknown system variable 'block_encryption_mode')
811
+ $buf = @ini_set( 'output_buffering', 0 );
812
+ $dsp = @ini_set( 'display_errors', 0 );
813
+ $log = @ini_set( 'error_log', '/' . 'dev' . '/' . 'null' );
814
+ $err = @error_reporting( 0 );
815
+ global $wpdb;
816
+ $ver = $wpdb->get_var( 'SELECT @@GLOBAL.version' );
817
+ $bem = $wpdb->get_var( 'SELECT @@GLOBAL.block_encryption_mode' ); // `aes-128-ecb` @since MySQL 5.6.17
818
+ @ini_set( 'output_buffering', $buf );
819
+ @ini_set( 'display_errors', $dsp );
820
+ @ini_set( 'error_log', $log );
821
+ @error_reporting( $err );
822
+
823
  // Server, PHP, WordPress
824
  $res = array(
825
  'Server:' => $_SERVER['SERVER_SOFTWARE'],
826
+ 'MySQL:' => $ver . ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG && $bem ? ' (' . $bem . ')' : '' ),
827
  'PHP:' => PHP_VERSION,
828
  'PHP SAPI:' => php_sapi_name(),
829
  'WordPress:' => $GLOBALS['wp_version'],
835
  'ZipArchive:' => class_exists( 'ZipArchive', FALSE ) ? 'yes' : 'no',
836
  'PECL phar:' => class_exists( 'PharData', FALSE ) ? 'yes' : 'no',
837
  'BC Math:' => (extension_loaded('gmp') ? 'gmp ' : '') . (function_exists('bcadd') ? 'yes' : 'no'),
838
+ 'mb_strcut:' => function_exists( 'mb_strcut' ) ? 'yes' : 'no', // @since PHP 4.0.6
839
+ 'OpenSSL:' => function_exists( 'openssl_cipher_iv_length' ) ? 'yes' : 'no', // @since PHP 5.3.3
840
  'SQLite(PDO):' => extension_loaded( 'pdo_sqlite' ) ? 'yes' : 'no',
841
  'DNS lookup:' => ('8.8.8.8' !== $val ? 'available' : 'n/a') . sprintf( ' [%.1f msec]', $key * 1000.0 ),
842
  'User agent:' => $_SERVER['HTTP_USER_AGENT'],
admin/includes/tab-accesslog.php CHANGED
@@ -165,7 +165,7 @@ endif; // $options['validation']['reclogs']
165
  *
166
  */
167
  public static function validation_logs() {
168
- echo '<table id="', IP_Geo_Block::PLUGIN_NAME, '-validation-logs" class="dataTable display" cellspacing="0" width="100%">', "\n", '<thead></thead><tbody></tbody></table>', "\n";
169
  }
170
 
171
  public static function warn_accesslog() {
165
  *
166
  */
167
  public static function validation_logs() {
168
+ echo '<table id="', IP_Geo_Block::PLUGIN_NAME, '-validation-logs" class="', IP_Geo_Block::PLUGIN_NAME, '-dataTable display" cellspacing="0" width="100%">', "\n", '<thead></thead><tbody></tbody></table>', "\n";
169
  }
170
 
171
  public static function warn_accesslog() {
admin/includes/tab-geolocation.php CHANGED
@@ -39,7 +39,7 @@ class IP_Geo_Block_Admin_Tab {
39
  $provider = array_keys( $providers );
40
  add_settings_field(
41
  $option_name.'_'.$field,
42
- __( 'Geolocation service', 'ip-geo-block' ),
43
  array( $context, 'callback_field' ),
44
  $option_slug,
45
  $section,
@@ -83,7 +83,7 @@ class IP_Geo_Block_Admin_Tab {
83
  $field = 'anonymize';
84
  add_settings_field(
85
  $option_name.'_'.$field,
86
- __( '<dfn title="IP address is always encrypted on recording in cache and logs. Moreover, this option makes the IP address anonymous and restricted on sending to the 3rd parties such as geolocation APIs or whois service.">Anonymize IP address and restrict 3rd party APIs</dfn>', 'ip-geo-block' ),
87
  array( $context, 'callback_field' ),
88
  $option_slug,
89
  $section,
@@ -91,14 +91,15 @@ class IP_Geo_Block_Admin_Tab {
91
  'type' => 'checkbox',
92
  'option' => $option_name,
93
  'field' => $field,
94
- 'value' => ! empty( $options[ $field ] ) ? TRUE : FALSE,
95
  )
96
  );
97
 
 
98
  $field = 'get_location';
99
  add_settings_field(
100
  $option_name.'_'.$field,
101
- __( 'Find geolocation', 'ip-geo-block' ),
102
  array( $context, 'callback_field' ),
103
  $option_slug,
104
  $section,
39
  $provider = array_keys( $providers );
40
  add_settings_field(
41
  $option_name.'_'.$field,
42
+ __( 'Geolocation API', 'ip-geo-block' ),
43
  array( $context, 'callback_field' ),
44
  $option_slug,
45
  $section,
83
  $field = 'anonymize';
84
  add_settings_field(
85
  $option_name.'_'.$field,
86
+ __( '<dfn title="IP address is always encrypted on recording in Cache and Logs. Moreover, this option replaces the end of IP address with &#8220;***&#8221; to make it anonymous.">Anonymize IP address</dfn>', 'ip-geo-block' ),
87
  array( $context, 'callback_field' ),
88
  $option_slug,
89
  $section,
91
  'type' => 'checkbox',
92
  'option' => $option_name,
93
  'field' => $field,
94
+ 'value' => ( ! empty( $options[ $field ] ) || ! empty( $options['restrict_api'] ) ) ? TRUE : FALSE,
95
  )
96
  );
97
 
98
+ // Search geolocation
99
  $field = 'get_location';
100
  add_settings_field(
101
  $option_name.'_'.$field,
102
+ __( 'Search geolocation', 'ip-geo-block' ),
103
  array( $context, 'callback_field' ),
104
  $option_slug,
105
  $section,
admin/includes/tab-settings.php CHANGED
@@ -206,7 +206,7 @@ endif;
206
  __( '<dfn title="e.g. &#8220;192.0.64.0/18&#8221; for Jetpack server, &#8220;69.46.36.0/27&#8221; for WordFence server or &#8220;AS32934&#8221; for Facebook.">Whitelist of extra IP addresses prior to country code</dfn>', 'ip-geo-block' ) .
207
  ' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" title="Classless Inter-Domain Routing - Wikipedia">CIDR</a>' .
208
  ', <a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)' .
209
- '<a class="ip-geo-block-icon ip-geo-block-icon-cidr" title="' . $comma[5] . '"><span class="dashicons dashicons-sos"></span></a>',
210
  array( $context, 'callback_field' ),
211
  $option_slug,
212
  $section,
@@ -228,7 +228,7 @@ endif;
228
  __( '<dfn title="Server level access control is recommended (e.g. .htaccess).">Blacklist of extra IP addresses prior to country code</dfn>', 'ip-geo-block' ) .
229
  ' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" title="Classless Inter-Domain Routing - Wikipedia">CIDR</a>' .
230
  ', <a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)' .
231
- '<a class="ip-geo-block-icon ip-geo-block-icon-cidr" title="' . $comma[5] . '"><span class="dashicons dashicons-sos"></span></a>',
232
  array( $context, 'callback_field' ),
233
  $option_slug,
234
  $section,
@@ -296,7 +296,7 @@ endif;
296
  $list .= "</ul></li></ul>\n";
297
 
298
  // Verify capability
299
- $list .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the capabilities to be verified. Depending on the particular type of uploader, certain capability may be required. Default is &#8220;upload_files&#8221; for Administrator, Editor and Author. This verification will be skipped if empty.">Capabilities to be verified</dfn>', 'ip-geo-block' ) . '&nbsp;<span class="ip-geo-block-desc">' . __( '(&thinsp;See &#8220;<a rel="noreferrer" href="https://codex.wordpress.org/Roles_and_Capabilities" title="Roles and Capabilities &laquo; WordPress Codex">Roles and Capabilities</a>&#8221;&thinsp;)', 'ip-geo-block' ) . '</span>' . "\n";
300
  $list .= '<li class="ip-geo-block-hide"><ul><li><input type="text" id="ip_geo_block_settings_mimetype_capability" name="ip_geo_block_settings[mimetype][capability]" class="regular-text code" placeholder="upload_files" value="' . esc_attr( implode( ',', $options['mimetype']['capability'] ) ) . '" />' . $comma[0] . '</li></ul></li></ul>';
301
 
302
  // Prevent malicious file uploading
@@ -323,6 +323,31 @@ endif;
323
  )
324
  );
325
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  // Response code (RFC 2616)
327
  $field = 'response_code';
328
  add_settings_field(
@@ -388,31 +413,6 @@ endif;
388
  )
389
  );
390
 
391
- // Max number of failed login attempts per IP address
392
- $field = 'login_fails';
393
- add_settings_field(
394
- $option_name.'_'.$field,
395
- __( '<dfn title="This is applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221;. Lockout period is defined as expiration time at &#8220;Privacy and record settings&#8221;.">Max number of failed login attempts per IP address</dfn>', 'ip-geo-block' ),
396
- array( $context, 'callback_field' ),
397
- $option_slug,
398
- $section,
399
- array(
400
- 'type' => 'select',
401
- 'option' => $option_name,
402
- 'field' => $field,
403
- 'value' => $options[ $field ],
404
- 'list' => array(
405
- -1 => 'Disable',
406
- 0 => 0,
407
- 1 => 1,
408
- 3 => 3,
409
- 5 => 5,
410
- 7 => 7,
411
- 10 => 10,
412
- ),
413
- )
414
- );
415
-
416
  // Validation timing
417
  $field = 'validation';
418
  $key = 'timing';
@@ -624,8 +624,9 @@ endif;
624
  $desc = array(
625
  __( 'Regardless of the country code, it will block a malicious request to <code>%s&ctdot;/*.php</code>.', 'ip-geo-block' ),
626
  __( 'Select the item which causes unintended blocking in order to exclude from the validation target. Grayed item indicates &#8220;INACTIVE&#8221;.', 'ip-geo-block' ),
627
- __( 'It configures &#8220;%s&#8221; to validate a request to the PHP file which does not load WordPress core. Make sure to deny direct access to the hidden files beginning with a dot by the server\'s configuration.', 'ip-geo-block' ),
628
  __( 'Sorry, but your server type is not supported.', 'ip-geo-block' ),
 
629
  );
630
 
631
  // Set rewrite condition
@@ -785,9 +786,6 @@ endif;
785
  )
786
  );
787
 
788
- // Default for matching rule on front-end
789
- $rule[-1] = __( 'Follow &#8220;Validation rule settings&#8221;', 'ip-geo-block' );
790
-
791
  // Matching rule
792
  $field = 'public';
793
  $key = 'matching_rule';
@@ -803,7 +801,7 @@ endif;
803
  'field' => $field,
804
  'sub-field' => $key,
805
  'value' => $options[ $field ][ $key ],
806
- 'list' => $rule,
807
  )
808
  );
809
 
@@ -1071,7 +1069,7 @@ endif;
1071
  $key = 'simulate';
1072
  add_settings_field(
1073
  $option_name.'_'.$field.'_'.$key,
1074
- '<dfn title="' . __( 'It enables to simulate validation without deployment. The results can be found at &#8220;Public facing pages&#8221; in Logs.', 'ip-geo-block' ) . '">' . __( 'Simulation mode', 'ip-geo-block' ) . '</dfn>',
1075
  array( $context, 'callback_field' ),
1076
  $option_slug,
1077
  $section,
@@ -1090,15 +1088,15 @@ endif;
1090
  add_settings_section(
1091
  $section = $plugin_slug . '-recording',
1092
  __( 'Privacy and record settings', 'ip-geo-block' ),
1093
- array( __CLASS__, 'note_record' ),
1094
  $option_slug
1095
  );
1096
 
1097
- // Anonymize IP address and restrict 3rd party APIs
1098
  $field = 'anonymize';
1099
  add_settings_field(
1100
  $option_name.'_'.$field,
1101
- __( '<dfn title="IP address is always encrypted on recording in cache and logs. Moreover, this option makes the IP address anonymous and restricted on sending to the 3rd parties such as geolocation APIs or whois service.">Anonymize IP address and restrict 3rd party APIs</dfn>', 'ip-geo-block' ),
1102
  array( $context, 'callback_field' ),
1103
  $option_slug,
1104
  $section,
@@ -1110,11 +1108,62 @@ endif;
1110
  )
1111
  );
1112
 
1113
- // Record IP address cache
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1114
  $field = 'cache_hold';
1115
  add_settings_field(
1116
  $option_name.'_'.$field,
1117
- __( '<dfn title="This option enables to record the IP address, country code and failure counter of login attempts into the cache on database to minimize the impact on site speed.">Record &#8220;IP address cache&#8221;</dfn>', 'ip-geo-block' ),
1118
  array( $context, 'callback_field' ),
1119
  $option_slug,
1120
  $section,
@@ -1126,11 +1175,11 @@ endif;
1126
  )
1127
  );
1128
 
1129
- // Expiration time [sec] for IP address cache
1130
  $field = 'cache_time';
1131
  add_settings_field(
1132
  $option_name.'_'.$field,
1133
- sprintf( __( '<dfn title="If user authentication fails consecutively %d times, subsequent login will also be prohibited for this and garbage collection period.">Expiration time [sec] for &#8220;IP address cache&#8221;</dfn>', 'ip-geo-block' ), (int)$options['login_fails'] ),
1134
  array( $context, 'callback_field' ),
1135
  $option_slug,
1136
  $section,
@@ -1168,10 +1217,11 @@ endif;
1168
  )
1169
  );
1170
 
1171
- // $_POST keys to be recorded with their values in "Logs"
 
1172
  add_settings_field(
1173
- $option_name.'_'.$field.'_postkey',
1174
- __( '<dfn title="e.g. action, comment, log, pwd, FILES">$_POST keys to be recorded with their values in &#8220;Logs&#8221;</dfn>', 'ip-geo-block' ),
1175
  array( $context, 'callback_field' ),
1176
  $option_slug,
1177
  $section,
@@ -1179,16 +1229,15 @@ endif;
1179
  'type' => 'text',
1180
  'option' => $option_name,
1181
  'field' => $field,
1182
- 'sub-field' => 'postkey',
1183
- 'value' => $options[ $field ]['postkey'],
1184
- 'after' => $comma[0],
1185
  )
1186
  );
1187
 
1188
- $key = 'explogs';
1189
  add_settings_field(
1190
- $option_name.'_'.$field.'_'.$key,
1191
- sprintf( __( '<dfn title="The maximum number of entries in the logs is also limited to %d.">Expiration time [sec] for &#8220;Logs&#8221;</dfn>', 'ip-geo-block' ), $options[ $field ]['maxlogs'] ),
1192
  array( $context, 'callback_field' ),
1193
  $option_slug,
1194
  $section,
@@ -1196,8 +1245,9 @@ endif;
1196
  'type' => 'text',
1197
  'option' => $option_name,
1198
  'field' => $field,
1199
- 'sub-field' => $key,
1200
- 'value' => $options[ $field ][ $key ],
 
1201
  )
1202
  );
1203
 
@@ -1206,7 +1256,7 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1206
  $key = 'maxlogs';
1207
  add_settings_field(
1208
  $option_name.'_'.$field.'_'.$key,
1209
- __( 'Maximum entries of &#8220;Logs&#8221;', 'ip-geo-block' ),
1210
  array( $context, 'callback_field' ),
1211
  $option_slug,
1212
  $section,
@@ -1223,7 +1273,7 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1223
  $field = 'live_update';
1224
  add_settings_field(
1225
  $option_name.'_'.$field,
1226
- __( '<dfn title="Select SQLite database source.">Database source of SQLite for &#8220;Live update&#8221;</dfn>', 'ip-geo-block' ),
1227
  array( $context, 'callback_field' ),
1228
  $option_slug,
1229
  $section,
@@ -1250,7 +1300,7 @@ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1250
  $field = 'reset_live';
1251
  add_settings_field(
1252
  $option_name.'_'.$field,
1253
- __( 'Reset database source of &#8220;Live update&#8221;', 'ip-geo-block' ),
1254
  array( $context, 'callback_field' ),
1255
  $option_slug,
1256
  $section,
@@ -1268,11 +1318,11 @@ endif;
1268
  $tmp = wp_next_scheduled( IP_Geo_Block::CACHE_NAME );
1269
  $tmp = $tmp ? IP_Geo_Block_Util::localdate( $tmp ) : '<span class="ip-geo-block-warn">' . __( 'Task could not be found in WP-Cron. Please try to deactivate this plugin once and activate again.', 'ip-geo-block' ). '</span>';
1270
 
1271
- // Cleanup interval [sec] for Logs and IP address cache
1272
  $field = 'cache_time_gc';
1273
  add_settings_field(
1274
  $option_name.'_'.$field,
1275
- __( '<dfn title="This option enables to schedule the WP-Cron event to remove the expired entries in ip address cache and logs.">Cleanup interval [sec] for &#8220;IP address cache&#8221; and &#8220;Logs&#8221;</dfn>', 'ip-geo-block' ),
1276
  array( $context, 'callback_field' ),
1277
  $option_slug,
1278
  $section,
@@ -1285,41 +1335,6 @@ endif;
1285
  )
1286
  );
1287
 
1288
- // Record "Statistics"
1289
- $field = 'save_statistics';
1290
- add_settings_field(
1291
- $option_name.'_'.$field,
1292
- __( '<dfn title="This option enables to record the number blocked countries and the number of blocked requests per day.">Record &#8220;Statistics&#8221;</dfn>', 'ip-geo-block' ),
1293
- array( $context, 'callback_field' ),
1294
- $option_slug,
1295
- $section,
1296
- array(
1297
- 'type' => 'checkbox',
1298
- 'option' => $option_name,
1299
- 'field' => $field,
1300
- 'value' => $options[ $field ],
1301
- )
1302
- );
1303
-
1304
- if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1305
- $field = 'validation';
1306
- $key = 'recdays';
1307
- add_settings_field(
1308
- $option_name.'_'.$field.'_'.$key,
1309
- __( 'Maximum period for &#8220;Statistics&#8221; [day]', 'ip-geo-block' ),
1310
- array( $context, 'callback_field' ),
1311
- $option_slug,
1312
- $section,
1313
- array(
1314
- 'type' => 'text',
1315
- 'option' => $option_name,
1316
- 'field' => $field,
1317
- 'sub-field' => $key,
1318
- 'value' => $options[ $field ][ $key ],
1319
- )
1320
- );
1321
- endif;
1322
-
1323
  // Remove all settings and records at uninstallation
1324
  $field = 'clean_uninstall';
1325
  add_settings_field(
@@ -1350,8 +1365,8 @@ endif;
1350
  $provider = IP_Geo_Block_Provider::get_providers( 'key' ); // all available providers
1351
  $providers = IP_Geo_Block_Provider::get_addons( $options['providers'] ); // only local
1352
 
1353
- // Disable 3rd parties API in case of 'anonymize'
1354
- if ( $options['anonymize'] ) {
1355
  foreach ( array_keys( $provider ) as $key ) {
1356
  if ( ! in_array( $key, $providers, TRUE ) )
1357
  $provider[ $key ] = is_string( $provider[ $key ] ) ? '-1' : -1;
@@ -1362,7 +1377,7 @@ endif;
1362
  $field = 'providers';
1363
  add_settings_field(
1364
  $option_name.'_'.$field,
1365
- __( '<dfn title="IP address cache and local database are scanned at the top priority.">API selection and key settings</dfn>', 'ip-geo-block' ),
1366
  array( $context, 'callback_field' ),
1367
  $option_slug,
1368
  $section,
@@ -1400,7 +1415,7 @@ endif;
1400
  *----------------------------------------*/
1401
  if ( empty( $providers ) ) {
1402
  $context->add_admin_notice( 'error', sprintf(
1403
- __( 'Can not find geolocation API libraries in <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="http://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' ),
1404
  apply_filters( 'ip-geo-block-api-dir', basename( WP_CONTENT_DIR ) )
1405
  ) );
1406
  }
@@ -1566,13 +1581,11 @@ endif;
1566
  );
1567
  }
1568
 
1569
- $desc = __( 'You need to click the &#8220;Save Changes&#8221; button for imported settings to take effect.', 'ip-geo-block' );
1570
-
1571
  // Export / Import settings
1572
  $field = 'export-import';
1573
  add_settings_field(
1574
  $option_name.'_'.$field,
1575
- sprintf( '<dfn title="%s">' . __( 'Export / Import settings', 'ip-geo-block' ) . '</dfn>', $desc ),
1576
  array( $context, 'callback_field' ),
1577
  $option_slug,
1578
  $section,
@@ -1589,7 +1602,7 @@ endif;
1589
  $field = 'pre-defined';
1590
  add_settings_field(
1591
  $option_name.'_'.$field,
1592
- sprintf( '<dfn title="%s">' . __( 'Import pre-defined settings', 'ip-geo-block' ) . '</dfn>', $desc ),
1593
  array( $context, 'callback_field' ),
1594
  $option_slug,
1595
  $section,
@@ -1641,7 +1654,7 @@ endif;
1641
  $field = 'show-info';
1642
  add_settings_field(
1643
  $option_name.'_'.$field,
1644
- __( '<dfn title="When an unexpected blocking has occurred, please press the button to find the blocked request in the dumped information which may help to solve the issue.">Diagnostic information</dfn><br />[ <a rel="noreferrer" href="https://wordpress.org/support/plugin/ip-geo-block" title="WordPress &#8250; Support &raquo; IP Geo Block">support forum</a> ]', 'ip-geo-block' ),
1645
  array( $context, 'callback_field' ),
1646
  $option_slug,
1647
  $section,
@@ -1672,8 +1685,8 @@ endif;
1672
  public static function note_services() {
1673
  echo
1674
  '<ul class="ip-geo-block-note">', "\n",
1675
- '<li>', __( 'While Geolite2&thinsp;/&thinsp;Maxmind and IP2Location will fetch the local databases, others will pass an IP address to the 3rd parties\' API via HTTP.', 'ip-geo-block' ), '</li>', "\n",
1676
- '<li>', __( 'Please select the appropriate APIs to fit the privacy law&thinsp;/&thinsp;regulation in your country&thinsp;/&thinsp;region.', 'ip-geo-block' ), '</li>', "\n",
1677
  '</ul>', "\n";
1678
  }
1679
 
@@ -1695,7 +1708,7 @@ endif;
1695
  '</ul>', "\n";
1696
  }
1697
 
1698
- public static function note_record() {
1699
  echo
1700
  '<ul class="ip-geo-block-note">', "\n",
1701
  '<li>', __( 'Please refer to the document &#8220;<a rel="noreferrer" href="http://www.ipgeoblock.com/codex/record-settings-and-logs.html" title="Codex | IP Geo Block">Record settings and logs</a>&#8221; for details.', 'ip-geo-block' ), '</li>', "\n",
206
  __( '<dfn title="e.g. &#8220;192.0.64.0/18&#8221; for Jetpack server, &#8220;69.46.36.0/27&#8221; for WordFence server or &#8220;AS32934&#8221; for Facebook.">Whitelist of extra IP addresses prior to country code</dfn>', 'ip-geo-block' ) .
207
  ' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" title="Classless Inter-Domain Routing - Wikipedia">CIDR</a>' .
208
  ', <a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)' .
209
+ '<a class="ip-geo-block-icon ip-geo-block-icon-cidr" title="' . $comma[5] . '"><span class="ip-geo-block-icon-calc"></span></a>',
210
  array( $context, 'callback_field' ),
211
  $option_slug,
212
  $section,
228
  __( '<dfn title="Server level access control is recommended (e.g. .htaccess).">Blacklist of extra IP addresses prior to country code</dfn>', 'ip-geo-block' ) .
229
  ' (<a rel="noreferrer" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing" title="Classless Inter-Domain Routing - Wikipedia">CIDR</a>' .
230
  ', <a rel="noreferrer" href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)" title="Autonomous system (Internet) - Wikipedia">ASN</a>)' .
231
+ '<a class="ip-geo-block-icon ip-geo-block-icon-cidr" title="' . $comma[5] . '"><span class="ip-geo-block-icon ip-geo-block-icon-calc"></span></a>',
232
  array( $context, 'callback_field' ),
233
  $option_slug,
234
  $section,
296
  $list .= "</ul></li></ul>\n";
297
 
298
  // Verify capability
299
+ $list .= '<ul class="ip-geo-block-settings-folding ip-geo-block-dropup">' . __( '<dfn title="Specify the capabilities to be verified. Depending on the particular type of uploader, certain capability may be required. Default is &#8220;upload_files&#8221; for Administrator, Editor and Author. This verification will be skipped if empty.">Capabilities to be verified</dfn>', 'ip-geo-block' ) . '&nbsp;<span class="ip-geo-block-desc">' . __( '( See &#8220;<a rel="noreferrer" href="https://codex.wordpress.org/Roles_and_Capabilities" title="Roles and Capabilities &laquo; WordPress Codex">Roles and Capabilities</a>&#8221; )', 'ip-geo-block' ) . '</span>' . "\n";
300
  $list .= '<li class="ip-geo-block-hide"><ul><li><input type="text" id="ip_geo_block_settings_mimetype_capability" name="ip_geo_block_settings[mimetype][capability]" class="regular-text code" placeholder="upload_files" value="' . esc_attr( implode( ',', $options['mimetype']['capability'] ) ) . '" />' . $comma[0] . '</li></ul></li></ul>';
301
 
302
  // Prevent malicious file uploading
323
  )
324
  );
325
 
326
+ // Max number of failed login attempts per IP address
327
+ $field = 'login_fails';
328
+ add_settings_field(
329
+ $option_name.'_'.$field,
330
+ __( '<dfn title="This is applied to &#8220;XML-RPC&#8221; and &#8220;Login form&#8221;. Lockout period is defined as expiration time of &#8220;IP address Cache&#8221; in &#8220;Privacy and record settings&#8221; section.">Max number of failed login attempts per IP address</dfn>', 'ip-geo-block' ),
331
+ array( $context, 'callback_field' ),
332
+ $option_slug,
333
+ $section,
334
+ array(
335
+ 'type' => 'select',
336
+ 'option' => $option_name,
337
+ 'field' => $field,
338
+ 'value' => $options[ $field ],
339
+ 'list' => array(
340
+ -1 => 'Disable',
341
+ 0 => 0,
342
+ 1 => 1,
343
+ 3 => 3,
344
+ 5 => 5,
345
+ 7 => 7,
346
+ 10 => 10,
347
+ ),
348
+ )
349
+ );
350
+
351
  // Response code (RFC 2616)
352
  $field = 'response_code';
353
  add_settings_field(
413
  )
414
  );
415
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
  // Validation timing
417
  $field = 'validation';
418
  $key = 'timing';
624
  $desc = array(
625
  __( 'Regardless of the country code, it will block a malicious request to <code>%s&ctdot;/*.php</code>.', 'ip-geo-block' ),
626
  __( 'Select the item which causes unintended blocking in order to exclude from the validation target. Grayed item indicates &#8220;INACTIVE&#8221;.', 'ip-geo-block' ),
627
+ __( 'It configures &#8220;%s&#8221; to validate a direct request to the PHP file which does not load WordPress core. Make sure to deny direct access to the hidden files beginning with a dot by the server\'s configuration.', 'ip-geo-block' ),
628
  __( 'Sorry, but your server type is not supported.', 'ip-geo-block' ),
629
+ __( 'You need to click the &#8220;Save Changes&#8221; button for imported settings to take effect.', 'ip-geo-block' ),
630
  );
631
 
632
  // Set rewrite condition
786
  )
787
  );
788
 
 
 
 
789
  // Matching rule
790
  $field = 'public';
791
  $key = 'matching_rule';
801
  'field' => $field,
802
  'sub-field' => $key,
803
  'value' => $options[ $field ][ $key ],
804
+ 'list' => array( -1 => __( 'Follow &#8220;Validation rule settings&#8221;', 'ip-geo-block' ) ) + $rule,
805
  )
806
  );
807
 
1069
  $key = 'simulate';
1070
  add_settings_field(
1071
  $option_name.'_'.$field.'_'.$key,
1072
+ '<dfn title="' . __( 'It enables to simulate validation without deployment. The results can be found as &#8220;public&#8221; in Logs.', 'ip-geo-block' ) . '">' . __( 'Simulation mode', 'ip-geo-block' ) . '</dfn>',
1073
  array( $context, 'callback_field' ),
1074
  $option_slug,
1075
  $section,
1088
  add_settings_section(
1089
  $section = $plugin_slug . '-recording',
1090
  __( 'Privacy and record settings', 'ip-geo-block' ),
1091
+ array( __CLASS__, 'note_privacy' ),
1092
  $option_slug
1093
  );
1094
 
1095
+ // Anonymize IP address
1096
  $field = 'anonymize';
1097
  add_settings_field(
1098
  $option_name.'_'.$field,
1099
+ __( '<dfn title="IP address is always encrypted on recording in Cache and Logs. Moreover, this option replaces the end of IP address with &#8220;***&#8221; to make it anonymous.">Anonymize IP address</dfn>', 'ip-geo-block' ),
1100
  array( $context, 'callback_field' ),
1101
  $option_slug,
1102
  $section,
1108
  )
1109
  );
1110
 
1111
+ // Do not send IP address to external APIs
1112
+ $field = 'restrict_api';
1113
+ add_settings_field(
1114
+ $option_name.'_'.$field,
1115
+ __( '<dfn title="This option restricts not to send IP address to the external Geolocation APIs.">Do not send IP address to external APIs</dfn>', 'ip-geo-block' ),
1116
+ array( $context, 'callback_field' ),
1117
+ $option_slug,
1118
+ $section,
1119
+ array(
1120
+ 'type' => 'checkbox',
1121
+ 'option' => $option_name,
1122
+ 'field' => $field,
1123
+ 'value' => ! empty( $options[ $field ] ),
1124
+ )
1125
+ );
1126
+
1127
+ // Record "Statistics"
1128
+ $field = 'save_statistics';
1129
+ add_settings_field(
1130
+ $option_name.'_'.$field,
1131
+ __( '<dfn title="This option enables to record the number blocked countries and the number of blocked requests per day.">Record &#8220;Statistics&#8221;</dfn>', 'ip-geo-block' ),
1132
+ array( $context, 'callback_field' ),
1133
+ $option_slug,
1134
+ $section,
1135
+ array(
1136
+ 'type' => 'checkbox',
1137
+ 'option' => $option_name,
1138
+ 'field' => $field,
1139
+ 'value' => $options[ $field ],
1140
+ )
1141
+ );
1142
+
1143
+ if ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG ):
1144
+ $field = 'validation';
1145
+ $key = 'recdays';
1146
+ add_settings_field(
1147
+ $option_name.'_'.$field.'_'.$key,
1148
+ '<div class="ip-geo-block-subitem">' . __( 'Maximum period for &#8220;Statistics&#8221; [days]', 'ip-geo-block' ) . '</div>',
1149
+ array( $context, 'callback_field' ),
1150
+ $option_slug,
1151
+ $section,
1152
+ array(
1153
+ 'type' => 'text',
1154
+ 'option' => $option_name,
1155
+ 'field' => $field,
1156
+ 'sub-field' => $key,
1157
+ 'value' => $options[ $field ][ $key ],
1158
+ )
1159
+ );
1160
+ endif;
1161
+
1162
+ // Record IP address Cache
1163
  $field = 'cache_hold';
1164
  add_settings_field(
1165
  $option_name.'_'.$field,
1166
+ __( '<dfn title="This option enables to record the IP address, country code and failure counter of login attempts into the cache on database to minimize the impact on site speed.">Record &#8220;IP address Cache&#8221;</dfn>', 'ip-geo-block' ),
1167
  array( $context, 'callback_field' ),
1168
  $option_slug,
1169
  $section,
1175
  )
1176
  );
1177
 
1178
+ // Expiration time [sec] for each entry
1179
  $field = 'cache_time';
1180
  add_settings_field(
1181
  $option_name.'_'.$field,
1182
+ '<div class="ip-geo-block-subitem">' . __( '<dfn title="If user authentication fails consecutively beyond &#8220;Max number of failed login attempts per IP address&#8221;, subsequent login will also be prohibited for this period.">Expiration time [sec] for each entry</dfn>', 'ip-geo-block' ) . '</div>',
1183
  array( $context, 'callback_field' ),
1184
  $option_slug,
1185
  $section,
1217
  )
1218
  );
1219
 
1220
+ // Expiration time [days] for each entry
1221
+ $key = 'explogs';
1222
  add_settings_field(
1223
+ $option_name.'_'.$field.'_'.$key,
1224
+ '<div class="ip-geo-block-subitem">' . sprintf( __( '<dfn title="The maximum number of entries in the logs is also limited to %d.">Expiration time [days] for each entry</dfn>', 'ip-geo-block' ), $options[ $field ]['maxlogs'] ) . '</div>',
1225
  array( $context, 'callback_field' ),
1226
  $option_slug,
1227
  $section,
1229
  'type' => 'text',
1230
  'option' => $option_name,
1231
  'field' => $field,
1232
+ 'sub-field' => $key,
1233
+ 'value' => $options[ $field ][ $key ],
 
1234
  )
1235
  );
1236
 
1237
+ // $_POST key to record with value
1238
  add_settings_field(
1239
+ $option_name.'_'.$field.'_postkey',
1240
+ '<div class="ip-geo-block-subitem">' . __( '<dfn title="e.g. action, comment, log, pwd, FILES">$_POST key to record with value</dfn>', 'ip-geo-block' ) . '</div>',
1241
  array( $context, 'callback_field' ),
1242
  $option_slug,
1243
  $section,
1245
  'type' => 'text',
1246
  'option' => $option_name,
1247
  'field' => $field,
1248
+ 'sub-field' => 'postkey',
1249
+ 'value' => $options[ $field ]['postkey'],
1250
+ 'after' => $comma[0],
1251
  )
1252
  );
1253
 
1256
  $key = 'maxlogs';
1257
  add_settings_field(
1258
  $option_name.'_'.$field.'_'.$key,
1259
+ '<div class="ip-geo-block-subitem">' . __( 'Maximum entries of &#8220;Logs&#8221;', 'ip-geo-block' ) . '</div>',
1260
  array( $context, 'callback_field' ),
1261
  $option_slug,
1262
  $section,
1273
  $field = 'live_update';
1274
  add_settings_field(
1275
  $option_name.'_'.$field,
1276
+ '<div class="ip-geo-block-subitem">' . __( '<dfn title="Select SQLite database source.">Database source of SQLite for &#8220;Live update&#8221;</dfn>', 'ip-geo-block' ) . '</div>',
1277
  array( $context, 'callback_field' ),
1278
  $option_slug,
1279
  $section,
1300
  $field = 'reset_live';
1301
  add_settings_field(
1302
  $option_name.'_'.$field,
1303
+ '<div class="ip-geo-block-subitem">' . __( 'Reset database source of &#8220;Live update&#8221;', 'ip-geo-block' ) . '</div>',
1304
  array( $context, 'callback_field' ),
1305
  $option_slug,
1306
  $section,
1318
  $tmp = wp_next_scheduled( IP_Geo_Block::CACHE_NAME );
1319
  $tmp = $tmp ? IP_Geo_Block_Util::localdate( $tmp ) : '<span class="ip-geo-block-warn">' . __( 'Task could not be found in WP-Cron. Please try to deactivate this plugin once and activate again.', 'ip-geo-block' ). '</span>';
1320
 
1321
+ // Interval [sec] to cleanup expired entries of IP address
1322
  $field = 'cache_time_gc';
1323
  add_settings_field(
1324
  $option_name.'_'.$field,
1325
+ __( '<dfn title="This option enables to schedule the WP-Cron event to remove the expired entries in &#8220;IP address Cache&#8221; and &#8220;Logs&#8221;.">Interval [sec] to cleanup expired entries of IP address</dfn>', 'ip-geo-block' ),
1326
  array( $context, 'callback_field' ),
1327
  $option_slug,
1328
  $section,
1335
  )
1336
  );
1337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1338
  // Remove all settings and records at uninstallation
1339
  $field = 'clean_uninstall';
1340
  add_settings_field(
1365
  $provider = IP_Geo_Block_Provider::get_providers( 'key' ); // all available providers
1366
  $providers = IP_Geo_Block_Provider::get_addons( $options['providers'] ); // only local
1367
 
1368
+ // Disable 3rd parties API
1369
+ if ( ! empty( $options['restrict_api'] ) ) {
1370
  foreach ( array_keys( $provider ) as $key ) {
1371
  if ( ! in_array( $key, $providers, TRUE ) )
1372
  $provider[ $key ] = is_string( $provider[ $key ] ) ? '-1' : -1;
1377
  $field = 'providers';
1378
  add_settings_field(
1379
  $option_name.'_'.$field,
1380
+ __( '<dfn title="IP address Cache and local databases are scanned at the top priority.">API selection and key settings</dfn>', 'ip-geo-block' ),
1381
  array( $context, 'callback_field' ),
1382
  $option_slug,
1383
  $section,
1415
  *----------------------------------------*/
1416
  if ( empty( $providers ) ) {
1417
  $context->add_admin_notice( 'error', sprintf(
1418
+ __( 'Can not find Geolocation API libraries in <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="http://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' ),
1419
  apply_filters( 'ip-geo-block-api-dir', basename( WP_CONTENT_DIR ) )
1420
  ) );
1421
  }
1581
  );
1582
  }
1583
 
 
 
1584
  // Export / Import settings
1585
  $field = 'export-import';
1586
  add_settings_field(
1587
  $option_name.'_'.$field,
1588
+ sprintf( '<dfn title="%s">' . __( 'Export / Import settings', 'ip-geo-block' ) . '</dfn>', $desc[4] ),
1589
  array( $context, 'callback_field' ),
1590
  $option_slug,
1591
  $section,
1602
  $field = 'pre-defined';
1603
  add_settings_field(
1604
  $option_name.'_'.$field,
1605
+ sprintf( '<dfn title="%s">' . __( 'Import pre-defined settings', 'ip-geo-block' ) . '</dfn>', $desc[4] ),
1606
  array( $context, 'callback_field' ),
1607
  $option_slug,
1608
  $section,
1654
  $field = 'show-info';
1655
  add_settings_field(
1656
  $option_name.'_'.$field,
1657
+ __( '<dfn title="When you have some unexpected blocking experiences, please press the button to find the blocked requests at the end of dumped information which may help you to solve the issues.">Diagnostic information</dfn><br />[ <a rel="noreferrer" href="https://wordpress.org/support/plugin/ip-geo-block" title="WordPress &#8250; Support &raquo; IP Geo Block">support forum</a> ]', 'ip-geo-block' ),
1658
  array( $context, 'callback_field' ),
1659
  $option_slug,
1660
  $section,
1685
  public static function note_services() {
1686
  echo
1687
  '<ul class="ip-geo-block-note">', "\n",
1688
+ '<li>', __( 'While Geolite2 / Maxmind and IP2Location will fetch the local databases, others will pass an IP address to the 3rd parties\' API via HTTP.', 'ip-geo-block' ), '</li>', "\n",
1689
+ '<li>', __( 'Please select the appropriate APIs to fit the privacy law / regulation in your country / region.', 'ip-geo-block' ), '</li>', "\n",
1690
  '</ul>', "\n";
1691
  }
1692
 
1708
  '</ul>', "\n";
1709
  }
1710
 
1711
+ public static function note_privacy() {
1712
  echo
1713
  '<ul class="ip-geo-block-note">', "\n",
1714
  '<li>', __( 'Please refer to the document &#8220;<a rel="noreferrer" href="http://www.ipgeoblock.com/codex/record-settings-and-logs.html" title="Codex | IP Geo Block">Record settings and logs</a>&#8221; for details.', 'ip-geo-block' ), '</li>', "\n",
admin/includes/tab-statistics.php CHANGED
@@ -210,11 +210,11 @@ if ( $options['validation']['reclogs'] ) :
210
  endif;
211
 
212
  /*----------------------------------------*
213
- * IP address in cache
214
  *----------------------------------------*/
215
  add_settings_section(
216
  $section = $plugin_slug . '-cache',
217
- __( 'Statistics in IP address cache', 'ip-geo-block' ),
218
  ( $options['cache_hold'] ?
219
  array( __CLASS__, 'statistics_cache' ) :
220
  array( __CLASS__, 'warn_ipadr_cache' )
@@ -378,7 +378,7 @@ endif;
378
  $key = esc_html( $key );
379
 
380
  if ( 'ip' === $slug && $options['anonymize'] )
381
- $link = $key = preg_replace( '/\d{1,3}$/', '***', $link );
382
 
383
  echo '<li><code>';
384
  echo str_replace(
@@ -400,11 +400,11 @@ endif;
400
  }
401
 
402
  /**
403
- * Render IP address cache
404
  *
405
  */
406
  public static function statistics_cache() {
407
- echo '<table id="', IP_Geo_Block::PLUGIN_NAME, '-statistics-cache" class="dataTable display" cellspacing="0" width="100%">', "\n", '<thead></thead><tbody></tbody></table>', "\n";
408
  }
409
 
410
  /**
@@ -428,7 +428,7 @@ endif;
428
  public static function warn_ipadr_cache() {
429
  $context = IP_Geo_Block_Admin::get_instance();
430
  $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
431
- echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
432
  echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record IP address in cache.', 'ip-geo-block' ), '</p>', "\n";
433
  }
434
 
210
  endif;
211
 
212
  /*----------------------------------------*
213
+ * Statistics in IP address Cache
214
  *----------------------------------------*/
215
  add_settings_section(
216
  $section = $plugin_slug . '-cache',
217
+ __( 'Statistics in IP address Cache', 'ip-geo-block' ),
218
  ( $options['cache_hold'] ?
219
  array( __CLASS__, 'statistics_cache' ) :
220
  array( __CLASS__, 'warn_ipadr_cache' )
378
  $key = esc_html( $key );
379
 
380
  if ( 'ip' === $slug && $options['anonymize'] )
381
+ $link = $key = IP_Geo_Block_Util::anonymize_ip( $link );
382
 
383
  echo '<li><code>';
384
  echo str_replace(
400
  }
401
 
402
  /**
403
+ * Render IP address Cache
404
  *
405
  */
406
  public static function statistics_cache() {
407
+ echo '<table id="', IP_Geo_Block::PLUGIN_NAME, '-statistics-cache" class="', IP_Geo_Block::PLUGIN_NAME, '-dataTable display" cellspacing="0" width="100%">', "\n", '<thead></thead><tbody></tbody></table>', "\n";
408
  }
409
 
410
  /**
428
  public static function warn_ipadr_cache() {
429
  $context = IP_Geo_Block_Admin::get_instance();
430
  $url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
431
+ echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord &#8220;IP address Cache&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
432
  echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record IP address in cache.', 'ip-geo-block' ), '</p>', "\n";
433
  }
434
 
admin/js/admin.js CHANGED
@@ -878,7 +878,7 @@
878
  texp = /(<([^>]+)>)/ig, // regular expression to strip tag
879
  hexp = /data-hash=[\W]([\w]+)[\W]/i, // regular expression to extract hash
880
  data = { IP: [], AS: [] }, // IP address and AS number
881
- hash, cell, cells = $('table.dataTable').find('td>input:checked');
882
 
883
  if (!cmd) {
884
  return false;
@@ -943,7 +943,7 @@
943
 
944
  // Jump to search tab with opening a new window
945
  // @note: `click` cannot be `off` because it's a root.
946
- $('table.dataTable tbody').on('click', 'a', function (/*event*/) {
947
  var p = window.location.search.slice(1).split('&'),
948
  n = p.length, q = {}, i, j;
949
 
@@ -1337,7 +1337,7 @@
1337
  /*--------------------------------
1338
  * Privacy and record settings
1339
  *--------------------------------*/
1340
- $(ID('@', 'anonymize')).on('change', function (/*event*/) {
1341
  $('input[class*="remote"]').prop('disabled', $(this).prop('checked'));
1342
  }).trigger('change');
1343
 
@@ -1862,7 +1862,7 @@
1862
 
1863
  if (ip) {
1864
  // Anonymize IP address
1865
- if ($(ID('@', 'anonymize' )).prop('checked')) {
1866
  ip = ip.replace(/([\.\:])\w{1,4}$/, '$1' + '0');
1867
  $(ID('@', 'ip_address')).val(ip);
1868
  }
878
  texp = /(<([^>]+)>)/ig, // regular expression to strip tag
879
  hexp = /data-hash=[\W]([\w]+)[\W]/i, // regular expression to extract hash
880
  data = { IP: [], AS: [] }, // IP address and AS number
881
+ hash, cell, cells = $('table' + ID('.', 'dataTable')).find('td>input:checked');
882
 
883
  if (!cmd) {
884
  return false;
943
 
944
  // Jump to search tab with opening a new window
945
  // @note: `click` cannot be `off` because it's a root.
946
+ $('table' + ID('.', 'dataTable') + ' tbody').on('click', 'a', function (/*event*/) {
947
  var p = window.location.search.slice(1).split('&'),
948
  n = p.length, q = {}, i, j;
949
 
1337
  /*--------------------------------
1338
  * Privacy and record settings
1339
  *--------------------------------*/
1340
+ $(ID('@', 'restrict_api')).on('change', function (/*event*/) {
1341
  $('input[class*="remote"]').prop('disabled', $(this).prop('checked'));
1342
  }).trigger('change');
1343
 
1862
 
1863
  if (ip) {
1864
  // Anonymize IP address
1865
+ if ($(ID('@', 'anonymize')).prop('checked')) {
1866
  ip = ip.replace(/([\.\:])\w{1,4}$/, '$1' + '0');
1867
  $(ID('@', 'ip_address')).val(ip);
1868
  }
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(a,f,t){function b(a,b){var c={".":".ip-geo-block-","#":"#ip-geo-block-","@":"#ip_geo_block_settings_",$:"ip-geo-block-","%":"ip_geo_block_","!":"ip_geo_block_settings_"};return"undefined"!==typeof b?c[a]+b:c.$+a}function da(a){return a.toString().replace(/[&<>"']/g,function(a){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[a]}).replace(/&amp;(#\d{2,4}|\w{4,7});/g,"&$1;")}function k(a){return a?da(a.toString().replace(/(<([^>]+)>)/ig,"")):""}function E(b,e){var c=a(f).width();c!==J&&(J=c,"undefined"===typeof p[b]&&(p[b]={id:!1,callback:e}),a(f).off("resize").on("resize",function(){!1!==p[b].id&&f.clearTimeout(p[b].id);p[b].time=f.setTimeout(p[b].callback,200);return!1}))}function C(c,e){e?a(b("#",c)).addClass(b("loading")):a(b("#",c)).removeClass(b("loading"))}function z(a,b){f.confirm(k(a))&&b()}function D(a,b,g){f.alert(k(b||d.msg[12].replace("%s",g)+" ("+a+")"))}function K(a,b){-1!==f.location.href.indexOf(a)&&(f.location=k(a)+(b?"&"+k(b):"")+"&ip-geo-block-auth-nonce="+F.nonce)}function q(b,e,g,l){b&&C(b,!0);e.action=d.action;e.nonce=d.nonce;a.post(d.url,e).done(function(a){g&&g(a)}).fail(function(a){S||D(a.status,a.responseText,e.action)}).always(function(){b&&("object"===typeof l?a.when.apply(a,l).then(function(){C(b,!1)}):C(b,!1))})}function M(a,b){q(a,{cmd:"clear-"+a,which:b},function(a){K(a.page,a.tab)})}function T(a){q(a,{cmd:a},function(a){K(a.page,a.tab)})}function x(a){a.stopImmediatePropagation();return!1}function G(a,e){e?a.removeClass("folding-disable"):(a.children(b(".","hide")).hide(),a.addClass("folding-disable"),a.removeClass(b("dropdown")).addClass(b("dropup")))}function N(c,e,g){var l=0===c.prop("type").indexOf("checkbox")&&c.is(":checked")||0===c.prop("type").indexOf("select")&&"0"!==c.val();c.siblings('input[name^="'+b("%","settings")+'"]:checkbox').prop("disabled",!l);a.isArray(e)?a.each(e,function(c,e){a(e).nextAll(b(".","settings-folding")).each(function(b,e){G(a(e),l&&g[c])})}):e.nextAll(b(".","settings-folding")).each(function(b,c){G(a(c),l&&g)})}function U(c){var e=b("@","validation_ajax_");G(c.closest("ul").next(),a(e+"1").is(":checked")||a(e+"2").is(":checked"))}function H(a){return String(a).replace(/[a-z]/gi,function(a){return String.fromCharCode(a.charCodeAt(0)+("n">a.toLowerCase()?13:-13))})}function ea(a,b){var c=new f.FileReader;c.onload=function(a){b&&b(a.target.result)};c.onerror=function(a){D("Error",a.target.error.code)};c.readAsText(a)}function V(c){var e=c.is(":checked"),g=a(b("@","public_target_rule")),l=a(b("@","public_behavior")),d=c.closest("tr").nextAll("tr");d.find('[name^="'+b("%","settings")+'"]').prop("disabled",!e);d.find(b(".","desc")).css("opacity",e?1:.5);N(c,[g,l],["1"===g.val()?!0:!1,l.val()]);e&&l.change()}function O(c,e){c&&("string"===typeof c&&(c=JSON.parse(c)),e&&(a('input[type="checkbox"]').prop("checked",!1).change(),a("input[name*=providers]").prop("disabled",!1).change()),a(b("#","import")).closest("form").deserialize(c),a(b("@","exception_admin")+","+b("@","validation_mimetype")).change(),a('select[name*="'+b("%","settings")+'"]').change(),a(b("@","validation_login")).change(),V(a(b("@","validation_public"))),U(a(b("@","validation_ajax_1"))),e&&(e=b("%","settings[providers][IPInfoDB]"),a(b("@","providers_IPInfoDB")).prop("checked",c[e]?!0:!1)))}function fa(a,b){var c=Math.ceil(a.length/b),e=[],d;for(d=0;d<c;++d){var m=d*b;e.push(a.slice(m,m+b))}return e}function v(c){"object"===typeof f.google&&(1===c?a(b("#","chart-countries")).length&&(h.drawPie(b("chart-countries")),h.drawLine(b("chart-daily"),"date")):5===c&&a(b(".","network")).each(function(b,c){h.drawStacked(a(c).attr("id"))}))}function W(a){if("object"===typeof f.google){var b=["corechart"];5===a&&b.push("bar");f.google.load("visualization","1",{packages:b,callback:function(){v(a)}});E("draw-chart."+a,function(){v(a)})}}function ha(a){var b,c="undefined"!==typeof wpCookies&&wpCookies.getHash("ip-geo-block")||[];for(b in c)c.hasOwnProperty(b)&&(c[b]=c[b].replace(/[^ox\d]/g,"").split(""));"undefined"===typeof c[a]&&(c[a]=[]);return c}function A(b){var c,g,d=[];a.each(b,function(a,b){d[a]="";if("undefined"!==typeof b&&(g=b.length))for(d[a]=b[0]||"o",c=1;c<g;++c)d[a]+=b[c]||"o"});"undefined"!==typeof wpCookies&&wpCookies.setHash("ip-geo-block",d,new Date(Date.now()+2592E6),F.home+F.admin)}function ia(c){var e=ha(c);a("form").on("click","h2,h3 a",function(){f.open(this.href,null);return!1}).on("click","h2,h3",function(){var d=a(this),l=d.closest("fieldset").data("section"),f=d.parent().nextAll(".panel-body").toggle();d.toggleClass(b("dropup")).toggleClass(b("dropdown"));(d=d.hasClass(b("dropdown")))?f.addClass(b("border")).trigger(b("show-body")):f.removeClass(b("border"));e[c][l]=d?"o":"x";A(e);v(c);return!1});a(b("#","toggle-sections")).on("click",function(){var d,l=a(b(".","field")).find("h2,h3"),f=[b("dropdown"),b("dropup")],m=l.filter("."+f[0]).length;l.each(function(g){d=a(this);d.removeClass(f.join(" ")).addClass(m?f[1]:f[0]);d=d.parent().nextAll(".panel-body").toggle(m?!1:!0);m?d.removeClass(b("border")):d.addClass(b("border")).trigger("show-body");e[c][g]=m?"x":"o"});A(e);v(c);return!1});return e}function P(c){a("body").append('<div style="display:none"><form method="POST" id="'+b("export-form")+'" action="'+d.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+d.action+'" /><input type="hidden" name="nonce" value="'+d.nonce+'" /><input type="hidden" name="cmd" value="'+c+'" /><input type="hidden" name="data" value="" id="'+b("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+b("file-dialog")+'" /></div>')}function X(a,b,d,f){a=a.cloneNode(!1);a.setAttribute("title",k(d));b=b.cloneNode(!1);b.setAttribute("class","dashicons dashicons-"+f);a.appendChild(b);return a}function Y(c,e,g){a.extend(!0,a.fn.dataTable.defaults,g,{dom:"tp",serverSide:!1,autoWidth:!1,processing:!0,deferRender:!0,deferLoading:10,info:!1,lengthChange:!1,language:{emptyTable:d.i18n[1],loadingRecords:d.i18n[0],processing:d.i18n[0],zeroRecords:d.i18n[2],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",pageLength:10,scroller:!0,scrollY:1E4,scrollCollapse:!0,drawCallback:function(c){var f=a(b("#",e.tableID)).find("td.dataTables_empty"),g="restore-logs"===e.ajaxCMD?3:2;g>c.iDraw?f.html(d.i18n[0]):g===c.iDraw&&(f.html(d.i18n[1]),f=a(b("@","search_filter")),f.val()&&f.trigger("keyup"))}});var l=a(b("#",e.tableID)).DataTable({ajax:{url:d.url,type:"POST",data:{cmd:e.ajaxCMD,action:d.action,nonce:d.nonce}},mark:!0}),h=function(){l.columns.adjust().responsive.recalc().draw(!1)};E("draw-table."+c,h);a(b("#",e.sectionID)).find(".panel-body").off(b("show-body")).on(b("show-body"),function(){h();return!1}).off("change").on("change",'th>input[type="checkbox"]',function(){var c=a(this).prop("checked");a(b("#",e.tableID)).find('td>input[type="checkbox"]').prop("checked",c);return!1});a(b("#","select-target")).off("change").on("change",function(){var c=a(this).find('input[name="'+b("target")+'"]:checked').val();l.columns(e.targetColumn).search("all"!==c?c:"").draw();return!1}).trigger("change");a(b("#","bulk-action")).off("click").on("click",function(){var f=a(this).prev().val(),g=/(<([^>]+)>)/ig,h=/data-hash=[\W]([\w]+)[\W]/i,k={IP:[],AS:[]},r,w,I=a("table.dataTable").find("td>input:checked");if(!f)return!1;if(!I.length)return D(null,d.msg[11]),!1;I.each(function(){w=l.cell(this.parentNode).data();r="bulk-action-remove"===f||"bulk-action-ip-erase"===f?(r=w[e.columnIP].match(h))?","+r[1]:"":"";k.IP.push(w[e.columnIP].replace(g,"")+r);k.AS.push(w[e.columnAS].replace(g,""))});k.IP.length&&q("loading",{cmd:f,which:k},function(d){"undefined"!==typeof d.page?K(d.page,"tab="+c):d&&(l.ajax.reload(),a(b("#",e.tableID)).find('th input[type="checkbox"]').prop("checked",!1))});return!1});a(b("@","search_filter")).off("keyup").on("keyup",function(){l.search(this.value,!1,!0,!/[A-Z]/.test(this.value)).draw();return!1});a(b("#","reset-filter")).off("click").on("click",function(){a(b("@","search_filter")).val("");l.search("").draw();return!1});a(b("@","clear_all")).off("click").on("click",function(){z(d.msg[1===c?4:5],function(){M(1===c?"cache":"logs",null)});return!1});a("table.dataTable tbody").on("click","a",function(){var b=f.location.search.slice(1).split("&"),e=b.length,d={},g;for(g=0;g<e;++g){var l=b[g].split("=");d[l[0]]=l[1]}d.tab=1===c?4:2;d.s=a(this).text().replace(/[^\w\.:\*]/,"");l=[];for(g in d)d.hasOwnProperty(g)&&l.push(g+"="+d[g]);f.open(f.location.pathname+"?"+l.join("&"),"_blank");return!1});return l}var S=!1,p=[],J=a(f).width(),d=IP_GEO_BLOCK,F=IP_GEO_BLOCK_AUTH;a.fn.deserialize=function(b){return this.each(function(){var c,d=this,f={};for(c in b)if(b.hasOwnProperty(c))try{var h=decodeURIComponent(c);var k=decodeURIComponent(b[c]);f.hasOwnProperty(h)||(f[h]=[]);f[h].push(k)}catch(ja){}a.each(f,function(b,e){c=a('[name="'+b+'"]:input',d).val(e);"hidden"!==c.attr("type")&&c.before('<span style="color:red">*</span>')})})};var h={dataPie:[],viewPie:[],drawPie:function(b){if("undefined"===typeof h.dataPie[b]){var c=h.dataPie[b]=new f.google.visualization.DataTable;c.addColumn("string","Country");c.addColumn("number","Requests");c=a.parseJSON(a("#"+b).attr("data-"+b));h.dataPie[b].addRows(c)}"undefined"===typeof h.viewPie[b]&&(h.viewPie[b]=new f.google.visualization.PieChart(t.getElementById(b)));"undefined"!==typeof h.dataPie[b]&&"undefined"!==typeof h.viewPie[b]&&0<a("#"+b).width()&&h.viewPie[b].draw(h.dataPie[b],{backgroundColor:{fill:"transparent"},chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:[],viewLine:[],drawLine:function(b,d){if("undefined"===typeof h.dataLine[b]){var c=h.dataLine[b]=new f.google.visualization.DataTable;c.addColumn(d,"Date");c.addColumn("number","comment");c.addColumn("number","xmlrpc");c.addColumn("number","login");c.addColumn("number","admin");c.addColumn("number","public");var e=a.parseJSON(a("#"+b).attr("data-"+b));var k=e.length;for(c=0;c<k;++c)e[c][0]=new Date(1E3*e[c][0]);h.dataLine[b].addRows(e)}"undefined"===typeof h.viewLine[b]&&(h.viewLine[b]=new f.google.visualization.LineChart(t.getElementById(b)));"undefined"!==typeof h.dataLine[b]&&"undefined"!==typeof h.viewLine[b]&&0<(c=a("#"+b).width())&&h.viewLine[b].draw(h.dataLine[b],{legend:{position:"bottom"},backgroundColor:{fill:"transparent"},hAxis:{format:"MM/dd"+("datetime"===d?" HH:mm":"")},vAxis:{textPosition:320<c?"out":"in"},chartArea:{left:320<c?"10%":0,top:"5%",width:"100%",height:"75%"}})},dataStacked:[],viewStacked:[],drawStacked:function(c){var d,g,l=a("#"+c);"undefined"===typeof h.dataStacked[c]&&(g=a.parseJSON(l.attr("data-"+c)))&&(g.unshift(["site","comment","xmlrpc","login","admin","poblic",{role:"link"}]),h.dataStacked[c]=f.google.visualization.arrayToDataTable(g));"undefined"===typeof h.viewStacked[c]&&(h.viewStacked[c]=new f.google.visualization.BarChart(t.getElementById(c)),f.google.visualization.events.addListener(h.viewStacked[c],"animationfinish",function(){var d,e,f,g=[],k=h.dataStacked[c],m=k.getNumberOfRows(),q=a(b("#","open-new")).prop("checked");for(d=0;d<m;d++)g.push({label:k.getValue(d,0),link:k.getValue(d,6)});m="http://www.w3.org/1999/xlink";l.find("text").each(function(a,b){f=b.parentNode;var c;if(c="g"===f.tagName.toLowerCase()){a:{c=b.textContent;var d,k=g.length;c=c.replace("\u2026","");for(d=0;d<k;++d)if(g.hasOwnProperty(d)&&0===g[d].label.indexOf(c)){c=d;break a}c=-1}c=-1!==(a=c)}c&&(e=t.createElementNS("http://www.w3.org/2000/svg","a"),e.setAttributeNS(m,"xlink:href",g[a].link),e.setAttributeNS(m,"title",g[a].label),e.setAttribute("target",q?"_blank":"_self"),e.setAttribute("class","site"),e.appendChild(f.removeChild(b)),f.appendChild(e),g.splice(a,1))})}));if(0<(d=l.width())&&"undefined"!==typeof h.dataStacked[c]&&"undefined"!==typeof h.viewStacked[c]){var k=b("range");var m=a.parseJSON(a("."+k).attr("data-"+k));g=h.dataStacked[c];k=40*g.getNumberOfRows();h.viewStacked[c].draw(g,{width:d,height:k+80,allowHtml:!0,isStacked:!0,legend:{position:"top"},chartArea:{top:50,left:90,width:"100%",height:k},hAxis:{minValue:0,maxValue:m[1]},backgroundColor:{fill:"transparent"},animation:{startup:!0,duration:200,easing:"out"}})}},ajaxStacked:function(c,d,f,k){c=Math.max(0,Math.min(4,c));d=5*Math.max(1,Math.min(5,d));q(null,{cmd:"restore-network",which:c,offset:d*f*k,length:d},function(c){var e,f,g,k,l;c=fa(c,d);a(b(".","network")).each(function(b,m){if("undefined"!==typeof c[b]){k=a(m).attr("id");l=h.dataStacked[k];g=Math.min(d,c[b].length);for(e=0;e<g;++e)for(f=1;5>=f;f++)l.setValue(e,f,c[b][e][f]);h.drawStacked(k)}})})}};a(function(){var c=Number(d.tab)||0,e=ia(c);a(b(".","inhibit")).on("submit",function(){return!1});a(f).on("beforeunload",function(){S=!0});switch(c){case 0:var g=b("%","settings");a('[id^="'+b("scan-")+'"]').on("click",function(){var c=a(this),d=c.attr("id"),e=c.parent();q(d.replace(/^.*(?:scan)/,"scanning"),{cmd:"scan-code",which:d.replace(b("scan-"),"")},function(a){e.children("ul").length||e.append('<ul id="'+b("code-list")+'"></ul>');e=e.children("ul").empty();for(c in a)if(a.hasOwnProperty(c)){var c=k(c);if("string"===typeof a[c])var d=k(a[c]);else d=k(a[c].code),c='<abbr title="'+k(a[c].type)+'">'+c+"</abbr>";e.append("<li>"+c+' : <span class="'+b("notice")+'">'+d+"</span></li>")}e.show("slow")});return!1});a(b("@","matching_rule")).on("change",function(){var c=this.value;a(b("@","white_list")).closest("tr").toggle("0"===c);a(b("@","black_list")).closest("tr").toggle("1"===c);return!1}).change();a(b(".","icon-cidr")).on("click",function(){var c=a(b("#","admin-styles-css")).get(0).href,d=f.open("about:blank","","width=560,height=170");c=c.slice(0,c.lastIndexOf("css/"));d.document.write('<!DOCTYPE html><html lang=en><meta charset=utf-8><title>CIDR calculator for IPv4 / IPv6</title><link href="'+c+'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>\u00a0</span></div></div><script src="'+c+'js/cidr.min.js?v=.1">\x3c/script>');d.document.close();return!1});a(b("@","validation_mimetype")).on("change",function(c){var d=a(this),n=parseInt(d.val(),10);d.nextAll(b(".","settings-folding")).each(function(b,c){G(a(c),n===b+1||n&&2===b)});return x(c)}).change();a('select[name*="response_code"]').on("change",function(c){var d=a(this),n=parseInt(d.val()/100,10),e=d.closest("tr").nextAll("tr");if(0<=d.attr("name").indexOf("public")&&-1===parseInt(a(b("@","public_matching_rule")).val(),10))return e.each(function(b){1>=b&&a(this).hide()}),x(c);3>=n?e.each(function(b){0===b?a(this).show():1===b&&a(this).hide()}):e.each(function(b){0===b?a(this).hide():1===b&&a(this).show()});return x(c)}).change();a(b("#","decode")).on("click",function(){var c=a(b("@","signature")),d=c.val();-1===d.search(/,/)?c.val(H(f.atob(d))):c.val(f.btoa(H(d)));return!1});a(b("@","validation_login")).on("change",function(b){var c=a(this);N(c,c,g,!0);return x(b)}).change();q(null,{cmd:"get-actions"},function(c){var e,n=a(b("#","list-admin")),f=t.createElement("li"),g=t.createElement("input"),h=t.createElement("label"),l=t.createElement("dfn"),m=t.createElement("span");for(y in c)if(c.hasOwnProperty(y)){var y=k(y);if(!n.find("#"+(e=b("!","exception_admin_"+y))).size()){var p=g.cloneNode(!1);p.setAttribute("id",e);p.setAttribute("value",y);p.setAttribute("type","checkbox");var r=f.cloneNode(!1);r.appendChild(p);p=h.cloneNode(!1);p.setAttribute("for",e);p.appendChild(t.createTextNode(y));r.appendChild(p);1&c[y]&&r.appendChild(X(l,m,d.msg[6],"lock"));2&c[y]&&r.appendChild(X(l,m,d.msg[7],"unlock"));n.append(r)}}a(b(".","icon-unlock")).on("click",function(){a(b("#","list-admin")+">li").filter(function(){return!a(this).find(".dashicons-unlock").length}).toggle();return!1});a(b("@","exception_admin")).on("change",function(c){var d=a.grep(a(this).val().split(","),function(a){return""!==a.replace(/^\s+|\s+$/g,"")});a(b("#","list-admin")).find("input").each(function(){var b=a(this),c=b.val();b.prop("checked",-1!==a.inArray(c,d))});return x(c)}).change();a(b("#","list-admin")).on("click","input",function(){var c=a(this);var d=a(b("@","exception_admin")),e=c.val(),n=a.grep(d.val().split(","),function(a){return""!==a.replace(/^\s+|\s+$/g,"")});c=a.inArray(e,n);-1===c?n.push(e):n.splice(c,1);d.val(n.join(",")).change()});a(b(".","icon-find")).on("click",function(){var c=a(this),e=[],n=0,f,ca,g,h,l=k(d.msg[9]),u=k(c.data("target"));a(b("#","find-"+u)).empty();c.next().children(b(".","find-desc")).show();c=a(b("#","list-"+u));c.children("li").each(function(b,c){e.push(a(c).find("input").val())});q("find-"+u,{cmd:"find-"+u},function(R){for(var m in R)R.hasOwnProperty(m)&&(++n,f=k(R[m]),m=k(m),ca=a.inArray(m,e),g=b("!","exception_"+u+"_"+m),h="admin"===u?f+"="+m:"/"+f+"/"+m+"/",h='<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="'+F.sites[0]+F.admin+"options-general.php?page=ip-geo-block&tab=4&s="+encodeURIComponent(h)+'" title="'+l.replace("%s",h)+'" target="_blank"><span></span></a>',0>ca?(e.push(m),c.prepend('<li><input id="'+g+'" value="'+m+'" type="checkbox" '+("admin"===u?"/>":"name=ip_geo_block_settings[exception]["+u+"]["+m+"] />")+'<label for="'+g+'">'+m+"</lable>"+h+"</li>")):(g=c.find("#"+g).parent(),g.find("a").length||g.append(h)));a(b("@","exception_"+u)).trigger("change");a(b("#","find-"+u)).append(' <span class="ip-geo-block-warn">'+k(d.msg[8].replace("%d",n))+"</span>")});return!1})});a('input[id^="'+b("!","validation_ajax_")+'"]').on("change",function(){U(a(this))}).change();a(b("@","validation_public")).on("change",function(b){V(a(this));return x(b)}).change();a(b("@","public_matching_rule")).on("change",function(c){var d=this.value;a(b("@","public_white_list")).closest("tr").toggle("0"===d);a(b("@","public_black_list")).closest("tr").toggle("1"===d);a(b("@","public_response_code")).change().closest("tr").toggle("-1"!==d);return x(c)}).change();a(b("@","public_behavior")).on("change",function(b){var c=a(this);G(c.siblings("ul"),c.prop("checked"));return x(b)}).change();a(b("@","update")).on("click",function(){q("download",{cmd:"download"},function(c){var d;for(d in c)if(c.hasOwnProperty(d)){var e=c[d];for(n in e)if(e.hasOwnProperty(n)){var n=k(n);e[n].filename&&a(b("@",d+"_"+n+"_path")).val(k(e[n].filename));e[n].message&&a(b("#",d+"-"+n)).text(k(e[n].message))}}});return!1});a(b("@","anonymize")).on("change",function(){a('input[class*="remote"]').prop("disabled",a(this).prop("checked"))}).trigger("change");a(b("@","save_statistics")).on("change",function(){a(b("@","validation_recdays")).prop("disabled",!a(this).prop("checked"));return!1}).trigger("change");a(b("@","validation_reclogs")).on("change",function(){var b=a(this);b.parent().parent().nextAll().find('input[id*="validation"]').prop("disabled",0===Number(b.prop("selectedIndex")))}).trigger("change");a(b("@","cache_hold")).on("change",function(){var b=a(this).prop("checked");a('input[name*="[cache_time]"]').prop("disabled",!b);a('select[id*="login_fails"]').prop("disabled",!b)}).trigger("change");a(b("@","comment_pos")).on("change",function(){var b=a(this);b.nextAll('input[type="text"]').prop("disabled",0===Number(b.prop("selectedIndex")))}).trigger("change");P("validate");a(b("#","export")).on("click",function(){if("undefined"===typeof JSON)return D(null,k(d.msg[10])),!1;var c=g,e={};a.each(a(this).closest("form").serializeArray(),function(a,b){-1!==b.name.indexOf(c)&&(e[b.name]=b.value)});e[c+="[signature]"]=f.btoa(H(e[c]));a(b("#","export-data")).val(JSON.stringify(e));a(b("#","export-form")).submit();return!1});a(b("#","file-dialog")).on("change",function(a){if("undefined"===typeof f.FileReader)return D(null,k(d.msg[10])),!1;var b;(a=a.target.files[0])&&ea(a,function(a){a=JSON.parse(a);b=g+"[signature]";"undefined"!==typeof a[b]&&(a[b]=f.btoa(H(a[b])));q("export-import",{cmd:"validate",data:JSON.stringify(a)},function(a){O(a,!0)})});return!1});a(b("#","import")).on("click",function(){a(b("#","file-dialog")).click();return!1});a(b("#","default")).on("click",function(){z(d.msg[0],function(){q("pre-defined",{cmd:"import-default"},function(a){O(a,!0)})});return!1});a(b("#","preferred")).on("click",function(){z(d.msg[0],function(){q("pre-defined",{cmd:"import-preferred"},function(a){O(a,!1)})});return!1});a(b("@","reset_live")).on("click",function(){q("reset-live",{cmd:"reset-live"});return!1});a(b("@","create_table")).on("click",function(){z(d.msg[1],function(){T("create-table")});return!1});a(b("@","delete_table")).on("click",function(){z(d.msg[2],function(){T("delete-table")});return!1});a(b("#","show-info")).on("click",function(){a(b("#","wp-info")).empty();q("wp-info",{cmd:"show-info"},function(c){var d,e=[];for(d in c)c.hasOwnProperty(d)&&e.push("- "+d+" "+c[d]);a(b("#","wp-info")).html('<textarea class="regular-text code" rows="'+e.length+'">'+e.join("\n")+"</textarea>").find("textarea").select();return!1})});a('select[name^="'+g+'"]').on("change",function(){var c=a(this),d,e=b(".","desc");c.next(e).empty();(d=c.children("option:selected").data("desc"))&&c.next(e).html(a.parseHTML(d));N(c,c,g,!0);return!1}).change();a(b(".","icon-cycle")).on("click",function(){var c=a(this).nextAll("li"),d=c.find(b("@","exception_admin"));c=c.find("input:checkbox").filter(":visible");var e=c.filter(":checked").length;c.prop("checked",!e);if(d.length)if(e)d.val("");else{var f=[];c.each(function(b,c){f.push(a(c).val())});d.val(f.join(","))}a(this).blur();return!1});a(b(".","settings-folding>dfn")).on("click",function(){var c=b("drop"),d=a(this).parent();d.children(b(".","hide")).toggle();d.toggleClass(c+"up").toggleClass(c+"down");d.hasClass(c+"up")&&d.children("div").hide();return!1});a("#submit").on("click",function(){var c=a(b("@","signature")),d=c.val();-1!==d.indexOf(",")&&c.val(f.btoa(H(d)));return!0});break;case 1:W(c);var l=0;a(b("#","sort-slug")).on("click",function(){var b=a(this).closest("ol"),c=b.children("li");(l=!l)?c.sort(function(b,c){return a(b).text()>a(c).text()}):c.sort(function(b,c){return parseInt(a(b).text().replace(/^.*\((\d+)\)$/,"$1"),10)<=parseInt(a(c).text().replace(/^.*\((\d+)\)$/,"$1"),10)});b.children("li").remove();c.appendTo(b)});a(b("@","clear_statistics")).on("click",function(){z(d.msg[3],function(){M("statistics",null)});return!1});a(b("@","clear_logs")).on("click",function(){z(d.msg[5],function(){M("logs",null)});return!1});Y(c,{tableID:"statistics-cache",ajaxCMD:"restore-cache",sectionID:"section-2",targetColumn:4,columnIP:1,columnAS:3},{columns:[{title:'<input type="checkbox">'},{title:d.i18n[3]},{title:d.i18n[4]},{title:d.i18n[5]},{title:d.i18n[6]},{title:d.i18n[7]},{title:d.i18n[8]},{title:d.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]}]});P("export-cache");a(b("#","export-cache")).on("click",function(){a(b("#","export-form")).submit();return!1});break;case 4:var w={tableID:"validation-logs",sectionID:"section-0",targetColumn:6,columnIP:3,columnAS:5},m={columns:[{title:'<input type="checkbox">'},{title:""},{title:d.i18n[10]},{title:d.i18n[3]},{title:d.i18n[4]},{title:d.i18n[5]},{title:d.i18n[7]},{title:d.i18n[11]},{title:d.i18n[12]},{title:d.i18n[13]},{title:d.i18n[14]},{title:d.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]}]},p=null,v=null,C=a(b("#","live-loading")),r=null,Q=function(){p&&(f.clearTimeout(p),p=null);v&&(C.removeClass(b("live-timer")),f.clearTimeout(v),v=null)},I=function(){Q();q("live-loading",{cmd:"live-start"},function(a){if(a.error)D(null,a.error);else if(a.data.length){var b,c=a.data.length;for(b=0;b<c;b++)r.row.add(a.data[b]);r.draw(!1)}p=f.setTimeout(I,1E3*d.interval)})},E=function(a,b){Q();q(null,{cmd:a||"live-stop",callback:b})},J=function(){E("live-pause",function(){C.addClass(b("live-timer"));v=f.setTimeout(function(){Q();a(b("#","live-log-stop")).prop("checked",!0)},1E3*d.timeout)})},B=b(""),Z=function(b,c,d){-1===c[7].indexOf("pass")?a(b).addClass(B+d+"blocked"):a(b).addClass(B+d+"passed")},aa=a(b("#","live-log")),ba=a(b("#","live-update"));a(b("#","validation-logs")).on("animationend",function(){a(this).find('tr[class*="'+B+'new"]').each(function(){var b=a(this);-1!==b.prop("class").indexOf("passed")?b.addClass(B+"passed").removeClass(B+"new-passed"):b.addClass(B+"blocked").removeClass(B+"new-blocked")});return!1});aa.on("change",function(){switch(a('input[name="'+b("live-log")+'"]:checked').val()){case "start":I();break;case "pause":J();break;case "stop":E()}});ba.on("change",function(){var d=aa.closest("tr"),f=ba.prop("checked");e[c][1]=f?"o":"x";A(e);r&&r.clear().destroy();f?(d.show().next().next().next().nextAll().hide(),w.ajaxCMD="live-stop",m.order=[1,"desc"],m.createdRow=function(a,b){Z(a,b,"new-")}):(d.hide().next().next().next().nextAll().show(),w.ajaxCMD="restore-logs",m.order=[0,""],m.createdRow=function(a,b){Z(a,b,"")});a(b("#","live-log-stop")).trigger("click");r=Y(c,w,m);return!1}).trigger("change");P("export-logs");a(b("#","export-logs")).on("click",function(){a(b("#","export-form")).submit();return!1});break;case 2:a(f).on(b("gmap-error"),function(){q(null,{cmd:"gmap-error"},function(a){K(a.page,a.tab)})});var L=a(b("#","map"));"object"===typeof f.google?L.each(function(){a(this).GmapRS()}):L.each(function(){a(this).empty().html('<iframe src="'+d.altgmap+'?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')});a('select[id^="'+b("!","service")+'"]').on("change",function(){e[c][3]=a(this).prop("selectedIndex");A(e)}).change();a(b("@","get_location")).on("click",function(){var c=a(b("#","whois")),d=a.trim(a(b("@","ip_address")).val());if(d){a(b("@","anonymize")).prop("checked")&&(d=d.replace(/([\.:])\w{1,4}$/,"$10"),a(b("@","ip_address")).val(d));c.hide().empty();var e=a.whois(d,function(d){var e,f="";for(e=0;e<d.length;++e)f+="<tr><td>"+d[e].name+"</td><td>"+d[e].value+"</td></tr>";c.html('<fieldset id="'+b("section-1")+'" class="'+b("field")+' panel panel-default" data-section="1"><legend class="panel-heading"><h3 id="'+b("whois-title")+'" class="'+b("dropdown")+'">Whois</h3></legend><div class="panel-body '+b("border")+'"><table class="'+b("table")+'">'+f+"</table></div></fieldset>").fadeIn("slow");a(b("#","whois-title")).on("click",function(){var c=a(this);c.parent().nextAll().toggle();c.toggleClass(b("dropup")).toggleClass(b("dropdown"));return!1})});q("loading",{cmd:"search",ip:d,which:a(b("@","service")).val()},function(a){var c="",e=k(a.latitude||"0"),g=k(a.longitude||"0"),h=a.latitude||a.longitude?8:2;for(l in a)if(a.hasOwnProperty(l)){var l=k(l);c+='<li><span class="'+b("title")+'">'+l+' : </span><span class="'+b("result")+'">'+k(a[l])+"</span></li>"}"object"===typeof f.google?L.GmapRS("addMarker",{latitude:e,longitude:g,title:d,content:"<ul>"+c+"</ul>",show:!0,zoom:h}):L.css({height:"600px",backgroundColor:"transparent"}).empty().html('<ul style="margin-top:0; margin-left:1em;"><li><span class="'+b("title")+'">IP address : </span><span class="'+b("result")+'">'+k(d)+"</span></li>"+c+'</ul><iframe src="//maps.google.com/maps?q='+e+","+g+"&z="+h+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')},[e])}return!1});a(b("@","ip_address")).on("keypress",function(c){if(c.which&&13===c.which||c.keyCode&&13===c.keyCode)return a(b("@","get_location")).click(),!1});a(b("@","ip_address")).val()&&a(b("@","get_location")).click();break;case 5:W(c),a("input[name="+b("duration")+"]:radio").on("click",function(){var b=a('div[class*="paginate"]').find('a[class*="current"]').text();e[c][2]=a(this).val()||0;e[c][3]=e[c][3]||2;e[c][4]=e[c][4]||1;A(e);h.ajaxStacked(e[c][2],e[c][3],e[c][4],b-1)}),a(b("#","open-new")).on("change",function(){var d=a(this).prop("checked");e[c][1]=d?"o":"x";A(e);a(b("#","section-0 svg")).find("a").each(function(){this.setAttribute("target",d?"_blank":"_self")})}),a(b("#","apply-layout")).on("click",function(){var d=a(b("#","select-layout"));e[c][3]=d.find('select[name="rows"] option:selected').val();e[c][4]=d.find('select[name="cols"] option:selected').val();A(e)}),a("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){"use strict";function i(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"undefined"!=typeof t?n[e]+t:n.$+e}function a(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;")}function o(e){return-1===e.indexOf("pass")}function r(e){return e?a(e.toString().replace(/(<([^>]+)>)/gi,"")):""}function l(n,i){var a=e(t).width();a!==q&&(q=a,"undefined"==typeof B[n]&&(B[n]={id:!1,callback:i}),e(t).off("resize").on("resize",function(){return!1!==B[n].id&&t.clearTimeout(B[n].id),B[n].time=t.setTimeout(B[n].callback,200),!1}))}function c(t,n){n?e(i("#",t)).addClass(i("loading")):e(i("#",t)).removeClass(i("loading"))}function s(e,n){t.confirm(r(e))&&n()}function d(e,n,i){t.alert(r(n||H.msg[12].replace("%s",i)+" ("+e+")"))}function u(){d(null,r(H.msg[10]))}function p(e,n){-1!==t.location.href.indexOf(e)&&(t.location=r(e)+(n?"&"+r(n):"")+"&ip-geo-block-auth-nonce="+V.nonce)}function f(t,n,i,a){t&&c(t,!0),n.action=H.action,n.nonce=H.nonce,e.post(H.url,n).done(function(e){i&&i(e)}).fail(function(e){J||d(e.status,e.responseText,n.action)}).always(function(){t&&("object"==typeof a?e.when.apply(e,a).then(function(){c(t,!1)}):c(t,!1))})}function h(e,t){f(e,{cmd:"clear-"+e,which:t},function(e){p(e.page,e.tab)})}function g(e){f(e,{cmd:e},function(e){p(e.page,e.tab)})}function m(e){return e.stopImmediatePropagation(),!1}function v(t){var n,a=i(".","desc");t.next(a).empty(),n=t.children("option:selected").data("desc"),n&&t.next(a).html(e.parseHTML(n))}function b(e,t){t?e.removeClass("folding-disable"):(e.children(i(".","hide")).hide(),e.addClass("folding-disable"),e.removeClass(i("dropdown")).addClass(i("dropup")))}function w(t,n,a){var o=0===t.prop("type").indexOf("checkbox")&&t.is(":checked")||0===t.prop("type").indexOf("select")&&"0"!==t.val();t.siblings('input[name^="'+i("%","settings")+'"]:checkbox').prop("disabled",!o),e.isArray(n)?e.each(n,function(t,n){e(n).nextAll(i(".","settings-folding")).each(function(n,i){b(e(i),o&&a[t])})}):n.nextAll(i(".","settings-folding")).each(function(t,n){b(e(n),o&&a)})}function k(t){var n=i("@","validation_ajax_");b(t.closest("ul").next(),e(n+"1").is(":checked")||e(n+"2").is(":checked"))}function y(e){return t.btoa(e)}function x(e){return t.atob(e)}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 y(_(e))}function P(e){return _(x(e))}function S(e,n){var i=new t.FileReader;i.onload=function(e){n&&n(e.target.result)},i.onerror=function(e){d("Error",e.target.error.code)},i.readAsText(e)}function A(t){var n=t.is(":checked"),a=e(i("@","public_target_rule")),o=e(i("@","public_behavior")),r=t.closest("tr").nextAll("tr");r.find('[name^="'+i("%","settings")+'"]').prop("disabled",!n),r.find(i(".","desc")).css("opacity",n?1:.5),w(t,[a,o],["1"===a.val(),o.val()]),n&&o.change()}function I(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(i("#","import")).closest("form").deserialize(t),e(i("@","exception_admin")+","+i("@","validation_mimetype")).change(),e('select[name*="'+i("%","settings")+'"]').change(),e(i("@","validation_login")).change(),A(e(i("@","validation_public"))),k(e(i("@","validation_ajax_1"))),n&&(n=i("%","settings[providers][IPInfoDB]"),e(i("@","providers_IPInfoDB")).prop("checked",!!t[n])))}function O(e,t){var n,i=t.length;for(e=e.replace("…",""),n=0;i>n;++n)if(t.hasOwnProperty(n)&&0===t[n].label.indexOf(e))return n;return-1}function D(e,t){var n,i,a=Math.ceil(e.length/t),o=[];for(n=0;a>n;++n)i=n*t,o.push(e.slice(i,i+t));return o}function N(n){"object"==typeof t.google&&(1===n?e(i("#","chart-countries")).length&&(G.drawPie(i("chart-countries")),G.drawLine(i("chart-daily"),"date")):5===n&&e(i(".","network")).each(function(t,n){G.drawStacked(e(n).attr("id"))}))}function j(e){if("object"==typeof t.google){var n=["corechart"];5===e&&n.push("bar"),t.google.load("visualization","1",{packages:n,callback:function(){N(e)}}),l("draw-chart."+e,function(){N(e)})}}function T(e){var t,n="undefined"!=typeof wpCookies&&wpCookies.getHash("ip-geo-block")||[];for(t in n)n.hasOwnProperty(t)&&(n[t]=n[t].replace(/[^ox\d]/g,"").split(""));return"undefined"==typeof n[e]&&(n[e]=[]),n}function L(t){var n,i,a=[];e.each(t,function(e,t){if(a[e]="","undefined"!=typeof t&&(i=t.length))for(a[e]=t[0]||"o",n=1;i>n;++n)a[e]+=t[n]||"o"}),"undefined"!=typeof wpCookies&&wpCookies.setHash("ip-geo-block",a,new Date(Date.now()+2592e6),V.home+V.admin)}function R(e,t,n){var a,o=e.closest("fieldset").data("section"),r=e.parent().nextAll(".panel-body").toggle();e.toggleClass(i("dropup")).toggleClass(i("dropdown")),a=e.hasClass(i("dropdown")),a?r.addClass(i("border")).trigger(i("show-body")):r.removeClass(i("border")),n[t][o]=a?"o":"x",L(n),N(t)}function z(n){var a=T(n);return e("form").on("click","h2,h3 a",function(){return t.open(this.href,null),!1}).on("click","h2,h3",function(){return R(e(this),n,a),!1}),e(i("#","toggle-sections")).on("click",function(){var t,o=e(i(".","field")).find("h2,h3"),r=[i("dropdown"),i("dropup")],l=o.filter("."+r[0]).length;return o.each(function(o){t=e(this),t.removeClass(r.join(" ")).addClass(l?r[1]:r[0]),t=t.parent().nextAll(".panel-body").toggle(!l),l?t.removeClass(i("border")):t.addClass(i("border")).trigger("show-body"),a[n][o]=l?"x":"o"}),L(a),N(n),!1}),a}function M(t){e("body").append('<div style="display:none"><form method="POST" id="'+i("export-form")+'" action="'+H.url.replace("ajax.php","post.php")+'"><input type="hidden" name="action" value="'+H.action+'" /><input type="hidden" name="nonce" value="'+H.nonce+'" /><input type="hidden" name="cmd" value="'+t+'" /><input type="hidden" name="data" value="" id="'+i("export-data")+'"/><input type="submit" value="submit" /></form><input type="file" name="settings" id="'+i("file-dialog")+'" /></div>')}function E(e,t,n,i){var a,o;return a=e.cloneNode(!1),a.setAttribute("title",r(n)),o=t.cloneNode(!1),o.setAttribute("class","dashicons dashicons-"+i),a.appendChild(o),a}function $(n,a,o){e.extend(!0,e.fn.dataTable.defaults,o,{dom:"tp",serverSide:!1,autoWidth:!1,processing:!0,deferRender:!0,deferLoading:10,info:!1,lengthChange:!1,language:{emptyTable:H.i18n[1],loadingRecords:H.i18n[0],processing:H.i18n[0],zeroRecords:H.i18n[2],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",pageLength:10,scroller:!0,scrollY:1e4,scrollCollapse:!0,drawCallback:function(t){var n=e(i("#",a.tableID)).find("td.dataTables_empty"),o="restore-logs"===a.ajaxCMD?3:2;o>t.iDraw?n.html(H.i18n[0]):o===t.iDraw&&(n.html(H.i18n[1]),n=e(i("@","search_filter")),n.val()&&n.trigger("keyup"))}});var r=e(i("#",a.tableID)).DataTable({ajax:{url:H.url,type:"POST",data:{cmd:a.ajaxCMD,action:H.action,nonce:H.nonce}},mark:!0}),c=function(){r.columns.adjust().responsive.recalc().draw(!1)};return l("draw-table."+n,c),e(i("#",a.sectionID)).find(".panel-body").off(i("show-body")).on(i("show-body"),function(){return c(),!1}).off("change").on("change",'th>input[type="checkbox"]',function(){var t=e(this).prop("checked");return e(i("#",a.tableID)).find('td>input[type="checkbox"]').prop("checked",t),!1}),e(i("#","select-target")).off("change").on("change",function(){var t=e(this).find('input[name="'+i("target")+'"]:checked').val();return r.columns(a.targetColumn).search("all"!==t?t:"").draw(),!1}).trigger("change"),e(i("#","bulk-action")).off("click").on("click",function(){var t,o,l=e(this).prev().val(),c=/(<([^>]+)>)/gi,s=/data-hash=[\W]([\w]+)[\W]/i,u={IP:[],AS:[]},h=e("table"+i(".","dataTable")).find("td>input:checked");return l?h.length?(h.each(function(){o=r.cell(this.parentNode).data(),"bulk-action-remove"===l||"bulk-action-ip-erase"===l?(t=o[a.columnIP].match(s),t=t?","+t[1]:""):t="",u.IP.push(o[a.columnIP].replace(c,"")+t),u.AS.push(o[a.columnAS].replace(c,""))}),u.IP.length&&f("loading",{cmd:l,which:u},function(t){"undefined"!=typeof t.page?p(t.page,"tab="+n):t&&(r.ajax.reload(),e(i("#",a.tableID)).find('th input[type="checkbox"]').prop("checked",!1))}),!1):(d(null,H.msg[11]),!1):!1}),e(i("@","search_filter")).off("keyup").on("keyup",function(){return r.search(this.value,!1,!0,!/[A-Z]/.test(this.value)).draw(),!1}),e(i("#","reset-filter")).off("click").on("click",function(){return e(i("@","search_filter")).val(""),r.search("").draw(),!1}),e(i("@","clear_all")).off("click").on("click",function(){return s(H.msg[1===n?4:5],function(){h(1===n?"cache":"logs",null)}),!1}),e("table"+i(".","dataTable")+" tbody").on("click","a",function(){var i,a,o=t.location.search.slice(1).split("&"),r=o.length,l={};for(i=0;r>i;++i)a=o[i].split("="),l[a[0]]=a[1];l.tab=1===n?4:2,l.s=e(this).text().replace(/[^\w\.\:\*]/,""),a=[];for(i in l)l.hasOwnProperty(i)&&a.push(i+"="+l[i]);return t.open(t.location.pathname+"?"+a.join("&"),"_blank"),!1}),r}var J=!1,B=[],q=e(t).width(),H=IP_GEO_BLOCK,V=IP_GEO_BLOCK_AUTH;e.fn.deserialize=function(t){return this.each(function(){var n,i,a,o=this,r={};for(n in t)if(t.hasOwnProperty(n))try{i=decodeURIComponent(n),a=decodeURIComponent(t[n]),r.hasOwnProperty(i)||(r[i]=[]),r[i].push(a)}catch(l){}e.each(r,function(t,i){n=e('[name="'+t+'"]:input',o).val(i),"hidden"!==n.attr("type")&&n.before('<span style="color:red">*</span>')})})};var G={dataPie:[],viewPie:[],drawPie:function(i){var a,o;"undefined"==typeof G.dataPie[i]&&(a=G.dataPie[i]=new t.google.visualization.DataTable,a.addColumn("string","Country"),a.addColumn("number","Requests"),o=e.parseJSON(e("#"+i).attr("data-"+i)),G.dataPie[i].addRows(o)),"undefined"==typeof G.viewPie[i]&&(G.viewPie[i]=new t.google.visualization.PieChart(n.getElementById(i))),"undefined"!=typeof G.dataPie[i]&&"undefined"!=typeof G.viewPie[i]&&0<(a=e("#"+i).width())&&G.viewPie[i].draw(G.dataPie[i],{backgroundColor:{fill:"transparent"},chartArea:{left:0,top:"5%",width:"100%",height:"90%"},sliceVisibilityThreshold:.015})},dataLine:[],viewLine:[],drawLine:function(i,a){var o,r,l;if("undefined"==typeof G.dataLine[i]){for(o=G.dataLine[i]=new t.google.visualization.DataTable,o.addColumn(a,"Date"),o.addColumn("number","comment"),o.addColumn("number","xmlrpc"),o.addColumn("number","login"),o.addColumn("number","admin"),o.addColumn("number","public"),l=e.parseJSON(e("#"+i).attr("data-"+i)),r=l.length,o=0;r>o;++o)l[o][0]=new Date(1e3*l[o][0]);G.dataLine[i].addRows(l)}"undefined"==typeof G.viewLine[i]&&(G.viewLine[i]=new t.google.visualization.LineChart(n.getElementById(i))),"undefined"!=typeof G.dataLine[i]&&"undefined"!=typeof G.viewLine[i]&&0<(o=e("#"+i).width())&&G.viewLine[i].draw(G.dataLine[i],{legend:{position:"bottom"},backgroundColor:{fill:"transparent"},hAxis:{format:"MM/dd"+("datetime"===a?" HH:mm":"")},vAxis:{textPosition:o>320?"out":"in"},chartArea:{left:o>320?"10%":0,top:"5%",width:"100%",height:"75%"}})},dataStacked:[],viewStacked:[],drawStacked:function(a){var o,r,l,c,s=e("#"+a);"undefined"==typeof G.dataStacked[a]&&(l=e.parseJSON(s.attr("data-"+a)),l&&(l.unshift(["site","comment","xmlrpc","login","admin","poblic",{role:"link"}]),G.dataStacked[a]=t.google.visualization.arrayToDataTable(l))),"undefined"==typeof G.viewStacked[a]&&(G.viewStacked[a]=new t.google.visualization.BarChart(n.getElementById(a)),t.google.visualization.events.addListener(G.viewStacked[a],"animationfinish",function(){var t,o,r,l=[],c=G.dataStacked[a],d=c.getNumberOfRows(),u=e(i("#","open-new")).prop("checked");for(t=0;d>t;t++)l.push({label:c.getValue(t,0),link:c.getValue(t,6)});d="http://www.w3.org/1999/xlink",s.find("text").each(function(e,t){r=t.parentNode,"g"===r.tagName.toLowerCase()&&-1!==(e=O(t.textContent,l))&&(o=n.createElementNS("http://www.w3.org/2000/svg","a"),o.setAttributeNS(d,"xlink:href",l[e].link),o.setAttributeNS(d,"title",l[e].label),o.setAttribute("target",u?"_blank":"_self"),o.setAttribute("class","site"),o.appendChild(r.removeChild(t)),r.appendChild(o),l.splice(e,1))})})),0<(r=s.width())&&"undefined"!=typeof G.dataStacked[a]&&"undefined"!=typeof G.viewStacked[a]&&(o=i("range"),c=e.parseJSON(e("."+o).attr("data-"+o)),l=G.dataStacked[a],o=40*l.getNumberOfRows(),G.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){t=Math.max(0,Math.min(4,t)),n=5*Math.max(1,Math.min(5,n)),f(null,{cmd:"restore-network",which:t,offset:n*a*o,length:n},function(t){var a,o,r,l,c;t=D(t,n),e(i(".","network")).each(function(i,s){if("undefined"!=typeof t[i]){for(l=e(s).attr("id"),c=G.dataStacked[l],r=Math.min(n,t[i].length),a=0;r>a;++a)for(o=1;5>=o;o++)c.setValue(a,o,t[i][a][o]);G.drawStacked(l)}})})}};e(function(){var a=Number(H.tab)||0,l=z(a);switch(e(i(".","inhibit")).on("submit",function(){return!1}),e(t).on("beforeunload",function(){J=!0}),a){case 0:var c=i("%","settings");e('[id^="'+i("scan-")+'"]').on("click",function(){var t=e(this),n=t.attr("id"),a=t.parent();return f(n.replace(/^.*(?:scan)/,"scanning"),{cmd:"scan-code",which:n.replace(i("scan-"),"")},function(e){a.children("ul").length||a.append('<ul id="'+i("code-list")+'"></ul>'),a=a.children("ul").empty();var t,n;for(t in e)e.hasOwnProperty(t)&&(t=r(t),"string"==typeof e[t]?n=r(e[t]):(n=r(e[t].code),t='<abbr title="'+r(e[t].type)+'">'+t+"</abbr>"),a.append("<li>"+t+' : <span class="'+i("notice")+'">'+n+"</span></li>"));a.show("slow")}),!1}),e(i("@","matching_rule")).on("change",function(){var t=this.value;return e(i("@","white_list")).closest("tr").toggle("0"===t),e(i("@","black_list")).closest("tr").toggle("1"===t),!1}).change(),e(i(".","icon-cidr")).on("click",function(){var n=e(i("#","admin-styles-css")).get(0).href,a=t.open("about:blank","","width=560,height=170");return n=n.slice(0,n.lastIndexOf("css/")),a.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>'),a.document.close(),!1}),e(i("@","validation_mimetype")).on("change",function(t){var n=e(this),a=parseInt(n.val(),10);return n.nextAll(i(".","settings-folding")).each(function(t,n){b(e(n),a===t+1||a&&2===t)}),m(t)}).change(),e('select[name*="response_code"]').on("change",function(t){var n=e(this),a=parseInt(n.val()/100,10),o=n.closest("tr").nextAll("tr");return 0<=n.attr("name").indexOf("public")&&-1===parseInt(e(i("@","public_matching_rule")).val(),10)?(o.each(function(t){1>=t&&e(this).hide()}),m(t)):(3>=a?o.each(function(t){0===t?e(this).show():1===t&&e(this).hide()}):o.each(function(t){0===t?e(this).hide():1===t&&e(this).show()}),m(t))}).change(),e(i("#","decode")).on("click",function(){var t=e(i("@","signature")),n=t.val();return-1===n.search(/,/)?t.val(P(n)):t.val(C(n)),!1}),e(i("@","validation_login")).on("change",function(t){var n=e(this);return w(n,n,c,!0),m(t)}).change(),f(null,{cmd:"get-actions"},function(t){var a,o,l,c,s=e(i("#","list-admin")),d=n.createElement("li"),u=n.createElement("input"),p=n.createElement("label"),h=n.createElement("dfn"),g=n.createElement("span");for(c in t)t.hasOwnProperty(c)&&(c=r(c),s.find("#"+(l=i("!","exception_admin_"+c))).size()||(a=u.cloneNode(!1),a.setAttribute("id",l),a.setAttribute("value",c),a.setAttribute("type","checkbox"),o=d.cloneNode(!1),o.appendChild(a),a=p.cloneNode(!1),a.setAttribute("for",l),a.appendChild(n.createTextNode(c)),o.appendChild(a),1&t[c]&&o.appendChild(E(h,g,H.msg[6],"lock")),2&t[c]&&o.appendChild(E(h,g,H.msg[7],"unlock")),s.append(o)));e(i(".","icon-unlock")).on("click",function(){return e(i("#","list-admin")+">li").filter(function(){return!e(this).find(".dashicons-unlock").length}).toggle(),!1}),e(i("@","exception_admin")).on("change",function(t){var n=e.grep(e(this).val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});return e(i("#","list-admin")).find("input").each(function(){var t=e(this),i=t.val();t.prop("checked",-1!==e.inArray(i,n))}),m(t)}).change(),e(i("#","list-admin")).on("click","input",function(){var t,n=e(this),a=e(i("@","exception_admin")),o=n.val(),r=e.grep(a.val().split(","),function(e){return""!==e.replace(/^\s+|\s+$/g,"")});t=e.inArray(o,r),-1===t?r.push(o):r.splice(t,1),a.val(r.join(",")).change()}),e(i(".","icon-find")).on("click",function(){var t,n,a,o,l=e(this),c=[],s=0,d=r(H.msg[9]),u=r(l.data("target"));return e(i("#","find-"+u)).empty(),l.next().children(i(".","find-desc")).show(),l=e(i("#","list-"+u)),l.children("li").each(function(t,n){c.push(e(n).find("input").val())}),f("find-"+u,{cmd:"find-"+u},function(p){var f;for(f in p)p.hasOwnProperty(f)&&(++s,t=r(p[f]),f=r(f),n=e.inArray(f,c),a=i("!","exception_"+u+"_"+f),o="admin"===u?t+"="+f:"/"+t+"/"+f+"/",o='<a class="ip-geo-block-icon ip-geo-block-icon-alert" href="'+V.sites[0]+V.admin+"options-general.php?page=ip-geo-block&tab=4&s="+encodeURIComponent(o)+'" title="'+d.replace("%s",o)+'" target="_blank"><span></span></a>',0>n?(c.push(f),l.prepend('<li><input id="'+a+'" value="'+f+'" type="checkbox" '+("admin"===u?"/>":"name=ip_geo_block_settings[exception]["+u+"]["+f+"] />")+'<label for="'+a+'">'+f+"</lable>"+o+"</li>")):(a=l.find("#"+a).parent(),a.find("a").length||a.append(o)));e(i("@","exception_"+u)).trigger("change"),e(i("#","find-"+u)).append(' <span class="ip-geo-block-warn">'+r(H.msg[8].replace("%d",s))+"</span>")}),!1})}),e('input[id^="'+i("!","validation_ajax_")+'"]').on("change",function(){k(e(this))}).change(),e(i("@","validation_public")).on("change",function(t){return A(e(this)),m(t)}).change(),e(i("@","public_matching_rule")).on("change",function(t){var n=this.value;return e(i("@","public_white_list")).closest("tr").toggle("0"===n),e(i("@","public_black_list")).closest("tr").toggle("1"===n),e(i("@","public_response_code")).change().closest("tr").toggle("-1"!==n),m(t)}).change(),e(i("@","public_behavior")).on("change",function(t){var n=e(this);return b(n.siblings("ul"),n.prop("checked")),m(t)}).change(),e(i("@","update")).on("click",function(){return f("download",{cmd:"download"},function(t){var n,a,o;for(n in t)if(t.hasOwnProperty(n)){o=t[n];for(a in o)o.hasOwnProperty(a)&&(a=r(a),o[a].filename&&e(i("@",n+"_"+a+"_path")).val(r(o[a].filename)),o[a].message&&e(i("#",n+"-"+a)).text(r(o[a].message)))}}),!1}),e(i("@","restrict_api")).on("change",function(){e('input[class*="remote"]').prop("disabled",e(this).prop("checked"))}).trigger("change"),e(i("@","save_statistics")).on("change",function(){return e(i("@","validation_recdays")).prop("disabled",!e(this).prop("checked")),!1}).trigger("change"),e(i("@","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(i("@","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(i("@","comment_pos")).on("change",function(){var t=e(this);t.nextAll('input[type="text"]').prop("disabled",0===Number(t.prop("selectedIndex")))}).trigger("change"),M("validate"),e(i("#","export")).on("click",function(){if("undefined"==typeof JSON)return u(),!1;var t=c,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(i("#","export-data")).val(JSON.stringify(n)),e(i("#","export-form")).submit(),!1}),e(i("#","file-dialog")).on("change",function(e){if("undefined"==typeof t.FileReader)return u(),!1;var n,i=e.target.files[0];return i&&S(i,function(e){e=JSON.parse(e),n=c+"[signature]","undefined"!=typeof e[n]&&(e[n]=C(e[n])),f("export-import",{cmd:"validate",data:JSON.stringify(e)},function(e){I(e,!0)})}),!1}),e(i("#","import")).on("click",function(){return e(i("#","file-dialog")).click(),!1}),e(i("#","default")).on("click",function(){return s(H.msg[0],function(){f("pre-defined",{cmd:"import-default"},function(e){I(e,!0)})}),!1}),e(i("#","preferred")).on("click",function(){return s(H.msg[0],function(){f("pre-defined",{cmd:"import-preferred"},function(e){I(e,!1)})}),!1}),e(i("@","reset_live")).on("click",function(){return f("reset-live",{cmd:"reset-live"}),!1}),e(i("@","create_table")).on("click",function(){return s(H.msg[1],function(){g("create-table")}),!1}),e(i("@","delete_table")).on("click",function(){return s(H.msg[2],function(){g("delete-table")}),!1}),e(i("#","show-info")).on("click",function(){e(i("#","wp-info")).empty(),f("wp-info",{cmd:"show-info"},function(t){var n,a=[];for(n in t)t.hasOwnProperty(n)&&a.push("- "+n+" "+t[n]);return e(i("#","wp-info")).html('<textarea class="regular-text code" rows="'+a.length+'">'+a.join("\n")+"</textarea>").find("textarea").select(),!1})}),e('select[name^="'+c+'"]').on("change",function(){var t=e(this);return v(t),w(t,t,c,!0),!1}).change(),e(i(".","icon-cycle")).on("click",function(){var t,n=e(this).nextAll("li"),a=n.find(i("@","exception_admin")),o=n.find("input:checkbox").filter(":visible"),r=o.filter(":checked").length;return o.prop("checked",!r),a.length&&(r?a.val(""):(t=[],o.each(function(n,i){t.push(e(i).val())}),a.val(t.join(",")))),e(this).blur(),!1}),e(i(".","settings-folding>dfn")).on("click",function(){var t=i("drop"),n=e(this).parent();return n.children(i(".","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(i("@","signature")),n=t.val();return-1!==n.indexOf(",")&&t.val(C(n)),!0});break;case 1:j(a);var y=0;e(i("#","sort-slug")).on("click",function(){var t=e(this).closest("ol"),n=t.children("li");y=!y,y?n.sort(function(t,n){return e(t).text()>e(n).text()}):n.sort(function(t,n){return parseInt(e(t).text().replace(/^.*\((\d+)\)$/,"$1"),10)<=parseInt(e(n).text().replace(/^.*\((\d+)\)$/,"$1"),10)}),t.children("li").remove(),n.appendTo(t)}),e(i("@","clear_statistics")).on("click",function(){return s(H.msg[3],function(){h("statistics",null)}),!1}),e(i("@","clear_logs")).on("click",function(){return s(H.msg[5],function(){h("logs",null)}),!1}),$(a,{tableID:"statistics-cache",ajaxCMD:"restore-cache",sectionID:"section-2",targetColumn:4,columnIP:1,columnAS:3},{columns:[{title:'<input type="checkbox">'},{title:H.i18n[3]},{title:H.i18n[4]},{title:H.i18n[5]},{title:H.i18n[6]},{title:H.i18n[7]},{title:H.i18n[8]},{title:H.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]}]}),M("export-cache"),e(i("#","export-cache")).on("click",function(){return e(i("#","export-form")).submit(),!1});break;case 4:var x={tableID:"validation-logs",sectionID:"section-0",targetColumn:6,columnIP:3,columnAS:5},_={columns:[{title:'<input type="checkbox">'},{title:""},{title:H.i18n[10]},{title:H.i18n[3]},{title:H.i18n[4]},{title:H.i18n[5]},{title:H.i18n[7]},{title:H.i18n[11]},{title:H.i18n[12]},{title:H.i18n[13]},{title:H.i18n[14]},{title:H.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]}]},O=null,D=null,N=e(i("#","live-loading")),T=null,R=function(){O&&(t.clearTimeout(O),O=null),D&&(N.removeClass(i("live-timer")),t.clearTimeout(D),D=null)},B=function(){R(),f("live-loading",{cmd:"live-start"},function(e){if(e.error)d(null,e.error);else if(e.data.length){var n,i=e.data.length;for(n=0;i>n;n++)T.row.add(e.data[n]);T.draw(!1)}O=t.setTimeout(B,1e3*H.interval)})},q=function(e,t){R(),f(null,{cmd:e||"live-stop",callback:t})},U=function(){q("live-pause",function(){N.addClass(i("live-timer")),D=t.setTimeout(function(){R(),e(i("#","live-log-stop")).prop("checked",!0)},1e3*H.timeout)})},W=i(""),F=function(t,n,i){o(n[7])?e(t).addClass(W+i+"blocked"):e(t).addClass(W+i+"passed")},K=e(i("#","live-log")),Y=e(i("#","live-update"));e(i("#","validation-logs")).on("animationend",function(){return e(this).find('tr[class*="'+W+'new"]').each(function(){var t=e(this);-1!==t.prop("class").indexOf("passed")?t.addClass(W+"passed").removeClass(W+"new-passed"):t.addClass(W+"blocked").removeClass(W+"new-blocked")}),!1}),K.on("change",function(){switch(e('input[name="'+i("live-log")+'"]:checked').val()){case"start":B();break;case"pause":U();break;case"stop":q()}}),Y.on("change",function(){var t=K.closest("tr"),n=Y.prop("checked");return l[a][1]=n?"o":"x",L(l),T&&T.clear().destroy(),n?(t.show().next().next().next().nextAll().hide(),x.ajaxCMD="live-stop",_.order=[1,"desc"],_.createdRow=function(e,t){F(e,t,"new-")}):(t.hide().next().next().next().nextAll().show(),x.ajaxCMD="restore-logs",_.order=[0,""],_.createdRow=function(e,t){F(e,t,"")}),e(i("#","live-log-stop")).trigger("click"),T=$(a,x,_),!1}).trigger("change"),M("export-logs"),e(i("#","export-logs")).on("click",function(){return e(i("#","export-form")).submit(),!1});break;case 2:e(t).on(i("gmap-error"),function(){f(null,{cmd:"gmap-error"},function(e){p(e.page,e.tab)})});var Q=e(i("#","map"));"object"==typeof t.google?Q.each(function(){e(this).GmapRS()}):Q.each(function(){e(this).empty().html('<iframe src="'+H.altgmap+'?output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')}),e('select[id^="'+i("!","service")+'"]').on("change",function(){l[a][3]=e(this).prop("selectedIndex"),L(l)}).change(),e(i("@","get_location")).on("click",function(){var n,a=e(i("#","whois")),o=e.trim(e(i("@","ip_address")).val());return o&&(e(i("@","anonymize")).prop("checked")&&(o=o.replace(/([\.\:])\w{1,4}$/,"$10"),e(i("@","ip_address")).val(o)),a.hide().empty(),n=e.whois(o,function(t){var n,o="";for(n=0;n<t.length;++n)o+="<tr><td>"+t[n].name+"</td><td>"+t[n].value+"</td></tr>";a.html('<fieldset id="'+i("section-1")+'" class="'+i("field")+' panel panel-default" data-section="1"><legend class="panel-heading"><h3 id="'+i("whois-title")+'" class="'+i("dropdown")+'">Whois</h3></legend><div class="panel-body '+i("border")+'"><table class="'+i("table")+'">'+o+"</table></div></fieldset>").fadeIn("slow"),e(i("#","whois-title")).on("click",function(){var t=e(this);return t.parent().nextAll().toggle(),t.toggleClass(i("dropup")).toggleClass(i("dropdown")),!1})}),f("loading",{cmd:"search",ip:o,which:e(i("@","service")).val()},function(e){var n,a="",l=r(e.latitude||"0"),c=r(e.longitude||"0"),s=e.latitude||e.longitude?8:2;for(n in e)e.hasOwnProperty(n)&&(n=r(n),a+='<li><span class="'+i("title")+'">'+n+' : </span><span class="'+i("result")+'">'+r(e[n])+"</span></li>");"object"==typeof t.google?Q.GmapRS("addMarker",{latitude:l,longitude:c,title:o,content:"<ul>"+a+"</ul>",show:!0,zoom:s}):Q.css({height:"600px",backgroundColor:"transparent"}).empty().html('<ul style="margin-top:0; margin-left:1em;"><li><span class="'+i("title")+'">IP address : </span><span class="'+i("result")+'">'+r(o)+"</span></li>"+a+'</ul><iframe src="//maps.google.com/maps?q='+l+","+c+"&z="+s+'&output=embed" frameborder="0" style="width:100%; height:400px; border:0" allowfullscreen></iframe>')},[n])),!1}),e(i("@","ip_address")).on("keypress",function(t){return t.which&&13===t.which||t.keyCode&&13===t.keyCode?(e(i("@","get_location")).click(),!1):void 0}),e(i("@","ip_address")).val()&&e(i("@","get_location")).click();break;case 5:j(a),e("input[name="+i("duration")+"]:radio").on("click",function(){var t=e('div[class*="paginate"]').find('a[class*="current"]').text();l[a][2]=e(this).val()||0,l[a][3]=l[a][3]||2,l[a][4]=l[a][4]||1,L(l),G.ajaxStacked(l[a][2],l[a][3],l[a][4],t-1)}),e(i("#","open-new")).on("change",function(){var t=e(this).prop("checked");l[a][1]=t?"o":"x",L(l),e(i("#","section-0 svg")).find("a").each(function(){this.setAttribute("target",t?"_blank":"_self")})}),e(i("#","apply-layout")).on("click",function(){var t=e(i("#","select-layout"));l[a][3]=t.find('select[name="rows"] option:selected').val(),l[a][4]=t.find('select[name="cols"] option:selected').val(),L(l)}),e("ul.wp-submenu>li.wp-first-item").removeClass("current").next().addClass("current")}})}(jQuery,window,document);
classes/class-ip-geo-block-apis.php CHANGED
@@ -204,14 +204,14 @@ abstract class IP_Geo_Block_API {
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
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%',
215
  'api' => array(
216
  '%API_FORMAT%' => 'json',
217
  ),
@@ -524,12 +524,6 @@ class IP_Geo_Block_API_Cache extends IP_Geo_Block_API {
524
  class IP_Geo_Block_Provider {
525
 
526
  protected static $providers = array(
527
- 'Ipdata.co' => array(
528
- 'key' => NULL,
529
- 'type' => 'IPv4, IPv6 / free',
530
- '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 for 1500 requests/day)',
531
- ),
532
-
533
  'ipinfo.io' => array(
534
  'key' => NULL,
535
  'type' => 'IPv4, IPv6 / free',
@@ -554,6 +548,12 @@ class IP_Geo_Block_Provider {
554
  '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)',
555
  ),
556
 
 
 
 
 
 
 
557
  'ipstack' => array(
558
  'key' => '',
559
  'type' => 'IPv4, IPv6 / free for registered user',
@@ -630,7 +630,7 @@ class IP_Geo_Block_Provider {
630
  $list = array();
631
  $providers = $settings['providers'];
632
 
633
- foreach ( self::get_providers( 'key', $rand, $cache, ! $settings['anonymize'] && $all ) as $key => $val ) {
634
  if ( ! empty( $providers[ $key ] ) || ( ! isset( $providers[ $key ] ) && NULL === $val ) )
635
  $list[] = $key;
636
  }
@@ -658,7 +658,7 @@ class IP_Geo_Block_Provider {
658
  }
659
 
660
  if ( 0 === $field )
661
- return __( 'You need to select at least one IP geolocation service. Otherwise <strong>you\'ll be blocked</strong> after the cache expires.', 'ip-geo-block' );
662
 
663
  return NULL;
664
  }
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
  ),
524
  class IP_Geo_Block_Provider {
525
 
526
  protected static $providers = array(
 
 
 
 
 
 
527
  'ipinfo.io' => array(
528
  'key' => NULL,
529
  'type' => 'IPv4, IPv6 / free',
548
  '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)',
549
  ),
550
 
551
+ 'Ipdata.co' => array(
552
+ 'key' => '',
553
+ 'type' => 'IPv4, IPv6 / free',
554
+ 'link' => '<a rel="noreferrer" href="https://ipdata.co/" title="ipdata.co - IP Geolocation and Threat Data API">https://ipdata.co/</a>&nbsp;(IPv4, IPv6 / up to 1500 requests daily free for registered user)',
555
+ ),
556
+
557
  'ipstack' => array(
558
  'key' => '',
559
  'type' => 'IPv4, IPv6 / free for registered user',
630
  $list = array();
631
  $providers = $settings['providers'];
632
 
633
+ foreach ( self::get_providers( 'key', $rand, $cache, empty( $settings['restrict_api'] ) && $all ) as $key => $val ) {
634
  if ( ! empty( $providers[ $key ] ) || ( ! isset( $providers[ $key ] ) && NULL === $val ) )
635
  $list[] = $key;
636
  }
658
  }
659
 
660
  if ( 0 === $field )
661
+ return __( 'You need to select at least one IP Geolocation API. Otherwise <strong>you\'ll be blocked</strong> after the cache expires.', 'ip-geo-block' );
662
 
663
  return NULL;
664
  }
classes/class-ip-geo-block-cron.php CHANGED
@@ -180,8 +180,8 @@ class IP_Geo_Block_Cron {
180
  self::stop_cache_gc();
181
 
182
  IP_Geo_Block_Logs::delete_expired( array(
183
- $settings['validation']['explogs'],
184
- $settings['cache_time']
185
  ) );
186
 
187
  self::start_cache_gc( $settings );
180
  self::stop_cache_gc();
181
 
182
  IP_Geo_Block_Logs::delete_expired( array(
183
+ (int)$settings['validation']['explogs'] * DAY_IN_SECONDS,
184
+ (int)$settings['cache_time']
185
  ) );
186
 
187
  self::start_cache_gc( $settings );
classes/class-ip-geo-block-logs.php CHANGED
@@ -13,9 +13,12 @@
13
  define( 'IP_GEO_BLOCK_MAX_STR_LEN', 255 );
14
  define( 'IP_GEO_BLOCK_MAX_BIN_LEN', 512 );
15
 
 
 
 
 
16
  class IP_Geo_Block_Logs {
17
 
18
- const CRYPT_KEY = NONCE_KEY;
19
  const TABLE_LOGS = 'ip_geo_block_logs';
20
  const TABLE_STAT = 'ip_geo_block_stat';
21
 
@@ -30,6 +33,9 @@ class IP_Geo_Block_Logs {
30
  'daystats' => array(),
31
  );
32
 
 
 
 
33
  // SQLite for Live update
34
  private static $pdo = NULL;
35
  private static $stm = NULL;
@@ -109,7 +115,97 @@ class IP_Geo_Block_Logs {
109
  }
110
 
111
  /**
112
- * Delete
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  *
114
  */
115
  public static function delete_tables( $which = 'all' ) {
@@ -138,7 +234,7 @@ class IP_Geo_Block_Logs {
138
  return sprintf( __( 'Creating a DB table %s had failed. Once de-activate this plugin, and then activate again.', 'ip-geo-block' ), $table );
139
 
140
  $result = $wpdb->get_results( "SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table'", ARRAY_A );
141
- foreach ( $result as $col ) {
142
  if ( in_array( $col['COLUMN_NAME'], array( 'ip', 'host' ), TRUE ) && 'varbinary' !== $col['DATA_TYPE'] )
143
  return sprintf( __( 'Column type in %s unmatched. Once de-activate this plugin, and then activate again.', 'ip-geo-block' ), $table );
144
  }
@@ -177,8 +273,7 @@ class IP_Geo_Block_Logs {
177
  public static function restore_stat( $default = FALSE ) {
178
  global $wpdb;
179
  $table = $wpdb->prefix . self::TABLE_STAT;
180
-
181
- $data = $wpdb->get_results( "SELECT * FROM `$table`", ARRAY_A ) or self::error( __LINE__ );
182
  return empty( $data ) ? ( $default ? self::$default : FALSE ) : unserialize( $data[0]['data'] );
183
  }
184
 
@@ -336,7 +431,7 @@ class IP_Geo_Block_Logs {
336
  }
337
 
338
  $headers = self::truncate_utf8( implode( ',', $headers ) );
339
- return $anonymize ? IP_Geo_Block_Util::anonymize_ip( $headers ) : $headers;
340
  }
341
 
342
  private static function get_post_data( $hook, $validate, $settings ) {
@@ -435,7 +530,9 @@ class IP_Geo_Block_Logs {
435
  register_shutdown_function( 'IP_Geo_Block_Logs::close_sqlite_db' );
436
 
437
  // Set data source name
438
- $id = apply_filters( IP_Geo_Block::PLUGIN_NAME . '-live-log', ($dsn ? ':memory:' : get_temp_dir() . IP_Geo_Block::PLUGIN_NAME . "-${id}.sqlite") );
 
 
439
 
440
  try {
441
  $pdo = new PDO( 'sqlite:' . $id, null, null, array(
@@ -527,7 +624,7 @@ class IP_Geo_Block_Logs {
527
 
528
  // anonymize ip address
529
  if ( $settings['anonymize'] )
530
- $validate['ip'] = preg_replace( '/\w{1,3}$/', '***', $validate['ip'] );
531
 
532
  if ( $record ) {
533
  // count the number of rows for each hook
@@ -543,29 +640,46 @@ class IP_Geo_Block_Logs {
543
  ) and $wpdb->query( $sql ) or self::error( __LINE__ );
544
 
545
  // insert into DB
546
- $sql = $wpdb->prepare(
547
- "INSERT INTO `$table`
548
- (`time`, `ip`, `asn`, `hook`, `auth`, `code`, `result`, `method`, `user_agent`, `headers`, `data`)
549
- VALUES (%d, AES_ENCRYPT(%s, %s), %s, %s, %d, %s, %s, %s, %s, AES_ENCRYPT(%s, %s), %s)",
550
- $_SERVER['REQUEST_TIME'],
551
- $validate['ip'],
552
- self::CRYPT_KEY,
553
- $validate['asn'],
554
- $hook,
555
- $validate['auth'],
556
- $validate['code'],
557
- $validate['result'],
558
- $method,
559
- $agent,
560
- $heads,
561
- self::CRYPT_KEY,
562
- $posts
563
- ) and $wpdb->query( $sql ) or self::error( __LINE__ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
564
 
565
  // backup logs to text files
566
- if ( $dir = apply_filters(
567
- IP_Geo_Block::PLUGIN_NAME . '-backup-dir', $settings['validation']['backup'], $hook
568
- ) ) {
569
  self::backup_logs( $hook, $validate, $method, $agent, $heads, $posts, $dir );
570
  }
571
  }
@@ -627,7 +741,7 @@ class IP_Geo_Block_Logs {
627
 
628
  try {
629
  self::$pdo->beginTransaction(); // possibly throw an PDOException
630
- if ( self::$stm = self::$pdo->query( "SELECT hook, time, ip, code, result, asn, method, user_agent, headers, data FROM " . self::TABLE_LOGS . " WHERE blog_id = ${id};" ) ) {
631
  $result = self::$stm->fetchAll( PDO::FETCH_NUM ); // array or FALSE
632
  self::$pdo->exec( "DELETE FROM " . self::TABLE_LOGS . " WHERE blog_id = ${id};" ); // int or FALSE
633
  }
@@ -652,14 +766,20 @@ class IP_Geo_Block_Logs {
652
  * @param string $hook type of log name
653
  * @return array log data
654
  */
655
- public static function restore_logs( $hook = NULL ) {
656
  global $wpdb;
657
  $table = $wpdb->prefix . self::TABLE_LOGS;
658
 
659
- $sql = $wpdb->prepare(
660
- "SELECT `hook`, `time`, `ip`, AES_DECRYPT(`ip`, %s), `code`, `result`, `asn`, `method`, `user_agent`, `headers`, AES_DECRYPT(`headers`, %s), `data` FROM `$table`",
661
- self::CRYPT_KEY, self::CRYPT_KEY
662
- );
 
 
 
 
 
 
663
 
664
  if ( in_array( $hook, array( 'comment', 'login', 'admin', 'xmlrpc', 'public' ), TRUE ) )
665
  $sql .= $wpdb->prepare( " WHERE `hook` = %s ORDER BY `time` DESC", $hook );
@@ -669,12 +789,15 @@ class IP_Geo_Block_Logs {
669
  $result = $sql ? $wpdb->get_results( $sql, ARRAY_N ) : array();
670
 
671
  foreach ( $result as $key => $val ) {
672
- if ( ctype_print( $result[ $key ][2] ) ) {
673
- array_splice( $result[ $key ], 3, 1 ); // remove encrypted `ip`
674
- array_splice( $result[ $key ], 9, 1 ); // remove encrypted `headers`
 
 
 
675
  } else {
676
- array_splice( $result[ $key ], 2, 1 ); // keep decrypted `ip`
677
- array_splice( $result[ $key ], 8, 1 ); // keep decrypted `headers`
678
  }
679
  }
680
 
@@ -692,15 +815,25 @@ class IP_Geo_Block_Logs {
692
  if ( $settings['anonymize'] )
693
  $ip = IP_Geo_Block_Util::anonymize_ip( $ip );
694
 
695
- $sql = $wpdb->prepare(
696
- "SELECT `time`, `ip`, AES_DECRYPT(`ip`, %s), `asn`, `hook`, `auth`, `code`, `result`, `method`, `user_agent`, `headers`, AES_DECRYPT(`headers`, %s), `data` FROM `$table` WHERE `ip` = AES_ENCRYPT(%s, %s)",
697
- self::CRYPT_KEY, self::CRYPT_KEY, $ip, self::CRYPT_KEY
698
- ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
699
 
700
- empty( $result ) and $result = array();
 
 
 
 
 
 
 
 
 
 
701
 
702
- foreach ( $result as $key => $val ) {
703
- if ( ctype_print( $result[ $key ][2] ) ) {
 
 
 
704
  array_splice( $result[ $key ], 3, 1 ); // remove encrypted `ip`
705
  array_splice( $result[ $key ], 11, 1 ); // remove encrypted `headers`
706
  } else {
@@ -725,9 +858,18 @@ class IP_Geo_Block_Logs {
725
  global $wpdb;
726
  $table = $wpdb->prefix . self::TABLE_LOGS;
727
 
 
 
728
  foreach ( array_unique( (array)$entry ) as $ip ) {
729
- $sql = $wpdb->prepare( "DELETE FROM `$table` WHERE `ip` = AES_ENCRYPT(%s, %s) OR `ip` = %s", $ip, self::CRYPT_KEY, $ip )
730
- and $result = ( FALSE !== $wpdb->query( $sql ) ) or self::error( __LINE__ );
 
 
 
 
 
 
 
731
  }
732
 
733
  return isset( $result ) ? $result : FALSE;
@@ -741,15 +883,24 @@ class IP_Geo_Block_Logs {
741
  global $wpdb;
742
  $table = $wpdb->prefix . self::TABLE_LOGS;
743
 
744
- $sql = $wpdb->prepare(
745
- "SELECT `time`, `ip`, AES_DECRYPT(`ip`, %s), `asn`, `hook`, `code`, `method`, `data` FROM `$table` WHERE `time` > %d",
746
- self::CRYPT_KEY, $_SERVER['REQUEST_TIME'] - $duration
747
- ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
748
 
749
- empty( $result ) and $result = array();
 
 
 
 
 
 
 
 
 
 
750
 
751
- foreach ( $result as $key => $val ) {
752
- if ( ctype_print( $result[ $key ][1] ) ) {
 
 
753
  array_splice( $result[ $key ], 2, 1 ); // remove encrypted `ip`
754
  } else {
755
  array_splice( $result[ $key ], 1, 1 ); // keep decrypted `ip`
@@ -774,19 +925,18 @@ class IP_Geo_Block_Logs {
774
  global $wpdb;
775
  $table = $wpdb->prefix . self::TABLE_LOGS;
776
 
777
- $result = array();
778
 
779
  $sql = $wpdb->prepare(
780
- "SELECT `time`, `ip`, AES_DECRYPT(`ip`, %s), `asn`, `hook`, `code`, `method`, `data` FROM `$table` WHERE `result` NOT LIKE '%%pass%%' AND `" . $key . "` LIKE '%%%s%%'",
781
- self::CRYPT_KEY, $search
782
  ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
783
 
784
- foreach ( $result as $key => $val ) {
785
- if ( ctype_print( $result[ $key ][1] ) ) {
786
  array_splice( $result[ $key ], 2, 1 ); // remove encrypted `ip`
787
- } else {
788
  array_splice( $result[ $key ], 1, 1 ); // keep decrypted `ip`
789
- }
790
 
791
  $result[ $key ] = array_combine(
792
  array( 'time', 'ip', 'asn', 'hook', 'code', 'method', 'data' ),
@@ -841,6 +991,10 @@ class IP_Geo_Block_Logs {
841
  public static function clear_cache() {
842
  global $wpdb;
843
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
 
 
 
 
844
  $wpdb->query( "TRUNCATE TABLE `$table`" ) or self::error( __LINE__ );
845
  }
846
 
@@ -852,14 +1006,30 @@ class IP_Geo_Block_Logs {
852
  global $wpdb;
853
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
854
 
855
- $sql = $wpdb->prepare(
856
- "SELECT `time`, `hook`, AES_DECRYPT(`ip`, %s), `asn`, `code`, `auth`, `fail`, `call`, `last`, `view`, AES_DECRYPT(`host`, %s), `ip` FROM `$table`",
857
- self::CRYPT_KEY, self::CRYPT_KEY
858
- ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
 
 
 
 
 
 
 
 
 
 
859
 
860
  // transform DB to cache format
861
  $cache = $hash = array();
862
- foreach ( (array)$result as $key => $val ) {
 
 
 
 
 
 
863
  // make the encrypted `ip` hashed so that it can be specified as a key
864
  $val = array_combine( array( 'time', 'hook', 'ip', 'asn', 'code', 'auth', 'fail', 'call', 'last', 'view', 'host', 'hash' ), $val );
865
  $val['hash'] = bin2hex( $val['hash'] );
@@ -887,12 +1057,24 @@ class IP_Geo_Block_Logs {
887
  global $wpdb;
888
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
889
 
890
- $sql = $wpdb->prepare(
891
- "SELECT `time`, `hook`, `asn`, `code`, `auth`, `fail`, `call`, `last`, `view`, AES_DECRYPT(`host`, %s) FROM `$table` WHERE `ip` = AES_ENCRYPT(%s, %s)",
892
- self::CRYPT_KEY, $ip, self::CRYPT_KEY
893
- ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
 
 
 
 
 
 
 
 
 
894
 
895
  if ( ! empty( $result[0] ) ) {
 
 
 
896
  $result[0] = array_combine( array( 'time', 'hook', 'asn', 'code', 'auth', 'fail', 'call', 'last', 'view', 'host' ), $result[0] );
897
  $result[0]['ip'] = $ip;
898
  return $result[0];
@@ -909,33 +1091,61 @@ class IP_Geo_Block_Logs {
909
  global $wpdb;
910
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
911
 
912
- $sql = $wpdb->prepare(
913
- "INSERT INTO `$table`
914
- (`time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `call`, `last`, `view`, `host`)
915
- VALUES (%d, %s, AES_ENCRYPT(%s, %s), %s, %s, %d, %d, %d, %d, %d, AES_ENCRYPT(%s, %s))
916
- ON DUPLICATE KEY UPDATE
917
- `time` = VALUES(`time`),
918
- `hook` = VALUES(`hook`),
919
- `auth` = VALUES(`auth`),
920
- `code` = VALUES(`code`),
921
- `fail` = VALUES(`fail`),
922
- `call` = VALUES(`call`),
923
- `last` = VALUES(`last`),
924
- `view` = VALUES(`view`)",
925
- $cache['time'],
926
- $cache['hook'],
927
- $cache['ip' ],
928
- self::CRYPT_KEY,
929
- $cache['asn' ],
930
- $cache['code'],
931
- $cache['auth'],
932
- $cache['fail'],
933
- $cache['call'],
934
- $cache['last'],
935
- $cache['view'],
936
- $cache['host'],
937
- self::CRYPT_KEY
938
- ) and $wpdb->query( $sql ) or self::error( __LINE__ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
939
  }
940
 
941
  /**
@@ -946,13 +1156,21 @@ class IP_Geo_Block_Logs {
946
  global $wpdb;
947
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
948
 
 
 
 
 
 
949
  foreach ( empty( $entry ) ? array( IP_Geo_Block::get_ip_address() ) : $entry as $ip ) {
950
  // if specified ip address is anonymized, then extract the encripted value
951
  $ip = explode( ',', $ip );
952
- if ( empty( $ip[1] ) )
953
- $sql = $wpdb->prepare( "DELETE FROM `$table` WHERE `ip` = AES_ENCRYPT(%s, %s)", $ip[0], self::CRYPT_KEY );
954
- else
 
 
955
  $sql = $wpdb->prepare( "DELETE FROM `$table` WHERE `ip` = UNHEX(%s)", $ip[1] );
 
956
 
957
  $sql and $result = ( FALSE !== $wpdb->query( $sql ) ) or self::error( __LINE__ );
958
  }
13
  define( 'IP_GEO_BLOCK_MAX_STR_LEN', 255 );
14
  define( 'IP_GEO_BLOCK_MAX_BIN_LEN', 512 );
15
 
16
+ // Cipher mode and type
17
+ define( 'IP_GEO_BLOCK_CIPHER_MODE', 2 ); // 0:before 3.0.13, 1:mysql default, 2:openssl
18
+ define( 'IP_GEO_BLOCK_CIPHER_TYPE', 'AES-256-CBC' ); // for openssl
19
+
20
  class IP_Geo_Block_Logs {
21
 
 
22
  const TABLE_LOGS = 'ip_geo_block_logs';
23
  const TABLE_STAT = 'ip_geo_block_stat';
24
 
33
  'daystats' => array(),
34
  );
35
 
36
+ // Cipher mode and key
37
+ private static $cipher = array();
38
+
39
  // SQLite for Live update
40
  private static $pdo = NULL;
41
  private static $stm = NULL;
115
  }
116
 
117
  /**
118
+ * Encrypts / Decrypts a string.
119
+ *
120
+ * @link https://php.net/manual/en/function.openssl-encrypt.php#119346
121
+ * @link https://mysqlserverteam.com/understand-and-satisfy-your-aes-encryption-needs-with-5-6-17/
122
+ *
123
+ * @param int $mode 0:before 3.0.12, 1:mysql default, 2:openssl
124
+ * @return array actual mode and cipher key
125
+ */
126
+ private static function cipher_mode_key( $mode = IP_GEO_BLOCK_CIPHER_MODE ) {
127
+ $mode and $mode = function_exists( 'openssl_cipher_iv_length' ) ? $mode : 1; // @since PHP 5.3.3
128
+
129
+ if ( empty( self::$cipher['mode'] ) ) {
130
+ // openssl
131
+ if ( 2 === $mode ) {
132
+ // `openssl_random_pseudo_bytes()` can not be used as an IV because of search function
133
+ self::$cipher['iv' ] = md5( NONCE_KEY . NONCE_SALT, TRUE ); // 16 bytes (128 bits)
134
+ self::$cipher['key'] = IP_Geo_Block_Util::hash_hmac(
135
+ function_exists( 'hash' ) ? 'sha256' /* 32 bytes (256 bits) */ : 'sha1' /* 20 bytes (160 bits) */,
136
+ AUTH_KEY, AUTH_SALT, TRUE
137
+ );
138
+ }
139
+
140
+ // mysql default
141
+ elseif ( 1 === $mode ) {
142
+ self::$cipher['key'] = md5( NONCE_KEY . NONCE_SALT, TRUE ); // 16 bytes (128 bits)
143
+ }
144
+
145
+ // before 3.0.12
146
+ else {
147
+ self::$cipher['key'] = NONCE_KEY;
148
+ }
149
+ }
150
+
151
+ return self::$cipher['mode'] = $mode;
152
+ }
153
+
154
+ private static function decrypt( $data ) {
155
+ return openssl_decrypt( $data, IP_GEO_BLOCK_CIPHER_TYPE, self::$cipher['key'], OPENSSL_RAW_DATA, self::$cipher['iv'] ); // @since PHP 5.3.0
156
+ }
157
+
158
+ private static function encrypt( $data ) {
159
+ return openssl_encrypt( $data, IP_GEO_BLOCK_CIPHER_TYPE, self::$cipher['key'], OPENSSL_RAW_DATA, self::$cipher['iv'] ); // @since PHP 5.3.0
160
+ }
161
+
162
+ private static function encrypt_ip( $ip ) {
163
+ return isset( self::$cipher[ $ip ] ) ? self::$cipher[ $ip ] : self::$cipher[ $ip ] = self::encrypt( $ip );
164
+ }
165
+
166
+ /**
167
+ * Upgrade
168
+ *
169
+ */
170
+ public static function upgrade( $version ) {
171
+ // delete IP address cache
172
+ self::clear_cache();
173
+
174
+ // restore logs by old format
175
+ $logs = self::restore_logs( NULL, FALSE ); // should be called before `cipher_mode_key()`
176
+
177
+ if ( 1 === ( $mode = self::cipher_mode_key() ) )
178
+ $key = bin2hex( self::$cipher['key'] );
179
+
180
+ // `No`, `hook`, `time`, `ip`, `code`, `result`, `asn`, `method`, `user_agent`, `headers`, `data`
181
+ $fields = $ips = $headers = array();
182
+ foreach ( $logs as $log ) {
183
+ if ( $log[3] ) { // if `ip` is successfully extracted
184
+ $fields[] = $log[0]; // `No`
185
+ if ( 2 === $mode ) {
186
+ $ips [] = "UNHEX('" . bin2hex( self::encrypt( $log[3] ) ) . "')"; // `ip`
187
+ $headers[] = "UNHEX('" . bin2hex( self::encrypt( $log[9] ) ) . "')"; // `headers`
188
+ } else {
189
+ $ips [] = "AES_ENCRYPT(UNHEX('" . bin2hex( $log[3] ) . "'), UNHEX('" . $key . "'))"; // `ip`
190
+ $headers[] = "AES_ENCRYPT(UNHEX('" . bin2hex( $log[9] ) . "'), UNHEX('" . $key . "'))"; // `headers`
191
+ }
192
+ }
193
+ }
194
+
195
+ // bulk update logs
196
+ if ( ! empty( $fields ) ) {
197
+ global $wpdb;
198
+ $table = $wpdb->prefix . self::TABLE_LOGS;
199
+
200
+ $sql = sprintf(
201
+ "UPDATE `$table` set `ip` = ELT(FIELD(`No`, %s), %s), `headers` = ELT(FIELD(`No`, %s), %s) WHERE `No` IN (%s)",
202
+ $fields = implode( ',', $fields ), implode( ',', $ips ), $fields, implode( ',', $headers ), $fields
203
+ ) and $wpdb->query( $sql ) or self::error( __LINE__ );
204
+ }
205
+ }
206
+
207
+ /**
208
+ * Delete specific tables
209
  *
210
  */
211
  public static function delete_tables( $which = 'all' ) {
234
  return sprintf( __( 'Creating a DB table %s had failed. Once de-activate this plugin, and then activate again.', 'ip-geo-block' ), $table );
235
 
236
  $result = $wpdb->get_results( "SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table'", ARRAY_A );
237
+ foreach ( empty( $result ) ? array() : $result as $col ) {
238
  if ( in_array( $col['COLUMN_NAME'], array( 'ip', 'host' ), TRUE ) && 'varbinary' !== $col['DATA_TYPE'] )
239
  return sprintf( __( 'Column type in %s unmatched. Once de-activate this plugin, and then activate again.', 'ip-geo-block' ), $table );
240
  }
273
  public static function restore_stat( $default = FALSE ) {
274
  global $wpdb;
275
  $table = $wpdb->prefix . self::TABLE_STAT;
276
+ $data = $wpdb->get_results( "SELECT * FROM `$table`", ARRAY_A ) or self::error( __LINE__ );
 
277
  return empty( $data ) ? ( $default ? self::$default : FALSE ) : unserialize( $data[0]['data'] );
278
  }
279
 
431
  }
432
 
433
  $headers = self::truncate_utf8( implode( ',', $headers ) );
434
+ return $anonymize ? IP_Geo_Block_Util::anonymize_ip( $headers, FALSE ) : $headers;
435
  }
436
 
437
  private static function get_post_data( $hook, $validate, $settings ) {
530
  register_shutdown_function( 'IP_Geo_Block_Logs::close_sqlite_db' );
531
 
532
  // Set data source name
533
+ $id = apply_filters( IP_Geo_Block::PLUGIN_NAME . '-live-log',
534
+ ( $dsn ? ':memory:' : get_temp_dir() . IP_Geo_Block::PLUGIN_NAME . "-${id}.sqlite" )
535
+ );
536
 
537
  try {
538
  $pdo = new PDO( 'sqlite:' . $id, null, null, array(
624
 
625
  // anonymize ip address
626
  if ( $settings['anonymize'] )
627
+ $validate['ip'] = IP_Geo_Block_Util::anonymize_ip( $validate['ip'] );
628
 
629
  if ( $record ) {
630
  // count the number of rows for each hook
640
  ) and $wpdb->query( $sql ) or self::error( __LINE__ );
641
 
642
  // insert into DB
643
+ if ( 2 === self::cipher_mode_key() ) {
644
+ $sql = $wpdb->prepare(
645
+ "INSERT INTO `$table`
646
+ (`time`, `ip`, `asn`, `hook`, `auth`, `code`, `result`, `method`, `user_agent`, `headers`, `data`)
647
+ VALUES (%d, %s, %s, %s, %d, %s, %s, %s, %s, %s, %s)",
648
+ $_SERVER['REQUEST_TIME'],
649
+ self::encrypt_ip( $validate['ip'] ),
650
+ $validate['asn'],
651
+ $hook,
652
+ $validate['auth'],
653
+ $validate['code'],
654
+ $validate['result'],
655
+ $method,
656
+ $agent,
657
+ self::encrypt( $heads ),
658
+ $posts
659
+ ) and $wpdb->query( $sql ) or self::error( __LINE__ );
660
+ } else {
661
+ $sql = $wpdb->prepare(
662
+ "INSERT INTO `$table`
663
+ (`time`, `ip`, `asn`, `hook`, `auth`, `code`, `result`, `method`, `user_agent`, `headers`, `data`)
664
+ VALUES (%d, AES_ENCRYPT(%s, %s), %s, %s, %d, %s, %s, %s, %s, AES_ENCRYPT(%s, %s), %s)",
665
+ $_SERVER['REQUEST_TIME'],
666
+ $validate['ip'],
667
+ self::$cipher['key'],
668
+ $validate['asn'],
669
+ $hook,
670
+ $validate['auth'],
671
+ $validate['code'],
672
+ $validate['result'],
673
+ $method,
674
+ $agent,
675
+ $heads,
676
+ self::$cipher['key'],
677
+ $posts
678
+ ) and $wpdb->query( $sql ) or self::error( __LINE__ );
679
+ }
680
 
681
  // backup logs to text files
682
+ if ( $dir = apply_filters( IP_Geo_Block::PLUGIN_NAME . '-backup-dir', $settings['validation']['backup'], $hook ) ) {
 
 
683
  self::backup_logs( $hook, $validate, $method, $agent, $heads, $posts, $dir );
684
  }
685
  }
741
 
742
  try {
743
  self::$pdo->beginTransaction(); // possibly throw an PDOException
744
+ if ( self::$stm = self::$pdo->query( "SELECT No, hook, time, ip, code, result, asn, method, user_agent, headers, data FROM " . self::TABLE_LOGS . " WHERE blog_id = ${id};" ) ) {
745
  $result = self::$stm->fetchAll( PDO::FETCH_NUM ); // array or FALSE
746
  self::$pdo->exec( "DELETE FROM " . self::TABLE_LOGS . " WHERE blog_id = ${id};" ); // int or FALSE
747
  }
766
  * @param string $hook type of log name
767
  * @return array log data
768
  */
769
+ public static function restore_logs( $hook = NULL, $upgrade = IP_GEO_BLOCK_CIPHER_MODE ) {
770
  global $wpdb;
771
  $table = $wpdb->prefix . self::TABLE_LOGS;
772
 
773
+ $mode = self::cipher_mode_key( $upgrade );
774
+
775
+ if ( 2 === $mode ) { // openssl
776
+ $sql = "SELECT `No`, `hook`, `time`, `ip`, `code`, `result`, `asn`, `method`, `user_agent`, `headers`, `data` FROM `$table`";
777
+ } else { // mysql default
778
+ $sql = $wpdb->prepare(
779
+ "SELECT `No`, `hook`, `time`, `ip`, AES_DECRYPT(`ip`, %s), `code`, `result`, `asn`, `method`, `user_agent`, `headers`, AES_DECRYPT(`headers`, %s), `data` FROM `$table`",
780
+ self::$cipher['key'], self::$cipher['key']
781
+ );
782
+ }
783
 
784
  if ( in_array( $hook, array( 'comment', 'login', 'admin', 'xmlrpc', 'public' ), TRUE ) )
785
  $sql .= $wpdb->prepare( " WHERE `hook` = %s ORDER BY `time` DESC", $hook );
789
  $result = $sql ? $wpdb->get_results( $sql, ARRAY_N ) : array();
790
 
791
  foreach ( $result as $key => $val ) {
792
+ if ( 2 === $mode ) {
793
+ $result[ $key ][3] = self::decrypt( $val[3] );
794
+ $result[ $key ][9] = self::decrypt( $val[9] );
795
+ } elseif ( ctype_print( $result[ $key ][3] ) ) {
796
+ array_splice( $result[ $key ], 4, 1 ); // remove encrypted `ip`
797
+ array_splice( $result[ $key ], 10, 1 ); // remove encrypted `headers`
798
  } else {
799
+ array_splice( $result[ $key ], 3, 1 ); // keep decrypted `ip`
800
+ array_splice( $result[ $key ], 9, 1 ); // keep decrypted `headers`
801
  }
802
  }
803
 
815
  if ( $settings['anonymize'] )
816
  $ip = IP_Geo_Block_Util::anonymize_ip( $ip );
817
 
818
+ $mode = self::cipher_mode_key();
 
 
 
819
 
820
+ if ( 2 === $mode ) { // openssl
821
+ $sql = $wpdb->prepare(
822
+ "SELECT `time`, `ip`, `asn`, `hook`, `auth`, `code`, `result`, `method`, `user_agent`, `headers`, `data` FROM `$table` WHERE `ip` = %s",
823
+ self::encrypt_ip( $ip )
824
+ ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
825
+ } else { // mysql default
826
+ $sql = $wpdb->prepare(
827
+ "SELECT `time`, `ip`, AES_DECRYPT(`ip`, %s), `asn`, `hook`, `auth`, `code`, `result`, `method`, `user_agent`, `headers`, AES_DECRYPT(`headers`, %s), `data` FROM `$table` WHERE `ip` = AES_ENCRYPT(%s, %s)",
828
+ self::$cipher['key'], self::$cipher['key'], $ip, self::$cipher['key']
829
+ ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
830
+ }
831
 
832
+ foreach ( empty( $result ) ? array() : $result as $key => $val ) {
833
+ if ( 2 === $mode ) {
834
+ $result[ $key ][1] = self::decrypt( $val[1] );
835
+ $result[ $key ][9] = self::decrypt( $val[9] );
836
+ } elseif ( ctype_print( $result[ $key ][2] ) ) {
837
  array_splice( $result[ $key ], 3, 1 ); // remove encrypted `ip`
838
  array_splice( $result[ $key ], 11, 1 ); // remove encrypted `headers`
839
  } else {
858
  global $wpdb;
859
  $table = $wpdb->prefix . self::TABLE_LOGS;
860
 
861
+ $mode = self::cipher_mode_key();
862
+
863
  foreach ( array_unique( (array)$entry ) as $ip ) {
864
+ if ( 2 === $mode ) {
865
+ $sql = $wpdb->prepare( "DELETE FROM `$table` WHERE `ip` = %s OR `ip` = %s",
866
+ self::encrypt_ip( $ip ), $ip
867
+ ) and $result = ( FALSE !== $wpdb->query( $sql ) ) or self::error( __LINE__ );
868
+ } else {
869
+ $sql = $wpdb->prepare( "DELETE FROM `$table` WHERE `ip` = AES_ENCRYPT(%s, %s) OR `ip` = %s",
870
+ $ip, self::$cipher['key'], $ip
871
+ ) and $result = ( FALSE !== $wpdb->query( $sql ) ) or self::error( __LINE__ );
872
+ }
873
  }
874
 
875
  return isset( $result ) ? $result : FALSE;
883
  global $wpdb;
884
  $table = $wpdb->prefix . self::TABLE_LOGS;
885
 
886
+ $mode = self::cipher_mode_key();
 
 
 
887
 
888
+ if ( 2 === $mode ) {
889
+ $sql = $wpdb->prepare(
890
+ "SELECT `time`, `ip`, `asn`, `hook`, `code`, `method`, `data` FROM `$table` WHERE `time` > %d",
891
+ $_SERVER['REQUEST_TIME'] - $duration
892
+ ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
893
+ } else {
894
+ $sql = $wpdb->prepare(
895
+ "SELECT `time`, `ip`, AES_DECRYPT(`ip`, %s), `asn`, `hook`, `code`, `method`, `data` FROM `$table` WHERE `time` > %d",
896
+ self::$cipher['key'], $_SERVER['REQUEST_TIME'] - $duration
897
+ ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
898
+ }
899
 
900
+ foreach ( empty( $result ) ? array() : $result as $key => $val ) {
901
+ if ( 2 === $mode ) {
902
+ $result[ $key ][1] = self::decrypt( $val[1] );
903
+ } elseif ( ctype_print( $result[ $key ][1] ) ) {
904
  array_splice( $result[ $key ], 2, 1 ); // remove encrypted `ip`
905
  } else {
906
  array_splice( $result[ $key ], 1, 1 ); // keep decrypted `ip`
925
  global $wpdb;
926
  $table = $wpdb->prefix . self::TABLE_LOGS;
927
 
928
+ self::cipher_mode_key();
929
 
930
  $sql = $wpdb->prepare(
931
+ "SELECT `time`, `ip`, AES_DECRYPT(`ip`, %s), `asn`, `hook`, `code`, `method`, `data` FROM `$table` " .
932
+ "WHERE `result` NOT LIKE '%%pass%%' AND `" . $key . "` LIKE '%%%s%%'", self::$cipher['key'], $search
933
  ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
934
 
935
+ foreach ( empty( $result ) ? array() : $result as $key => $val ) {
936
+ if ( ctype_print( $result[ $key ][1] ) )
937
  array_splice( $result[ $key ], 2, 1 ); // remove encrypted `ip`
938
+ else
939
  array_splice( $result[ $key ], 1, 1 ); // keep decrypted `ip`
 
940
 
941
  $result[ $key ] = array_combine(
942
  array( 'time', 'ip', 'asn', 'hook', 'code', 'method', 'data' ),
991
  public static function clear_cache() {
992
  global $wpdb;
993
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
994
+
995
+ if ( ! $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) )
996
+ return;
997
+
998
  $wpdb->query( "TRUNCATE TABLE `$table`" ) or self::error( __LINE__ );
999
  }
1000
 
1006
  global $wpdb;
1007
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
1008
 
1009
+ if ( ! $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) )
1010
+ return;
1011
+
1012
+ $mode = self::cipher_mode_key();
1013
+
1014
+ if ( 2 === $mode ) {
1015
+ $sql = "SELECT `time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `call`, `last`, `view`, `host` FROM `$table`";
1016
+ $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
1017
+ } else {
1018
+ $sql = $wpdb->prepare(
1019
+ "SELECT `time`, `hook`, AES_DECRYPT(`ip`, %s), `asn`, `code`, `auth`, `fail`, `call`, `last`, `view`, AES_DECRYPT(`host`, %s), `ip` FROM `$table`",
1020
+ self::$cipher['key'], self::$cipher['key']
1021
+ ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
1022
+ }
1023
 
1024
  // transform DB to cache format
1025
  $cache = $hash = array();
1026
+ foreach ( empty( $result ) ? array() : $result as $key => $val ) {
1027
+ if ( 2 === $mode ) {
1028
+ $val[11] = $val[ 2]; // `hash`
1029
+ $val[ 2] = self::decrypt( $val[ 2] ); // `ip`
1030
+ $val[10] = self::decrypt( $val[10] ); // `host`
1031
+ }
1032
+
1033
  // make the encrypted `ip` hashed so that it can be specified as a key
1034
  $val = array_combine( array( 'time', 'hook', 'ip', 'asn', 'code', 'auth', 'fail', 'call', 'last', 'view', 'host', 'hash' ), $val );
1035
  $val['hash'] = bin2hex( $val['hash'] );
1057
  global $wpdb;
1058
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
1059
 
1060
+ $mode = self::cipher_mode_key();
1061
+
1062
+ if ( 2 === $mode ) {
1063
+ $sql = $wpdb->prepare(
1064
+ "SELECT `time`, `hook`, `asn`, `code`, `auth`, `fail`, `call`, `last`, `view`, `host` FROM `$table` " .
1065
+ "WHERE `ip` = %s", self::encrypt_ip( $ip )
1066
+ ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
1067
+ } else {
1068
+ $sql = $wpdb->prepare(
1069
+ "SELECT `time`, `hook`, `asn`, `code`, `auth`, `fail`, `call`, `last`, `view`, AES_DECRYPT(`host`, %s) FROM `$table` " .
1070
+ "WHERE `ip` = AES_ENCRYPT(%s, %s)", self::$cipher['key'], $ip, self::$cipher['key']
1071
+ ) and $result = $wpdb->get_results( $sql, ARRAY_N ) or self::error( __LINE__ );
1072
+ }
1073
 
1074
  if ( ! empty( $result[0] ) ) {
1075
+ if ( 2 === $mode )
1076
+ $result[0][9] = self::decrypt( $result[0][9] ); // decrypt `host`
1077
+
1078
  $result[0] = array_combine( array( 'time', 'hook', 'asn', 'code', 'auth', 'fail', 'call', 'last', 'view', 'host' ), $result[0] );
1079
  $result[0]['ip'] = $ip;
1080
  return $result[0];
1091
  global $wpdb;
1092
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
1093
 
1094
+ if ( 2 === self::cipher_mode_key() ) {
1095
+ $sql = $wpdb->prepare(
1096
+ "INSERT INTO `$table`
1097
+ (`time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `call`, `last`, `view`, `host`)
1098
+ VALUES (%d, %s, %s, %s, %s, %d, %d, %d, %d, %d, %s)
1099
+ ON DUPLICATE KEY UPDATE
1100
+ `time` = VALUES(`time`),
1101
+ `hook` = VALUES(`hook`),
1102
+ `auth` = VALUES(`auth`),
1103
+ `code` = VALUES(`code`),
1104
+ `fail` = VALUES(`fail`),
1105
+ `call` = VALUES(`call`),
1106
+ `last` = VALUES(`last`),
1107
+ `view` = VALUES(`view`)",
1108
+ $cache['time'],
1109
+ $cache['hook'],
1110
+ self::encrypt_ip( $cache['ip'] ),
1111
+ $cache['asn' ],
1112
+ $cache['code'],
1113
+ $cache['auth'],
1114
+ $cache['fail'],
1115
+ $cache['call'],
1116
+ $cache['last'],
1117
+ $cache['view'],
1118
+ self::encrypt( $cache['host'] )
1119
+ ) and $wpdb->query( $sql ) or self::error( __LINE__ );
1120
+ } else {
1121
+ $sql = $wpdb->prepare(
1122
+ "INSERT INTO `$table`
1123
+ (`time`, `hook`, `ip`, `asn`, `code`, `auth`, `fail`, `call`, `last`, `view`, `host`)
1124
+ VALUES (%d, %s, AES_ENCRYPT(%s, %s), %s, %s, %d, %d, %d, %d, %d, AES_ENCRYPT(%s, %s))
1125
+ ON DUPLICATE KEY UPDATE
1126
+ `time` = VALUES(`time`),
1127
+ `hook` = VALUES(`hook`),
1128
+ `auth` = VALUES(`auth`),
1129
+ `code` = VALUES(`code`),
1130
+ `fail` = VALUES(`fail`),
1131
+ `call` = VALUES(`call`),
1132
+ `last` = VALUES(`last`),
1133
+ `view` = VALUES(`view`)",
1134
+ $cache['time'],
1135
+ $cache['hook'],
1136
+ $cache['ip' ],
1137
+ self::$cipher['key'],
1138
+ $cache['asn' ],
1139
+ $cache['code'],
1140
+ $cache['auth'],
1141
+ $cache['fail'],
1142
+ $cache['call'],
1143
+ $cache['last'],
1144
+ $cache['view'],
1145
+ $cache['host'],
1146
+ self::$cipher['key']
1147
+ ) and $wpdb->query( $sql ) or self::error( __LINE__ );
1148
+ }
1149
  }
1150
 
1151
  /**
1156
  global $wpdb;
1157
  $table = $wpdb->prefix . IP_Geo_Block::CACHE_NAME;
1158
 
1159
+ if ( ! $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) )
1160
+ return;
1161
+
1162
+ $mode = self::cipher_mode_key();
1163
+
1164
  foreach ( empty( $entry ) ? array( IP_Geo_Block::get_ip_address() ) : $entry as $ip ) {
1165
  // if specified ip address is anonymized, then extract the encripted value
1166
  $ip = explode( ',', $ip );
1167
+ if ( empty( $ip[1] ) ) {
1168
+ $sql = $wpdb->prepare( "DELETE FROM `$table` WHERE `ip` = %s",
1169
+ 2 === $mode ? self::encrypt_ip( $ip[0] ) : 'AES_ENCRYPT(' . $ip[0] . ', ' . self::$cipher['key'] . ')'
1170
+ );
1171
+ } else {
1172
  $sql = $wpdb->prepare( "DELETE FROM `$table` WHERE `ip` = UNHEX(%s)", $ip[1] );
1173
+ }
1174
 
1175
  $sql and $result = ( FALSE !== $wpdb->query( $sql ) ) or self::error( __LINE__ );
1176
  }
classes/class-ip-geo-block-opts.php CHANGED
@@ -16,7 +16,7 @@ class IP_Geo_Block_Opts {
16
  *
17
  */
18
  private static $option_table = array(
19
- 'version' => '3.0.12',// Version of this table (not package)
20
  // since version 1.0
21
  'providers' => array(), // List of providers and API keys
22
  'comment' => array( // Message on the comment form
@@ -31,7 +31,7 @@ class IP_Geo_Block_Opts {
31
  'save_statistics' => TRUE, // Record validation statistics
32
  'clean_uninstall' => TRUE, // Remove all savings from DB
33
  // since version 1.1
34
- 'cache_hold' => FALSE, // Record IP address cache
35
  'cache_time' => HOUR_IN_SECONDS, // @since 3.5
36
  // since version 3.0.0
37
  'cache_time_gc' => 900, // Cache garbage collection time
@@ -45,13 +45,13 @@ class IP_Geo_Block_Opts {
45
  'ajax' => 0, // Validate on ajax/post (1:country 2:ZEP)
46
  'xmlrpc' => 1, // Validate on xmlrpc (1:country 2:close)
47
  'proxy' => NULL, // $_SERVER variables for IPs
48
- 'reclogs' => 0, // 1:blocked 2:passed 3:unauth 4:auth 5:all 6:blocked/passed
49
  'postkey' => 'action,comment,log,pwd,FILES', // Keys in $_POST, $_FILES
50
  // since version 1.3.1
51
  'maxlogs' => 500, // Max number of rows for validation logs
52
  'backup' => NULL, // Absolute path to directory for backup logs
53
- // since version 3.0.12
54
- 'explogs' => WEEK_IN_SECONDS, // expiration time for logs
55
  // since version 2.1.0
56
  'plugins' => 0, // Validate on wp-content/plugins (1:country 2:ZEP)
57
  'themes' => 0, // Validate on wp-content/themes (1:country 2:ZEP)
@@ -188,6 +188,8 @@ class IP_Geo_Block_Opts {
188
  'time' => 10, // More than 10 page view in 10 seconds
189
  'view' => 10, // More than 10 page view in 10 seconds
190
  ),
 
 
191
  );
192
 
193
  /**
@@ -415,15 +417,22 @@ class IP_Geo_Block_Opts {
415
  if ( version_compare( $version, '3.0.12' ) < 0 ) {
416
  $settings['validation']['maxlogs'] = $default['validation']['maxlogs'];
417
  $settings['validation']['explogs'] = $default['validation']['explogs'];
 
 
418
  }
419
 
420
- // save package version number
 
 
 
 
 
421
  $settings['version'] = IP_Geo_Block::VERSION;
422
  }
423
 
424
  // install addons for IP Geolocation database API ver. 1.1.12
425
  $providers = IP_Geo_Block_Provider::get_addons();
426
- if ( empty( $providers ) || ! $settings['api_dir'] || version_compare( $version, '3.0.9' ) < 0 )
427
  $settings['api_dir'] = self::install_api( $settings );
428
 
429
  $settings['request_ua'] = trim( str_replace( array( 'InfiniteWP' ), '', @$_SERVER['HTTP_USER_AGENT'] ) );
@@ -461,12 +470,13 @@ class IP_Geo_Block_Opts {
461
  public static function delete_api( $settings ) {
462
  require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
463
  $fs = IP_Geo_Block_FS::init( 'delete_api' );
 
464
  return $fs->delete( self::get_api_dir( $settings ), TRUE ); // $recursive = true
465
  }
466
 
467
  private static function get_api_dir( $settings ) {
468
  // wp-content
469
- $dir = empty( $settings['api_dir'] ) ? WP_CONTENT_DIR : dirname( $settings['api_dir'] );
470
 
471
  if ( ! @is_writable( $dir ) ) {
472
  // wp-content/uploads
16
  *
17
  */
18
  private static $option_table = array(
19
+ 'version' => '3.0.13',// Version of this table (not package)
20
  // since version 1.0
21
  'providers' => array(), // List of providers and API keys
22
  'comment' => array( // Message on the comment form
31
  'save_statistics' => TRUE, // Record validation statistics
32
  'clean_uninstall' => TRUE, // Remove all savings from DB
33
  // since version 1.1
34
+ 'cache_hold' => TRUE, // Record IP address cache
35
  'cache_time' => HOUR_IN_SECONDS, // @since 3.5
36
  // since version 3.0.0
37
  'cache_time_gc' => 900, // Cache garbage collection time
45
  'ajax' => 0, // Validate on ajax/post (1:country 2:ZEP)
46
  'xmlrpc' => 1, // Validate on xmlrpc (1:country 2:close)
47
  'proxy' => NULL, // $_SERVER variables for IPs
48
+ 'reclogs' => 1, // 1:blocked 2:passed 3:unauth 4:auth 5:all 6:blocked/passed
49
  'postkey' => 'action,comment,log,pwd,FILES', // Keys in $_POST, $_FILES
50
  // since version 1.3.1
51
  'maxlogs' => 500, // Max number of rows for validation logs
52
  'backup' => NULL, // Absolute path to directory for backup logs
53
+ // since version 3.0.13
54
+ 'explogs' => 7, // expiration time for logs [days]
55
  // since version 2.1.0
56
  'plugins' => 0, // Validate on wp-content/plugins (1:country 2:ZEP)
57
  'themes' => 0, // Validate on wp-content/themes (1:country 2:ZEP)
188
  'time' => 10, // More than 10 page view in 10 seconds
189
  'view' => 10, // More than 10 page view in 10 seconds
190
  ),
191
+ // since version 3.0.13
192
+ 'restrict_api' => TRUE, // Do not send IP address to external APIs
193
  );
194
 
195
  /**
417
  if ( version_compare( $version, '3.0.12' ) < 0 ) {
418
  $settings['validation']['maxlogs'] = $default['validation']['maxlogs'];
419
  $settings['validation']['explogs'] = $default['validation']['explogs'];
420
+ } else if ( version_compare( $version, '3.0.13' ) < 0 ) {
421
+ $settings['validation']['explogs'] /= DAY_IN_SECONDS;
422
  }
423
 
424
+ if ( version_compare( $version, '3.0.13' ) < 0 ) {
425
+ $settings['restrict_api'] = $settings['anonymize'];
426
+ IP_Geo_Block_Logs::upgrade( $version );
427
+ }
428
+
429
+ // update package version number
430
  $settings['version'] = IP_Geo_Block::VERSION;
431
  }
432
 
433
  // install addons for IP Geolocation database API ver. 1.1.12
434
  $providers = IP_Geo_Block_Provider::get_addons();
435
+ if ( empty( $providers ) || ! $settings['api_dir'] || ! file_exists( $settings['api_dir'] ) || version_compare( $version, '3.0.9' ) < 0 )
436
  $settings['api_dir'] = self::install_api( $settings );
437
 
438
  $settings['request_ua'] = trim( str_replace( array( 'InfiniteWP' ), '', @$_SERVER['HTTP_USER_AGENT'] ) );
470
  public static function delete_api( $settings ) {
471
  require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
472
  $fs = IP_Geo_Block_FS::init( 'delete_api' );
473
+
474
  return $fs->delete( self::get_api_dir( $settings ), TRUE ); // $recursive = true
475
  }
476
 
477
  private static function get_api_dir( $settings ) {
478
  // wp-content
479
+ $dir = ( empty( $settings['api_dir'] ) || ! file_exists( $settings['api_dir'] ) ) ? WP_CONTENT_DIR : dirname( $settings['api_dir'] );
480
 
481
  if ( ! @is_writable( $dir ) ) {
482
  // wp-content/uploads
classes/class-ip-geo-block-util.php CHANGED
@@ -297,7 +297,7 @@ class IP_Geo_Block_Util {
297
  if ( function_exists( 'get_user_by' ) )
298
  return get_user_by( $field, $value );
299
 
300
- $userdata = WP_User::get_data_by( $field, $value ); // wp-includes/class-wp-user.php @since 2.0.0
301
 
302
  if ( ! $userdata )
303
  return FALSE;
@@ -308,30 +308,18 @@ class IP_Geo_Block_Util {
308
  return $user;
309
  }
310
 
311
- /**
312
- * WP alternative function for mu-plugins
313
- *
314
- * Filters whether the current request is a WordPress Ajax request.
315
- * @source wp-includes/load.php @since 4.7.0
316
- */
317
- public static function doing_ajax() {
318
- return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );
319
- }
320
-
321
  /**
322
  * WP alternative function for mu-plugins
323
  *
324
  * Validates authentication cookie.
325
  * @source wp-includes/pluggable.php
326
  */
327
- public static function validate_auth_cookie( $scheme = 'logged_in' ) {
328
- static $cache_uid = NULL;
329
-
330
- if ( NULL === $cache_uid ) {
331
- $cache_uid = FALSE;
332
 
 
333
  if ( ! ( $cookie = self::parse_auth_cookie( $scheme ) ) )
334
- return FALSE;
335
 
336
  $scheme = $cookie['scheme'];
337
  $username = $cookie['username'];
@@ -340,17 +328,17 @@ class IP_Geo_Block_Util {
340
  $expired = $expiration = $cookie['expiration'];
341
 
342
  // Allow a grace period for POST and Ajax requests
343
- if ( self::doing_ajax() || 'POST' === $_SERVER['REQUEST_METHOD'] )
344
  $expired += HOUR_IN_SECONDS;
345
 
346
  // Quick check to see if an honest cookie has expired
347
  if ( $expired < time() )
348
- return FALSE;
349
 
350
- if ( ! ( $user = self::get_user_by( 'login', $username ) ) ) // wp-includes/pluggable.php @since 2.8.0
351
- return FALSE;
352
 
353
- $pass_frag = substr( $user->user_pass, 8, 4 );
354
  $key = self::hash_nonce( $username . '|' . $pass_frag . '|' . $expiration . '|' . $token, $scheme );
355
 
356
  // If ext/hash is not present, compat.php's hash_hmac() does not support sha256.
@@ -358,16 +346,16 @@ class IP_Geo_Block_Util {
358
  $hash = self::hash_hmac( $algo, $username . '|' . $expiration . '|' . $token, $key );
359
 
360
  if ( ! self::hash_equals( $hash, $hmac ) )
361
- return FALSE;
362
-
363
- $manager = WP_Session_Tokens::get_instance( $user->ID ); // wp-includes/class-wp-session-tokens.php @since 4.0.0
364
- if ( ! $manager->verify( $token ) )
365
- return FALSE;
366
 
367
- $cache_uid = $user->ID;
 
 
 
 
368
  }
369
 
370
- return $cache_uid;
371
  }
372
 
373
  /**
@@ -412,7 +400,7 @@ class IP_Geo_Block_Util {
412
  * Generate a keyed hash value using the HMAC method.
413
  * @source http://php.net/manual/en/function.hash-hmac.php#93440
414
  */
415
- private static function hash_hmac( $algo, $data, $key, $raw_output = FALSE ) {
416
  // PHP 5 >= 5.1.2, PECL hash >= 1.1 or wp-includes/compat.php
417
  if ( function_exists( 'hash_hmac' ) )
418
  return hash_hmac( $algo, $data, $key, $raw_output );
@@ -486,9 +474,7 @@ class IP_Geo_Block_Util {
486
 
487
  header( "Location: $location", TRUE, $status );
488
  return TRUE;
489
- }
490
-
491
- else {
492
  return FALSE;
493
  }
494
  }
@@ -596,8 +582,12 @@ class IP_Geo_Block_Util {
596
  * @source wp-includes/pluggable.php
597
  */
598
  public static function is_user_logged_in() {
599
- // possibly logged in but should be verified after 'init' hook is fired.
600
- return did_action( 'init' ) ? is_user_logged_in() : (bool)( class_exists( 'WP_Session_Tokens', FALSE ) ? self::validate_auth_cookie() : self::parse_auth_cookie() );
 
 
 
 
601
  }
602
 
603
  /**
@@ -607,18 +597,12 @@ class IP_Geo_Block_Util {
607
  * @source wp-includes/user.php
608
  */
609
  public static function get_current_user_id() {
610
- static $cache_uid = NULL;
611
 
612
- if ( NULL === $cache_uid ) {
613
- if ( ! ( $cache_uid = ( did_action( 'init' ) ? get_current_user_id() : 0 ) ) ) {
614
- $keys = preg_grep( '/wp-settings-/', array_keys( isset( $_COOKIE ) ? $_COOKIE : array() ) );
615
- if ( $val = array_shift( $keys ) ) {
616
- $cache_uid = (int)substr( $val, strrpos( $val, '-' ) + 1 ); // get numerical characters
617
- }
618
- }
619
- }
620
 
621
- return $cache_uid;
622
  }
623
 
624
  /**
@@ -628,10 +612,10 @@ class IP_Geo_Block_Util {
628
  * @source wp-includes/capabilities.php
629
  */
630
  public static function current_user_can( $capability ) {
631
- do_action( IP_Geo_Block::PLUGIN_NAME . '-check-capability', $capability );
 
632
 
633
- // possibly logged in but should be verified after 'init' hook is fired.
634
- return did_action( 'init' ) ? current_user_can( $capability ) : (bool)( class_exists( 'WP_Session_Tokens', FALSE ) ? self::validate_auth_cookie() : self::parse_auth_cookie() );
635
  }
636
 
637
  /**
@@ -783,7 +767,6 @@ class IP_Geo_Block_Util {
783
  private static function is_IIS() {
784
  $_is_apache = ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'LiteSpeed' ) !== FALSE );
785
  $_is_IIS = ! $_is_apache && ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer' ) !== FALSE );
786
-
787
  return $_is_IIS ? substr( $_SERVER['SERVER_SOFTWARE'], strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/' ) + 14 ) : FALSE;
788
  }
789
 
@@ -945,19 +928,20 @@ class IP_Geo_Block_Util {
945
  * Anonymize IP address in string
946
  *
947
  */
948
- public static function anonymize_ip( $subject ) {
949
- return preg_replace(
950
- array(
951
- // loose pattern for IPv4
952
- '/([0-9]{9})[0-9]{3}([^0-9]?)/',
953
- '/([0-9]{1,3}[-\.][0-9]{1,3}[-\.][0-9]{1,3}[-\.])[0-9]+([^0-9]?)/',
954
-
955
- // loose pattern for IPv6
956
- '/((?:[0-9a-f:]+[-:]+)+)[0-9a-f\*]+([^0-9a-f]?)/i',
957
- ),
958
- '$1***$2',
959
- $subject
960
- );
 
961
  }
962
 
963
  /**
297
  if ( function_exists( 'get_user_by' ) )
298
  return get_user_by( $field, $value );
299
 
300
+ $userdata = WP_User::get_data_by( $field, $value ); // wp-includes/class-wp-user.php @since 3.3.0
301
 
302
  if ( ! $userdata )
303
  return FALSE;
308
  return $user;
309
  }
310
 
 
 
 
 
 
 
 
 
 
 
311
  /**
312
  * WP alternative function for mu-plugins
313
  *
314
  * Validates authentication cookie.
315
  * @source wp-includes/pluggable.php
316
  */
317
+ private static function validate_auth_cookie( $scheme = 'logged_in' ) {
318
+ static $cache_user = NULL;
 
 
 
319
 
320
+ if ( NULL === $cache_user ) {
321
  if ( ! ( $cookie = self::parse_auth_cookie( $scheme ) ) )
322
+ return $cache_user = FALSE;
323
 
324
  $scheme = $cookie['scheme'];
325
  $username = $cookie['username'];
328
  $expired = $expiration = $cookie['expiration'];
329
 
330
  // Allow a grace period for POST and Ajax requests
331
+ if ( defined( 'DOING_AJAX' ) || 'POST' === $_SERVER['REQUEST_METHOD'] )
332
  $expired += HOUR_IN_SECONDS;
333
 
334
  // Quick check to see if an honest cookie has expired
335
  if ( $expired < time() )
336
+ return $cache_user = FALSE;
337
 
338
+ if ( ! ( $cache_user = self::get_user_by( 'login', $username ) ) ) // wp-includes/pluggable.php @since 2.8.0
339
+ return $cache_user = FALSE;
340
 
341
+ $pass_frag = substr( $cache_user->user_pass, 8, 4 );
342
  $key = self::hash_nonce( $username . '|' . $pass_frag . '|' . $expiration . '|' . $token, $scheme );
343
 
344
  // If ext/hash is not present, compat.php's hash_hmac() does not support sha256.
346
  $hash = self::hash_hmac( $algo, $username . '|' . $expiration . '|' . $token, $key );
347
 
348
  if ( ! self::hash_equals( $hash, $hmac ) )
349
+ return $cache_user = FALSE;
 
 
 
 
350
 
351
+ if ( class_exists( 'WP_Session_Tokens', FALSE ) ) { // @since 4.0.0
352
+ $manager = WP_Session_Tokens::get_instance( $cache_user->ID );
353
+ if ( ! $manager->verify( $token ) )
354
+ return $cache_user = FALSE;
355
+ }
356
  }
357
 
358
+ return $cache_user;
359
  }
360
 
361
  /**
400
  * Generate a keyed hash value using the HMAC method.
401
  * @source http://php.net/manual/en/function.hash-hmac.php#93440
402
  */
403
+ public static function hash_hmac( $algo, $data, $key, $raw_output = FALSE ) {
404
  // PHP 5 >= 5.1.2, PECL hash >= 1.1 or wp-includes/compat.php
405
  if ( function_exists( 'hash_hmac' ) )
406
  return hash_hmac( $algo, $data, $key, $raw_output );
474
 
475
  header( "Location: $location", TRUE, $status );
476
  return TRUE;
477
+ } else {
 
 
478
  return FALSE;
479
  }
480
  }
582
  * @source wp-includes/pluggable.php
583
  */
584
  public static function is_user_logged_in() {
585
+ static $logged_in = NULL;
586
+
587
+ if ( NULL === $logged_in )
588
+ $logged_in = ( did_action( 'init' ) ? is_user_logged_in() /* @since 2.0.0 */ : ( ( $user = self::validate_auth_cookie() ) ? $user->exists() /* @since 3.4.0 */ : FALSE ) );
589
+
590
+ return $logged_in;
591
  }
592
 
593
  /**
597
  * @source wp-includes/user.php
598
  */
599
  public static function get_current_user_id() {
600
+ static $user_id = NULL;
601
 
602
+ if ( NULL === $user_id )
603
+ $user_id = ( did_action( 'init' ) ? get_current_user_id() /* @since MU 3.0.0 */ : ( ( $user = self::validate_auth_cookie() ) ? $user->ID /* @since 2.0.0 */ : 0 ) );
 
 
 
 
 
 
604
 
605
+ return $user_id;
606
  }
607
 
608
  /**
612
  * @source wp-includes/capabilities.php
613
  */
614
  public static function current_user_can( $capability ) {
615
+ if ( did_action( 'init' ) )
616
+ return current_user_can( $capability ); // @since 2.0.0
617
 
618
+ return ( $user = self::validate_auth_cookie() ) ? $user->has_cap( $capability ) : FALSE; // @since 2.0.0
 
619
  }
620
 
621
  /**
767
  private static function is_IIS() {
768
  $_is_apache = ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'LiteSpeed' ) !== FALSE );
769
  $_is_IIS = ! $_is_apache && ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) !== FALSE || strpos( $_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer' ) !== FALSE );
 
770
  return $_is_IIS ? substr( $_SERVER['SERVER_SOFTWARE'], strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/' ) + 14 ) : FALSE;
771
  }
772
 
928
  * Anonymize IP address in string
929
  *
930
  */
931
+ public static function anonymize_ip( $subject, $strict = TRUE ) {
932
+ return $strict ?
933
+ preg_replace( '/\w{1,3}$/', '***', $subject ) :
934
+ preg_replace(
935
+ array(
936
+ // loose pattern for IPv4
937
+ '/([0-9]{9})[0-9]{3}([^0-9]?)/',
938
+ '/([0-9]{1,3}[-\.][0-9]{1,3}[-\.][0-9]{1,3}[-\.])[0-9]+([^0-9]?)/',
939
+ // loose pattern for IPv6
940
+ '/((?:[0-9a-f:]+[-:]+)+)[0-9a-f:\*]+([^0-9a-f]?)/i',
941
+ ),
942
+ '$1***$2',
943
+ $subject
944
+ );
945
  }
946
 
947
  /**
classes/class-ip-geo-block.php CHANGED
@@ -15,7 +15,7 @@ class IP_Geo_Block {
15
  * Unique identifier for this plugin.
16
  *
17
  */
18
- const VERSION = '3.0.12.1';
19
  const GEOAPI_NAME = 'ip-geo-api';
20
  const PLUGIN_NAME = 'ip-geo-block';
21
  const OPTION_NAME = 'ip_geo_block_settings';
@@ -153,18 +153,6 @@ class IP_Geo_Block {
153
  // force to redirect on logout to remove nonce, embed a nonce into pages
154
  add_filter( 'wp_redirect', array( $this, 'logout_redirect' ), 20, 2 ); // logout_redirect @4.2
155
  add_filter( 'http_request_args', array( $this, 'request_nonce' ), $priority, 2 ); // @since 2.7.0
156
-
157
- // Hotfix: https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/
158
- add_filter( 'wp_update_attachment_metadata', array( $this, 'unlink_tempfix' ), $priority );
159
- }
160
-
161
- // Hotfix: WordPress File Delete to Code Execution
162
- function unlink_tempfix( $data ) {
163
- if( isset( $data['thumb'] ) ) {
164
- $data['thumb'] = basename( $data['thumb'] );
165
- }
166
-
167
- return $data;
168
  }
169
 
170
  /**
15
  * Unique identifier for this plugin.
16
  *
17
  */
18
+ const VERSION = '3.0.13';
19
  const GEOAPI_NAME = 'ip-geo-api';
20
  const PLUGIN_NAME = 'ip-geo-block';
21
  const OPTION_NAME = 'ip_geo_block_settings';
153
  // force to redirect on logout to remove nonce, embed a nonce into pages
154
  add_filter( 'wp_redirect', array( $this, 'logout_redirect' ), 20, 2 ); // logout_redirect @4.2
155
  add_filter( 'http_request_args', array( $this, 'request_nonce' ), $priority, 2 ); // @since 2.7.0
 
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
 
158
  /**
includes/Net/DNS2.php CHANGED
@@ -354,7 +354,7 @@ class Net_DNS2
354
  // only auto-load our classes
355
  //
356
  if (strncmp($name, 'Net_DNS2', 8) == 0) {
357
-
358
  include str_replace('_', '/', $name) . '.php';
359
  }
360
 
354
  // only auto-load our classes
355
  //
356
  if (strncmp($name, 'Net_DNS2', 8) == 0) {
357
+ //if(!in_array($name,array('Net_DNS2_RR_SOA', 'Net_DNS2_RR_CNAME', 'Net_DNS2_Exception', 'Net_DNS2_Resolver','Net_DNS2_Socket','Net_DNS2_Packet_Request','Net_DNS2_Packet','Net_DNS2_Header','Net_DNS2_Lookups','Net_DNS2_Question','Net_DNS2_Socket_Sockets','Net_DNS2_Packet_Response','Net_DNS2_RR','Net_DNS2_RR_PTR'))) debug_log($name);//in_array( $name, array( 'Net_DNS2_Resolver', 'Net_DNS2_Socket', 'Net_DNS2_Packet_Request', 'Net_DNS2_Packet', 'Net_DNS2_Header', 'Net_DNS2_Lookups', 'Net_DNS2_Question', 'Net_DNS2_Socket_Sockets', 'Net_DNS2_Packet_Response', 'Net_DNS2_RR', 'Net_DNS2_RR_PTR', 'Net_DNS2_RR_SOA', 'Net_DNS2_RR_CNAME', 'Net_DNS2_RR_OPT', 'Net_DNS2_RR_SIG', 'Net_DNS2_RR_TSIG', 'Net_DNS2_Exception' ) ) and debug_log($name);
358
  include str_replace('_', '/', $name) . '.php';
359
  }
360
 
includes/Net/DNS2/BitMap.php DELETED
@@ -1,254 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * a class to handle converting RR bitmaps to arrays and back; used on NSEC
54
- * and NSEC3 RR's
55
- *
56
- * @category Networking
57
- * @package Net_DNS2
58
- * @author Mike Pultz <mike@mikepultz.com>
59
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
60
- * @link http://pear.php.net/package/Net_DNS2
61
- * @see Net_DNS2_Packet
62
- *
63
- */
64
- class Net_DNS2_BitMap
65
- {
66
- /**
67
- * parses a RR bitmap field defined in RFC3845, into an array of RR names.
68
- *
69
- * Type Bit Map(s) Field = ( Window Block # | Bitmap Length | Bitmap ) +
70
- *
71
- * @param string $data a bitmap stringto parse
72
- *
73
- * @return array
74
- * @access public
75
- *
76
- */
77
- public static function bitMapToArray($data)
78
- {
79
- if (strlen($data) == 0) {
80
- return null;
81
- }
82
-
83
- $output = array();
84
- $offset = 0;
85
- $length = strlen($data);
86
-
87
- while ($offset < $length) {
88
-
89
- //
90
- // unpack the window and length values
91
- //
92
- $x = unpack('@' . $offset . '/Cwindow/Clength', $data);
93
- $offset += 2;
94
-
95
- //
96
- // copy out the bitmap value
97
- //
98
- $bitmap = unpack('C*', substr($data, $offset, $x['length']));
99
- $offset += $x['length'];
100
-
101
- //
102
- // I'm not sure if there's a better way of doing this, but PHP doesn't
103
- // have a 'B' flag for unpack()
104
- //
105
- $bitstr = '';
106
- foreach ($bitmap as $r) {
107
-
108
- $bitstr .= sprintf('%08b', $r);
109
- }
110
-
111
- $blen = strlen($bitstr);
112
- for ($i=0; $i<$blen; $i++) {
113
-
114
- if ($bitstr[$i] == '1') {
115
-
116
- $type = $x['window'] * 256 + $i;
117
-
118
- if (isset(Net_DNS2_Lookups::$rr_types_by_id[$type])) {
119
-
120
- $output[] = Net_DNS2_Lookups::$rr_types_by_id[$type];
121
- } else {
122
-
123
- $output[] = 'TYPE' . $type;
124
- }
125
- }
126
- }
127
- }
128
-
129
- return $output;
130
- }
131
-
132
- /**
133
- * builds a RR Bit map from an array of RR type names
134
- *
135
- * @param array $data a list of RR names
136
- *
137
- * @return string
138
- * @access public
139
- *
140
- */
141
- public static function arrayToBitMap(array $data)
142
- {
143
- if (count($data) == 0) {
144
- return null;
145
- }
146
-
147
- $current_window = 0;
148
-
149
- //
150
- // go through each RR
151
- //
152
- $max = 0;
153
- $bm = array();
154
-
155
- foreach ($data as $rr) {
156
-
157
- $rr = strtoupper($rr);
158
-
159
- //
160
- // get the type id for the RR
161
- //
162
- $type = @Net_DNS2_Lookups::$rr_types_by_name[$rr];
163
- if (isset($type)) {
164
-
165
- //
166
- // skip meta types or qtypes
167
- //
168
- if ( (isset(Net_DNS2_Lookups::$rr_qtypes_by_id[$type]))
169
- || (isset(Net_DNS2_Lookups::$rr_metatypes_by_id[$type]))
170
- ) {
171
- continue;
172
- }
173
-
174
- } else {
175
-
176
- //
177
- // if it's not found, then it must be defined as TYPE<id>, per
178
- // RFC3845 section 2.2, if it's not, we ignore it.
179
- //
180
- list($name, $type) = explode('TYPE', $rr);
181
- if (!isset($type)) {
182
-
183
- continue;
184
- }
185
- }
186
-
187
- //
188
- // build the current window
189
- //
190
- $current_window = (int)($type / 256);
191
-
192
- $val = $type - $current_window * 256.0;
193
- if ($val > $max) {
194
- $max = $val;
195
- }
196
-
197
- $bm[$current_window][$val] = 1;
198
- $bm[$current_window]['length'] = ceil(($max + 1) / 8);
199
- }
200
-
201
- $output = '';
202
-
203
- foreach ($bm as $window => $bitdata) {
204
-
205
- $bitstr = '';
206
-
207
- for ($i=0; $i<$bm[$window]['length'] * 8; $i++) {
208
- if (isset($bm[$window][$i])) {
209
- $bitstr .= '1';
210
- } else {
211
- $bitstr .= '0';
212
- }
213
- }
214
-
215
- $output .= pack('CC', $window, $bm[$window]['length']);
216
- $output .= pack('H*', self::bigBaseConvert($bitstr));
217
- }
218
-
219
- return $output;
220
- }
221
-
222
- /**
223
- * a base_convert that handles large numbers; forced to 2/16
224
- *
225
- * @param string $number a bit string
226
- *
227
- * @return string
228
- * @access public
229
- *
230
- */
231
- public static function bigBaseConvert($number)
232
- {
233
- $result = '';
234
-
235
- $bin = substr(chunk_split(strrev($number), 4, '-'), 0, -1);
236
- $temp = preg_split('[-]', $bin, -1, PREG_SPLIT_DELIM_CAPTURE);
237
-
238
- for ($i = count($temp)-1;$i >= 0;$i--) {
239
-
240
- $result = $result . base_convert(strrev($temp[$i]), 2, 16);
241
- }
242
-
243
- return strtoupper($result);
244
- }
245
- }
246
-
247
- /*
248
- * Local variables:
249
- * tab-width: 4
250
- * c-basic-offset: 4
251
- * c-hanging-comment-ender-p: nil
252
- * End:
253
- */
254
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/Cache.php DELETED
@@ -1,311 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.1.0
49
- *
50
- */
51
-
52
- /**
53
- * A class to provide simple dns lookup caching.
54
- *
55
- * @category Networking
56
- * @package Net_DNS2
57
- * @author Mike Pultz <mike@mikepultz.com>
58
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
59
- * @link http://pear.php.net/package/Net_DNS2
60
- * @see Net_DNS2_Packet
61
- *
62
- */
63
- class Net_DNS2_Cache
64
- {
65
- /*
66
- * the filename of the cache file
67
- */
68
- protected $cache_file = '';
69
-
70
- /*
71
- * the local data store for the cache
72
- */
73
- protected $cache_data = array();
74
-
75
- /*
76
- * the size of the cache to use
77
- */
78
- protected $cache_size = 0;
79
-
80
- /*
81
- * the cache serializer
82
- */
83
- protected $cache_serializer;
84
-
85
- /*
86
- * an internal flag to make sure we don't load the cache content more
87
- * than once per instance.
88
- */
89
- protected $cache_opened = false;
90
-
91
- /**
92
- * returns true/false if the provided key is defined in the cache
93
- *
94
- * @param string $key the key to lookup in the local cache
95
- *
96
- * @return boolean
97
- * @access public
98
- *
99
- */
100
- public function has($key)
101
- {
102
- return isset($this->cache_data[$key]);
103
- }
104
-
105
- /**
106
- * returns the value for the given key
107
- *
108
- * @param string $key the key to lookup in the local cache
109
- *
110
- * @return mixed returns the cache data on sucess, false on error
111
- * @access public
112
- *
113
- */
114
- public function get($key)
115
- {
116
- if (isset($this->cache_data[$key])) {
117
-
118
- if ($this->cache_serializer == 'json') {
119
- return json_decode($this->cache_data[$key]['object']);
120
- } else {
121
- return unserialize($this->cache_data[$key]['object']);
122
- }
123
- } else {
124
-
125
- return false;
126
- }
127
- }
128
-
129
- /**
130
- * adds a new key/value pair to the cache
131
- *
132
- * @param string $key the key for the new cache entry
133
- * @param mixed $data the data to store in cache
134
- *
135
- * @return void
136
- * @access public
137
- *
138
- */
139
- public function put($key, $data)
140
- {
141
- $ttl = 86400 * 365;
142
-
143
- //
144
- // clear the rdata values
145
- //
146
- $data->rdata = '';
147
- $data->rdlength = 0;
148
-
149
- //
150
- // find the lowest TTL, and use that as the TTL for the whole cached
151
- // object. The downside to using one TTL for the whole object, is that
152
- // we'll invalidate entries before they actuall expire, causing a
153
- // real lookup to happen.
154
- //
155
- // The upside is that we don't need to require() each RR type in the
156
- // cache, so we can look at their individual TTL's on each run- we only
157
- // unserialize the actual RR object when it's get() from the cache.
158
- //
159
- foreach ($data->answer as $index => $rr) {
160
-
161
- if ($rr->ttl < $ttl) {
162
- $ttl = $rr->ttl;
163
- }
164
-
165
- $rr->rdata = '';
166
- $rr->rdlength = 0;
167
- }
168
- foreach ($data->authority as $index => $rr) {
169
-
170
- if ($rr->ttl < $ttl) {
171
- $ttl = $rr->ttl;
172
- }
173
-
174
- $rr->rdata = '';
175
- $rr->rdlength = 0;
176
- }
177
- foreach ($data->additional as $index => $rr) {
178
-
179
- if ($rr->ttl < $ttl) {
180
- $ttl = $rr->ttl;
181
- }
182
-
183
- $rr->rdata = '';
184
- $rr->rdlength = 0;
185
- }
186
-
187
- $this->cache_data[$key] = array(
188
-
189
- 'cache_date' => time(),
190
- 'ttl' => $ttl
191
- );
192
-
193
- if ($this->cache_serializer == 'json') {
194
- $this->cache_data[$key]['object'] = json_encode($data);
195
- } else {
196
- $this->cache_data[$key]['object'] = serialize($data);
197
- }
198
- }
199
-
200
- /**
201
- * runs a clean up process on the cache data
202
- *
203
- * @return void
204
- * @access protected
205
- *
206
- */
207
- protected function clean()
208
- {
209
- if (count($this->cache_data) > 0) {
210
-
211
- //
212
- // go through each entry and adjust their TTL, and remove entries that
213
- // have expired
214
- //
215
- $now = time();
216
-
217
- foreach ($this->cache_data as $key => $data) {
218
-
219
- $diff = $now - $data['cache_date'];
220
-
221
- if ($data['ttl'] <= $diff) {
222
-
223
- unset($this->cache_data[$key]);
224
- } else {
225
-
226
- $this->cache_data[$key]['ttl'] -= $diff;
227
- $this->cache_data[$key]['cache_date'] = $now;
228
- }
229
- }
230
- }
231
- }
232
-
233
- /**
234
- * runs a clean up process on the cache data
235
- *
236
- * @return mixed
237
- * @access protected
238
- *
239
- */
240
- protected function resize()
241
- {
242
- if (count($this->cache_data) > 0) {
243
-
244
- //
245
- // serialize the cache data
246
- //
247
- if ($this->cache_serializer == 'json') {
248
- $cache = json_encode($this->cache_data);
249
- } else {
250
- $cache = serialize($this->cache_data);
251
- }
252
-
253
- //
254
- // only do this part if the size allocated to the cache storage
255
- // is smaller than the actual cache data
256
- //
257
- if (strlen($cache) > $this->cache_size) {
258
-
259
- while (strlen($cache) > $this->cache_size) {
260
-
261
- //
262
- // go through the data, and remove the entries closed to
263
- // their expiration date.
264
- //
265
- $smallest_ttl = time();
266
- $smallest_key = null;
267
-
268
- foreach ($this->cache_data as $key => $data) {
269
-
270
- if ($data['ttl'] < $smallest_ttl) {
271
-
272
- $smallest_ttl = $data['ttl'];
273
- $smallest_key = $key;
274
- }
275
- }
276
-
277
- //
278
- // unset the key with the smallest TTL
279
- //
280
- unset($this->cache_data[$smallest_key]);
281
-
282
- //
283
- // re-serialize
284
- //
285
- if ($this->cache_serializer == 'json') {
286
- $cache = json_encode($this->cache_data);
287
- } else {
288
- $cache = serialize($this->cache_data);
289
- }
290
- }
291
- }
292
-
293
- if ( ($cache == 'a:0:{}') || ($cache == '{}') ) {
294
- return null;
295
- } else {
296
- return $cache;
297
- }
298
- }
299
-
300
- return null;
301
- }
302
- };
303
-
304
- /*
305
- * Local variables:
306
- * tab-width: 4
307
- * c-basic-offset: 4
308
- * c-hanging-comment-ender-p: nil
309
- * End:
310
- */
311
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/Cache/File.php DELETED
@@ -1,247 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.1.0
49
- *
50
- */
51
-
52
- /**
53
- * File-based caching for the Net_DNS2_Cache class
54
- *
55
- * @category Networking
56
- * @package Net_DNS2
57
- * @author Mike Pultz <mike@mikepultz.com>
58
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
59
- * @link http://pear.php.net/package/Net_DNS2
60
- * @see Net_DNS2_Packet
61
- *
62
- */
63
- class Net_DNS2_Cache_File extends Net_DNS2_Cache
64
- {
65
- /**
66
- * open a cache object
67
- *
68
- * @param string $cache_file path to a file to use for cache storage
69
- * @param integer $size the size of the shared memory segment to create
70
- * @param string $serializer the name of the cache serialize to use
71
- *
72
- * @throws Net_DNS2_Exception
73
- * @access public
74
- * @return void
75
- *
76
- */
77
- public function open($cache_file, $size, $serializer)
78
- {
79
- $this->cache_size = $size;
80
- $this->cache_file = $cache_file;
81
- $this->cache_serializer = $serializer;
82
-
83
- //
84
- // check that the file exists first
85
- //
86
- if ( ($this->cache_opened == false)
87
- && (file_exists($this->cache_file) == true)
88
- && (filesize($this->cache_file) > 0)
89
- ) {
90
- //
91
- // open the file for reading
92
- //
93
- $fp = @fopen($this->cache_file, 'r');
94
- if ($fp !== false) {
95
-
96
- //
97
- // lock the file just in case
98
- //
99
- flock($fp, LOCK_EX);
100
-
101
- //
102
- // read the file contents
103
- //
104
- $data = fread($fp, filesize($this->cache_file));
105
-
106
- $decoded = null;
107
-
108
- if ($this->cache_serializer == 'json') {
109
-
110
- $decoded = json_decode($data, true);
111
- } else {
112
-
113
- $decoded = unserialize($data);
114
- }
115
-
116
- if (is_array($decoded) == true) {
117
-
118
- $this->cache_data = $decoded;
119
- } else {
120
-
121
- $this->cache_data = array();
122
- }
123
-
124
- //
125
- // unlock
126
- //
127
- flock($fp, LOCK_UN);
128
-
129
- //
130
- // close the file
131
- //
132
- fclose($fp);
133
-
134
- //
135
- // clean up the data
136
- //
137
- $this->clean();
138
-
139
- //
140
- // mark this so we don't read this contents more than once per instance.
141
- //
142
- $this->cache_opened = true;
143
- }
144
- }
145
- }
146
-
147
- /**
148
- * Destructor
149
- *
150
- * @access public
151
- *
152
- */
153
- public function __destruct()
154
- {
155
- //
156
- // if there's no cache file set, then there's nothing to do
157
- //
158
- if (strlen($this->cache_file) == 0) {
159
- return;
160
- }
161
-
162
- //
163
- // open the file for reading/writing
164
- //
165
- $fp = fopen($this->cache_file, 'a+');
166
- if ($fp !== false) {
167
-
168
- //
169
- // lock the file just in case
170
- //
171
- flock($fp, LOCK_EX);
172
-
173
- //
174
- // seek to the start of the file to read
175
- //
176
- fseek($fp, 0, SEEK_SET);
177
-
178
- //
179
- // read the file contents
180
- //
181
- $data = @fread($fp, filesize($this->cache_file));
182
- if ( ($data !== false) && (strlen($data) > 0) ) {
183
-
184
- //
185
- // unserialize and store the data
186
- //
187
- $c = $this->cache_data;
188
-
189
- $decoded = null;
190
-
191
- if ($this->cache_serializer == 'json') {
192
-
193
- $decoded = json_decode($data, true);
194
- } else {
195
-
196
- $decoded = unserialize($data);
197
- }
198
-
199
- if (is_array($decoded) == true) {
200
-
201
- $this->cache_data = array_merge($c, $decoded);
202
- }
203
- }
204
-
205
- //
206
- // trucate the file
207
- //
208
- ftruncate($fp, 0);
209
-
210
- //
211
- // clean the data
212
- //
213
- $this->clean();
214
-
215
- //
216
- // resize the data
217
- //
218
- $data = $this->resize();
219
- if (!is_null($data)) {
220
-
221
- //
222
- // write the file contents
223
- //
224
- fwrite($fp, $data);
225
- }
226
-
227
- //
228
- // unlock
229
- //
230
- flock($fp, LOCK_UN);
231
-
232
- //
233
- // close the file
234
- //
235
- fclose($fp);
236
- }
237
- }
238
- };
239
-
240
- /*
241
- * Local variables:
242
- * tab-width: 4
243
- * c-basic-offset: 4
244
- * c-hanging-comment-ender-p: nil
245
- * End:
246
- */
247
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/Cache/Shm.php DELETED
@@ -1,318 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.1.0
49
- *
50
- */
51
-
52
- /**
53
- * Shared Memory-based caching for the Net_DNS2_Cache class
54
- *
55
- * @category Networking
56
- * @package Net_DNS2
57
- * @author Mike Pultz <mike@mikepultz.com>
58
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
59
- * @link http://pear.php.net/package/Net_DNS2
60
- * @see Net_DNS2_Packet
61
- *
62
- */
63
- class Net_DNS2_Cache_Shm extends Net_DNS2_Cache
64
- {
65
- /*
66
- * resource id of the shared memory cache
67
- */
68
- private $_cache_id = false;
69
-
70
- /*
71
- * the IPC key
72
- */
73
- private $_cache_file_tok = -1;
74
-
75
- /**
76
- * open a cache object
77
- *
78
- * @param string $cache_file path to a file to use for cache storage
79
- * @param integer $size the size of the shared memory segment to create
80
- * @param string $serializer the name of the cache serialize to use
81
- *
82
- * @throws Net_DNS2_Exception
83
- * @access public
84
- * @return void
85
- *
86
- */
87
- public function open($cache_file, $size, $serializer)
88
- {
89
- $this->cache_size = $size;
90
- $this->cache_file = $cache_file;
91
- $this->cache_serializer = $serializer;
92
-
93
- //
94
- // if we've already loaded the cache data, then just return right away
95
- //
96
- if ($this->cache_opened == true)
97
- {
98
- return;
99
- }
100
-
101
- //
102
- // make sure the file exists first
103
- //
104
- if (!file_exists($cache_file)) {
105
-
106
- if (file_put_contents($cache_file, '') === false) {
107
-
108
- throw new Net_DNS2_Exception(
109
- 'failed to create empty SHM file: ' . $cache_file,
110
- Net_DNS2_Lookups::E_CACHE_SHM_FILE
111
- );
112
- }
113
- }
114
-
115
- //
116
- // convert the filename to a IPC key
117
- //
118
- $this->_cache_file_tok = ftok($cache_file, 't');
119
- if ($this->_cache_file_tok == -1) {
120
-
121
- throw new Net_DNS2_Exception(
122
- 'failed on ftok() file: ' . $this->_cache_file_tok,
123
- Net_DNS2_Lookups::E_CACHE_SHM_FILE
124
- );
125
- }
126
-
127
- //
128
- // try to open an existing cache; if it doesn't exist, then there's no
129
- // cache, and nothing to do.
130
- //
131
- $this->_cache_id = @shmop_open($this->_cache_file_tok, 'w', 0, 0);
132
- if ($this->_cache_id !== false) {
133
-
134
- //
135
- // this returns the size allocated, and not the size used, but it's
136
- // still a good check to make sure there's space allocated.
137
- //
138
- $allocated = shmop_size($this->_cache_id);
139
- if ($allocated > 0) {
140
-
141
- //
142
- // read the data from the shared memory segment
143
- //
144
- $data = trim(shmop_read($this->_cache_id, 0, $allocated));
145
- if ( ($data !== false) && (strlen($data) > 0) ) {
146
-
147
- //
148
- // unserialize and store the data
149
- //
150
- $decoded = null;
151
-
152
- if ($this->cache_serializer == 'json') {
153
-
154
- $decoded = json_decode($data, true);
155
- } else {
156
-
157
- $decoded = unserialize($data);
158
- }
159
-
160
- if (is_array($decoded) == true) {
161
-
162
- $this->cache_data = $decoded;
163
- } else {
164
-
165
- $this->cache_data = array();
166
- }
167
-
168
- //
169
- // call clean to clean up old entries
170
- //
171
- $this->clean();
172
-
173
- //
174
- // mark the cache as loaded, so we don't load it more than once
175
- //
176
- $this->cache_opened = true;
177
- }
178
- }
179
- }
180
- }
181
-
182
- /**
183
- * Destructor
184
- *
185
- * @access public
186
- *
187
- */
188
- public function __destruct()
189
- {
190
- //
191
- // if there's no cache file set, then there's nothing to do
192
- //
193
- if (strlen($this->cache_file) == 0) {
194
- return;
195
- }
196
-
197
- $fp = fopen($this->cache_file, 'r');
198
- if ($fp !== false) {
199
-
200
- //
201
- // lock the file
202
- //
203
- flock($fp, LOCK_EX);
204
-
205
- //
206
- // check to see if we have an open shm segment
207
- //
208
- if ($this->_cache_id === false) {
209
-
210
- //
211
- // try opening it again, incase it was created by another
212
- // process in the mean time
213
- //
214
- $this->_cache_id = @shmop_open(
215
- $this->_cache_file_tok, 'w', 0, 0
216
- );
217
- if ($this->_cache_id === false) {
218
-
219
- //
220
- // otherwise, create it.
221
- //
222
- $this->_cache_id = @shmop_open(
223
- $this->_cache_file_tok, 'c', 0, $this->cache_size
224
- );
225
- }
226
- }
227
-
228
- //
229
- // get the size allocated to the segment
230
- //
231
- $allocated = shmop_size($this->_cache_id);
232
-
233
- //
234
- // read the contents
235
- //
236
- $data = trim(shmop_read($this->_cache_id, 0, $allocated));
237
-
238
- //
239
- // if there was some data
240
- //
241
- if ( ($data !== false) && (strlen($data) > 0) ) {
242
-
243
- //
244
- // unserialize and store the data
245
- //
246
- $c = $this->cache_data;
247
-
248
- $decoded = null;
249
-
250
- if ($this->cache_serializer == 'json') {
251
-
252
- $decoded = json_decode($data, true);
253
- } else {
254
-
255
- $decoded = unserialize($data);
256
- }
257
-
258
- if (is_array($decoded) == true) {
259
-
260
- $this->cache_data = array_merge($c, $decoded);
261
- }
262
- }
263
-
264
- //
265
- // delete the segment
266
- //
267
- shmop_delete($this->_cache_id);
268
-
269
- //
270
- // clean the data
271
- //
272
- $this->clean();
273
-
274
- //
275
- // clean up and write the data
276
- //
277
- $data = $this->resize();
278
- if (!is_null($data)) {
279
-
280
- //
281
- // re-create segment
282
- //
283
- $this->_cache_id = @shmop_open(
284
- $this->_cache_file_tok, 'c', 0644, $this->cache_size
285
- );
286
- if ($this->_cache_id === false) {
287
- return;
288
- }
289
-
290
- $o = shmop_write($this->_cache_id, $data, 0);
291
- }
292
-
293
- //
294
- // close the segment
295
- //
296
- shmop_close($this->_cache_id);
297
-
298
- //
299
- // unlock
300
- //
301
- flock($fp, LOCK_UN);
302
-
303
- //
304
- // close the file
305
- //
306
- fclose($fp);
307
- }
308
- }
309
- };
310
-
311
- /*
312
- * Local variables:
313
- * tab-width: 4
314
- * c-basic-offset: 4
315
- * c-hanging-comment-ender-p: nil
316
- * End:
317
- */
318
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/PrivateKey.php DELETED
@@ -1,424 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2011 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.1.0
49
- *
50
- */
51
-
52
- /**
53
- * SSL Private Key container class
54
- *
55
- * @category Networking
56
- * @package Net_DNS2
57
- * @author Mike Pultz <mike@mikepultz.com>
58
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
59
- * @link http://pear.php.net/package/Net_DNS2
60
- *
61
- */
62
- class Net_DNS2_PrivateKey
63
- {
64
- /*
65
- * the filename that was loaded; stored for reference
66
- */
67
- public $filename;
68
-
69
- /*
70
- * the keytag for the signature
71
- */
72
- public $keytag;
73
-
74
- /*
75
- * the sign name for the signature
76
- */
77
- public $signname;
78
-
79
- /*
80
- * the algorithm used for the signature
81
- */
82
- public $algorithm;
83
-
84
- /*
85
- * the key format fo the signature
86
- */
87
- public $key_format;
88
-
89
- /*
90
- * the openssl private key id
91
- */
92
- public $instance;
93
-
94
- /*
95
- * RSA: modulus
96
- */
97
- private $_modulus;
98
-
99
- /*
100
- * RSA: public exponent
101
- */
102
- private $_public_exponent;
103
-
104
- /*
105
- * RSA: rivate exponent
106
- */
107
- private $_private_exponent;
108
-
109
- /*
110
- * RSA: prime1
111
- */
112
- private $_prime1;
113
-
114
- /*
115
- * RSA: prime2
116
- */
117
- private $_prime2;
118
-
119
- /*
120
- * RSA: exponent 1
121
- */
122
- private $_exponent1;
123
-
124
- /*
125
- * RSA: exponent 2
126
- */
127
- private $_exponent2;
128
-
129
- /*
130
- * RSA: coefficient
131
- */
132
- private $_coefficient;
133
-
134
- /*
135
- * DSA: prime
136
- */
137
- public $prime;
138
-
139
- /*
140
- * DSA: subprime
141
- */
142
- public $subprime;
143
-
144
- /*
145
- * DSA: base
146
- */
147
- public $base;
148
-
149
- /*
150
- * DSA: private value
151
- */
152
- public $private_value;
153
-
154
- /*
155
- * DSA: public value
156
- */
157
- public $public_value;
158
-
159
- /**
160
- * Constructor - base constructor the private key container class
161
- *
162
- * @param string $file path to a private-key file to parse and load
163
- *
164
- * @throws Net_DNS2_Exception
165
- * @access public
166
- *
167
- */
168
- public function __construct($file = null)
169
- {
170
- if (isset($file)) {
171
- $this->parseFile($file);
172
- }
173
- }
174
-
175
- /**
176
- * parses a private key file generated by dnssec-keygen
177
- *
178
- * @param string $file path to a private-key file to parse and load
179
- *
180
- * @return boolean
181
- * @throws Net_DNS2_Exception
182
- * @access public
183
- *
184
- */
185
- public function parseFile($file)
186
- {
187
- //
188
- // check for OpenSSL
189
- //
190
- if (extension_loaded('openssl') === false) {
191
-
192
- throw new Net_DNS2_Exception(
193
- 'the OpenSSL extension is required to use parse private key.',
194
- Net_DNS2_Lookups::E_OPENSSL_UNAVAIL
195
- );
196
- }
197
-
198
- //
199
- // check to make sure the file exists
200
- //
201
- if (is_readable($file) == false) {
202
-
203
- throw new Net_DNS2_Exception(
204
- 'invalid private key file: ' . $file,
205
- Net_DNS2_Lookups::E_OPENSSL_INV_PKEY
206
- );
207
- }
208
-
209
- //
210
- // get the base filename, and parse it for the local value
211
- //
212
- $keyname = basename($file);
213
- if (strlen($keyname) == 0) {
214
-
215
- throw new Net_DNS2_Exception(
216
- 'failed to get basename() for: ' . $file,
217
- Net_DNS2_Lookups::E_OPENSSL_INV_PKEY
218
- );
219
- }
220
-
221
- //
222
- // parse the keyname
223
- //
224
- if (preg_match("/K(.*)\.\+(\d{3})\+(\d*)\.private/", $keyname, $matches)) {
225
-
226
- $this->signname = $matches[1];
227
- $this->algorithm = intval($matches[2]);
228
- $this->keytag = intval($matches[3]);
229
-
230
- } else {
231
-
232
- throw new Net_DNS2_Exception(
233
- 'file ' . $keyname . ' does not look like a private key file!',
234
- Net_DNS2_Lookups::E_OPENSSL_INV_PKEY
235
- );
236
- }
237
-
238
- //
239
- // read all the data from the
240
- //
241
- $data = file($file, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
242
- if (count($data) == 0) {
243
-
244
- throw new Net_DNS2_Exception(
245
- 'file ' . $keyname . ' is empty!',
246
- Net_DNS2_Lookups::E_OPENSSL_INV_PKEY
247
- );
248
- }
249
-
250
- foreach ($data as $line) {
251
-
252
- list($key, $value) = explode(':', $line);
253
-
254
- $key = trim($key);
255
- $value = trim($value);
256
-
257
- switch(strtolower($key)) {
258
-
259
- case 'private-key-format':
260
- $this->_key_format = $value;
261
- break;
262
-
263
- case 'algorithm':
264
- if ($this->algorithm != $value) {
265
- throw new Net_DNS2_Exception(
266
- 'Algorithm mis-match! filename is ' . $this->algorithm .
267
- ', contents say ' . $value,
268
- Net_DNS2_Lookups::E_OPENSSL_INV_ALGO
269
- );
270
- }
271
- break;
272
-
273
- //
274
- // RSA
275
- //
276
- case 'modulus':
277
- $this->_modulus = $value;
278
- break;
279
-
280
- case 'publicexponent':
281
- $this->_public_exponent = $value;
282
- break;
283
-
284
- case 'privateexponent':
285
- $this->_private_exponent = $value;
286
- break;
287
-
288
- case 'prime1':
289
- $this->_prime1 = $value;
290
- break;
291
-
292
- case 'prime2':
293
- $this->_prime2 = $value;
294
- break;
295
-
296
- case 'exponent1':
297
- $this->_exponent1 = $value;
298
- break;
299
-
300
- case 'exponent2':
301
- $this->_exponent2 = $value;
302
- break;
303
-
304
- case 'coefficient':
305
- $this->_coefficient = $value;
306
- break;
307
-
308
- //
309
- // DSA - this won't work in PHP until the OpenSSL extension is better
310
- //
311
- case 'prime(p)':
312
- $this->prime = $value;
313
- break;
314
-
315
- case 'subprime(q)':
316
- $this->subprime = $value;
317
- break;
318
-
319
- case 'base(g)':
320
- $this->base = $value;
321
- break;
322
-
323
- case 'private_value(x)':
324
- $this->private_value = $value;
325
- break;
326
-
327
- case 'public_value(y)':
328
- $this->public_value = $value;
329
- break;
330
-
331
- default:
332
- throw new Net_DNS2_Exception(
333
- 'unknown private key data: ' . $key . ': ' . $value,
334
- Net_DNS2_Lookups::E_OPENSSL_INV_PKEY
335
- );
336
- }
337
- }
338
-
339
- //
340
- // generate the private key
341
- //
342
- $args = array();
343
-
344
- switch($this->algorithm) {
345
-
346
- //
347
- // RSA
348
- //
349
- case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSAMD5:
350
- case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA1:
351
- case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA256:
352
- case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA512:
353
-
354
- $args = array(
355
-
356
- 'rsa' => array(
357
-
358
- 'n' => base64_decode($this->_modulus),
359
- 'e' => base64_decode($this->_public_exponent),
360
- 'd' => base64_decode($this->_private_exponent),
361
- 'p' => base64_decode($this->_prime1),
362
- 'q' => base64_decode($this->_prime2),
363
- 'dmp1' => base64_decode($this->_exponent1),
364
- 'dmq1' => base64_decode($this->_exponent2),
365
- 'iqmp' => base64_decode($this->_coefficient)
366
- )
367
- );
368
-
369
- break;
370
-
371
- //
372
- // DSA - this won't work in PHP until the OpenSSL extension is better
373
- //
374
- case Net_DNS2_Lookups::DNSSEC_ALGORITHM_DSA:
375
-
376
- $args = array(
377
-
378
- 'dsa' => array(
379
-
380
- 'p' => base64_decode($this->prime),
381
- 'q' => base64_decode($this->subprime),
382
- 'g' => base64_decode($this->base),
383
- 'priv_key' => base64_decode($this->private_value),
384
- 'pub_key' => base64_decode($this->public_value)
385
- )
386
- );
387
-
388
- break;
389
-
390
- default:
391
- throw new Net_DNS2_Exception(
392
- 'we only currently support RSAMD5 and RSASHA1 encryption.',
393
- Net_DNS2_Lookups::E_OPENSSL_INV_PKEY
394
- );
395
- }
396
-
397
- //
398
- // generate and store the key
399
- //
400
- $this->instance = openssl_pkey_new($args);
401
- if ($this->instance === false) {
402
- throw new Net_DNS2_Exception(
403
- openssl_error_string(),
404
- Net_DNS2_Lookups::E_OPENSSL_ERROR
405
- );
406
- }
407
-
408
- //
409
- // store the filename incase we need it for something
410
- //
411
- $this->filename = $file;
412
-
413
- return true;
414
- }
415
- }
416
-
417
- /*
418
- * Local variables:
419
- * tab-width: 4
420
- * c-basic-offset: 4
421
- * c-hanging-comment-ender-p: nil
422
- * End:
423
- */
424
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/A.php DELETED
@@ -1,156 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * A Resource Record - RFC1035 section 3.4.1
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | ADDRESS |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- *
59
- * @category Networking
60
- * @package Net_DNS2
61
- * @author Mike Pultz <mike@mikepultz.com>
62
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
63
- * @link http://pear.php.net/package/Net_DNS2
64
- * @see Net_DNS2_RR
65
- *
66
- */
67
- class Net_DNS2_RR_A extends Net_DNS2_RR
68
- {
69
- /*
70
- * The IPv4 address in quad-dotted notation
71
- */
72
- public $address;
73
-
74
- /**
75
- * method to return the rdata portion of the packet as a string
76
- *
77
- * @return string
78
- * @access protected
79
- *
80
- */
81
- protected function rrToString()
82
- {
83
- return $this->address;
84
- }
85
-
86
- /**
87
- * parses the rdata portion from a standard DNS config line
88
- *
89
- * @param array $rdata a string split line of values for the rdata
90
- *
91
- * @return boolean
92
- * @access protected
93
- *
94
- */
95
- protected function rrFromString(array $rdata)
96
- {
97
- $value = array_shift($rdata);
98
-
99
- if (Net_DNS2::isIPv4($value) == true) {
100
-
101
- $this->address = $value;
102
- return true;
103
- }
104
-
105
- return false;
106
- }
107
-
108
- /**
109
- * parses the rdata of the Net_DNS2_Packet object
110
- *
111
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
112
- *
113
- * @return boolean
114
- * @access protected
115
- *
116
- */
117
- protected function rrSet(Net_DNS2_Packet &$packet)
118
- {
119
- if ($this->rdlength > 0) {
120
-
121
- $this->address = inet_ntop($this->rdata);
122
- if ($this->address !== false) {
123
-
124
- return true;
125
- }
126
- }
127
-
128
- return false;
129
- }
130
-
131
- /**
132
- * returns the rdata portion of the DNS packet
133
- *
134
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
135
- * compressed names
136
- *
137
- * @return mixed either returns a binary packed
138
- * string or null on failure
139
- * @access protected
140
- *
141
- */
142
- protected function rrGet(Net_DNS2_Packet &$packet)
143
- {
144
- $packet->offset += 4;
145
- return inet_pton($this->address);
146
- }
147
- }
148
-
149
- /*
150
- * Local variables:
151
- * tab-width: 4
152
- * c-basic-offset: 4
153
- * c-hanging-comment-ender-p: nil
154
- * End:
155
- */
156
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/AAAA.php DELETED
@@ -1,177 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * A Resource Record - RFC1035 section 3.4.1
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | |
57
- * | |
58
- * | |
59
- * | ADDRESS |
60
- * | |
61
- * | (128 bit) |
62
- * | |
63
- * | |
64
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
65
- *
66
- * @category Networking
67
- * @package Net_DNS2
68
- * @author Mike Pultz <mike@mikepultz.com>
69
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
70
- * @link http://pear.php.net/package/Net_DNS2
71
- * @see Net_DNS2_RR
72
- *
73
- */
74
- class Net_DNS2_RR_AAAA extends Net_DNS2_RR
75
- {
76
- /*
77
- * the IPv6 address in the preferred hexadecimal values of the eight
78
- * 16-bit pieces
79
- * per RFC1884
80
- *
81
- */
82
- public $address;
83
-
84
- /**
85
- * method to return the rdata portion of the packet as a string
86
- *
87
- * @return string
88
- * @access protected
89
- *
90
- */
91
- protected function rrToString()
92
- {
93
- return $this->address;
94
- }
95
-
96
- /**
97
- * parses the rdata portion from a standard DNS config line
98
- *
99
- * @param array $rdata a string split line of values for the rdata
100
- *
101
- * @return boolean
102
- * @access protected
103
- *
104
- */
105
- protected function rrFromString(array $rdata)
106
- {
107
- //
108
- // expand out compressed formats
109
- //
110
- $value = array_shift($rdata);
111
- if (Net_DNS2::isIPv6($value) == true) {
112
-
113
- $this->address = $value;
114
- return true;
115
- }
116
-
117
- return false;
118
- }
119
-
120
- /**
121
- * parses the rdata of the Net_DNS2_Packet object
122
- *
123
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
124
- *
125
- * @return boolean
126
- * @access protected
127
- *
128
- */
129
- protected function rrSet(Net_DNS2_Packet &$packet)
130
- {
131
- //
132
- // must be 8 x 16bit chunks, or 16 x 8bit
133
- //
134
- if ($this->rdlength == 16) {
135
-
136
- //
137
- // PHP's inet_ntop returns IPv6 addresses in their compressed form,
138
- // but we want to keep with the preferred standard, so we'll parse
139
- // it manually.
140
- //
141
- $x = unpack('n8', $this->rdata);
142
- if (count($x) == 8) {
143
-
144
- $this->address = vsprintf('%x:%x:%x:%x:%x:%x:%x:%x', $x);
145
- return true;
146
- }
147
- }
148
-
149
- return false;
150
- }
151
-
152
- /**
153
- * returns the rdata portion of the DNS packet
154
- *
155
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
156
- * compressed names
157
- *
158
- * @return mixed either returns a binary packed
159
- * string or null on failure
160
- * @access protected
161
- *
162
- */
163
- protected function rrGet(Net_DNS2_Packet &$packet)
164
- {
165
- $packet->offset += 16;
166
- return inet_pton($this->address);
167
- }
168
- }
169
-
170
- /*
171
- * Local variables:
172
- * tab-width: 4
173
- * c-basic-offset: 4
174
- * c-hanging-comment-ender-p: nil
175
- * End:
176
- */
177
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/AFSDB.php DELETED
@@ -1,174 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * AFSDB Resource Record - RFC1183 section 1
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | SUBTYPE |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * / HOSTNAME /
59
- * / /
60
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
61
- *
62
- * @category Networking
63
- * @package Net_DNS2
64
- * @author Mike Pultz <mike@mikepultz.com>
65
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
66
- * @link http://pear.php.net/package/Net_DNS2
67
- * @see Net_DNS2_RR
68
- *
69
- */
70
- class Net_DNS2_RR_AFSDB extends Net_DNS2_RR
71
- {
72
- /*
73
- * The AFSDB sub type
74
- */
75
- public $subtype;
76
-
77
- /*
78
- * The AFSDB hostname
79
- */
80
- public $hostname;
81
-
82
- /**
83
- * method to return the rdata portion of the packet as a string
84
- *
85
- * @return string
86
- * @access protected
87
- *
88
- */
89
- protected function rrToString()
90
- {
91
- return $this->subtype . ' ' . $this->cleanString($this->hostname) . '.';
92
- }
93
-
94
- /**
95
- * parses the rdata portion from a standard DNS config line
96
- *
97
- * @param array $rdata a string split line of values for the rdata
98
- *
99
- * @return boolean
100
- * @access protected
101
- *
102
- */
103
- protected function rrFromString(array $rdata)
104
- {
105
- $this->subtype = array_shift($rdata);
106
- $this->hostname = $this->cleanString(array_shift($rdata));
107
-
108
- return true;
109
- }
110
-
111
- /**
112
- * parses the rdata of the Net_DNS2_Packet object
113
- *
114
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
115
- *
116
- * @return boolean
117
- * @access protected
118
- *
119
- */
120
- protected function rrSet(Net_DNS2_Packet &$packet)
121
- {
122
- if ($this->rdlength > 0) {
123
-
124
- //
125
- // unpack the subtype
126
- //
127
- $x = unpack('nsubtype', $this->rdata);
128
-
129
- $this->subtype = $x['subtype'];
130
- $offset = $packet->offset + 2;
131
-
132
- $this->hostname = Net_DNS2_Packet::expand($packet, $offset);
133
-
134
- return true;
135
- }
136
-
137
- return false;
138
- }
139
-
140
- /**
141
- * returns the rdata portion of the DNS packet
142
- *
143
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
144
- * compressed names
145
- *
146
- * @return mixed either returns a binary packed
147
- * string or null on failure
148
- * @access protected
149
- *
150
- */
151
- protected function rrGet(Net_DNS2_Packet &$packet)
152
- {
153
- if (strlen($this->hostname) > 0) {
154
-
155
- $data = pack('n', $this->subtype);
156
- $packet->offset += 2;
157
-
158
- $data .= $packet->compress($this->hostname, $packet->offset);
159
-
160
- return $data;
161
- }
162
-
163
- return null;
164
- }
165
- }
166
-
167
- /*
168
- * Local variables:
169
- * tab-width: 4
170
- * c-basic-offset: 4
171
- * c-hanging-comment-ender-p: nil
172
- * End:
173
- */
174
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/ANY.php DELETED
@@ -1,129 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * This is only used for generating an empty ANY RR.
54
- *
55
- * @category Networking
56
- * @package Net_DNS2
57
- * @author Mike Pultz <mike@mikepultz.com>
58
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
59
- * @link http://pear.php.net/package/Net_DNS2
60
- * @see Net_DNS2_RR
61
- *
62
- */
63
- class Net_DNS2_RR_ANY extends Net_DNS2_RR
64
- {
65
- /**
66
- * method to return the rdata portion of the packet as a string
67
- *
68
- * @return string
69
- * @access protected
70
- *
71
- */
72
- protected function rrToString()
73
- {
74
- return '';
75
- }
76
-
77
- /**
78
- * parses the rdata portion from a standard DNS config line
79
- *
80
- * @param array $rdata a string split line of values for the rdata
81
- *
82
- * @return boolean
83
- * @access protected
84
- *
85
- */
86
- protected function rrFromString(array $rdata)
87
- {
88
- return true;
89
- }
90
-
91
- /**
92
- * parses the rdata of the Net_DNS2_Packet object
93
- *
94
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
95
- *
96
- * @return boolean
97
- * @access protected
98
- *
99
- */
100
- protected function rrSet(Net_DNS2_Packet &$packet)
101
- {
102
- return true;
103
- }
104
-
105
- /**
106
- * returns the rdata portion of the DNS packet
107
- *
108
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
109
- * compressed names
110
- *
111
- * @return mixed either returns a binary packed
112
- * string or null on failure
113
- * @access protected
114
- *
115
- */
116
- protected function rrGet(Net_DNS2_Packet &$packet)
117
- {
118
- return '';
119
- }
120
- }
121
-
122
- /*
123
- * Local variables:
124
- * tab-width: 4
125
- * c-basic-offset: 4
126
- * c-hanging-comment-ender-p: nil
127
- * End:
128
- */
129
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/APL.php DELETED
@@ -1,343 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.0.0
49
- *
50
- */
51
-
52
- /**
53
- * APL Resource Record - RFC3123
54
- *
55
- * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
56
- * | ADDRESSFAMILY |
57
- * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
58
- * | PREFIX | N | AFDLENGTH |
59
- * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
60
- * / AFDPART /
61
- * | |
62
- * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_APL extends Net_DNS2_RR
73
- {
74
- /*
75
- * a list of all the address prefix list items
76
- */
77
- public $apl_items = array();
78
-
79
- /**
80
- * method to return the rdata portion of the packet as a string
81
- *
82
- * @return string
83
- * @access protected
84
- *
85
- */
86
- protected function rrToString()
87
- {
88
- $out = '';
89
-
90
- foreach ($this->apl_items as $item) {
91
-
92
- if ($item['n'] == 1) {
93
-
94
- $out .= '!';
95
- }
96
-
97
- $out .= $item['address_family'] . ':' .
98
- $item['afd_part'] . '/' . $item['prefix'] . ' ';
99
- }
100
-
101
- return trim($out);
102
- }
103
-
104
- /**
105
- * parses the rdata portion from a standard DNS config line
106
- *
107
- * @param array $rdata a string split line of values for the rdata
108
- *
109
- * @return boolean
110
- * @access protected
111
- *
112
- */
113
- protected function rrFromString(array $rdata)
114
- {
115
- foreach ($rdata as $item) {
116
-
117
- if (preg_match('/^(!?)([1|2])\:([^\/]*)\/([0-9]{1,3})$/', $item, $m)) {
118
-
119
- $i = array(
120
-
121
- 'address_family' => $m[2],
122
- 'prefix' => $m[4],
123
- 'n' => ($m[1] == '!') ? 1 : 0,
124
- 'afd_part' => strtolower($m[3])
125
- );
126
-
127
- $address = $this->_trimZeros(
128
- $i['address_family'], $i['afd_part']
129
- );
130
-
131
- $i['afd_length'] = count(explode('.', $address));
132
-
133
- $this->apl_items[] = $i;
134
- }
135
- }
136
-
137
- return true;
138
- }
139
-
140
- /**
141
- * parses the rdata of the Net_DNS2_Packet object
142
- *
143
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
144
- *
145
- * @return boolean
146
- * @access protected
147
- *
148
- */
149
- protected function rrSet(Net_DNS2_Packet &$packet)
150
- {
151
- if ($this->rdlength > 0) {
152
-
153
- $offset = 0;
154
-
155
- while ($offset < $this->rdlength) {
156
-
157
- //
158
- // unpack the family, prefix, negate and length values
159
- //
160
- $x = unpack(
161
- 'naddress_family/Cprefix/Cextra', substr($this->rdata, $offset)
162
- );
163
-
164
- $item = array(
165
-
166
- 'address_family' => $x['address_family'],
167
- 'prefix' => $x['prefix'],
168
- 'n' => ($x['extra'] >> 7) & 0x1,
169
- 'afd_length' => $x['extra'] & 0xf
170
- );
171
-
172
- switch($item['address_family']) {
173
-
174
- case 1:
175
- $r = unpack(
176
- 'C*', substr($this->rdata, $offset + 4, $item['afd_length'])
177
- );
178
- if (count($r) < 4) {
179
-
180
- for ($c=count($r)+1; $c<4+1; $c++) {
181
-
182
- $r[$c] = 0;
183
- }
184
- }
185
-
186
- $item['afd_part'] = implode('.', $r);
187
-
188
- break;
189
- case 2:
190
- $r = unpack(
191
- 'C*', substr($this->rdata, $offset + 4, $item['afd_length'])
192
- );
193
- if (count($r) < 8) {
194
-
195
- for ($c=count($r)+1; $c<8+1; $c++) {
196
-
197
- $r[$c] = 0;
198
- }
199
- }
200
-
201
- $item['afd_part'] = sprintf(
202
- '%x:%x:%x:%x:%x:%x:%x:%x',
203
- $r[1], $r[2], $r[3], $r[4], $r[5], $r[6], $r[7], $r[8]
204
- );
205
-
206
- break;
207
- default:
208
- return false;
209
- }
210
-
211
- $this->apl_items[] = $item;
212
-
213
- $offset += 4 + $item['afd_length'];
214
- }
215
-
216
- return true;
217
- }
218
-
219
- return false;
220
- }
221
-
222
- /**
223
- * returns the rdata portion of the DNS packet
224
- *
225
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
226
- * compressed names
227
- *
228
- * @return mixed either returns a binary packed
229
- * string or null on failure
230
- * @access protected
231
- *
232
- */
233
- protected function rrGet(Net_DNS2_Packet &$packet)
234
- {
235
- if (count($this->apl_items) > 0) {
236
-
237
- $data = '';
238
-
239
- foreach ($this->apl_items as $item) {
240
-
241
- //
242
- // pack the address_family and prefix values
243
- //
244
- $data .= pack(
245
- 'nCC',
246
- $item['address_family'],
247
- $item['prefix'],
248
- ($item['n'] << 7) | $item['afd_length']
249
- );
250
-
251
- switch($item['address_family']) {
252
- case 1:
253
- $address = explode(
254
- '.',
255
- $this->_trimZeros($item['address_family'], $item['afd_part'])
256
- );
257
-
258
- foreach ($address as $b) {
259
- $data .= chr($b);
260
- }
261
- break;
262
- case 2:
263
- $address = explode(
264
- ':',
265
- $this->_trimZeros($item['address_family'], $item['afd_part'])
266
- );
267
-
268
- foreach ($address as $b) {
269
- $data .= pack('H', $b);
270
- }
271
- break;
272
- default:
273
- return null;
274
- }
275
- }
276
-
277
- $packet->offset += strlen($data);
278
-
279
- return $data;
280
- }
281
-
282
- return null;
283
- }
284
-
285
- /**
286
- * returns an IP address with the right-hand zero's trimmed
287
- *
288
- * @param integer $family the IP address family from the rdata
289
- * @param string $address the IP address
290
- *
291
- * @return string the trimmed IP addresss.
292
- *
293
- * @access private
294
- *
295
- */
296
- private function _trimZeros($family, $address)
297
- {
298
- $a = array();
299
-
300
- switch($family) {
301
- case 1:
302
- $a = array_reverse(explode('.', $address));
303
- break;
304
- case 2:
305
- $a = array_reverse(explode(':', $address));
306
- break;
307
- default:
308
- return '';
309
- }
310
-
311
- foreach ($a as $value) {
312
-
313
- if ($value === '0') {
314
-
315
- array_shift($a);
316
- }
317
- }
318
-
319
- $out = '';
320
-
321
- switch($family) {
322
- case 1:
323
- $out = implode('.', array_reverse($a));
324
- break;
325
- case 2:
326
- $out = implode(':', array_reverse($a));
327
- break;
328
- default:
329
- return '';
330
- }
331
-
332
- return $out;
333
- }
334
- }
335
-
336
- /*
337
- * Local variables:
338
- * tab-width: 4
339
- * c-basic-offset: 4
340
- * c-hanging-comment-ender-p: nil
341
- * End:
342
- */
343
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/ATMA.php DELETED
@@ -1,210 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.1.0
49
- *
50
- */
51
-
52
- /**
53
- * ATMA Resource Record
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
56
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
57
- * | FORMAT | |
58
- * | +--+--+--+--+--+--+--+--+
59
- * / ADDRESS /
60
- * | |
61
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
62
- *
63
- * @category Networking
64
- * @package Net_DNS2
65
- * @author Mike Pultz <mike@mikepultz.com>
66
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
67
- * @link http://pear.php.net/package/Net_DNS2
68
- * @see Net_DNS2_RR
69
- *
70
- */
71
- class Net_DNS2_RR_ATMA extends Net_DNS2_RR
72
- {
73
- /*
74
- * One octet that indicates the format of ADDRESS. The two possible values
75
- * for FORMAT are value 0 indicating ATM End System Address (AESA) format
76
- * and value 1 indicating E.164 format
77
- */
78
- public $format;
79
-
80
- /*
81
- * The IPv4 address in quad-dotted notation
82
- */
83
- public $address;
84
-
85
- /**
86
- * method to return the rdata portion of the packet as a string
87
- *
88
- * @return string
89
- * @access protected
90
- *
91
- */
92
- protected function rrToString()
93
- {
94
- return $this->address;
95
- }
96
-
97
- /**
98
- * parses the rdata portion from a standard DNS config line
99
- *
100
- * @param array $rdata a string split line of values for the rdata
101
- *
102
- * @return boolean
103
- * @access protected
104
- *
105
- */
106
- protected function rrFromString(array $rdata)
107
- {
108
- $value = array_shift($rdata);
109
-
110
- if (ctype_xdigit($value) == true) {
111
-
112
- $this->format = 0;
113
- $this->address = $value;
114
-
115
- } else if (is_numeric($value) == true) {
116
-
117
- $this->format = 1;
118
- $this->address = $value;
119
-
120
- } else {
121
-
122
- return false;
123
- }
124
-
125
- return true;
126
- }
127
-
128
- /**
129
- * parses the rdata of the Net_DNS2_Packet object
130
- *
131
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
132
- *
133
- * @return boolean
134
- * @access protected
135
- *
136
- */
137
- protected function rrSet(Net_DNS2_Packet &$packet)
138
- {
139
- if ($this->rdlength > 0) {
140
-
141
- //
142
- // unpack the format
143
- //
144
- $x = unpack('Cformat/N*address', $this->rdata);
145
-
146
- $this->format = $x['format'];
147
-
148
- if ($this->format == 0) {
149
-
150
- $a = unpack('@1/H*address', $this->rdata);
151
-
152
- $this->address = $a['address'];
153
-
154
- } else if ($this->format == 1) {
155
-
156
- $this->address = substr($this->rdata, 1, $this->rdlength - 1);
157
-
158
- } else {
159
-
160
- return false;
161
- }
162
-
163
- return true;
164
- }
165
-
166
- return false;
167
- }
168
-
169
- /**
170
- * returns the rdata portion of the DNS packet
171
- *
172
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
173
- * compressed names
174
- *
175
- * @return mixed either returns a binary packed
176
- * string or null on failure
177
- * @access protected
178
- *
179
- */
180
- protected function rrGet(Net_DNS2_Packet &$packet)
181
- {
182
- $data = chr($this->format);
183
-
184
- if ($this->format == 0) {
185
-
186
- $data .= pack('H*', $this->address);
187
-
188
- } else if ($this->format == 1) {
189
-
190
- $data .= $this->address;
191
-
192
- } else {
193
-
194
- return null;
195
- }
196
-
197
- $packet->offset += strlen($data);
198
-
199
- return $data;
200
- }
201
- }
202
-
203
- /*
204
- * Local variables:
205
- * tab-width: 4
206
- * c-basic-offset: 4
207
- * c-hanging-comment-ender-p: nil
208
- * End:
209
- */
210
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/AVC.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2016, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2016 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.4.2
49
- *
50
- */
51
-
52
- /**
53
- * The AVC RR is implemented exactly like the TXT record, so
54
- * for now we just extend the TXT RR and use it.
55
- *
56
- * @category Networking
57
- * @package Net_DNS2
58
- * @author Mike Pultz <mike@mikepultz.com>
59
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
60
- * @link http://pear.php.net/package/Net_DNS2
61
- * @see Net_DNS2_RR
62
- *
63
- */
64
- class Net_DNS2_RR_AVC extends Net_DNS2_RR_TXT
65
- {
66
- }
67
-
68
- /*
69
- * Local variables:
70
- * tab-width: 4
71
- * c-basic-offset: 4
72
- * c-hanging-comment-ender-p: nil
73
- * End:
74
- */
75
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/CAA.php DELETED
@@ -1,179 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2011 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.2.0
49
- *
50
- */
51
-
52
- /**
53
- * CAA Resource Record - http://tools.ietf.org/html/draft-ietf-pkix-caa-03
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | FLAGS | TAG LENGTH |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * / TAG /
59
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
60
- * / DATA /
61
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
62
- *
63
- * @category Networking
64
- * @package Net_DNS2
65
- * @author Mike Pultz <mike@mikepultz.com>
66
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
67
- * @link http://pear.php.net/package/Net_DNS2
68
- * @see Net_DNS2_RR
69
- *
70
- */
71
- class Net_DNS2_RR_CAA extends Net_DNS2_RR
72
- {
73
- /*
74
- * The critcal flag
75
- */
76
- public $flags;
77
-
78
- /*
79
- * The property identifier
80
- */
81
- public $tag;
82
-
83
- /*
84
- * The property value
85
- */
86
- public $value;
87
-
88
- /**
89
- * method to return the rdata portion of the packet as a string
90
- *
91
- * @return string
92
- * @access protected
93
- *
94
- */
95
- protected function rrToString()
96
- {
97
- return $this->flags . ' ' . $this->tag . ' "' .
98
- trim($this->cleanString($this->value), '"') . '"';
99
- }
100
-
101
- /**
102
- * parses the rdata portion from a standard DNS config line
103
- *
104
- * @param array $rdata a string split line of values for the rdata
105
- *
106
- * @return boolean
107
- * @access protected
108
- *
109
- */
110
- protected function rrFromString(array $rdata)
111
- {
112
- $this->flags = array_shift($rdata);
113
- $this->tag = array_shift($rdata);
114
-
115
- $this->value = trim($this->cleanString(implode($rdata, ' ')), '"');
116
-
117
- return true;
118
- }
119
-
120
- /**
121
- * parses the rdata of the Net_DNS2_Packet object
122
- *
123
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
124
- *
125
- * @return boolean
126
- * @access protected
127
- *
128
- */
129
- protected function rrSet(Net_DNS2_Packet &$packet)
130
- {
131
- if ($this->rdlength > 0) {
132
-
133
- //
134
- // unpack the flags and tag length
135
- //
136
- $x = unpack('Cflags/Ctag_length', $this->rdata);
137
-
138
- $this->flags = $x['flags'];
139
- $offset = 2;
140
-
141
- $this->tag = substr($this->rdata, $offset, $x['tag_length']);
142
- $offset += $x['tag_length'];
143
-
144
- $this->value = substr($this->rdata, $offset);
145
-
146
- return true;
147
- }
148
-
149
- return false;
150
- }
151
-
152
- /**
153
- * returns the rdata portion of the DNS packet
154
- *
155
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
156
- * compressed names
157
- *
158
- * @return mixed either returns a binary packed
159
- * string or null on failure
160
- * @access protected
161
- *
162
- */
163
- protected function rrGet(Net_DNS2_Packet &$packet)
164
- {
165
- if (strlen($this->value) > 0) {
166
-
167
- $data = chr($this->flags);
168
- $data .= chr(strlen($this->tag)) . $this->tag . $this->value;
169
-
170
- $packet->offset += strlen($data);
171
-
172
- return $data;
173
- }
174
-
175
- return null;
176
- }
177
- }
178
-
179
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/CDNSKEY.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2014, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2014 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.4.0
49
- *
50
- */
51
-
52
- /**
53
- * The CDNSKEY RR is implemented exactly like the DNSKEY record, so
54
- * for now we just extend the DNSKEY RR and use it.
55
- *
56
- * http://www.rfc-editor.org/rfc/rfc7344.txt
57
- *
58
- * @category Networking
59
- * @package Net_DNS2
60
- * @author Mike Pultz <mike@mikepultz.com>
61
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
62
- * @link http://pear.php.net/package/Net_DNS2
63
- * @see Net_DNS2_RR
64
- *
65
- */
66
- class Net_DNS2_RR_CDNSKEY extends Net_DNS2_RR_DNSKEY
67
- {
68
- }
69
-
70
- /*
71
- * Local variables:
72
- * tab-width: 4
73
- * c-basic-offset: 4
74
- * c-hanging-comment-ender-p: nil
75
- * End:
76
- */
77
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/CDS.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2011 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.2.0
49
- *
50
- */
51
-
52
- /**
53
- * The CDS RR is implemented exactly like the DS record, so
54
- * for now we just extend the DS RR and use it.
55
- *
56
- * http://www.rfc-editor.org/rfc/rfc7344.txt
57
- *
58
- * @category Networking
59
- * @package Net_DNS2
60
- * @author Mike Pultz <mike@mikepultz.com>
61
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
62
- * @link http://pear.php.net/package/Net_DNS2
63
- * @see Net_DNS2_RR
64
- *
65
- */
66
- class Net_DNS2_RR_CDS extends Net_DNS2_RR_DS
67
- {
68
- }
69
-
70
- /*
71
- * Local variables:
72
- * tab-width: 4
73
- * c-basic-offset: 4
74
- * c-hanging-comment-ender-p: nil
75
- * End:
76
- */
77
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/CERT.php DELETED
@@ -1,292 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * CERT Resource Record - RFC4398 section 2
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | format | key tag |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59
- * | algorithm | /
60
- * +---------------+ certificate or CRL /
61
- * / /
62
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_CERT extends Net_DNS2_RR
73
- {
74
- /*
75
- * format's allowed for certificates
76
- */
77
- const CERT_FORMAT_RES = 0;
78
- const CERT_FORMAT_PKIX = 1;
79
- const CERT_FORMAT_SPKI = 2;
80
- const CERT_FORMAT_PGP = 3;
81
- const CERT_FORMAT_IPKIX = 4;
82
- const CERT_FORMAT_ISPKI = 5;
83
- const CERT_FORMAT_IPGP = 6;
84
- const CERT_FORMAT_ACPKIX = 7;
85
- const CERT_FORMAT_IACPKIX = 8;
86
- const CERT_FORMAT_URI = 253;
87
- const CERT_FORMAT_OID = 254;
88
-
89
- public $cert_format_name_to_id = array();
90
- public $cert_format_id_to_name = array(
91
-
92
- self::CERT_FORMAT_RES => 'Reserved',
93
- self::CERT_FORMAT_PKIX => 'PKIX',
94
- self::CERT_FORMAT_SPKI => 'SPKI',
95
- self::CERT_FORMAT_PGP => 'PGP',
96
- self::CERT_FORMAT_IPKIX => 'IPKIX',
97
- self::CERT_FORMAT_ISPKI => 'ISPKI',
98
- self::CERT_FORMAT_IPGP => 'IPGP',
99
- self::CERT_FORMAT_ACPKIX => 'ACPKIX',
100
- self::CERT_FORMAT_IACPKIX => 'IACPKIX',
101
- self::CERT_FORMAT_URI => 'URI',
102
- self::CERT_FORMAT_OID => 'OID'
103
- );
104
-
105
- /*
106
- * certificate format
107
- */
108
- public $format;
109
-
110
- /*
111
- * key tag
112
- */
113
- public $keytag;
114
-
115
- /*
116
- * The algorithm used for the CERt
117
- */
118
- public $algorithm;
119
-
120
- /*
121
- * certificate
122
- */
123
- public $certificate;
124
-
125
- /**
126
- * we have our own constructor so that we can load our certificate
127
- * information for parsing.
128
- *
129
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
130
- * @param array $rr a array with parsed RR values
131
- *
132
- * @return
133
- *
134
- */
135
- public function __construct(Net_DNS2_Packet &$packet = null, array $rr = null)
136
- {
137
- parent::__construct($packet, $rr);
138
-
139
- //
140
- // load the lookup values
141
- //
142
- $this->cert_format_name_to_id = array_flip($this->cert_format_id_to_name);
143
- }
144
-
145
- /**
146
- * method to return the rdata portion of the packet as a string
147
- *
148
- * @return string
149
- * @access protected
150
- *
151
- */
152
- protected function rrToString()
153
- {
154
- return $this->format . ' ' . $this->keytag . ' ' . $this->algorithm .
155
- ' ' . base64_encode($this->certificate);
156
- }
157
-
158
- /**
159
- * parses the rdata portion from a standard DNS config line
160
- *
161
- * @param array $rdata a string split line of values for the rdata
162
- *
163
- * @return boolean
164
- * @access protected
165
- *
166
- */
167
- protected function rrFromString(array $rdata)
168
- {
169
- //
170
- // load and check the format; can be an int, or a mnemonic symbol
171
- //
172
- $this->format = array_shift($rdata);
173
- if (!is_numeric($this->format)) {
174
-
175
- $mnemonic = strtoupper(trim($this->format));
176
- if (!isset($this->cert_format_name_to_id[$mnemonic])) {
177
-
178
- return false;
179
- }
180
-
181
- $this->format = $this->cert_format_name_to_id[$mnemonic];
182
- } else {
183
-
184
- if (!isset($this->cert_format_id_to_name[$this->format])) {
185
-
186
- return false;
187
- }
188
- }
189
-
190
- $this->keytag = array_shift($rdata);
191
-
192
- //
193
- // parse and check the algorithm; can be an int, or a mnemonic symbol
194
- //
195
- $this->algorithm = array_shift($rdata);
196
- if (!is_numeric($this->algorithm)) {
197
-
198
- $mnemonic = strtoupper(trim($this->algorithm));
199
- if (!isset(Net_DNS2_Lookups::$algorithm_name_to_id[$mnemonic])) {
200
-
201
- return false;
202
- }
203
-
204
- $this->algorithm = Net_DNS2_Lookups::$algorithm_name_to_id[
205
- $mnemonic
206
- ];
207
- } else {
208
-
209
- if (!isset(Net_DNS2_Lookups::$algorithm_id_to_name[$this->algorithm])) {
210
- return false;
211
- }
212
- }
213
-
214
- //
215
- // parse and base64 decode the certificate
216
- //
217
- // certificates MUST be provided base64 encoded, if not, everything will
218
- // be broken after this point, as we assume it's base64 encoded.
219
- //
220
- $this->certificate = base64_decode(implode(' ', $rdata));
221
-
222
- return true;
223
- }
224
-
225
- /**
226
- * parses the rdata of the Net_DNS2_Packet object
227
- *
228
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
229
- *
230
- * @return boolean
231
- * @access protected
232
- *
233
- */
234
- protected function rrSet(Net_DNS2_Packet &$packet)
235
- {
236
- if ($this->rdlength > 0) {
237
-
238
- //
239
- // unpack the format, keytag and algorithm
240
- //
241
- $x = unpack('nformat/nkeytag/Calgorithm', $this->rdata);
242
-
243
- $this->format = $x['format'];
244
- $this->keytag = $x['keytag'];
245
- $this->algorithm = $x['algorithm'];
246
-
247
- //
248
- // copy the certificate
249
- //
250
- $this->certificate = substr($this->rdata, 5, $this->rdlength - 5);
251
-
252
- return true;
253
- }
254
-
255
- return false;
256
- }
257
-
258
- /**
259
- * returns the rdata portion of the DNS packet
260
- *
261
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
262
- * compressed names
263
- *
264
- * @return mixed either returns a binary packed
265
- * string or null on failure
266
- * @access protected
267
- *
268
- */
269
- protected function rrGet(Net_DNS2_Packet &$packet)
270
- {
271
- if (strlen($this->certificate) > 0) {
272
-
273
- $data = pack('nnC', $this->format, $this->keytag, $this->algorithm) .
274
- $this->certificate;
275
-
276
- $packet->offset += strlen($data);
277
-
278
- return $data;
279
- }
280
-
281
- return null;
282
- }
283
- }
284
-
285
- /*
286
- * Local variables:
287
- * tab-width: 4
288
- * c-basic-offset: 4
289
- * c-hanging-comment-ender-p: nil
290
- * End:
291
- */
292
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/CSYNC.php DELETED
@@ -1,203 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2015, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2015 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.4.1
49
- *
50
- */
51
-
52
- /**
53
- * CSYNC Resource Record - RFC 7477 seciond 2.1.1
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | SOA Serial |
57
- * | |
58
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
59
- * | Flags |
60
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
61
- * / Type Bit Map /
62
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_CSYNC extends Net_DNS2_RR
73
- {
74
- /*
75
- * serial number
76
- */
77
- public $serial;
78
-
79
- /*
80
- * flags
81
- */
82
- public $flags;
83
-
84
- /*
85
- * array of RR type names
86
- */
87
- public $type_bit_maps = array();
88
-
89
- /**
90
- * method to return the rdata portion of the packet as a string
91
- *
92
- * @return string
93
- * @access protected
94
- *
95
- */
96
- protected function rrToString()
97
- {
98
- $out = $this->serial . ' ' . $this->flags;
99
-
100
- //
101
- // show the RR's
102
- //
103
- foreach ($this->type_bit_maps as $rr) {
104
-
105
- $out .= ' ' . strtoupper($rr);
106
- }
107
-
108
- return $out;
109
- }
110
-
111
- /**
112
- * parses the rdata portion from a standard DNS config line
113
- *
114
- * @param array $rdata a string split line of values for the rdata
115
- *
116
- * @return boolean
117
- * @access protected
118
- *
119
- */
120
- protected function rrFromString(array $rdata)
121
- {
122
- $this->serial = array_shift($rdata);
123
- $this->flags = array_shift($rdata);
124
-
125
- $this->type_bit_maps = $rdata;
126
-
127
- return true;
128
- }
129
-
130
- /**
131
- * parses the rdata of the Net_DNS2_Packet object
132
- *
133
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
134
- *
135
- * @return boolean
136
- * @access protected
137
- *
138
- */
139
- protected function rrSet(Net_DNS2_Packet &$packet)
140
- {
141
- if ($this->rdlength > 0) {
142
-
143
- //
144
- // unpack the serial and flags values
145
- //
146
- $x = unpack('@' . $packet->offset . '/Nserial/nflags', $packet->rdata);
147
-
148
- $this->serial = Net_DNS2::expandUint32($x['serial']);
149
- $this->flags = $x['flags'];
150
-
151
- //
152
- // parse out the RR bitmap
153
- //
154
- $this->type_bit_maps = Net_DNS2_BitMap::bitMapToArray(
155
- substr($this->rdata, 6)
156
- );
157
-
158
- return true;
159
- }
160
-
161
- return false;
162
- }
163
-
164
- /**
165
- * returns the rdata portion of the DNS packet
166
- *
167
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
168
- * compressed names
169
- *
170
- * @return mixed either returns a binary packed
171
- * string or null on failure
172
- * @access protected
173
- *
174
- */
175
- protected function rrGet(Net_DNS2_Packet &$packet)
176
- {
177
- //
178
- // pack the serial and flags values
179
- //
180
- $data = pack('Nn', $this->serial, $this->flags);
181
-
182
- //
183
- // convert the array of RR names to a type bitmap
184
- //
185
- $data .= Net_DNS2_BitMap::arrayToBitMap($this->type_bit_maps);
186
-
187
- //
188
- // advance the offset
189
- //
190
- $packet->offset += strlen($data);
191
-
192
- return $data;
193
- }
194
- }
195
-
196
- /*
197
- * Local variables:
198
- * tab-width: 4
199
- * c-basic-offset: 4
200
- * c-hanging-comment-ender-p: nil
201
- * End:
202
- */
203
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/DHCID.php DELETED
@@ -1,207 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * DHCID Resource Record - RFC4701 section 3.1
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | ID Type Code |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * | Digest Type | /
59
- * +--+--+--+--+--+--+--+--+ /
60
- * / /
61
- * / Digest /
62
- * / /
63
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
64
- *
65
- * @category Networking
66
- * @package Net_DNS2
67
- * @author Mike Pultz <mike@mikepultz.com>
68
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
69
- * @link http://pear.php.net/package/Net_DNS2
70
- * @see Net_DNS2_RR
71
- *
72
- */
73
- class Net_DNS2_RR_DHCID extends Net_DNS2_RR
74
- {
75
- /*
76
- * Identifier type
77
- */
78
- public $id_type;
79
-
80
- /*
81
- * Digest Type
82
- */
83
- public $digest_type;
84
-
85
- /*
86
- * The digest
87
- */
88
- public $digest;
89
-
90
-
91
- /**
92
- * method to return the rdata portion of the packet as a string
93
- *
94
- * @return string
95
- * @access protected
96
- *
97
- */
98
- protected function rrToString()
99
- {
100
- $out = pack('nC', $this->id_type, $this->digest_type);
101
- $out .= base64_decode($this->digest);
102
-
103
- return base64_encode($out);
104
- }
105
-
106
- /**
107
- * parses the rdata portion from a standard DNS config line
108
- *
109
- * @param array $rdata a string split line of values for the rdata
110
- *
111
- * @return boolean
112
- * @access protected
113
- *
114
- */
115
- protected function rrFromString(array $rdata)
116
- {
117
- $data = base64_decode(array_shift($rdata));
118
- if (strlen($data) > 0) {
119
-
120
- //
121
- // unpack the id type and digest type
122
- //
123
- $x = unpack('nid_type/Cdigest_type', $data);
124
-
125
- $this->id_type = $x['id_type'];
126
- $this->digest_type = $x['digest_type'];
127
-
128
- //
129
- // copy out the digest
130
- //
131
- $this->digest = base64_encode(substr($data, 3, strlen($data) - 3));
132
-
133
- return true;
134
- }
135
-
136
- return false;
137
- }
138
-
139
- /**
140
- * parses the rdata of the Net_DNS2_Packet object
141
- *
142
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
143
- *
144
- * @return boolean
145
- * @access protected
146
- *
147
- */
148
- protected function rrSet(Net_DNS2_Packet &$packet)
149
- {
150
- if ($this->rdlength > 0) {
151
-
152
- //
153
- // unpack the id type and digest type
154
- //
155
- $x = unpack('nid_type/Cdigest_type', $this->rdata);
156
-
157
- $this->id_type = $x['id_type'];
158
- $this->digest_type = $x['digest_type'];
159
-
160
- //
161
- // copy out the digest
162
- //
163
- $this->digest = base64_encode(
164
- substr($this->rdata, 3, $this->rdlength - 3)
165
- );
166
-
167
- return true;
168
- }
169
-
170
- return false;
171
- }
172
-
173
- /**
174
- * returns the rdata portion of the DNS packet
175
- *
176
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
177
- * compressed names
178
- *
179
- * @return mixed either returns a binary packed
180
- * string or null on failure
181
- * @access protected
182
- *
183
- */
184
- protected function rrGet(Net_DNS2_Packet &$packet)
185
- {
186
- if (strlen($this->digest) > 0) {
187
-
188
- $data = pack('nC', $this->id_type, $this->digest_type) .
189
- base64_decode($this->digest);
190
-
191
- $packet->offset += strlen($data);
192
-
193
- return $data;
194
- }
195
-
196
- return null;
197
- }
198
- }
199
-
200
- /*
201
- * Local variables:
202
- * tab-width: 4
203
- * c-basic-offset: 4
204
- * c-hanging-comment-ender-p: nil
205
- * End:
206
- */
207
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/DLV.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * The DLV RR is implemented exactly like the DS RR; so we just extend that
54
- * class, and use all of it's methods
55
- *
56
- * @category Networking
57
- * @package Net_DNS2
58
- * @author Mike Pultz <mike@mikepultz.com>
59
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
60
- * @link http://pear.php.net/package/Net_DNS2
61
- * @see Net_DNS2_RR
62
- *
63
- */
64
- class Net_DNS2_RR_DLV extends Net_DNS2_RR_DS
65
- {
66
- }
67
-
68
- /*
69
- * Local variables:
70
- * tab-width: 4
71
- * c-basic-offset: 4
72
- * c-hanging-comment-ender-p: nil
73
- * End:
74
- */
75
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/DNAME.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * DNAME Resource Record - RFC2672 section 3
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * / DNAME /
57
- * / /
58
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
59
- *
60
- * @category Networking
61
- * @package Net_DNS2
62
- * @author Mike Pultz <mike@mikepultz.com>
63
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
64
- * @link http://pear.php.net/package/Net_DNS2
65
- * @see Net_DNS2_RR
66
- *
67
- */
68
- class Net_DNS2_RR_DNAME extends Net_DNS2_RR
69
- {
70
- /*
71
- * The target name
72
- */
73
- public $dname;
74
-
75
- /**
76
- * method to return the rdata portion of the packet as a string
77
- *
78
- * @return string
79
- * @access protected
80
- *
81
- */
82
- protected function rrToString()
83
- {
84
- return $this->cleanString($this->dname) . '.';
85
- }
86
-
87
- /**
88
- * parses the rdata portion from a standard DNS config line
89
- *
90
- * @param array $rdata a string split line of values for the rdata
91
- *
92
- * @return boolean
93
- * @access protected
94
- *
95
- */
96
- protected function rrFromString(array $rdata)
97
- {
98
- $this->dname = $this->cleanString(array_shift($rdata));
99
- return true;
100
- }
101
-
102
- /**
103
- * parses the rdata of the Net_DNS2_Packet object
104
- *
105
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
106
- *
107
- * @return boolean
108
- * @access protected
109
- *
110
- */
111
- protected function rrSet(Net_DNS2_Packet &$packet)
112
- {
113
- if ($this->rdlength > 0) {
114
-
115
- $offset = $packet->offset;
116
- $this->dname = Net_DNS2_Packet::expand($packet, $offset);
117
-
118
- return true;
119
- }
120
-
121
- return false;
122
- }
123
-
124
- /**
125
- * returns the rdata portion of the DNS packet
126
- *
127
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
128
- * compressed names
129
- *
130
- * @return mixed either returns a binary packed
131
- * string or null on failure
132
- * @access protected
133
- *
134
- */
135
- protected function rrGet(Net_DNS2_Packet &$packet)
136
- {
137
- if (strlen($this->dname) > 0) {
138
-
139
- return $packet->compress($this->dname, $packet->offset);
140
- }
141
-
142
- return null;
143
- }
144
- }
145
-
146
- /*
147
- * Local variables:
148
- * tab-width: 4
149
- * c-basic-offset: 4
150
- * c-hanging-comment-ender-p: nil
151
- * End:
152
- */
153
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/DNSKEY.php DELETED
@@ -1,198 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * DNSKEY Resource Record - RFC4034 sction 2.1
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | Flags | Protocol | Algorithm |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59
- * / /
60
- * / Public Key /
61
- * / /
62
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_DNSKEY extends Net_DNS2_RR
73
- {
74
- /*
75
- * flags
76
- */
77
- public $flags;
78
-
79
- /*
80
- * protocol
81
- */
82
- public $protocol;
83
-
84
- /*
85
- * algorithm used
86
- */
87
- public $algorithm;
88
-
89
- /*
90
- * the public key
91
- */
92
- public $key;
93
-
94
- /**
95
- * method to return the rdata portion of the packet as a string
96
- *
97
- * @return string
98
- * @access protected
99
- *
100
- */
101
- protected function rrToString()
102
- {
103
- return $this->flags . ' ' . $this->protocol . ' ' .
104
- $this->algorithm . ' ' . $this->key;
105
- }
106
-
107
- /**
108
- * parses the rdata portion from a standard DNS config line
109
- *
110
- * @param array $rdata a string split line of values for the rdata
111
- *
112
- * @return boolean
113
- * @access protected
114
- *
115
- */
116
- protected function rrFromString(array $rdata)
117
- {
118
- $this->flags = array_shift($rdata);
119
- $this->protocol = array_shift($rdata);
120
- $this->algorithm = array_shift($rdata);
121
- $this->key = implode(' ', $rdata);
122
-
123
- return true;
124
- }
125
-
126
- /**
127
- * parses the rdata of the Net_DNS2_Packet object
128
- *
129
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
130
- *
131
- * @return boolean
132
- * @access protected
133
- *
134
- */
135
- protected function rrSet(Net_DNS2_Packet &$packet)
136
- {
137
- if ($this->rdlength > 0) {
138
-
139
- //
140
- // unpack the flags, protocol and algorithm
141
- //
142
- $x = unpack('nflags/Cprotocol/Calgorithm', $this->rdata);
143
-
144
- //
145
- // TODO: right now we're just displaying what's in DNS; we really
146
- // should be parsing bit 7 and bit 15 of the flags field, and store
147
- // those separately.
148
- //
149
- // right now the DNSSEC implementation is really just for display,
150
- // we don't validate or handle any of the keys
151
- //
152
- $this->flags = $x['flags'];
153
- $this->protocol = $x['protocol'];
154
- $this->algorithm = $x['algorithm'];
155
-
156
- $this->key = base64_encode(substr($this->rdata, 4));
157
-
158
- return true;
159
- }
160
-
161
- return false;
162
- }
163
-
164
- /**
165
- * returns the rdata portion of the DNS packet
166
- *
167
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
168
- * compressed names
169
- *
170
- * @return mixed either returns a binary packed
171
- * string or null on failure
172
- * @access protected
173
- *
174
- */
175
- protected function rrGet(Net_DNS2_Packet &$packet)
176
- {
177
- if (strlen($this->key) > 0) {
178
-
179
- $data = pack('nCC', $this->flags, $this->protocol, $this->algorithm);
180
- $data .= base64_decode($this->key);
181
-
182
- $packet->offset += strlen($data);
183
-
184
- return $data;
185
- }
186
-
187
- return null;
188
- }
189
- }
190
-
191
- /*
192
- * Local variables:
193
- * tab-width: 4
194
- * c-basic-offset: 4
195
- * c-hanging-comment-ender-p: nil
196
- * End:
197
- */
198
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/DS.php DELETED
@@ -1,209 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * DS Resource Record - RFC4034 sction 5.1
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | Key Tag | Algorithm | Digest Type |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59
- * / /
60
- * / Digest /
61
- * / /
62
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_DS extends Net_DNS2_RR
73
- {
74
- /*
75
- * key tag
76
- */
77
- public $keytag;
78
-
79
- /*
80
- * algorithm number
81
- */
82
- public $algorithm;
83
-
84
- /*
85
- * algorithm used to construct the digest
86
- */
87
- public $digesttype;
88
-
89
- /*
90
- * the digest data
91
- */
92
- public $digest;
93
-
94
- /**
95
- * method to return the rdata portion of the packet as a string
96
- *
97
- * @return string
98
- * @access protected
99
- *
100
- */
101
- protected function rrToString()
102
- {
103
- return $this->keytag . ' ' . $this->algorithm . ' ' .
104
- $this->digesttype . ' ' . $this->digest;
105
- }
106
-
107
- /**
108
- * parses the rdata portion from a standard DNS config line
109
- *
110
- * @param array $rdata a string split line of values for the rdata
111
- *
112
- * @return boolean
113
- * @access protected
114
- *
115
- */
116
- protected function rrFromString(array $rdata)
117
- {
118
- $this->keytag = array_shift($rdata);
119
- $this->algorithm = array_shift($rdata);
120
- $this->digesttype = array_shift($rdata);
121
- $this->digest = implode('', $rdata);
122
-
123
- return true;
124
- }
125
-
126
- /**
127
- * parses the rdata of the Net_DNS2_Packet object
128
- *
129
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
130
- *
131
- * @return boolean
132
- * @access protected
133
- *
134
- */
135
- protected function rrSet(Net_DNS2_Packet &$packet)
136
- {
137
- if ($this->rdlength > 0) {
138
-
139
- //
140
- // unpack the keytag, algorithm and digesttype
141
- //
142
- $x = unpack('nkeytag/Calgorithm/Cdigesttype', $this->rdata);
143
-
144
- $this->keytag = $x['keytag'];
145
- $this->algorithm = $x['algorithm'];
146
- $this->digesttype = $x['digesttype'];
147
-
148
- //
149
- // figure out the digest size
150
- //
151
- $digest_size = 0;
152
- if ($this->digesttype == 1) {
153
-
154
- $digest_size = 20; // SHA1
155
-
156
- } else if ($this->digesttype == 2) {
157
-
158
- $digest_size = 32; // SHA256
159
- }
160
-
161
- //
162
- // copy the digest
163
- //
164
- $x = unpack('H*', substr($this->rdata, 4, $digest_size));
165
- $this->digest = $x[1];
166
-
167
- return true;
168
- }
169
-
170
- return false;
171
- }
172
-
173
- /**
174
- * returns the rdata portion of the DNS packet
175
- *
176
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
177
- * compressed names
178
- *
179
- * @return mixed either returns a binary packed
180
- * string or null on failure
181
- * @access protected
182
- *
183
- */
184
- protected function rrGet(Net_DNS2_Packet &$packet)
185
- {
186
- if (strlen($this->digest) > 0) {
187
-
188
- $data = pack(
189
- 'nCCH*',
190
- $this->keytag, $this->algorithm, $this->digesttype, $this->digest
191
- );
192
-
193
- $packet->offset += strlen($data);
194
-
195
- return $data;
196
- }
197
-
198
- return null;
199
- }
200
- }
201
-
202
- /*
203
- * Local variables:
204
- * tab-width: 4
205
- * c-basic-offset: 4
206
- * c-hanging-comment-ender-p: nil
207
- * End:
208
- */
209
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/EID.php DELETED
@@ -1,130 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * EID Resource Record - undefined; the rdata is simply used as-is in it's
54
- * binary format, so not process has to be done.
55
- *
56
- * @category Networking
57
- * @package Net_DNS2
58
- * @author Mike Pultz <mike@mikepultz.com>
59
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
60
- * @link http://pear.php.net/package/Net_DNS2
61
- * @see Net_DNS2_RR
62
- *
63
- */
64
- class Net_DNS2_RR_EID extends Net_DNS2_RR
65
- {
66
- /**
67
- * method to return the rdata portion of the packet as a string
68
- *
69
- * @return string
70
- * @access protected
71
- *
72
- */
73
- protected function rrToString()
74
- {
75
- return '';
76
- }
77
-
78
- /**
79
- * parses the rdata portion from a standard DNS config line
80
- *
81
- * @param array $rdata a string split line of values for the rdata
82
- *
83
- * @return boolean
84
- * @access protected
85
- *
86
- */
87
- protected function rrFromString(array $rdata)
88
- {
89
- return true;
90
- }
91
-
92
- /**
93
- * parses the rdata of the Net_DNS2_Packet object
94
- *
95
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
96
- *
97
- * @return boolean
98
- * @access protected
99
- *
100
- */
101
- protected function rrSet(Net_DNS2_Packet &$packet)
102
- {
103
- return true;
104
- }
105
-
106
- /**
107
- * returns the rdata portion of the DNS packet
108
- *
109
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
110
- * compressed names
111
- *
112
- * @return mixed either returns a binary packed
113
- * string or null on failure
114
- * @access protected
115
- *
116
- */
117
- protected function rrGet(Net_DNS2_Packet &$packet)
118
- {
119
- return $this->rdata;
120
- }
121
- }
122
-
123
- /*
124
- * Local variables:
125
- * tab-width: 4
126
- * c-basic-offset: 4
127
- * c-hanging-comment-ender-p: nil
128
- * End:
129
- */
130
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/EUI48.php DELETED
@@ -1,187 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2013 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.3.2
49
- *
50
- */
51
-
52
- /**
53
- * EUI48 Resource Record - RFC7043 section 3.1
54
- *
55
- * 0 1 2 3
56
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
57
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
58
- * | EUI-48 Address |
59
- * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
60
- * | |
61
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
62
- *
63
- * @category Networking
64
- * @package Net_DNS2
65
- * @author Mike Pultz <mike@mikepultz.com>
66
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
67
- * @link http://pear.php.net/package/Net_DNS2
68
- * @see Net_DNS2_RR
69
- *
70
- */
71
- class Net_DNS2_RR_EUI48 extends Net_DNS2_RR
72
- {
73
- /*
74
- * The EUI48 address, in hex format
75
- */
76
- public $address;
77
-
78
- /**
79
- * method to return the rdata portion of the packet as a string
80
- *
81
- * @return string
82
- * @access protected
83
- *
84
- */
85
- protected function rrToString()
86
- {
87
- return $this->address;
88
- }
89
-
90
- /**
91
- * parses the rdata portion from a standard DNS config line
92
- *
93
- * @param array $rdata a string split line of values for the rdata
94
- *
95
- * @return boolean
96
- * @access protected
97
- *
98
- */
99
- protected function rrFromString(array $rdata)
100
- {
101
- $value = array_shift($rdata);
102
-
103
- //
104
- // re: RFC 7043, the field must be represented as six two-digit hex numbers
105
- // separated by hyphens.
106
- //
107
- $a = explode('-', $value);
108
- if (count($a) != 6) {
109
-
110
- return false;
111
- }
112
-
113
- //
114
- // make sure they're all hex values
115
- //
116
- foreach ($a as $i) {
117
- if (ctype_xdigit($i) == false) {
118
- return false;
119
- }
120
- }
121
-
122
- //
123
- // store it
124
- //
125
- $this->address = strtolower($value);
126
-
127
- return true;
128
- }
129
-
130
- /**
131
- * parses the rdata of the Net_DNS2_Packet object
132
- *
133
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
134
- *
135
- * @return boolean
136
- * @access protected
137
- *
138
- */
139
- protected function rrSet(Net_DNS2_Packet &$packet)
140
- {
141
- if ($this->rdlength > 0) {
142
-
143
- $x = unpack('C6', $this->rdata);
144
- if (count($x) == 6) {
145
-
146
- $this->address = vsprintf('%02x-%02x-%02x-%02x-%02x-%02x', $x);
147
- return true;
148
- }
149
- }
150
-
151
- return false;
152
- }
153
-
154
- /**
155
- * returns the rdata portion of the DNS packet
156
- *
157
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
158
- * compressed names
159
- *
160
- * @return mixed either returns a binary packed
161
- * string or null on failure
162
- * @access protected
163
- *
164
- */
165
- protected function rrGet(Net_DNS2_Packet &$packet)
166
- {
167
- $data = '';
168
-
169
- $a = explode('-', $this->address);
170
- foreach ($a as $b) {
171
-
172
- $data .= chr(hexdec($b));
173
- }
174
-
175
- $packet->offset += 6;
176
- return $data;
177
- }
178
- }
179
-
180
- /*
181
- * Local variables:
182
- * tab-width: 4
183
- * c-basic-offset: 4
184
- * c-hanging-comment-ender-p: nil
185
- * End:
186
- */
187
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/EUI64.php DELETED
@@ -1,188 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2013 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.3.2
49
- *
50
- */
51
-
52
- /**
53
- * EUI64 Resource Record - RFC7043 section 4.1
54
- *
55
- * 0 1 2 3
56
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
57
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
58
- * | EUI-48 Address |
59
- * | |
60
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61
- *
62
- * @category Networking
63
- * @package Net_DNS2
64
- * @author Mike Pultz <mike@mikepultz.com>
65
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
66
- * @link http://pear.php.net/package/Net_DNS2
67
- * @see Net_DNS2_RR
68
- *
69
- */
70
- class Net_DNS2_RR_EUI64 extends Net_DNS2_RR
71
- {
72
- /*
73
- * The EUI64 address, in hex format
74
- */
75
- public $address;
76
-
77
- /**
78
- * method to return the rdata portion of the packet as a string
79
- *
80
- * @return string
81
- * @access protected
82
- *
83
- */
84
- protected function rrToString()
85
- {
86
- return $this->address;
87
- }
88
-
89
- /**
90
- * parses the rdata portion from a standard DNS config line
91
- *
92
- * @param array $rdata a string split line of values for the rdata
93
- *
94
- * @return boolean
95
- * @access protected
96
- *
97
- */
98
- protected function rrFromString(array $rdata)
99
- {
100
- $value = array_shift($rdata);
101
-
102
- //
103
- // re: RFC 7043, the field must be represented as 8 two-digit hex numbers
104
- // separated by hyphens.
105
- //
106
- $a = explode('-', $value);
107
- if (count($a) != 8) {
108
-
109
- return false;
110
- }
111
-
112
- //
113
- // make sure they're all hex values
114
- //
115
- foreach ($a as $i) {
116
- if (ctype_xdigit($i) == false) {
117
- return false;
118
- }
119
- }
120
-
121
- //
122
- // store it
123
- //
124
- $this->address = strtolower($value);
125
-
126
- return true;
127
- }
128
-
129
- /**
130
- * parses the rdata of the Net_DNS2_Packet object
131
- *
132
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
133
- *
134
- * @return boolean
135
- * @access protected
136
- *
137
- */
138
- protected function rrSet(Net_DNS2_Packet &$packet)
139
- {
140
- if ($this->rdlength > 0) {
141
-
142
- $x = unpack('C8', $this->rdata);
143
- if (count($x) == 8) {
144
-
145
- $this->address = vsprintf(
146
- '%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x', $x
147
- );
148
- return true;
149
- }
150
- }
151
-
152
- return false;
153
- }
154
-
155
- /**
156
- * returns the rdata portion of the DNS packet
157
- *
158
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
159
- * compressed names
160
- *
161
- * @return mixed either returns a binary packed
162
- * string or null on failure
163
- * @access protected
164
- *
165
- */
166
- protected function rrGet(Net_DNS2_Packet &$packet)
167
- {
168
- $data = '';
169
-
170
- $a = explode('-', $this->address);
171
- foreach ($a as $b) {
172
-
173
- $data .= chr(hexdec($b));
174
- }
175
-
176
- $packet->offset += 8;
177
- return $data;
178
- }
179
- }
180
-
181
- /*
182
- * Local variables:
183
- * tab-width: 4
184
- * c-basic-offset: 4
185
- * c-hanging-comment-ender-p: nil
186
- * End:
187
- */
188
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/HINFO.php DELETED
@@ -1,175 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * HINFO Resource Record - RFC1035 section 3.3.2
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * / CPU /
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * / OS /
59
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
60
- *
61
- * @category Networking
62
- * @package Net_DNS2
63
- * @author Mike Pultz <mike@mikepultz.com>
64
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
65
- * @link http://pear.php.net/package/Net_DNS2
66
- * @see Net_DNS2_RR
67
- *
68
- */
69
- class Net_DNS2_RR_HINFO extends Net_DNS2_RR
70
- {
71
- /*
72
- * computer informatino
73
- */
74
- public $cpu;
75
-
76
- /*
77
- * operataing system
78
- */
79
- public $os;
80
-
81
- /**
82
- * method to return the rdata portion of the packet as a string
83
- *
84
- * @return string
85
- * @access protected
86
- *
87
- */
88
- protected function rrToString()
89
- {
90
- return $this->formatString($this->cpu) . ' ' .
91
- $this->formatString($this->os);
92
- }
93
-
94
- /**
95
- * parses the rdata portion from a standard DNS config line
96
- *
97
- * @param array $rdata a string split line of values for the rdata
98
- *
99
- * @return boolean
100
- * @access protected
101
- *
102
- */
103
- protected function rrFromString(array $rdata)
104
- {
105
- $data = $this->buildString($rdata);
106
- if (count($data) == 2) {
107
-
108
- $this->cpu = $data[0];
109
- $this->os = $data[1];
110
-
111
- return true;
112
- }
113
-
114
- return false;
115
- }
116
-
117
- /**
118
- * parses the rdata of the Net_DNS2_Packet object
119
- *
120
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
121
- *
122
- * @return boolean
123
- * @access protected
124
- *
125
- */
126
- protected function rrSet(Net_DNS2_Packet &$packet)
127
- {
128
- if ($this->rdlength > 0) {
129
-
130
- $offset = $packet->offset;
131
-
132
- $this->cpu = trim(Net_DNS2_Packet::label($packet, $offset), '"');
133
- $this->os = trim(Net_DNS2_Packet::label($packet, $offset), '"');
134
-
135
- return true;
136
- }
137
-
138
- return false;
139
- }
140
-
141
- /**
142
- * returns the rdata portion of the DNS packet
143
- *
144
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
145
- * compressed names
146
- *
147
- * @return mixed either returns a binary packed
148
- * string or null on failure
149
- * @access protected
150
- *
151
- */
152
- protected function rrGet(Net_DNS2_Packet &$packet)
153
- {
154
- if (strlen($this->cpu) > 0) {
155
-
156
- $data = chr(strlen($this->cpu)) . $this->cpu;
157
- $data .= chr(strlen($this->os)) . $this->os;
158
-
159
- $packet->offset += strlen($data);
160
-
161
- return $data;
162
- }
163
-
164
- return null;
165
- }
166
- }
167
-
168
- /*
169
- * Local variables:
170
- * tab-width: 4
171
- * c-basic-offset: 4
172
- * c-hanging-comment-ender-p: nil
173
- * End:
174
- */
175
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/HIP.php DELETED
@@ -1,287 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.0.0
49
- *
50
- */
51
-
52
- /**
53
- * HIP Resource Record - RFC5205 section 5
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | HIT length | PK algorithm | PK length |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59
- * | |
60
- * ~ HIT ~
61
- * | |
62
- * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
- * | | |
64
- * +-+-+-+-+-+-+-+-+-+-+-+ +
65
- * | Public Key |
66
- * ~ ~
67
- * | |
68
- * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
69
- * | | |
70
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
71
- * | |
72
- * ~ Rendezvous Servers ~
73
- * | |
74
- * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
75
- * | |
76
- * +-+-+-+-+-+-+-+
77
- *
78
- * @category Networking
79
- * @package Net_DNS2
80
- * @author Mike Pultz <mike@mikepultz.com>
81
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
82
- * @link http://pear.php.net/package/Net_DNS2
83
- * @see Net_DNS2_RR
84
- *
85
- */
86
- class Net_DNS2_RR_HIP extends Net_DNS2_RR
87
- {
88
- /*
89
- * The length of the HIT field
90
- */
91
- public $hit_length;
92
-
93
- /*
94
- * the public key cryptographic algorithm
95
- */
96
- public $pk_algorithm;
97
-
98
- /*
99
- * the length of the public key field
100
- */
101
- public $pk_length;
102
-
103
- /*
104
- * The HIT is stored as a binary value in network byte order.
105
- */
106
- public $hit;
107
-
108
- /*
109
- * The public key
110
- */
111
- public $public_key;
112
-
113
- /*
114
- * a list of rendezvous servers
115
- */
116
- public $rendezvous_servers = array();
117
-
118
- /**
119
- * method to return the rdata portion of the packet as a string
120
- *
121
- * @return string
122
- * @access protected
123
- *
124
- */
125
- protected function rrToString()
126
- {
127
- $out = $this->pk_algorithm . ' ' .
128
- $this->hit . ' ' . $this->public_key . ' ';
129
-
130
- foreach ($this->rendezvous_servers as $index => $server) {
131
-
132
- $out .= $server . '. ';
133
- }
134
-
135
- return trim($out);
136
- }
137
-
138
- /**
139
- * parses the rdata portion from a standard DNS config line
140
- *
141
- * @param array $rdata a string split line of values for the rdata
142
- *
143
- * @return boolean
144
- * @access protected
145
- *
146
- */
147
- protected function rrFromString(array $rdata)
148
- {
149
- $this->pk_algorithm = array_shift($rdata);
150
- $this->hit = strtoupper(array_shift($rdata));
151
- $this->public_key = array_shift($rdata);
152
-
153
- //
154
- // anything left on the array, must be one or more rendezevous servers. add
155
- // them and strip off the trailing dot
156
- //
157
- if (count($rdata) > 0) {
158
-
159
- $this->rendezvous_servers = preg_replace('/\.$/', '', $rdata);
160
- }
161
-
162
- //
163
- // store the lengths;
164
- //
165
- $this->hit_length = strlen(pack('H*', $this->hit));
166
- $this->pk_length = strlen(base64_decode($this->public_key));
167
-
168
- return true;
169
- }
170
-
171
- /**
172
- * parses the rdata of the Net_DNS2_Packet object
173
- *
174
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
175
- *
176
- * @return boolean
177
- * @access protected
178
- *
179
- */
180
- protected function rrSet(Net_DNS2_Packet &$packet)
181
- {
182
- if ($this->rdlength > 0) {
183
-
184
- //
185
- // unpack the algorithm and length values
186
- //
187
- $x = unpack('Chit_length/Cpk_algorithm/npk_length', $this->rdata);
188
-
189
- $this->hit_length = $x['hit_length'];
190
- $this->pk_algorithm = $x['pk_algorithm'];
191
- $this->pk_length = $x['pk_length'];
192
-
193
- $offset = 4;
194
-
195
- //
196
- // copy out the HIT value
197
- //
198
- $hit = unpack('H*', substr($this->rdata, $offset, $this->hit_length));
199
-
200
- $this->hit = strtoupper($hit[1]);
201
- $offset += $this->hit_length;
202
-
203
- //
204
- // copy out the public key
205
- //
206
- $this->public_key = base64_encode(
207
- substr($this->rdata, $offset, $this->pk_length)
208
- );
209
- $offset += $this->pk_length;
210
-
211
- //
212
- // copy out any possible rendezvous servers
213
- //
214
- $offset = $packet->offset + $offset;
215
-
216
- while ( ($offset - $packet->offset) < $this->rdlength) {
217
-
218
- $this->rendezvous_servers[] = Net_DNS2_Packet::expand(
219
- $packet, $offset
220
- );
221
- }
222
-
223
- return true;
224
- }
225
-
226
- return false;
227
- }
228
-
229
- /**
230
- * returns the rdata portion of the DNS packet
231
- *
232
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
233
- * compressed names
234
- *
235
- * @return mixed either returns a binary packed
236
- * string or null on failure
237
- * @access protected
238
- *
239
- */
240
- protected function rrGet(Net_DNS2_Packet &$packet)
241
- {
242
- if ( (strlen($this->hit) > 0) && (strlen($this->public_key) > 0) ) {
243
-
244
- //
245
- // pack the length, algorithm and HIT values
246
- //
247
- $data = pack(
248
- 'CCnH*',
249
- $this->hit_length,
250
- $this->pk_algorithm,
251
- $this->pk_length,
252
- $this->hit
253
- );
254
-
255
- //
256
- // add the public key
257
- //
258
- $data .= base64_decode($this->public_key);
259
-
260
- //
261
- // add the offset
262
- //
263
- $packet->offset += strlen($data);
264
-
265
- //
266
- // add each rendezvous server
267
- //
268
- foreach ($this->rendezvous_servers as $index => $server) {
269
-
270
- $data .= $packet->compress($server, $packet->offset);
271
- }
272
-
273
- return $data;
274
- }
275
-
276
- return null;
277
- }
278
- }
279
-
280
- /*
281
- * Local variables:
282
- * tab-width: 4
283
- * c-basic-offset: 4
284
- * c-hanging-comment-ender-p: nil
285
- * End:
286
- */
287
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/IPSECKEY.php DELETED
@@ -1,386 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * IPSECKEY Resource Record - RFC4025 section 2.1
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | precedence | gateway type | algorithm | gateway |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------+ +
59
- * ~ gateway ~
60
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61
- * | /
62
- * / public key /
63
- * / /
64
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
65
- *
66
- * @category Networking
67
- * @package Net_DNS2
68
- * @author Mike Pultz <mike@mikepultz.com>
69
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
70
- * @link http://pear.php.net/package/Net_DNS2
71
- * @see Net_DNS2_RR
72
- *
73
- */
74
- class Net_DNS2_RR_IPSECKEY extends Net_DNS2_RR
75
- {
76
- const GATEWAY_TYPE_NONE = 0;
77
- const GATEWAY_TYPE_IPV4 = 1;
78
- const GATEWAY_TYPE_IPV6 = 2;
79
- const GATEWAY_TYPE_DOMAIN = 3;
80
-
81
- const ALGORITHM_NONE = 0;
82
- const ALGORITHM_DSA = 1;
83
- const ALGORITHM_RSA = 2;
84
-
85
- /*
86
- * Precedence (used the same was as a preference field)
87
- */
88
- public $precedence;
89
-
90
- /*
91
- * Gateway type - specifies the format of the gataway information
92
- * This can be either:
93
- *
94
- * 0 No Gateway
95
- * 1 IPv4 address
96
- * 2 IPV6 address
97
- * 3 wire-encoded domain name (not compressed)
98
- *
99
- */
100
- public $gateway_type;
101
-
102
- /*
103
- * The algorithm used
104
- *
105
- * This can be:
106
- *
107
- * 0 No key is present
108
- * 1 DSA key is present
109
- * 2 RSA key is present
110
- *
111
- */
112
- public $algorithm;
113
-
114
- /*
115
- * The gatway information
116
- */
117
- public $gateway;
118
-
119
- /*
120
- * the public key
121
- */
122
- public $key;
123
-
124
- /**
125
- * method to return the rdata portion of the packet as a string
126
- *
127
- * @return string
128
- * @access protected
129
- *
130
- */
131
- protected function rrToString()
132
- {
133
- $out = $this->precedence . ' ' . $this->gateway_type . ' ' .
134
- $this->algorithm . ' ';
135
-
136
- switch($this->gateway_type) {
137
- case self::GATEWAY_TYPE_NONE:
138
- $out .= '. ';
139
- break;
140
-
141
- case self::GATEWAY_TYPE_IPV4:
142
- case self::GATEWAY_TYPE_IPV6:
143
- $out .= $this->gateway . ' ';
144
- break;
145
-
146
- case self::GATEWAY_TYPE_DOMAIN:
147
- $out .= $this->gateway . '. ';
148
- break;
149
- }
150
-
151
- $out .= $this->key;
152
- return $out;
153
- }
154
-
155
- /**
156
- * parses the rdata portion from a standard DNS config line
157
- *
158
- * @param array $rdata a string split line of values for the rdata
159
- *
160
- * @return boolean
161
- * @access protected
162
- *
163
- */
164
- protected function rrFromString(array $rdata)
165
- {
166
- //
167
- // load the data
168
- //
169
- $precedence = array_shift($rdata);
170
- $gateway_type = array_shift($rdata);
171
- $algorithm = array_shift($rdata);
172
- $gateway = strtolower(trim(array_shift($rdata)));
173
- $key = array_shift($rdata);
174
-
175
- //
176
- // validate it
177
- //
178
- switch($gateway_type) {
179
- case self::GATEWAY_TYPE_NONE:
180
- $gateway = '';
181
- break;
182
-
183
- case self::GATEWAY_TYPE_IPV4:
184
- if (Net_DNS2::isIPv4($gateway) == false) {
185
- return false;
186
- }
187
- break;
188
-
189
- case self::GATEWAY_TYPE_IPV6:
190
- if (Net_DNS2::isIPv6($gateway) == false) {
191
- return false;
192
- }
193
- break;
194
-
195
- case self::GATEWAY_TYPE_DOMAIN:
196
- ; // do nothing
197
- break;
198
-
199
- default:
200
- return false;
201
- }
202
-
203
- //
204
- // check the algorithm and key
205
- //
206
- switch($algorithm) {
207
- case self::ALGORITHM_NONE:
208
- $key = '';
209
- break;
210
-
211
- case self::ALGORITHM_DSA:
212
- case self::ALGORITHM_RSA:
213
- ; // do nothing
214
- break;
215
-
216
- default:
217
- return false;
218
- }
219
-
220
- //
221
- // store the values
222
- //
223
- $this->precedence = $precedence;
224
- $this->gateway_type = $gateway_type;
225
- $this->algorithm = $algorithm;
226
- $this->gateway = $gateway;
227
- $this->key = $key;
228
-
229
- return true;
230
- }
231
-
232
- /**
233
- * parses the rdata of the Net_DNS2_Packet object
234
- *
235
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
236
- *
237
- * @return boolean
238
- * @access protected
239
- *
240
- */
241
- protected function rrSet(Net_DNS2_Packet &$packet)
242
- {
243
- if ($this->rdlength > 0) {
244
-
245
- //
246
- // parse off the precedence, gateway type and algorithm
247
- //
248
- $x = unpack('Cprecedence/Cgateway_type/Calgorithm', $this->rdata);
249
-
250
- $this->precedence = $x['precedence'];
251
- $this->gateway_type = $x['gateway_type'];
252
- $this->algorithm = $x['algorithm'];
253
-
254
- $offset = 3;
255
-
256
- //
257
- // extract the gatway based on the type
258
- //
259
- switch($this->gateway_type) {
260
- case self::GATEWAY_TYPE_NONE:
261
- $this->gateway = '';
262
- break;
263
-
264
- case self::GATEWAY_TYPE_IPV4:
265
- $this->gateway = inet_ntop(substr($this->rdata, $offset, 4));
266
- $offset += 4;
267
- break;
268
-
269
- case self::GATEWAY_TYPE_IPV6:
270
- $ip = unpack('n8', substr($this->rdata, $offset, 16));
271
- if (count($ip) == 8) {
272
-
273
- $this->gateway = vsprintf('%x:%x:%x:%x:%x:%x:%x:%x', $ip);
274
- $offset += 16;
275
- } else {
276
-
277
- return false;
278
- }
279
- break;
280
-
281
- case self::GATEWAY_TYPE_DOMAIN:
282
-
283
- $doffset = $offset + $packet->offset;
284
- $this->gateway = Net_DNS2_Packet::expand($packet, $doffset);
285
- $offset = ($doffset - $packet->offset);
286
- break;
287
-
288
- default:
289
- return false;
290
- }
291
-
292
- //
293
- // extract the key
294
- //
295
- switch($this->algorithm) {
296
- case self::ALGORITHM_NONE:
297
- $this->key = '';
298
- break;
299
-
300
- case self::ALGORITHM_DSA:
301
- case self::ALGORITHM_RSA:
302
- $this->key = base64_encode(substr($this->rdata, $offset));
303
- break;
304
-
305
- default:
306
- return false;
307
- }
308
-
309
- return true;
310
- }
311
-
312
- return false;
313
- }
314
-
315
- /**
316
- * returns the rdata portion of the DNS packet
317
- *
318
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
319
- * compressed names
320
- *
321
- * @return mixed either returns a binary packed
322
- * string or null on failure
323
- * @access protected
324
- *
325
- */
326
- protected function rrGet(Net_DNS2_Packet &$packet)
327
- {
328
- //
329
- // pack the precedence, gateway type and algorithm
330
- //
331
- $data = pack(
332
- 'CCC', $this->precedence, $this->gateway_type, $this->algorithm
333
- );
334
-
335
- //
336
- // add the gateway based on the type
337
- //
338
- switch($this->gateway_type) {
339
- case self::GATEWAY_TYPE_NONE:
340
- ; // add nothing
341
- break;
342
-
343
- case self::GATEWAY_TYPE_IPV4:
344
- case self::GATEWAY_TYPE_IPV6:
345
- $data .= inet_pton($this->gateway);
346
- break;
347
-
348
- case self::GATEWAY_TYPE_DOMAIN:
349
- $data .= chr(strlen($this->gateway)) . $this->gateway;
350
- break;
351
-
352
- default:
353
- return null;
354
- }
355
-
356
- //
357
- // add the key if there's one specified
358
- //
359
- switch($this->algorithm) {
360
- case self::ALGORITHM_NONE:
361
- ; // add nothing
362
- break;
363
-
364
- case self::ALGORITHM_DSA:
365
- case self::ALGORITHM_RSA:
366
- $data .= base64_decode($this->key);
367
- break;
368
-
369
- default:
370
- return null;
371
- }
372
-
373
- $packet->offset += strlen($data);
374
-
375
- return $data;
376
- }
377
- }
378
-
379
- /*
380
- * Local variables:
381
- * tab-width: 4
382
- * c-basic-offset: 4
383
- * c-hanging-comment-ender-p: nil
384
- * End:
385
- */
386
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/ISDN.php DELETED
@@ -1,190 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * ISDN Resource Record - RFC1183 section 3.2
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * / ISDN-address /
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * / SA /
59
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
60
- *
61
- * @category Networking
62
- * @package Net_DNS2
63
- * @author Mike Pultz <mike@mikepultz.com>
64
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
65
- * @link http://pear.php.net/package/Net_DNS2
66
- * @see Net_DNS2_RR
67
- *
68
- */
69
- class Net_DNS2_RR_ISDN extends Net_DNS2_RR
70
- {
71
- /*
72
- * ISDN Number
73
- */
74
- public $isdnaddress;
75
-
76
- /*
77
- * Sub-Address
78
- */
79
- public $sa;
80
-
81
- /**
82
- * method to return the rdata portion of the packet as a string
83
- *
84
- * @return string
85
- * @access protected
86
- *
87
- */
88
- protected function rrToString()
89
- {
90
- return $this->formatString($this->isdnaddress) . ' ' .
91
- $this->formatString($this->sa);
92
- }
93
-
94
- /**
95
- * parses the rdata portion from a standard DNS config line
96
- *
97
- * @param array $rdata a string split line of values for the rdata
98
- *
99
- * @return boolean
100
- * @access protected
101
- *
102
- */
103
- protected function rrFromString(array $rdata)
104
- {
105
- $data = $this->buildString($rdata);
106
- if (count($data) >= 1) {
107
-
108
- $this->isdnaddress = $data[0];
109
- if (isset($data[1])) {
110
-
111
- $this->sa = $data[1];
112
- }
113
-
114
- return true;
115
- }
116
-
117
- return false;
118
- }
119
-
120
- /**
121
- * parses the rdata of the Net_DNS2_Packet object
122
- *
123
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
124
- *
125
- * @return boolean
126
- * @access protected
127
- *
128
- */
129
- protected function rrSet(Net_DNS2_Packet &$packet)
130
- {
131
- if ($this->rdlength > 0) {
132
-
133
- $this->isdnaddress = Net_DNS2_Packet::label($packet, $packet->offset);
134
-
135
- //
136
- // look for a SA (sub address) - it's optional
137
- //
138
- if ( (strlen($this->isdnaddress) + 1) < $this->rdlength) {
139
-
140
- $this->sa = Net_DNS2_Packet::label($packet, $packet->offset);
141
- } else {
142
-
143
- $this->sa = '';
144
- }
145
-
146
- return true;
147
- }
148
-
149
- return false;
150
- }
151
-
152
- /**
153
- * returns the rdata portion of the DNS packet
154
- *
155
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
156
- * compressed names
157
- *
158
- * @return mixed either returns a binary packed
159
- * string or null on failure
160
- * @access protected
161
- *
162
- */
163
- protected function rrGet(Net_DNS2_Packet &$packet)
164
- {
165
- if (strlen($this->isdnaddress) > 0) {
166
-
167
- $data = chr(strlen($this->isdnaddress)) . $this->isdnaddress;
168
- if (!empty($this->sa)) {
169
-
170
- $data .= chr(strlen($this->sa));
171
- $data .= $this->sa;
172
- }
173
-
174
- $packet->offset += strlen($data);
175
-
176
- return $data;
177
- }
178
-
179
- return null;
180
- }
181
- }
182
-
183
- /*
184
- * Local variables:
185
- * tab-width: 4
186
- * c-basic-offset: 4
187
- * c-hanging-comment-ender-p: nil
188
- * End:
189
- */
190
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/KEY.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * the KEY RR is implemented the same as the DNSKEY RR, the only difference
54
- * is how the flags data is parsed.
55
- *
56
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
57
- * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
58
- * | A/C | Z | XT| Z | Z | NAMTYP| Z | Z | Z | Z | SIG |
59
- * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
60
- *
61
- * DNSKEY only uses bits 7 and 15
62
- *
63
- * We're not doing anything with these flags right now, so duplicating the
64
- * class like this is fine.
65
- *
66
- * @category Networking
67
- * @package Net_DNS2
68
- * @author Mike Pultz <mike@mikepultz.com>
69
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
70
- * @link http://pear.php.net/package/Net_DNS2
71
- * @see Net_DNS2_RR
72
- *
73
- */
74
- class Net_DNS2_RR_KEY extends Net_DNS2_RR_DNSKEY
75
- {
76
- }
77
-
78
- /*
79
- * Local variables:
80
- * tab-width: 4
81
- * c-basic-offset: 4
82
- * c-hanging-comment-ender-p: nil
83
- * End:
84
- */
85
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/KX.php DELETED
@@ -1,179 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * KX Resource Record - RFC2230 section 3.1
54
- *
55
- * This class is almost identical to MX, except that the the exchanger
56
- * domain is not compressed, it's added as a label
57
- *
58
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
59
- * | PREFERENCE |
60
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
61
- * / EXCHANGER /
62
- * / /
63
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
64
- *
65
- * @category Networking
66
- * @package Net_DNS2
67
- * @author Mike Pultz <mike@mikepultz.com>
68
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
69
- * @link http://pear.php.net/package/Net_DNS2
70
- * @see Net_DNS2_RR
71
- *
72
- */
73
- class Net_DNS2_RR_KX extends Net_DNS2_RR
74
- {
75
- /*
76
- * the preference for this mail exchanger
77
- */
78
- public $preference;
79
-
80
- /*
81
- * the hostname of the mail exchanger
82
- */
83
- public $exchange;
84
-
85
- /**
86
- * method to return the rdata portion of the packet as a string
87
- *
88
- * @return string
89
- * @access protected
90
- *
91
- */
92
- protected function rrToString()
93
- {
94
- return $this->preference . ' ' . $this->cleanString($this->exchange) . '.';
95
- }
96
-
97
- /**
98
- * parses the rdata portion from a standard DNS config line
99
- *
100
- * @param array $rdata a string split line of values for the rdata
101
- *
102
- * @return boolean
103
- * @access protected
104
- *
105
- */
106
- protected function rrFromString(array $rdata)
107
- {
108
- $this->preference = array_shift($rdata);
109
- $this->exchange = $this->cleanString(array_shift($rdata));
110
-
111
- return true;
112
- }
113
-
114
- /**
115
- * parses the rdata of the Net_DNS2_Packet object
116
- *
117
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
118
- *
119
- * @return boolean
120
- * @access protected
121
- *
122
- */
123
- protected function rrSet(Net_DNS2_Packet &$packet)
124
- {
125
- if ($this->rdlength > 0) {
126
-
127
- //
128
- // parse the preference
129
- //
130
- $x = unpack('npreference', $this->rdata);
131
- $this->preference = $x['preference'];
132
-
133
- //
134
- // get the exchange entry server)
135
- //
136
- $offset = $packet->offset + 2;
137
- $this->exchange = Net_DNS2_Packet::label($packet, $offset);
138
-
139
- return true;
140
- }
141
-
142
- return false;
143
- }
144
-
145
- /**
146
- * returns the rdata portion of the DNS packet
147
- *
148
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
149
- * compressed names
150
- *
151
- * @return mixed either returns a binary packed
152
- * string or null on failure
153
- * @access protected
154
- *
155
- */
156
- protected function rrGet(Net_DNS2_Packet &$packet)
157
- {
158
- if (strlen($this->exchange) > 0) {
159
-
160
- $data = pack('nC', $this->preference, strlen($this->exchange)) .
161
- $this->exchange;
162
-
163
- $packet->offset += strlen($data);
164
-
165
- return $data;
166
- }
167
-
168
- return null;
169
- }
170
- }
171
-
172
- /*
173
- * Local variables:
174
- * tab-width: 4
175
- * c-basic-offset: 4
176
- * c-hanging-comment-ender-p: nil
177
- * End:
178
- */
179
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/L32.php DELETED
@@ -1,180 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2013 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.3.1
49
- *
50
- */
51
-
52
- /**
53
- * L32 Resource Record - RFC6742 section 2.2
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | Preference | Locator32 (16 MSBs) |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59
- * | Locator32 (16 LSBs) |
60
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61
- *
62
- * @category Networking
63
- * @package Net_DNS2
64
- * @author Mike Pultz <mike@mikepultz.com>
65
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
66
- * @link http://pear.php.net/package/Net_DNS2
67
- * @see Net_DNS2_RR
68
- *
69
- */
70
- class Net_DNS2_RR_L32 extends Net_DNS2_RR
71
- {
72
- /*
73
- * The preference
74
- */
75
- public $preference;
76
-
77
- /*
78
- * The locator32 field
79
- */
80
- public $locator32;
81
-
82
- /**
83
- * method to return the rdata portion of the packet as a string
84
- *
85
- * @return string
86
- * @access protected
87
- *
88
- */
89
- protected function rrToString()
90
- {
91
- return $this->preference . ' ' . $this->locator32;
92
- }
93
-
94
- /**
95
- * parses the rdata portion from a standard DNS config line
96
- *
97
- * @param array $rdata a string split line of values for the rdata
98
- *
99
- * @return boolean
100
- * @access protected
101
- *
102
- */
103
- protected function rrFromString(array $rdata)
104
- {
105
- $this->preference = array_shift($rdata);
106
- $this->locator32 = array_shift($rdata);
107
-
108
- return true;
109
- }
110
-
111
- /**
112
- * parses the rdata of the Net_DNS2_Packet object
113
- *
114
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
115
- *
116
- * @return boolean
117
- * @access protected
118
- *
119
- */
120
- protected function rrSet(Net_DNS2_Packet &$packet)
121
- {
122
- if ($this->rdlength > 0) {
123
-
124
- //
125
- // unpack the values
126
- //
127
- $x = unpack('npreference/C4locator', $this->rdata);
128
-
129
- $this->preference = $x['preference'];
130
-
131
- //
132
- // build the locator value
133
- //
134
- $this->locator32 = $x['locator1'] . '.' . $x['locator2'] . '.' .
135
- $x['locator3'] . '.' . $x['locator4'];
136
-
137
- return true;
138
- }
139
-
140
- return false;
141
- }
142
-
143
- /**
144
- * returns the rdata portion of the DNS packet
145
- *
146
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
147
- * compressed names
148
- *
149
- * @return mixed either returns a binary packed
150
- * string or null on failure
151
- * @access protected
152
- *
153
- */
154
- protected function rrGet(Net_DNS2_Packet &$packet)
155
- {
156
- if (strlen($this->locator32) > 0) {
157
-
158
- //
159
- // break out the locator value
160
- //
161
- $n = explode('.', $this->locator32);
162
-
163
- //
164
- // pack the data
165
- //
166
- return pack('nC4', $this->preference, $n[0], $n[1], $n[2], $n[3]);
167
- }
168
-
169
- return null;
170
- }
171
- }
172
-
173
- /*
174
- * Local variables:
175
- * tab-width: 4
176
- * c-basic-offset: 4
177
- * c-hanging-comment-ender-p: nil
178
- * End:
179
- */
180
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/L64.php DELETED
@@ -1,187 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2013 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.3.1
49
- *
50
- */
51
-
52
- /**
53
- * L64 Resource Record - RFC6742 section 2.3
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | Preference | |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
59
- * | Locator64 |
60
- * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61
- * | |
62
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_L64 extends Net_DNS2_RR
73
- {
74
- /*
75
- * The preference
76
- */
77
- public $preference;
78
-
79
- /*
80
- * The locator64 field
81
- */
82
- public $locator64;
83
-
84
- /**
85
- * method to return the rdata portion of the packet as a string
86
- *
87
- * @return string
88
- * @access protected
89
- *
90
- */
91
- protected function rrToString()
92
- {
93
- return $this->preference . ' ' . $this->locator64;
94
- }
95
-
96
- /**
97
- * parses the rdata portion from a standard DNS config line
98
- *
99
- * @param array $rdata a string split line of values for the rdata
100
- *
101
- * @return boolean
102
- * @access protected
103
- *
104
- */
105
- protected function rrFromString(array $rdata)
106
- {
107
- $this->preference = array_shift($rdata);
108
- $this->locator64 = array_shift($rdata);
109
-
110
- return true;
111
- }
112
-
113
- /**
114
- * parses the rdata of the Net_DNS2_Packet object
115
- *
116
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
117
- *
118
- * @return boolean
119
- * @access protected
120
- *
121
- */
122
- protected function rrSet(Net_DNS2_Packet &$packet)
123
- {
124
- if ($this->rdlength > 0) {
125
-
126
- //
127
- // unpack the values
128
- //
129
- $x = unpack('npreference/n4locator', $this->rdata);
130
-
131
- $this->preference = $x['preference'];
132
-
133
- //
134
- // build the locator64
135
- //
136
- $this->locator64 = dechex($x['locator1']) . ':' .
137
- dechex($x['locator2']) . ':' .
138
- dechex($x['locator3']) . ':' .
139
- dechex($x['locator4']);
140
-
141
- return true;
142
- }
143
-
144
- return false;
145
- }
146
-
147
- /**
148
- * returns the rdata portion of the DNS packet
149
- *
150
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
151
- * compressed names
152
- *
153
- * @return mixed either returns a binary packed
154
- * string or null on failure
155
- * @access protected
156
- *
157
- */
158
- protected function rrGet(Net_DNS2_Packet &$packet)
159
- {
160
- if (strlen($this->locator64) > 0) {
161
-
162
- //
163
- // break out the locator64
164
- //
165
- $n = explode(':', $this->locator64);
166
-
167
- //
168
- // pack the data
169
- //
170
- return pack(
171
- 'n5', $this->preference, hexdec($n[0]), hexdec($n[1]),
172
- hexdec($n[2]), hexdec($n[3])
173
- );
174
- }
175
-
176
- return null;
177
- }
178
- }
179
-
180
- /*
181
- * Local variables:
182
- * tab-width: 4
183
- * c-basic-offset: 4
184
- * c-hanging-comment-ender-p: nil
185
- * End:
186
- */
187
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/LOC.php DELETED
@@ -1,440 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * LOC Resource Record - RFC1876 section 2
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | VERSION | SIZE |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * | HORIZ PRE | VERT PRE |
59
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
60
- * | LATITUDE |
61
- * | |
62
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
63
- * | LONGITUDE |
64
- * | |
65
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
66
- * | ALTITUDE |
67
- * | |
68
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
69
- *
70
- * @category Networking
71
- * @package Net_DNS2
72
- * @author Mike Pultz <mike@mikepultz.com>
73
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
74
- * @link http://pear.php.net/package/Net_DNS2
75
- * @see Net_DNS2_RR
76
- *
77
- */
78
- class Net_DNS2_RR_LOC extends Net_DNS2_RR
79
- {
80
- /*
81
- * the LOC version- should only ever be 0
82
- */
83
- public $version;
84
-
85
- /*
86
- * The diameter of a sphere enclosing the described entity
87
- */
88
- public $size;
89
-
90
- /*
91
- * The horizontal precision of the data
92
- */
93
- public $horiz_pre;
94
-
95
- /*
96
- * The vertical precision of the data
97
- */
98
- public $vert_pre;
99
-
100
- /*
101
- * The latitude - stored in decimal degrees
102
- */
103
- public $latitude;
104
-
105
- /*
106
- * The longitude - stored in decimal degrees
107
- */
108
- public $longitude;
109
-
110
- /*
111
- * The altitude - stored in decimal
112
- */
113
- public $altitude;
114
-
115
- /*
116
- * used for quick power-of-ten lookups
117
- */
118
- private $_powerOfTen = array(1, 10, 100, 1000, 10000, 100000,
119
- 1000000,10000000,100000000,1000000000);
120
-
121
- /*
122
- * some conversion values
123
- */
124
- const CONV_SEC = 1000;
125
- const CONV_MIN = 60000;
126
- const CONV_DEG = 3600000;
127
-
128
- const REFERENCE_ALT = 10000000;
129
- const REFERENCE_LATLON = 2147483648;
130
-
131
- /**
132
- * method to return the rdata portion of the packet as a string
133
- *
134
- * @return string
135
- * @access protected
136
- *
137
- */
138
- protected function rrToString()
139
- {
140
- if ($this->version == 0) {
141
-
142
- return $this->_d2Dms($this->latitude, 'LAT') . ' ' .
143
- $this->_d2Dms($this->longitude, 'LNG') . ' ' .
144
- sprintf('%.2fm', $this->altitude) . ' ' .
145
- sprintf('%.2fm', $this->size) . ' ' .
146
- sprintf('%.2fm', $this->horiz_pre) . ' ' .
147
- sprintf('%.2fm', $this->vert_pre);
148
- }
149
-
150
- return '';
151
- }
152
-
153
- /**
154
- * parses the rdata portion from a standard DNS config line
155
- *
156
- * @param array $rdata a string split line of values for the rdata
157
- *
158
- * @return boolean
159
- * @access protected
160
- *
161
- */
162
- protected function rrFromString(array $rdata)
163
- {
164
- //
165
- // format as defined by RFC1876 section 3
166
- //
167
- // d1 [m1 [s1]] {"N"|"S"} d2 [m2 [s2]] {"E"|"W"} alt["m"]
168
- // [siz["m"] [hp["m"] [vp["m"]]]]
169
- //
170
- $res = preg_match(
171
- '/^(\d+) \s+((\d+) \s+)?(([\d.]+) \s+)?(N|S) \s+(\d+) ' .
172
- '\s+((\d+) \s+)?(([\d.]+) \s+)?(E|W) \s+(-?[\d.]+) m?(\s+ ' .
173
- '([\d.]+) m?)?(\s+ ([\d.]+) m?)?(\s+ ([\d.]+) m?)?/ix',
174
- implode(' ', $rdata), $x
175
- );
176
-
177
- if ($res) {
178
-
179
- //
180
- // latitude
181
- //
182
- $latdeg = $x[1];
183
- $latmin = (isset($x[3])) ? $x[3] : 0;
184
- $latsec = (isset($x[5])) ? $x[5] : 0;
185
- $lathem = strtoupper($x[6]);
186
-
187
- $this->latitude = $this->_dms2d($latdeg, $latmin, $latsec, $lathem);
188
-
189
- //
190
- // longitude
191
- //
192
- $londeg = $x[7];
193
- $lonmin = (isset($x[9])) ? $x[9] : 0;
194
- $lonsec = (isset($x[11])) ? $x[11] : 0;
195
- $lonhem = strtoupper($x[12]);
196
-
197
- $this->longitude = $this->_dms2d($londeg, $lonmin, $lonsec, $lonhem);
198
-
199
- //
200
- // the rest of teh values
201
- //
202
- $version = 0;
203
-
204
- $this->size = (isset($x[15])) ? $x[15] : 1;
205
- $this->horiz_pre = ((isset($x[17])) ? $x[17] : 10000);
206
- $this->vert_pre = ((isset($x[19])) ? $x[19] : 10);
207
- $this->altitude = $x[13];
208
-
209
- return true;
210
- }
211
-
212
- return false;
213
- }
214
-
215
- /**
216
- * parses the rdata of the Net_DNS2_Packet object
217
- *
218
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
219
- *
220
- * @return boolean
221
- * @access protected
222
- *
223
- */
224
- protected function rrSet(Net_DNS2_Packet &$packet)
225
- {
226
- if ($this->rdlength > 0) {
227
-
228
- //
229
- // unpack all the values
230
- //
231
- $x = unpack(
232
- 'Cver/Csize/Choriz_pre/Cvert_pre/Nlatitude/Nlongitude/Naltitude',
233
- $this->rdata
234
- );
235
-
236
- //
237
- // version must be 0 per RFC 1876 section 2
238
- //
239
- $this->version = $x['ver'];
240
- if ($this->version == 0) {
241
-
242
- $this->size = $this->_precsizeNtoA($x['size']);
243
- $this->horiz_pre = $this->_precsizeNtoA($x['horiz_pre']);
244
- $this->vert_pre = $this->_precsizeNtoA($x['vert_pre']);
245
-
246
- //
247
- // convert the latitude and longitude to degress in decimal
248
- //
249
- if ($x['latitude'] < 0) {
250
-
251
- $this->latitude = ($x['latitude'] +
252
- self::REFERENCE_LATLON) / self::CONV_DEG;
253
- } else {
254
-
255
- $this->latitude = ($x['latitude'] -
256
- self::REFERENCE_LATLON) / self::CONV_DEG;
257
- }
258
-
259
- if ($x['longitude'] < 0) {
260
-
261
- $this->longitude = ($x['longitude'] +
262
- self::REFERENCE_LATLON) / self::CONV_DEG;
263
- } else {
264
-
265
- $this->longitude = ($x['longitude'] -
266
- self::REFERENCE_LATLON) / self::CONV_DEG;
267
- }
268
-
269
- //
270
- // convert down the altitude
271
- //
272
- $this->altitude = ($x['altitude'] - self::REFERENCE_ALT) / 100;
273
-
274
- return true;
275
-
276
- } else {
277
-
278
- return false;
279
- }
280
-
281
- return true;
282
- }
283
-
284
- return false;
285
- }
286
-
287
- /**
288
- * returns the rdata portion of the DNS packet
289
- *
290
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
291
- * compressed names
292
- *
293
- * @return mixed either returns a binary packed
294
- * string or null on failure
295
- * @access protected
296
- *
297
- */
298
- protected function rrGet(Net_DNS2_Packet &$packet)
299
- {
300
- if ($this->version == 0) {
301
-
302
- $lat = 0;
303
- $lng = 0;
304
-
305
- if ($this->latitude < 0) {
306
-
307
- $lat = ($this->latitude * self::CONV_DEG) - self::REFERENCE_LATLON;
308
- } else {
309
-
310
- $lat = ($this->latitude * self::CONV_DEG) + self::REFERENCE_LATLON;
311
- }
312
-
313
- if ($this->longitude < 0) {
314
-
315
- $lng = ($this->longitude * self::CONV_DEG) - self::REFERENCE_LATLON;
316
- } else {
317
-
318
- $lng = ($this->longitude * self::CONV_DEG) + self::REFERENCE_LATLON;
319
- }
320
-
321
- $packet->offset += 16;
322
-
323
- return pack(
324
- 'CCCCNNN',
325
- $this->version,
326
- $this->_precsizeAtoN($this->size),
327
- $this->_precsizeAtoN($this->horiz_pre),
328
- $this->_precsizeAtoN($this->vert_pre),
329
- $lat, $lng,
330
- ($this->altitude * 100) + self::REFERENCE_ALT
331
- );
332
- }
333
-
334
- return null;
335
- }
336
-
337
- /**
338
- * takes an XeY precision/size value, returns a string representation.
339
- * shamlessly stolen from RFC1876 Appendix A
340
- *
341
- * @param integer $prec the value to convert
342
- *
343
- * @return string
344
- * @access private
345
- *
346
- */
347
- private function _precsizeNtoA($prec)
348
- {
349
- $mantissa = (($prec >> 4) & 0x0f) % 10;
350
- $exponent = (($prec >> 0) & 0x0f) % 10;
351
-
352
- return $mantissa * $this->_powerOfTen[$exponent];
353
- }
354
-
355
- /**
356
- * converts ascii size/precision X * 10**Y(cm) to 0xXY.
357
- * shamlessly stolen from RFC1876 Appendix A
358
- *
359
- * @param string $prec the value to convert
360
- *
361
- * @return integer
362
- * @access private
363
- *
364
- */
365
- private function _precsizeAtoN($prec)
366
- {
367
- $exponent = 0;
368
- while ($prec >= 10) {
369
-
370
- $prec /= 10;
371
- ++$exponent;
372
- }
373
-
374
- return ($prec << 4) | ($exponent & 0x0f);
375
- }
376
-
377
- /**
378
- * convert lat/lng in deg/min/sec/hem to decimal value
379
- *
380
- * @param integer $deg the degree value
381
- * @param integer $min the minutes value
382
- * @param integer $sec the seconds value
383
- * @param string $hem the hemisphere (N/E/S/W)
384
- *
385
- * @return float the decinmal value
386
- * @access private
387
- *
388
- */
389
- private function _dms2d($deg, $min, $sec, $hem)
390
- {
391
- $deg = $deg - 0;
392
- $min = $min - 0;
393
-
394
- $sign = ($hem == 'W' || $hem == 'S') ? -1 : 1;
395
- return ((($sec/60+$min)/60)+$deg) * $sign;
396
- }
397
-
398
- /**
399
- * convert lat/lng in decimal to deg/min/sec/hem
400
- *
401
- * @param float $data the decimal value
402
- * @param string $latlng either LAT or LNG so we can determine the HEM value
403
- *
404
- * @return string
405
- * @access private
406
- *
407
- */
408
- private function _d2Dms($data, $latlng)
409
- {
410
- $deg = 0;
411
- $min = 0;
412
- $sec = 0;
413
- $msec = 0;
414
- $hem = '';
415
-
416
- if ($latlng == 'LAT') {
417
- $hem = ($data > 0) ? 'N' : 'S';
418
- } else {
419
- $hem = ($data > 0) ? 'E' : 'W';
420
- }
421
-
422
- $data = abs($data);
423
-
424
- $deg = (int)$data;
425
- $min = (int)(($data - $deg) * 60);
426
- $sec = (int)(((($data - $deg) * 60) - $min) * 60);
427
- $msec = round((((((($data - $deg) * 60) - $min) * 60) - $sec) * 1000));
428
-
429
- return sprintf('%d %02d %02d.%03d %s', $deg, $min, $sec, round($msec), $hem);
430
- }
431
- }
432
-
433
- /*
434
- * Local variables:
435
- * tab-width: 4
436
- * c-basic-offset: 4
437
- * c-hanging-comment-ender-p: nil
438
- * End:
439
- */
440
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/LP.php DELETED
@@ -1,177 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2013 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.3.1
49
- *
50
- */
51
-
52
- /**
53
- * LP Resource Record - RFC6742 section 2.4
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | Preference | /
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /
59
- * / /
60
- * / FQDN /
61
- * / /
62
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_LP extends Net_DNS2_RR
73
- {
74
- /*
75
- * The preference
76
- */
77
- public $preference;
78
-
79
- /*
80
- * The fdqn field
81
- */
82
- public $fqdn;
83
-
84
- /**
85
- * method to return the rdata portion of the packet as a string
86
- *
87
- * @return string
88
- * @access protected
89
- *
90
- */
91
- protected function rrToString()
92
- {
93
- return $this->preference . ' ' . $this->fqdn . '.';
94
- }
95
-
96
- /**
97
- * parses the rdata portion from a standard DNS config line
98
- *
99
- * @param array $rdata a string split line of values for the rdata
100
- *
101
- * @return boolean
102
- * @access protected
103
- *
104
- */
105
- protected function rrFromString(array $rdata)
106
- {
107
- $this->preference = array_shift($rdata);
108
- $this->fqdn = trim(array_shift($rdata), '.');
109
-
110
- return true;
111
- }
112
-
113
- /**
114
- * parses the rdata of the Net_DNS2_Packet object
115
- *
116
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
117
- *
118
- * @return boolean
119
- * @access protected
120
- *
121
- */
122
- protected function rrSet(Net_DNS2_Packet &$packet)
123
- {
124
- if ($this->rdlength > 0) {
125
-
126
- //
127
- // parse the preference
128
- //
129
- $x = unpack('npreference', $this->rdata);
130
- $this->preference = $x['preference'];
131
- $offset = $packet->offset + 2;
132
-
133
- //
134
- // get the hostname
135
- //
136
- $this->fqdn = Net_DNS2_Packet::expand($packet, $offset);
137
-
138
- return true;
139
- }
140
-
141
- return false;
142
- }
143
-
144
- /**
145
- * returns the rdata portion of the DNS packet
146
- *
147
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
148
- * compressed names
149
- *
150
- * @return mixed either returns a binary packed
151
- * string or null on failure
152
- * @access protected
153
- *
154
- */
155
- protected function rrGet(Net_DNS2_Packet &$packet)
156
- {
157
- if (strlen($this->fqdn) > 0) {
158
-
159
- $data = pack('n', $this->preference);
160
- $packet->offset += 2;
161
-
162
- $data .= $packet->compress($this->fqdn, $packet->offset);
163
- return $data;
164
- }
165
-
166
- return null;
167
- }
168
- }
169
-
170
- /*
171
- * Local variables:
172
- * tab-width: 4
173
- * c-basic-offset: 4
174
- * c-hanging-comment-ender-p: nil
175
- * End:
176
- */
177
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/MX.php DELETED
@@ -1,175 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * MX Resource Record - RFC1035 section 3.3.9
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | PREFERENCE |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * / EXCHANGE /
59
- * / /
60
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
61
- *
62
- * @category Networking
63
- * @package Net_DNS2
64
- * @author Mike Pultz <mike@mikepultz.com>
65
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
66
- * @link http://pear.php.net/package/Net_DNS2
67
- * @see Net_DNS2_RR
68
- *
69
- */
70
- class Net_DNS2_RR_MX extends Net_DNS2_RR
71
- {
72
- /*
73
- * the preference for this mail exchanger
74
- */
75
- public $preference;
76
-
77
- /*
78
- * the hostname of the mail exchanger
79
- */
80
- public $exchange;
81
-
82
- /**
83
- * method to return the rdata portion of the packet as a string
84
- *
85
- * @return string
86
- * @access protected
87
- *
88
- */
89
- protected function rrToString()
90
- {
91
- return $this->preference . ' ' . $this->cleanString($this->exchange) . '.';
92
- }
93
-
94
- /**
95
- * parses the rdata portion from a standard DNS config line
96
- *
97
- * @param array $rdata a string split line of values for the rdata
98
- *
99
- * @return boolean
100
- * @access protected
101
- *
102
- */
103
- protected function rrFromString(array $rdata)
104
- {
105
- $this->preference = array_shift($rdata);
106
- $this->exchange = $this->cleanString(array_shift($rdata));
107
-
108
- return true;
109
- }
110
-
111
- /**
112
- * parses the rdata of the Net_DNS2_Packet object
113
- *
114
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
115
- *
116
- * @return boolean
117
- * @access protected
118
- *
119
- */
120
- protected function rrSet(Net_DNS2_Packet &$packet)
121
- {
122
- if ($this->rdlength > 0) {
123
-
124
- //
125
- // parse the preference
126
- //
127
- $x = unpack('npreference', $this->rdata);
128
- $this->preference = $x['preference'];
129
-
130
- //
131
- // get the exchange entry server)
132
- //
133
- $offset = $packet->offset + 2;
134
- $this->exchange = Net_DNS2_Packet::expand($packet, $offset);
135
-
136
- return true;
137
- }
138
-
139
- return false;
140
- }
141
-
142
- /**
143
- * returns the rdata portion of the DNS packet
144
- *
145
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
146
- * compressed names
147
- *
148
- * @return mixed either returns a binary packed
149
- * string or null on failure
150
- * @access protected
151
- *
152
- */
153
- protected function rrGet(Net_DNS2_Packet &$packet)
154
- {
155
- if (strlen($this->exchange) > 0) {
156
-
157
- $data = pack('n', $this->preference);
158
- $packet->offset += 2;
159
-
160
- $data .= $packet->compress($this->exchange, $packet->offset);
161
- return $data;
162
- }
163
-
164
- return null;
165
- }
166
- }
167
-
168
- /*
169
- * Local variables:
170
- * tab-width: 4
171
- * c-basic-offset: 4
172
- * c-hanging-comment-ender-p: nil
173
- * End:
174
- */
175
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/NAPTR.php DELETED
@@ -1,231 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * NAPTR Resource Record - RFC2915
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
56
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
57
- * | ORDER |
58
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
59
- * | PREFERENCE |
60
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
61
- * / FLAGS /
62
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
63
- * / SERVICES /
64
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
65
- * / REGEXP /
66
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
67
- * / REPLACEMENT /
68
- * / /
69
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
70
- *
71
- * @category Networking
72
- * @package Net_DNS2
73
- * @author Mike Pultz <mike@mikepultz.com>
74
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
75
- * @link http://pear.php.net/package/Net_DNS2
76
- * @see Net_DNS2_RR
77
- *
78
- */
79
- class Net_DNS2_RR_NAPTR extends Net_DNS2_RR
80
- {
81
- /*
82
- * the order in which the NAPTR records MUST be processed
83
- */
84
- public $order;
85
-
86
- /*
87
- * specifies the order in which NAPTR records with equal "order"
88
- * values SHOULD be processed
89
- */
90
- public $preference;
91
-
92
- /*
93
- * rewrite flags
94
- */
95
- public $flags;
96
-
97
- /*
98
- * Specifies the service(s) available down this rewrite path
99
- */
100
- public $services;
101
-
102
- /*
103
- * regular expression
104
- */
105
- public $regexp;
106
-
107
- /*
108
- * The next NAME to query for NAPTR, SRV, or address records
109
- * depending on the value of the flags field
110
- */
111
- public $replacement;
112
-
113
- /**
114
- * method to return the rdata portion of the packet as a string
115
- *
116
- * @return string
117
- * @access protected
118
- *
119
- */
120
- protected function rrToString()
121
- {
122
- return $this->order . ' ' . $this->preference . ' ' .
123
- $this->formatString($this->flags) . ' ' .
124
- $this->formatString($this->services) . ' ' .
125
- $this->formatString($this->regexp) . ' ' .
126
- $this->cleanString($this->replacement) . '.';
127
- }
128
-
129
- /**
130
- * parses the rdata portion from a standard DNS config line
131
- *
132
- * @param array $rdata a string split line of values for the rdata
133
- *
134
- * @return boolean
135
- * @access protected
136
- *
137
- */
138
- protected function rrFromString(array $rdata)
139
- {
140
- $this->order = array_shift($rdata);
141
- $this->preference = array_shift($rdata);
142
-
143
- $data = $this->buildString($rdata);
144
- if (count($data) == 4) {
145
-
146
- $this->flags = $data[0];
147
- $this->services = $data[1];
148
- $this->regexp = $data[2];
149
- $this->replacement = $this->cleanString($data[3]);
150
-
151
- return true;
152
- }
153
-
154
- return false;
155
- }
156
-
157
- /**
158
- * parses the rdata of the Net_DNS2_Packet object
159
- *
160
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
161
- *
162
- * @return boolean
163
- * @access protected
164
- *
165
- */
166
- protected function rrSet(Net_DNS2_Packet &$packet)
167
- {
168
- if ($this->rdlength > 0) {
169
-
170
- //
171
- // unpack the order and preference
172
- //
173
- $x = unpack('norder/npreference', $this->rdata);
174
-
175
- $this->order = $x['order'];
176
- $this->preference = $x['preference'];
177
-
178
- $offset = $packet->offset + 4;
179
-
180
- $this->flags = Net_DNS2_Packet::label($packet, $offset);
181
- $this->services = Net_DNS2_Packet::label($packet, $offset);
182
- $this->regexp = Net_DNS2_Packet::label($packet, $offset);
183
-
184
- $this->replacement = Net_DNS2_Packet::expand($packet, $offset);
185
-
186
- return true;
187
- }
188
-
189
- return false;
190
- }
191
-
192
- /**
193
- * returns the rdata portion of the DNS packet
194
- *
195
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
196
- * compressed names
197
- *
198
- * @return mixed either returns a binary packed
199
- * string or null on failure
200
- * @access protected
201
- *
202
- */
203
- protected function rrGet(Net_DNS2_Packet &$packet)
204
- {
205
- if ( (isset($this->order)) && (strlen($this->services) > 0) ) {
206
-
207
- $data = pack('nn', $this->order, $this->preference);
208
-
209
- $data .= chr(strlen($this->flags)) . $this->flags;
210
- $data .= chr(strlen($this->services)) . $this->services;
211
- $data .= chr(strlen($this->regexp)) . $this->regexp;
212
-
213
- $packet->offset += strlen($data);
214
-
215
- $data .= $packet->compress($this->replacement, $packet->offset);
216
-
217
- return $data;
218
- }
219
-
220
- return null;
221
- }
222
- }
223
-
224
- /*
225
- * Local variables:
226
- * tab-width: 4
227
- * c-basic-offset: 4
228
- * c-hanging-comment-ender-p: nil
229
- * End:
230
- */
231
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/NID.php DELETED
@@ -1,187 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2013 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.3.1
49
- *
50
- */
51
-
52
- /**
53
- * NID Resource Record - RFC6742 section 2.1
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | Preference | |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
59
- * | NodeID |
60
- * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61
- * | |
62
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_NID extends Net_DNS2_RR
73
- {
74
- /*
75
- * The preference
76
- */
77
- public $preference;
78
-
79
- /*
80
- * The node ID field
81
- */
82
- public $nodeid;
83
-
84
- /**
85
- * method to return the rdata portion of the packet as a string
86
- *
87
- * @return string
88
- * @access protected
89
- *
90
- */
91
- protected function rrToString()
92
- {
93
- return $this->preference . ' ' . $this->nodeid;
94
- }
95
-
96
- /**
97
- * parses the rdata portion from a standard DNS config line
98
- *
99
- * @param array $rdata a string split line of values for the rdata
100
- *
101
- * @return boolean
102
- * @access protected
103
- *
104
- */
105
- protected function rrFromString(array $rdata)
106
- {
107
- $this->preference = array_shift($rdata);
108
- $this->nodeid = array_shift($rdata);
109
-
110
- return true;
111
- }
112
-
113
- /**
114
- * parses the rdata of the Net_DNS2_Packet object
115
- *
116
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
117
- *
118
- * @return boolean
119
- * @access protected
120
- *
121
- */
122
- protected function rrSet(Net_DNS2_Packet &$packet)
123
- {
124
- if ($this->rdlength > 0) {
125
-
126
- //
127
- // unpack the values
128
- //
129
- $x = unpack('npreference/n4nodeid', $this->rdata);
130
-
131
- $this->preference = $x['preference'];
132
-
133
- //
134
- // build the node id
135
- //
136
- $this->nodeid = dechex($x['nodeid1']) . ':' .
137
- dechex($x['nodeid2']) . ':' .
138
- dechex($x['nodeid3']) . ':' .
139
- dechex($x['nodeid4']);
140
-
141
- return true;
142
- }
143
-
144
- return false;
145
- }
146
-
147
- /**
148
- * returns the rdata portion of the DNS packet
149
- *
150
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
151
- * compressed names
152
- *
153
- * @return mixed either returns a binary packed
154
- * string or null on failure
155
- * @access protected
156
- *
157
- */
158
- protected function rrGet(Net_DNS2_Packet &$packet)
159
- {
160
- if (strlen($this->nodeid) > 0) {
161
-
162
- //
163
- // break out the node id
164
- //
165
- $n = explode(':', $this->nodeid);
166
-
167
- //
168
- // pack the data
169
- //
170
- return pack(
171
- 'n5', $this->preference, hexdec($n[0]), hexdec($n[1]),
172
- hexdec($n[2]), hexdec($n[3])
173
- );
174
- }
175
-
176
- return null;
177
- }
178
- }
179
-
180
- /*
181
- * Local variables:
182
- * tab-width: 4
183
- * c-basic-offset: 4
184
- * c-hanging-comment-ender-p: nil
185
- * End:
186
- */
187
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/NIMLOC.php DELETED
@@ -1,130 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * NIMLOCK Resource Record - undefined; the rdata is simply used as-is in it's
54
- * binary format, so not process has to be done.
55
- *
56
- * @category Networking
57
- * @package Net_DNS2
58
- * @author Mike Pultz <mike@mikepultz.com>
59
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
60
- * @link http://pear.php.net/package/Net_DNS2
61
- * @see Net_DNS2_RR
62
- *
63
- */
64
- class Net_DNS2_RR_NIMLOCK extends Net_DNS2_RR
65
- {
66
- /**
67
- * method to return the rdata portion of the packet as a string
68
- *
69
- * @return string
70
- * @access protected
71
- *
72
- */
73
- protected function rrToString()
74
- {
75
- return '';
76
- }
77
-
78
- /**
79
- * parses the rdata portion from a standard DNS config line
80
- *
81
- * @param array $rdata a string split line of values for the rdata
82
- *
83
- * @return boolean
84
- * @access protected
85
- *
86
- */
87
- protected function rrFromString(array $rdata)
88
- {
89
- return true;
90
- }
91
-
92
- /**
93
- * parses the rdata of the Net_DNS2_Packet object
94
- *
95
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
96
- *
97
- * @return boolean
98
- * @access protected
99
- *
100
- */
101
- protected function rrSet(Net_DNS2_Packet &$packet)
102
- {
103
- return true;
104
- }
105
-
106
- /**
107
- * returns the rdata portion of the DNS packet
108
- *
109
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
110
- * compressed names
111
- *
112
- * @return mixed either returns a binary packed
113
- * string or null on failure
114
- * @access protected
115
- *
116
- */
117
- protected function rrGet(Net_DNS2_Packet &$packet)
118
- {
119
- return $this->rdata;
120
- }
121
- }
122
-
123
- /*
124
- * Local variables:
125
- * tab-width: 4
126
- * c-basic-offset: 4
127
- * c-hanging-comment-ender-p: nil
128
- * End:
129
- */
130
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/NS.php DELETED
@@ -1,153 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * NS Resource Record - RFC1035 section 3.3.11
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * / NSDNAME /
57
- * / /
58
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
59
- *
60
- * @category Networking
61
- * @package Net_DNS2
62
- * @author Mike Pultz <mike@mikepultz.com>
63
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
64
- * @link http://pear.php.net/package/Net_DNS2
65
- * @see Net_DNS2_RR
66
- *
67
- */
68
- class Net_DNS2_RR_NS extends Net_DNS2_RR
69
- {
70
- /*
71
- * the hostname of the DNS server
72
- */
73
- public $nsdname;
74
-
75
- /**
76
- * method to return the rdata portion of the packet as a string
77
- *
78
- * @return string
79
- * @access protected
80
- *
81
- */
82
- protected function rrToString()
83
- {
84
- return $this->cleanString($this->nsdname) . '.';
85
- }
86
-
87
- /**
88
- * parses the rdata portion from a standard DNS config line
89
- *
90
- * @param array $rdata a string split line of values for the rdata
91
- *
92
- * @return boolean
93
- * @access protected
94
- *
95
- */
96
- protected function rrFromString(array $rdata)
97
- {
98
- $this->nsdname = $this->cleanString(array_shift($rdata));
99
- return true;
100
- }
101
-
102
- /**
103
- * parses the rdata of the Net_DNS2_Packet object
104
- *
105
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
106
- *
107
- * @return boolean
108
- * @access protected
109
- *
110
- */
111
- protected function rrSet(Net_DNS2_Packet &$packet)
112
- {
113
- if ($this->rdlength > 0) {
114
-
115
- $offset = $packet->offset;
116
- $this->nsdname = Net_DNS2_Packet::expand($packet, $offset);
117
-
118
- return true;
119
- }
120
-
121
- return false;
122
- }
123
-
124
- /**
125
- * returns the rdata portion of the DNS packet
126
- *
127
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
128
- * compressed names
129
- *
130
- * @return mixed either returns a binary packed
131
- * string or null on failure
132
- * @access protected
133
- *
134
- */
135
- protected function rrGet(Net_DNS2_Packet &$packet)
136
- {
137
- if (strlen($this->nsdname) > 0) {
138
-
139
- return $packet->compress($this->nsdname, $packet->offset);
140
- }
141
-
142
- return null;
143
- }
144
- }
145
-
146
- /*
147
- * Local variables:
148
- * tab-width: 4
149
- * c-basic-offset: 4
150
- * c-hanging-comment-ender-p: nil
151
- * End:
152
- */
153
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/NSAP.php DELETED
@@ -1,262 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * NSAP Resource Record - RFC1706
54
- *
55
- * |--------------|
56
- * | <-- IDP --> |
57
- * |--------------|-------------------------------------|
58
- * | AFI | IDI | <-- DSP --> |
59
- * |-----|--------|-------------------------------------|
60
- * | 47 | 0005 | DFI | AA |Rsvd | RD |Area | ID |Sel |
61
- * |-----|--------|-----|----|-----|----|-----|----|----|
62
- * octets | 1 | 2 | 1 | 3 | 2 | 2 | 2 | 6 | 1 |
63
- * |-----|--------|-----|----|-----|----|-----|----|----|
64
- *
65
- * @category Networking
66
- * @package Net_DNS2
67
- * @author Mike Pultz <mike@mikepultz.com>
68
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
69
- * @link http://pear.php.net/package/Net_DNS2
70
- * @see Net_DNS2_RR
71
- *
72
- */
73
- class Net_DNS2_RR_NSAP extends Net_DNS2_RR
74
- {
75
- public $afi;
76
- public $idi;
77
- public $dfi;
78
- public $aa;
79
- public $rsvd;
80
- public $rd;
81
- public $area;
82
- public $id;
83
- public $sel;
84
-
85
- /**
86
- * method to return the rdata portion of the packet as a string
87
- *
88
- * @return string
89
- * @access protected
90
- *
91
- */
92
- protected function rrToString()
93
- {
94
- return $this->cleanString($this->afi) . '.' .
95
- $this->cleanString($this->idi) . '.' .
96
- $this->cleanString($this->dfi) . '.' .
97
- $this->cleanString($this->aa) . '.' .
98
- $this->cleanString($this->rsvd) . '.' .
99
- $this->cleanString($this->rd) . '.' .
100
- $this->cleanString($this->area) . '.' .
101
- $this->cleanString($this->id) . '.' .
102
- $this->sel;
103
- }
104
-
105
- /**
106
- * parses the rdata portion from a standard DNS config line
107
- *
108
- * @param array $rdata a string split line of values for the rdata
109
- *
110
- * @return boolean
111
- * @access protected
112
- *
113
- */
114
- protected function rrFromString(array $rdata)
115
- {
116
- $data = strtolower(trim(array_shift($rdata)));
117
-
118
- //
119
- // there is no real standard for format, so we can't rely on the fact that
120
- // the value will come in with periods separating the values- so strip
121
- // them out if they're included, and parse without them.
122
- //
123
- $data = str_replace(array('.', '0x'), '', $data);
124
-
125
- //
126
- // unpack it as ascii characters
127
- //
128
- $x = unpack('A2afi/A4idi/A2dfi/A6aa/A4rsvd/A4rd/A4area/A12id/A2sel', $data);
129
-
130
- //
131
- // make sure the afi value is 47
132
- //
133
- if ($x['afi'] == '47') {
134
-
135
- $this->afi = '0x' . $x['afi'];
136
- $this->idi = $x['idi'];
137
- $this->dfi = $x['dfi'];
138
- $this->aa = $x['aa'];
139
- $this->rsvd = $x['rsvd'];
140
- $this->rd = $x['rd'];
141
- $this->area = $x['area'];
142
- $this->id = $x['id'];
143
- $this->sel = $x['sel'];
144
-
145
- return true;
146
- }
147
-
148
- return false;
149
- }
150
-
151
- /**
152
- * parses the rdata of the Net_DNS2_Packet object
153
- *
154
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
155
- *
156
- * @return boolean
157
- * @access protected
158
- *
159
- */
160
- protected function rrSet(Net_DNS2_Packet &$packet)
161
- {
162
- if ($this->rdlength == 20) {
163
-
164
- //
165
- // get the AFI value
166
- //
167
- $this->afi = dechex(ord($this->rdata[0]));
168
-
169
- //
170
- // we only support AFI 47- there arent' any others defined.
171
- //
172
- if ($this->afi == '47') {
173
-
174
- //
175
- // unpack the rest of the values
176
- //
177
- $x = unpack(
178
- 'Cafi/nidi/Cdfi/C3aa/nrsvd/nrd/narea/Nidh/nidl/Csel',
179
- $this->rdata
180
- );
181
-
182
- $this->afi = sprintf('0x%02x', $x['afi']);
183
- $this->idi = sprintf('%04x', $x['idi']);
184
- $this->dfi = sprintf('%02x', $x['dfi']);
185
- $this->aa = sprintf(
186
- '%06x', $x['aa1'] << 16 | $x['aa2'] << 8 | $x['aa3']
187
- );
188
- $this->rsvd = sprintf('%04x', $x['rsvd']);
189
- $this->rd = sprintf('%04x', $x['rd']);
190
- $this->area = sprintf('%04x', $x['area']);
191
- $this->id = sprintf('%08x', $x['idh']) .
192
- sprintf('%04x', $x['idl']);
193
- $this->sel = sprintf('%02x', $x['sel']);
194
-
195
- return true;
196
- }
197
- }
198
-
199
- return false;
200
- }
201
-
202
- /**
203
- * returns the rdata portion of the DNS packet
204
- *
205
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
206
- * compressed names
207
- *
208
- * @return mixed either returns a binary packed
209
- * string or null on failure
210
- * @access protected
211
- *
212
- */
213
- protected function rrGet(Net_DNS2_Packet &$packet)
214
- {
215
- if ($this->afi === '0'.'x47') {
216
-
217
- //
218
- // build the aa field
219
- //
220
- $aa = unpack('A2x/A2y/A2z', $this->aa);
221
-
222
- //
223
- // build the id field
224
- //
225
- $id = unpack('A8a/A4b', $this->id);
226
-
227
- //
228
- $data = pack(
229
- 'CnCCCCnnnNnC',
230
- hexdec($this->afi),
231
- hexdec($this->idi),
232
- hexdec($this->dfi),
233
- hexdec($aa['x']),
234
- hexdec($aa['y']),
235
- hexdec($aa['z']),
236
- hexdec($this->rsvd),
237
- hexdec($this->rd),
238
- hexdec($this->area),
239
- hexdec($id['a']),
240
- hexdec($id['b']),
241
- hexdec($this->sel)
242
- );
243
-
244
- if (strlen($data) == 20) {
245
-
246
- $packet->offset += 20;
247
- return $data;
248
- }
249
- }
250
-
251
- return null;
252
- }
253
- }
254
-
255
- /*
256
- * Local variables:
257
- * tab-width: 4
258
- * c-basic-offset: 4
259
- * c-hanging-comment-ender-p: nil
260
- * End:
261
- */
262
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/NSEC.php DELETED
@@ -1,184 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * NSEC Resource Record - RFC3845 section 2.1
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * / Next Domain Name /
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59
- * / List of Type Bit Map(s) /
60
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61
- *
62
- * @category Networking
63
- * @package Net_DNS2
64
- * @author Mike Pultz <mike@mikepultz.com>
65
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
66
- * @link http://pear.php.net/package/Net_DNS2
67
- * @see Net_DNS2_RR
68
- *
69
- */
70
- class Net_DNS2_RR_NSEC extends Net_DNS2_RR
71
- {
72
- /*
73
- * The next owner name
74
- */
75
- public $next_domain_name;
76
-
77
- /*
78
- * identifies the RRset types that exist at the NSEC RR's owner name.
79
- */
80
- public $type_bit_maps = array();
81
-
82
- /**
83
- * method to return the rdata portion of the packet as a string
84
- *
85
- * @return string
86
- * @access protected
87
- *
88
- */
89
- protected function rrToString()
90
- {
91
- $data = $this->cleanString($this->next_domain_name) . '.';
92
-
93
- foreach ($this->type_bit_maps as $rr) {
94
-
95
- $data .= ' ' . $rr;
96
- }
97
-
98
- return $data;
99
- }
100
-
101
- /**
102
- * parses the rdata portion from a standard DNS config line
103
- *
104
- * @param array $rdata a string split line of values for the rdata
105
- *
106
- * @return boolean
107
- * @access protected
108
- *
109
- */
110
- protected function rrFromString(array $rdata)
111
- {
112
- $this->next_domain_name = $this->cleanString(array_shift($rdata));
113
- $this->type_bit_maps = $rdata;
114
-
115
- return true;
116
- }
117
-
118
- /**
119
- * parses the rdata of the Net_DNS2_Packet object
120
- *
121
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
122
- *
123
- * @return boolean
124
- * @access protected
125
- *
126
- */
127
- protected function rrSet(Net_DNS2_Packet &$packet)
128
- {
129
- if ($this->rdlength > 0) {
130
-
131
- //
132
- // expand the next domain name
133
- //
134
- $offset = $packet->offset;
135
- $this->next_domain_name = Net_DNS2_Packet::expand($packet, $offset);
136
-
137
- //
138
- // parse out the RR's from the bitmap
139
- //
140
- $this->type_bit_maps = Net_DNS2_BitMap::bitMapToArray(
141
- substr($this->rdata, $offset - $packet->offset)
142
- );
143
-
144
- return true;
145
- }
146
-
147
- return false;
148
- }
149
-
150
- /**
151
- * returns the rdata portion of the DNS packet
152
- *
153
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
154
- * compressed names
155
- *
156
- * @return mixed either returns a binary packed
157
- * string or null on failure
158
- * @access protected
159
- *
160
- */
161
- protected function rrGet(Net_DNS2_Packet &$packet)
162
- {
163
- if (strlen($this->next_domain_name) > 0) {
164
-
165
- $data = $packet->compress($this->next_domain_name, $packet->offset);
166
- $bitmap = Net_DNS2_BitMap::arrayToBitMap($this->type_bit_maps);
167
-
168
- $packet->offset += strlen($bitmap);
169
-
170
- return $data . $bitmap;
171
- }
172
-
173
- return null;
174
- }
175
- }
176
-
177
- /*
178
- * Local variables:
179
- * tab-width: 4
180
- * c-basic-offset: 4
181
- * c-hanging-comment-ender-p: nil
182
- * End:
183
- */
184
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/NSEC3.php DELETED
@@ -1,310 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * NSEC3 Resource Record - RFC5155 section 3.2
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | Hash Alg. | Flags | Iterations |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59
- * | Salt Length | Salt /
60
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61
- * | Hash Length | Next Hashed Owner Name /
62
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
- * / Type Bit Maps /
64
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
65
- *
66
- * @category Networking
67
- * @package Net_DNS2
68
- * @author Mike Pultz <mike@mikepultz.com>
69
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
70
- * @link http://pear.php.net/package/Net_DNS2
71
- * @see Net_DNS2_RR
72
- *
73
- */
74
- class Net_DNS2_RR_NSEC3 extends Net_DNS2_RR
75
- {
76
- /*
77
- * Algorithm to use
78
- */
79
- public $algorithm;
80
-
81
- /*
82
- * flags
83
- */
84
- public $flags;
85
-
86
- /*
87
- * defines the number of additional times the hash is performed.
88
- */
89
- public $iterations;
90
-
91
- /*
92
- * the length of the salt- not displayed
93
- */
94
- public $salt_length;
95
-
96
- /*
97
- * the salt
98
- */
99
- public $salt;
100
-
101
- /*
102
- * the length of the hash value
103
- */
104
- public $hash_length;
105
-
106
- /*
107
- * the hashed value of the owner name
108
- */
109
- public $hashed_owner_name;
110
-
111
- /*
112
- * array of RR type names
113
- */
114
- public $type_bit_maps = array();
115
-
116
- /**
117
- * method to return the rdata portion of the packet as a string
118
- *
119
- * @return string
120
- * @access protected
121
- *
122
- */
123
- protected function rrToString()
124
- {
125
- $out = $this->algorithm . ' ' . $this->flags . ' ' . $this->iterations . ' ';
126
-
127
- //
128
- // per RFC5155, the salt_length value isn't displayed, and if the salt
129
- // is empty, the salt is displayed as '-'
130
- //
131
- if ($this->salt_length > 0) {
132
-
133
- $out .= $this->salt;
134
- } else {
135
-
136
- $out .= '-';
137
- }
138
-
139
- //
140
- // per RFC5255 the hash length isn't shown
141
- //
142
- $out .= ' ' . $this->hashed_owner_name;
143
-
144
- //
145
- // show the RR's
146
- //
147
- foreach ($this->type_bit_maps as $rr) {
148
-
149
- $out .= ' ' . strtoupper($rr);
150
- }
151
-
152
- return $out;
153
- }
154
-
155
- /**
156
- * parses the rdata portion from a standard DNS config line
157
- *
158
- * @param array $rdata a string split line of values for the rdata
159
- *
160
- * @return boolean
161
- * @access protected
162
- *
163
- */
164
- protected function rrFromString(array $rdata)
165
- {
166
- $this->algorithm = array_shift($rdata);
167
- $this->flags = array_shift($rdata);
168
- $this->iterations = array_shift($rdata);
169
-
170
- //
171
- // an empty salt is represented as '-' per RFC5155 section 3.3
172
- //
173
- $salt = array_shift($rdata);
174
- if ($salt == '-') {
175
-
176
- $this->salt_length = 0;
177
- $this->salt = '';
178
- } else {
179
-
180
- $this->salt_length = strlen(pack('H*', $salt));
181
- $this->salt = strtoupper($salt);
182
- }
183
-
184
- $this->hashed_owner_name = array_shift($rdata);
185
- $this->hash_length = strlen(base64_decode($this->hashed_owner_name));
186
-
187
- $this->type_bit_maps = $rdata;
188
-
189
- return true;
190
- }
191
-
192
- /**
193
- * parses the rdata of the Net_DNS2_Packet object
194
- *
195
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
196
- *
197
- * @return boolean
198
- * @access protected
199
- *
200
- */
201
- protected function rrSet(Net_DNS2_Packet &$packet)
202
- {
203
- if ($this->rdlength > 0) {
204
-
205
- //
206
- // unpack the first values
207
- //
208
- $x = unpack('Calgorithm/Cflags/niterations/Csalt_length', $this->rdata);
209
-
210
- $this->algorithm = $x['algorithm'];
211
- $this->flags = $x['flags'];
212
- $this->iterations = $x['iterations'];
213
- $this->salt_length = $x['salt_length'];
214
-
215
- $offset = 5;
216
-
217
- if ($this->salt_length > 0) {
218
-
219
- $x = unpack('H*', substr($this->rdata, $offset, $this->salt_length));
220
- $this->salt = strtoupper($x[1]);
221
- $offset += $this->salt_length;
222
- }
223
-
224
- //
225
- // unpack the hash length
226
- //
227
- $x = unpack('@' . $offset . '/Chash_length', $this->rdata);
228
- $offset++;
229
-
230
- //
231
- // copy out the hash
232
- //
233
- $this->hash_length = $x['hash_length'];
234
- if ($this->hash_length > 0) {
235
-
236
- $this->hashed_owner_name = base64_encode(
237
- substr($this->rdata, $offset, $this->hash_length)
238
- );
239
- $offset += $this->hash_length;
240
- }
241
-
242
- //
243
- // parse out the RR bitmap
244
- //
245
- $this->type_bit_maps = Net_DNS2_BitMap::bitMapToArray(
246
- substr($this->rdata, $offset)
247
- );
248
-
249
- return true;
250
- }
251
-
252
- return false;
253
- }
254
-
255
- /**
256
- * returns the rdata portion of the DNS packet
257
- *
258
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
259
- * compressed names
260
- *
261
- * @return mixed either returns a binary packed
262
- * string or null on failure
263
- * @access protected
264
- *
265
- */
266
- protected function rrGet(Net_DNS2_Packet &$packet)
267
- {
268
- //
269
- // pull the salt and build the length
270
- //
271
- $salt = pack('H*', $this->salt);
272
- $this->salt_length = strlen($salt);
273
-
274
- //
275
- // pack the algorithm, flags, iterations and salt length
276
- //
277
- $data = pack(
278
- 'CCnC',
279
- $this->algorithm, $this->flags, $this->iterations, $this->salt_length
280
- );
281
- $data .= $salt;
282
-
283
- //
284
- // add the hash length and hash
285
- //
286
- $data .= chr($this->hash_length);
287
- if ($this->hash_length > 0) {
288
-
289
- $data .= base64_decode($this->hashed_owner_name);
290
- }
291
-
292
- //
293
- // conver the array of RR names to a type bitmap
294
- //
295
- $data .= Net_DNS2_BitMap::arrayToBitMap($this->type_bit_maps);
296
-
297
- $packet->offset += strlen($data);
298
-
299
- return $data;
300
- }
301
- }
302
-
303
- /*
304
- * Local variables:
305
- * tab-width: 4
306
- * c-basic-offset: 4
307
- * c-hanging-comment-ender-p: nil
308
- * End:
309
- */
310
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/NSEC3PARAM.php DELETED
@@ -1,220 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * NSEC3PARAM Resource Record - RFC5155 section 4.2
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | Hash Alg. | Flags | Iterations |
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59
- * | Salt Length | Salt /
60
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61
- *
62
- * @category Networking
63
- * @package Net_DNS2
64
- * @author Mike Pultz <mike@mikepultz.com>
65
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
66
- * @link http://pear.php.net/package/Net_DNS2
67
- * @see Net_DNS2_RR
68
- *
69
- */
70
- class Net_DNS2_RR_NSEC3PARAM extends Net_DNS2_RR
71
- {
72
- /*
73
- * Algorithm to use
74
- *
75
- * TODO: same as the NSEC3
76
- */
77
- public $algorithm;
78
-
79
- /*
80
- * flags
81
- */
82
- public $flags;
83
-
84
- /*
85
- * defines the number of additional times the hash is performed.
86
- */
87
- public $iterations;
88
-
89
- /*
90
- * the length of the salt- not displayed
91
- */
92
- public $salt_length;
93
-
94
- /*
95
- * the salt
96
- */
97
- public $salt;
98
-
99
- /**
100
- * method to return the rdata portion of the packet as a string
101
- *
102
- * @return string
103
- * @access protected
104
- *
105
- */
106
- protected function rrToString()
107
- {
108
- $out = $this->algorithm . ' ' . $this->flags . ' ' . $this->iterations . ' ';
109
-
110
- //
111
- // per RFC5155, the salt_length value isn't displayed, and if the salt
112
- // is empty, the salt is displayed as "-"
113
- //
114
- if ($this->salt_length > 0) {
115
-
116
- $out .= $this->salt;
117
- } else {
118
-
119
- $out .= '-';
120
- }
121
-
122
- return $out;
123
- }
124
-
125
- /**
126
- * parses the rdata portion from a standard DNS config line
127
- *
128
- * @param array $rdata a string split line of values for the rdata
129
- *
130
- * @return boolean
131
- * @access protected
132
- *
133
- */
134
- protected function rrFromString(array $rdata)
135
- {
136
- $this->algorithm = array_shift($rdata);
137
- $this->flags = array_shift($rdata);
138
- $this->iterations = array_shift($rdata);
139
-
140
- $salt = array_shift($rdata);
141
- if ($salt == '-') {
142
-
143
- $this->salt_length = 0;
144
- $this->salt = '';
145
- } else {
146
-
147
- $this->salt_length = strlen(pack('H*', $salt));
148
- $this->salt = strtoupper($salt);
149
- }
150
-
151
- return true;
152
- }
153
-
154
- /**
155
- * parses the rdata of the Net_DNS2_Packet object
156
- *
157
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
158
- *
159
- * @return boolean
160
- * @access protected
161
- *
162
- */
163
- protected function rrSet(Net_DNS2_Packet &$packet)
164
- {
165
- if ($this->rdlength > 0) {
166
-
167
- $x = unpack('Calgorithm/Cflags/niterations/Csalt_length', $this->rdata);
168
-
169
- $this->algorithm = $x['algorithm'];
170
- $this->flags = $x['flags'];
171
- $this->iterations = $x['iterations'];
172
- $this->salt_length = $x['salt_length'];
173
-
174
- if ($this->salt_length > 0) {
175
-
176
- $x = unpack('H*', substr($this->rdata, 5, $this->salt_length));
177
- $this->salt = strtoupper($x[1]);
178
- }
179
-
180
- return true;
181
- }
182
-
183
- return false;
184
- }
185
-
186
- /**
187
- * returns the rdata portion of the DNS packet
188
- *
189
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
190
- * compressed names
191
- *
192
- * @return mixed either returns a binary packed
193
- * string or null on failure
194
- * @access protected
195
- *
196
- */
197
- protected function rrGet(Net_DNS2_Packet &$packet)
198
- {
199
- $salt = pack('H*', $this->salt);
200
- $this->salt_length = strlen($salt);
201
-
202
- $data = pack(
203
- 'CCnC',
204
- $this->algorithm, $this->flags, $this->iterations, $this->salt_length
205
- ) . $salt;
206
-
207
- $packet->offset += strlen($data);
208
-
209
- return $data;
210
- }
211
- }
212
-
213
- /*
214
- * Local variables:
215
- * tab-width: 4
216
- * c-basic-offset: 4
217
- * c-hanging-comment-ender-p: nil
218
- * End:
219
- */
220
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/OPENPGPKEY.php DELETED
@@ -1,159 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2014, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2014 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.4.0
49
- *
50
- */
51
-
52
- /**
53
- * OPENPGPKEY Resource Record - https://tools.ietf.org/html/draft-ietf-dane-openpgpkey-01
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * / /
58
- * / OpenPGP Public KeyRing /
59
- * / /
60
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
61
- *
62
- * @category Networking
63
- * @package Net_DNS2
64
- * @author Mike Pultz <mike@mikepultz.com>
65
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
66
- * @link http://pear.php.net/package/Net_DNS2
67
- * @see Net_DNS2_RR
68
- *
69
- */
70
- class Net_DNS2_RR_OPENPGPKEY extends Net_DNS2_RR
71
- {
72
- /*
73
- * the public key
74
- */
75
- public $key;
76
-
77
- /**
78
- * method to return the rdata portion of the packet as a string
79
- *
80
- * @return string
81
- * @access protected
82
- *
83
- */
84
- protected function rrToString()
85
- {
86
- return $this->key;
87
- }
88
-
89
- /**
90
- * parses the rdata portion from a standard DNS config line
91
- *
92
- * @param array $rdata a string split line of values for the rdata
93
- *
94
- * @return boolean
95
- * @access protected
96
- *
97
- */
98
- protected function rrFromString(array $rdata)
99
- {
100
- $this->key = array_shift($rdata);
101
-
102
- return true;
103
- }
104
-
105
- /**
106
- * parses the rdata of the Net_DNS2_Packet object
107
- *
108
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
109
- *
110
- * @return boolean
111
- * @access protected
112
- *
113
- */
114
- protected function rrSet(Net_DNS2_Packet &$packet)
115
- {
116
- if ($this->rdlength > 0) {
117
-
118
- $this->key = base64_encode(substr($this->rdata, 0, $this->rdlength));
119
-
120
- return true;
121
- }
122
-
123
- return false;
124
- }
125
-
126
- /**
127
- * returns the rdata portion of the DNS packet
128
- *
129
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
130
- * compressed names
131
- *
132
- * @return mixed either returns a binary packed
133
- * string or null on failure
134
- * @access protected
135
- *
136
- */
137
- protected function rrGet(Net_DNS2_Packet &$packet)
138
- {
139
- if (strlen($this->key) > 0) {
140
-
141
- $data = base64_decode($this->key);
142
-
143
- $packet->offset += strlen($data);
144
-
145
- return $data;
146
- }
147
-
148
- return null;
149
- }
150
- }
151
-
152
- /*
153
- * Local variables:
154
- * tab-width: 4
155
- * c-basic-offset: 4
156
- * c-hanging-comment-ender-p: nil
157
- * End:
158
- */
159
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/PX.php DELETED
@@ -1,186 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * PX Resource Record - RFC2163 section 4
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | PREFERENCE |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * / MAP822 /
59
- * / /
60
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
61
- * / MAPX400 /
62
- * / /
63
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
64
- *
65
- * @category Networking
66
- * @package Net_DNS2
67
- * @author Mike Pultz <mike@mikepultz.com>
68
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
69
- * @link http://pear.php.net/package/Net_DNS2
70
- * @see Net_DNS2_RR
71
- *
72
- */
73
- class Net_DNS2_RR_PX extends Net_DNS2_RR
74
- {
75
- /*
76
- * preference
77
- */
78
- public $preference;
79
-
80
- /*
81
- * the RFC822 part of the MCGAM
82
- */
83
- public $map822;
84
-
85
- /*
86
- * the X.400 part of the MCGAM
87
- */
88
- public $mapx400;
89
-
90
- /**
91
- * method to return the rdata portion of the packet as a string
92
- *
93
- * @return string
94
- * @access protected
95
- *
96
- */
97
- protected function rrToString()
98
- {
99
- return $this->preference . ' ' . $this->cleanString($this->map822) . '. ' .
100
- $this->cleanString($this->mapx400) . '.';
101
- }
102
-
103
- /**
104
- * parses the rdata portion from a standard DNS config line
105
- *
106
- * @param array $rdata a string split line of values for the rdata
107
- *
108
- * @return boolean
109
- * @access protected
110
- *
111
- */
112
- protected function rrFromString(array $rdata)
113
- {
114
- $this->preference = $rdata[0];
115
- $this->map822 = $this->cleanString($rdata[1]);
116
- $this->mapx400 = $this->cleanString($rdata[2]);
117
-
118
- return true;
119
- }
120
-
121
- /**
122
- * parses the rdata of the Net_DNS2_Packet object
123
- *
124
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
125
- *
126
- * @return boolean
127
- * @access protected
128
- *
129
- */
130
- protected function rrSet(Net_DNS2_Packet &$packet)
131
- {
132
- if ($this->rdlength > 0) {
133
-
134
- //
135
- // parse the preference
136
- //
137
- $x = unpack('npreference', $this->rdata);
138
- $this->preference = $x['preference'];
139
-
140
- $offset = $packet->offset + 2;
141
-
142
- $this->map822 = Net_DNS2_Packet::expand($packet, $offset);
143
- $this->mapx400 = Net_DNS2_Packet::expand($packet, $offset);
144
-
145
- return true;
146
- }
147
-
148
- return false;
149
- }
150
-
151
- /**
152
- * returns the rdata portion of the DNS packet
153
- *
154
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
155
- * compressed names
156
- *
157
- * @return mixed either returns a binary packed
158
- * string or null on failure
159
- * @access protected
160
- *
161
- */
162
- protected function rrGet(Net_DNS2_Packet &$packet)
163
- {
164
- if (strlen($this->map822) > 0) {
165
-
166
- $data = pack('n', $this->preference);
167
- $packet->offset += 2;
168
-
169
- $data .= $packet->compress($this->map822, $packet->offset);
170
- $data .= $packet->compress($this->mapx400, $packet->offset);
171
-
172
- return $data;
173
- }
174
-
175
- return null;
176
- }
177
- }
178
-
179
- /*
180
- * Local variables:
181
- * tab-width: 4
182
- * c-basic-offset: 4
183
- * c-hanging-comment-ender-p: nil
184
- * End:
185
- */
186
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/RP.php DELETED
@@ -1,167 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * RP Resource Record - RFC1183 section 2.2
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * / mboxdname /
57
- * / /
58
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
59
- * / txtdname /
60
- * / /
61
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
62
- *
63
- * @category Networking
64
- * @package Net_DNS2
65
- * @author Mike Pultz <mike@mikepultz.com>
66
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
67
- * @link http://pear.php.net/package/Net_DNS2
68
- * @see Net_DNS2_RR
69
- *
70
- */
71
- class Net_DNS2_RR_RP extends Net_DNS2_RR
72
- {
73
- /*
74
- * mailbox for the responsible person
75
- */
76
- public $mboxdname;
77
-
78
- /*
79
- * is a domain name for which TXT RR's exists
80
- */
81
- public $txtdname;
82
-
83
- /**
84
- * method to return the rdata portion of the packet as a string
85
- *
86
- * @return string
87
- * @access protected
88
- *
89
- */
90
- protected function rrToString()
91
- {
92
- return $this->cleanString($this->mboxdname) . '. ' .
93
- $this->cleanString($this->txtdname) . '.';
94
- }
95
-
96
- /**
97
- * parses the rdata portion from a standard DNS config line
98
- *
99
- * @param array $rdata a string split line of values for the rdata
100
- *
101
- * @return boolean
102
- * @access protected
103
- *
104
- */
105
- protected function rrFromString(array $rdata)
106
- {
107
- $this->mboxdname = $this->cleanString($rdata[0]);
108
- $this->txtdname = $this->cleanString($rdata[1]);
109
-
110
- return true;
111
- }
112
-
113
- /**
114
- * parses the rdata of the Net_DNS2_Packet object
115
- *
116
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
117
- *
118
- * @return boolean
119
- * @access protected
120
- *
121
- */
122
- protected function rrSet(Net_DNS2_Packet &$packet)
123
- {
124
- if ($this->rdlength > 0) {
125
-
126
- $offset = $packet->offset;
127
-
128
- $this->mboxdname = Net_DNS2_Packet::expand($packet, $offset);
129
- $this->txtdname = Net_DNS2_Packet::expand($packet, $offset);
130
-
131
- return true;
132
- }
133
-
134
- return false;
135
- }
136
-
137
- /**
138
- * returns the rdata portion of the DNS packet
139
- *
140
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
141
- * compressed names
142
- *
143
- * @return mixed either returns a binary packed
144
- * string or null on failure
145
- * @access protected
146
- *
147
- */
148
- protected function rrGet(Net_DNS2_Packet &$packet)
149
- {
150
- if (strlen($this->mboxdname) > 0) {
151
-
152
- return $packet->compress($this->mboxdname, $packet->offset) .
153
- $packet->compress($this->txtdname, $packet->offset);
154
- }
155
-
156
- return null;
157
- }
158
- }
159
-
160
- /*
161
- * Local variables:
162
- * tab-width: 4
163
- * c-basic-offset: 4
164
- * c-hanging-comment-ender-p: nil
165
- * End:
166
- */
167
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/RRSIG.php DELETED
@@ -1,329 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- * This file contains code based off the Net::DNS::SEC Perl module by
51
- * Olaf M. Kolkman
52
- *
53
- * This is the copyright notice from the PERL Net::DNS::SEC module:
54
- *
55
- * Copyright (c) 2001 - 2005 RIPE NCC. Author Olaf M. Kolkman
56
- * Copyright (c) 2007 - 2008 NLnet Labs. Author Olaf M. Kolkman
57
- * <olaf@net-dns.org>
58
- *
59
- * All Rights Reserved
60
- *
61
- * Permission to use, copy, modify, and distribute this software and its
62
- * documentation for any purpose and without fee is hereby granted,
63
- * provided that the above copyright notice appear in all copies and that
64
- * both that copyright notice and this permission notice appear in
65
- * supporting documentation, and that the name of the author not be
66
- * used in advertising or publicity pertaining to distribution of the
67
- * software without specific, written prior permission.
68
- *
69
- * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
70
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
71
- * AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
72
- * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
73
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
74
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
75
- *
76
- */
77
-
78
- /**
79
- * RRSIG Resource Record - RFC4034 sction 3.1
80
- *
81
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
82
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
83
- * | Type Covered | Algorithm | Labels |
84
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
85
- * | Original TTL |
86
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
87
- * | Signature Expiration |
88
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
89
- * | Signature Inception |
90
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
91
- * | Key Tag | /
92
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Signer's Name /
93
- * / /
94
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
95
- * / /
96
- * / Signature /
97
- * / /
98
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
99
- *
100
- * @category Networking
101
- * @package Net_DNS2
102
- * @author Mike Pultz <mike@mikepultz.com>
103
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
104
- * @link http://pear.php.net/package/Net_DNS2
105
- * @see Net_DNS2_RR
106
- *
107
- */
108
- class Net_DNS2_RR_RRSIG extends Net_DNS2_RR
109
- {
110
- /*
111
- * the RR type covered by this signature
112
- */
113
- public $typecovered;
114
-
115
- /*
116
- * the algorithm used for the signature
117
- */
118
- public $algorithm;
119
-
120
- /*
121
- * the number of labels in the name
122
- */
123
- public $labels;
124
-
125
- /*
126
- * the original TTL
127
- */
128
- public $origttl;
129
-
130
- /*
131
- * the signature expiration
132
- */
133
- public $sigexp;
134
-
135
- /*
136
- * the inception of the signature
137
- */
138
- public $sigincep;
139
-
140
- /*
141
- * the keytag used
142
- */
143
- public $keytag;
144
-
145
- /*
146
- * the signer's name
147
- */
148
- public $signname;
149
-
150
- /*
151
- * the signature
152
- */
153
- public $signature;
154
-
155
- /**
156
- * method to return the rdata portion of the packet as a string
157
- *
158
- * @return string
159
- * @access protected
160
- *
161
- */
162
- protected function rrToString()
163
- {
164
- return $this->typecovered . ' ' . $this->algorithm . ' ' .
165
- $this->labels . ' ' . $this->origttl . ' ' .
166
- $this->sigexp . ' ' . $this->sigincep . ' ' .
167
- $this->keytag . ' ' . $this->cleanString($this->signname) . '. ' .
168
- $this->signature;
169
- }
170
-
171
- /**
172
- * parses the rdata portion from a standard DNS config line
173
- *
174
- * @param array $rdata a string split line of values for the rdata
175
- *
176
- * @return boolean
177
- * @access protected
178
- *
179
- */
180
- protected function rrFromString(array $rdata)
181
- {
182
- $this->typecovered = strtoupper(array_shift($rdata));
183
- $this->algorithm = array_shift($rdata);
184
- $this->labels = array_shift($rdata);
185
- $this->origttl = array_shift($rdata);
186
- $this->sigexp = array_shift($rdata);
187
- $this->sigincep = array_shift($rdata);
188
- $this->keytag = array_shift($rdata);
189
- $this->signname = $this->cleanString(array_shift($rdata));
190
-
191
- foreach ($rdata as $line) {
192
-
193
- $this->signature .= $line;
194
- }
195
-
196
- $this->signature = trim($this->signature);
197
-
198
- return true;
199
- }
200
-
201
- /**
202
- * parses the rdata of the Net_DNS2_Packet object
203
- *
204
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
205
- *
206
- * @return boolean
207
- * @access protected
208
- *
209
- */
210
- protected function rrSet(Net_DNS2_Packet &$packet)
211
- {
212
- if ($this->rdlength > 0) {
213
-
214
- //
215
- // unpack
216
- //
217
- $x = unpack(
218
- 'ntc/Calgorithm/Clabels/Norigttl/Nsigexp/Nsigincep/nkeytag',
219
- $this->rdata
220
- );
221
-
222
- $this->typecovered = Net_DNS2_Lookups::$rr_types_by_id[$x['tc']];
223
- $this->algorithm = $x['algorithm'];
224
- $this->labels = $x['labels'];
225
- $this->origttl = Net_DNS2::expandUint32($x['origttl']);
226
-
227
- //
228
- // the dates are in GM time
229
- //
230
- $this->sigexp = gmdate('YmdHis', $x['sigexp']);
231
- $this->sigincep = gmdate('YmdHis', $x['sigincep']);
232
-
233
- //
234
- // get the keytag
235
- //
236
- $this->keytag = $x['keytag'];
237
-
238
- //
239
- // get teh signers name and signature
240
- //
241
- $offset = $packet->offset + 18;
242
- $sigoffset = $offset;
243
-
244
- $this->signname = strtolower(
245
- Net_DNS2_Packet::expand($packet, $sigoffset)
246
- );
247
- $this->signature = base64_encode(
248
- substr($this->rdata, 18 + ($sigoffset - $offset))
249
- );
250
-
251
- return true;
252
- }
253
-
254
- return false;
255
- }
256
-
257
- /**
258
- * returns the rdata portion of the DNS packet
259
- *
260
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
261
- * compressed names
262
- *
263
- * @return mixed either returns a binary packed
264
- * string or null on failure
265
- * @access protected
266
- *
267
- */
268
- protected function rrGet(Net_DNS2_Packet &$packet)
269
- {
270
- if (strlen($this->signature) > 0) {
271
-
272
- //
273
- // parse the values out of the dates
274
- //
275
- preg_match(
276
- '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigexp, $e
277
- );
278
- preg_match(
279
- '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigincep, $i
280
- );
281
-
282
- //
283
- // pack the value
284
- //
285
- $data = pack(
286
- 'nCCNNNn',
287
- Net_DNS2_Lookups::$rr_types_by_name[$this->typecovered],
288
- $this->algorithm,
289
- $this->labels,
290
- $this->origttl,
291
- gmmktime($e[4], $e[5], $e[6], $e[2], $e[3], $e[1]),
292
- gmmktime($i[4], $i[5], $i[6], $i[2], $i[3], $i[1]),
293
- $this->keytag
294
- );
295
-
296
- //
297
- // the signer name is special; it's not allowed to be compressed
298
- // (see section 3.1.7)
299
- //
300
- $names = explode('.', strtolower($this->signname));
301
- foreach ($names as $name) {
302
-
303
- $data .= chr(strlen($name));
304
- $data .= $name;
305
- }
306
- $data .= "\0";
307
-
308
- //
309
- // add the signature
310
- //
311
- $data .= base64_decode($this->signature);
312
-
313
- $packet->offset += strlen($data);
314
-
315
- return $data;
316
- }
317
-
318
- return null;
319
- }
320
- }
321
-
322
- /*
323
- * Local variables:
324
- * tab-width: 4
325
- * c-basic-offset: 4
326
- * c-hanging-comment-ender-p: nil
327
- * End:
328
- */
329
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/RT.php DELETED
@@ -1,175 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * RT Resource Record - RFC1183 section 3.3
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | preference |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * / intermediate-host /
59
- * / /
60
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
61
- *
62
- * @category Networking
63
- * @package Net_DNS2
64
- * @author Mike Pultz <mike@mikepultz.com>
65
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
66
- * @link http://pear.php.net/package/Net_DNS2
67
- * @see Net_DNS2_RR
68
- *
69
- */
70
- class Net_DNS2_RR_RT extends Net_DNS2_RR
71
- {
72
- /*
73
- * the preference of this route
74
- */
75
- public $preference;
76
-
77
- /*
78
- * host which will servce as an intermediate in reaching the owner host
79
- */
80
- public $intermediatehost;
81
-
82
- /**
83
- * method to return the rdata portion of the packet as a string
84
- *
85
- * @return string
86
- * @access protected
87
- *
88
- */
89
- protected function rrToString()
90
- {
91
- return $this->preference . ' ' .
92
- $this->cleanString($this->intermediatehost) . '.';
93
- }
94
-
95
- /**
96
- * parses the rdata portion from a standard DNS config line
97
- *
98
- * @param array $rdata a string split line of values for the rdata
99
- *
100
- * @return boolean
101
- * @access protected
102
- *
103
- */
104
- protected function rrFromString(array $rdata)
105
- {
106
- $this->preference = $rdata[0];
107
- $this->intermediatehost = $this->cleanString($rdata[1]);
108
-
109
- return true;
110
- }
111
-
112
- /**
113
- * parses the rdata of the Net_DNS2_Packet object
114
- *
115
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
116
- *
117
- * @return boolean
118
- * @access protected
119
- *
120
- */
121
- protected function rrSet(Net_DNS2_Packet &$packet)
122
- {
123
- if ($this->rdlength > 0) {
124
-
125
- //
126
- // unpack the preference
127
- //
128
- $x = unpack('npreference', $this->rdata);
129
-
130
- $this->preference = $x['preference'];
131
- $offset = $packet->offset + 2;
132
-
133
- $this->intermediatehost = Net_DNS2_Packet::expand($packet, $offset);
134
-
135
- return true;
136
- }
137
-
138
- return false;
139
- }
140
-
141
- /**
142
- * returns the rdata portion of the DNS packet
143
- *
144
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
145
- * compressed names
146
- *
147
- * @return mixed either returns a binary packed
148
- * string or null on failure
149
- * @access protected
150
- *
151
- */
152
- protected function rrGet(Net_DNS2_Packet &$packet)
153
- {
154
- if (strlen($this->intermediatehost) > 0) {
155
-
156
- $data = pack('n', $this->preference);
157
- $packet->offset += 2;
158
-
159
- $data .= $packet->compress($this->intermediatehost, $packet->offset);
160
-
161
- return $data;
162
- }
163
-
164
- return null;
165
- }
166
- }
167
-
168
- /*
169
- * Local variables:
170
- * tab-width: 4
171
- * c-basic-offset: 4
172
- * c-hanging-comment-ender-p: nil
173
- * End:
174
- */
175
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/SMIMEA.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2016, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2016 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.4.2
49
- *
50
- */
51
-
52
- /**
53
- * The SMIMEA RR is implemented exactly like the TLSA record, so
54
- * for now we just extend the TLSA RR and use it.
55
- *
56
- * @category Networking
57
- * @package Net_DNS2
58
- * @author Mike Pultz <mike@mikepultz.com>
59
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
60
- * @link http://pear.php.net/package/Net_DNS2
61
- * @see Net_DNS2_RR
62
- *
63
- */
64
- class Net_DNS2_RR_SMIMEA extends Net_DNS2_RR_TLSA
65
- {
66
- }
67
-
68
- /*
69
- * Local variables:
70
- * tab-width: 4
71
- * c-basic-offset: 4
72
- * c-hanging-comment-ender-p: nil
73
- * End:
74
- */
75
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/SPF.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * The SPF RR is implemented exactly like the TXT record, so
54
- * for now we just extend the TXT RR and use it.
55
- *
56
- * @category Networking
57
- * @package Net_DNS2
58
- * @author Mike Pultz <mike@mikepultz.com>
59
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
60
- * @link http://pear.php.net/package/Net_DNS2
61
- * @see Net_DNS2_RR
62
- *
63
- */
64
- class Net_DNS2_RR_SPF extends Net_DNS2_RR_TXT
65
- {
66
- }
67
-
68
- /*
69
- * Local variables:
70
- * tab-width: 4
71
- * c-basic-offset: 4
72
- * c-hanging-comment-ender-p: nil
73
- * End:
74
- */
75
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/SRV.php DELETED
@@ -1,186 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * SRV Resource Record - RFC2782
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | PRIORITY |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * | WEIGHT |
59
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
60
- * | PORT |
61
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
62
- * / TARGET /
63
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
64
- *
65
- * @category Networking
66
- * @package Net_DNS2
67
- * @author Mike Pultz <mike@mikepultz.com>
68
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
69
- * @link http://pear.php.net/package/Net_DNS2
70
- * @see Net_DNS2_RR
71
- *
72
- */
73
- class Net_DNS2_RR_SRV extends Net_DNS2_RR
74
- {
75
- /*
76
- * The priority of this target host.
77
- */
78
- public $priority;
79
-
80
- /*
81
- * a relative weight for entries with the same priority
82
- */
83
- public $weight;
84
-
85
- /*
86
- * The port on this target host of this service.
87
- */
88
- public $port;
89
-
90
- /*
91
- * The domain name of the target host
92
- */
93
- public $target;
94
-
95
- /**
96
- * method to return the rdata portion of the packet as a string
97
- *
98
- * @return string
99
- * @access protected
100
- *
101
- */
102
- protected function rrToString()
103
- {
104
- return $this->priority . ' ' . $this->weight . ' ' .
105
- $this->port . ' ' . $this->cleanString($this->target) . '.';
106
- }
107
-
108
- /**
109
- * parses the rdata portion from a standard DNS config line
110
- *
111
- * @param array $rdata a string split line of values for the rdata
112
- *
113
- * @return boolean
114
- * @access protected
115
- *
116
- */
117
- protected function rrFromString(array $rdata)
118
- {
119
- $this->priority = $rdata[0];
120
- $this->weight = $rdata[1];
121
- $this->port = $rdata[2];
122
-
123
- $this->target = $this->cleanString($rdata[3]);
124
-
125
- return true;
126
- }
127
-
128
- /**
129
- * parses the rdata of the Net_DNS2_Packet object
130
- *
131
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
132
- *
133
- * @return boolean
134
- * @access protected
135
- *
136
- */
137
- protected function rrSet(Net_DNS2_Packet &$packet)
138
- {
139
- if ($this->rdlength > 0) {
140
-
141
- //
142
- // unpack the priority, weight and port
143
- //
144
- $x = unpack('npriority/nweight/nport', $this->rdata);
145
-
146
- $this->priority = $x['priority'];
147
- $this->weight = $x['weight'];
148
- $this->port = $x['port'];
149
-
150
- $offset = $packet->offset + 6;
151
- $this->target = Net_DNS2_Packet::expand($packet, $offset);
152
-
153
- return true;
154
- }
155
-
156
- return false;
157
- }
158
-
159
- /**
160
- * returns the rdata portion of the DNS packet
161
- *
162
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
163
- * compressed names
164
- *
165
- * @return mixed either returns a binary packed
166
- * string or null on failure
167
- * @access protected
168
- *
169
- */
170
- protected function rrGet(Net_DNS2_Packet &$packet)
171
- {
172
- if (strlen($this->target) > 0) {
173
-
174
- $data = pack('nnn', $this->priority, $this->weight, $this->port);
175
- $packet->offset += 6;
176
-
177
- $data .= $packet->compress($this->target, $packet->offset);
178
-
179
- return $data;
180
- }
181
-
182
- return null;
183
- }
184
- }
185
-
186
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/SSHFP.php DELETED
@@ -1,250 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * SSHFP Resource Record - RFC4255 section 3.1
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | algorithm | fp type | /
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /
59
- * / /
60
- * / fingerprint /
61
- * / /
62
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_SSHFP extends Net_DNS2_RR
73
- {
74
- /*
75
- * the algorithm used
76
- */
77
- public $algorithm;
78
-
79
- /*
80
- * The finger print type
81
- */
82
- public $fp_type;
83
-
84
- /*
85
- * the finger print data
86
- */
87
- public $fingerprint;
88
-
89
- /*
90
- * Algorithms
91
- */
92
- const SSHFP_ALGORITHM_RES = 0;
93
- const SSHFP_ALGORITHM_RSA = 1;
94
- const SSHFP_ALGORITHM_DSS = 2;
95
- const SSHFP_ALGORITHM_ECDSA = 3;
96
-
97
- /*
98
- * Fingerprint Types
99
- */
100
- const SSHFP_FPTYPE_RES = 0;
101
- const SSHFP_FPTYPE_SHA1 = 1;
102
- const SSHFP_FPTYPE_SHA256 = 2;
103
-
104
-
105
- /**
106
- * method to return the rdata portion of the packet as a string
107
- *
108
- * @return string
109
- * @access protected
110
- *
111
- */
112
- protected function rrToString()
113
- {
114
- return $this->algorithm . ' ' . $this->fp_type . ' ' . $this->fingerprint;
115
- }
116
-
117
- /**
118
- * parses the rdata portion from a standard DNS config line
119
- *
120
- * @param array $rdata a string split line of values for the rdata
121
- *
122
- * @return boolean
123
- * @access protected
124
- *
125
- */
126
- protected function rrFromString(array $rdata)
127
- {
128
- //
129
- // "The use of mnemonics instead of numbers is not allowed."
130
- //
131
- // RFC4255 section 3.2
132
- //
133
- $algorithm = array_shift($rdata);
134
- $fp_type = array_shift($rdata);
135
- $fingerprint = strtolower(implode('', $rdata));
136
-
137
- //
138
- // There are only two algorithm's defined
139
- //
140
- if ( ($algorithm != self::SSHFP_ALGORITHM_RSA)
141
- && ($algorithm != self::SSHFP_ALGORITHM_DSS)
142
- && ($algorithm != self::SSHFP_ALGORITHM_ECDSA)
143
- ) {
144
- return false;
145
- }
146
-
147
- //
148
- // there are only two fingerprints defined
149
- //
150
- if ( ($fp_type != self::SSHFP_FPTYPE_SHA1)
151
- && ($fp_type != self::SSHFP_FPTYPE_SHA256)
152
- ) {
153
- return false;
154
- }
155
-
156
- $this->algorithm = $algorithm;
157
- $this->fp_type = $fp_type;
158
- $this->fingerprint = $fingerprint;
159
-
160
- return true;
161
- }
162
-
163
- /**
164
- * parses the rdata of the Net_DNS2_Packet object
165
- *
166
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
167
- *
168
- * @return boolean
169
- * @access protected
170
- *
171
- */
172
- protected function rrSet(Net_DNS2_Packet &$packet)
173
- {
174
- if ($this->rdlength > 0) {
175
-
176
- //
177
- // unpack the algorithm and finger print type
178
- //
179
- $x = unpack('Calgorithm/Cfp_type', $this->rdata);
180
-
181
- $this->algorithm = $x['algorithm'];
182
- $this->fp_type = $x['fp_type'];
183
-
184
- //
185
- // There are only three algorithm's defined
186
- //
187
- if ( ($this->algorithm != self::SSHFP_ALGORITHM_RSA)
188
- && ($this->algorithm != self::SSHFP_ALGORITHM_DSS)
189
- && ($this->algorithm != self::SSHFP_ALGORITHM_ECDSA)
190
- ) {
191
- return false;
192
- }
193
-
194
- //
195
- // there are only two fingerprints defined
196
- //
197
- if ( ($this->fp_type != self::SSHFP_FPTYPE_SHA1)
198
- && ($this->fp_type != self::SSHFP_FPTYPE_SHA256)
199
- ) {
200
- return false;
201
- }
202
-
203
- //
204
- // parse the finger print; this assumes SHA-1
205
- //
206
- $fp = unpack('H*a', substr($this->rdata, 2));
207
- $this->fingerprint = strtolower($fp['a']);
208
-
209
- return true;
210
- }
211
-
212
- return false;
213
- }
214
-
215
- /**
216
- * returns the rdata portion of the DNS packet
217
- *
218
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
219
- * compressed names
220
- *
221
- * @return mixed either returns a binary packed
222
- * string or null on failure
223
- * @access protected
224
- *
225
- */
226
- protected function rrGet(Net_DNS2_Packet &$packet)
227
- {
228
- if (strlen($this->fingerprint) > 0) {
229
-
230
- $data = pack(
231
- 'CCH*', $this->algorithm, $this->fp_type, $this->fingerprint
232
- );
233
-
234
- $packet->offset += strlen($data);
235
-
236
- return $data;
237
- }
238
-
239
- return null;
240
- }
241
- }
242
-
243
- /*
244
- * Local variables:
245
- * tab-width: 4
246
- * c-basic-offset: 4
247
- * c-hanging-comment-ender-p: nil
248
- * End:
249
- */
250
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/TA.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2011 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.2.0
49
- *
50
- */
51
-
52
- /**
53
- * The TA RR is implemented exactly like the DS record, so
54
- * for now we just extend the DS RR and use it.
55
- *
56
- * @category Networking
57
- * @package Net_DNS2
58
- * @author Mike Pultz <mike@mikepultz.com>
59
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
60
- * @link http://pear.php.net/package/Net_DNS2
61
- * @see Net_DNS2_RR
62
- *
63
- */
64
- class Net_DNS2_RR_TA extends Net_DNS2_RR_DS
65
- {
66
- }
67
-
68
- /*
69
- * Local variables:
70
- * tab-width: 4
71
- * c-basic-offset: 4
72
- * c-hanging-comment-ender-p: nil
73
- * End:
74
- */
75
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/TALINK.php DELETED
@@ -1,171 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2011 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.2.0
49
- *
50
- */
51
-
52
- /**
53
- * TALINK Resource Record - DNSSEC Trust Anchor
54
- *
55
- * http://tools.ietf.org/id/draft-ietf-dnsop-dnssec-trust-history-00.txt
56
- *
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * / PREVIOUS /
59
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
60
- * / NEXT /
61
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
62
- *
63
- * @category Networking
64
- * @package Net_DNS2
65
- * @author Mike Pultz <mike@mikepultz.com>
66
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
67
- * @link http://pear.php.net/package/Net_DNS2
68
- * @see Net_DNS2_RR
69
- *
70
- */
71
- class Net_DNS2_RR_TALINK extends Net_DNS2_RR
72
- {
73
- /*
74
- * the previous domain name
75
- */
76
- public $previous;
77
-
78
- /*
79
- * the next domain name
80
- */
81
- public $next;
82
-
83
- /**
84
- * method to return the rdata portion of the packet as a string
85
- *
86
- * @return string
87
- * @access protected
88
- *
89
- */
90
- protected function rrToString()
91
- {
92
- return $this->cleanString($this->previous) . '. ' .
93
- $this->cleanString($this->next) . '.';
94
- }
95
-
96
- /**
97
- * parses the rdata portion from a standard DNS config line
98
- *
99
- * @param array $rdata a string split line of values for the rdata
100
- *
101
- * @return boolean
102
- * @access protected
103
- *
104
- */
105
- protected function rrFromString(array $rdata)
106
- {
107
- $this->previous = $this->cleanString($rdata[0]);
108
- $this->next = $this->cleanString($rdata[1]);
109
-
110
- return true;
111
- }
112
-
113
- /**
114
- * parses the rdata of the Net_DNS2_Packet object
115
- *
116
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
117
- *
118
- * @return boolean
119
- * @access protected
120
- *
121
- */
122
- protected function rrSet(Net_DNS2_Packet &$packet)
123
- {
124
- if ($this->rdlength > 0) {
125
-
126
- $offset = $packet->offset;
127
-
128
- $this->previous = Net_DNS2_Packet::label($packet, $offset);
129
- $this->next = Net_DNS2_Packet::label($packet, $offset);
130
-
131
- return true;
132
- }
133
-
134
- return false;
135
- }
136
-
137
- /**
138
- * returns the rdata portion of the DNS packet
139
- *
140
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
141
- * compressed names
142
- *
143
- * @return mixed either returns a binary packed
144
- * string or null on failure
145
- * @access protected
146
- *
147
- */
148
- protected function rrGet(Net_DNS2_Packet &$packet)
149
- {
150
- if ( (strlen($this->previous) > 0) || (strlen($this->next) > 0) ) {
151
-
152
- $data = chr(strlen($this->previous)) . $this->previous .
153
- chr(strlen($this->next)) . $this->next;
154
-
155
- $packet->offset += strlen($data);
156
-
157
- return $data;
158
- }
159
-
160
- return null;
161
- }
162
- }
163
-
164
- /*
165
- * Local variables:
166
- * tab-width: 4
167
- * c-basic-offset: 4
168
- * c-hanging-comment-ender-p: nil
169
- * End:
170
- */
171
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/TKEY.php DELETED
@@ -1,307 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * TKEY Resource Record - RFC 2930 section 2
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * / ALGORITHM /
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * | INCEPTION |
59
- * | |
60
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
61
- * | EXPIRATION |
62
- * | |
63
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
64
- * | MODE |
65
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
66
- * | ERROR |
67
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
68
- * | KEY SIZE |
69
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
70
- * / KEY DATA /
71
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
72
- * | OTHER SIZE |
73
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
74
- * / OTHER DATA /
75
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
76
- *
77
- * @category Networking
78
- * @package Net_DNS2
79
- * @author Mike Pultz <mike@mikepultz.com>
80
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
81
- * @link http://pear.php.net/package/Net_DNS2
82
- * @see Net_DNS2_RR
83
- *
84
- */
85
- class Net_DNS2_RR_TKEY extends Net_DNS2_RR
86
- {
87
- public $algorithm;
88
- public $inception;
89
- public $expiration;
90
- public $mode;
91
- public $error;
92
- public $key_size;
93
- public $key_data;
94
- public $other_size;
95
- public $other_data;
96
-
97
- /*
98
- * TSIG Modes
99
- */
100
- const TSIG_MODE_RES = 0;
101
- const TSIG_MODE_SERV_ASSIGN = 1;
102
- const TSIG_MODE_DH = 2;
103
- const TSIG_MODE_GSS_API = 3;
104
- const TSIG_MODE_RESV_ASSIGN = 4;
105
- const TSIG_MODE_KEY_DELE = 5;
106
-
107
- /*
108
- * map the mod id's to names so we can validate
109
- */
110
- public $tsgi_mode_id_to_name = array(
111
-
112
- self::TSIG_MODE_RES => 'Reserved',
113
- self::TSIG_MODE_SERV_ASSIGN => 'Server Assignment',
114
- self::TSIG_MODE_DH => 'Diffie-Hellman',
115
- self::TSIG_MODE_GSS_API => 'GSS-API',
116
- self::TSIG_MODE_RESV_ASSIGN => 'Resolver Assignment',
117
- self::TSIG_MODE_KEY_DELE => 'Key Deletion'
118
- );
119
-
120
- /**
121
- * method to return the rdata portion of the packet as a string
122
- *
123
- * @return string
124
- * @access protected
125
- *
126
- */
127
- protected function rrToString()
128
- {
129
- $out = $this->cleanString($this->algorithm) . '. ' . $this->mode;
130
- if ($this->key_size > 0) {
131
-
132
- $out .= ' ' . trim($this->key_data, '.') . '.';
133
- } else {
134
-
135
- $out .= ' .';
136
- }
137
-
138
- return $out;
139
- }
140
-
141
- /**
142
- * parses the rdata portion from a standard DNS config line
143
- *
144
- * @param array $rdata a string split line of values for the rdata
145
- *
146
- * @return boolean
147
- * @access protected
148
- *
149
- */
150
- protected function rrFromString(array $rdata)
151
- {
152
- //
153
- // data passed in is assumed: <algorithm> <mode> <key>
154
- //
155
- $this->algorithm = $this->cleanString(array_shift($rdata));
156
- $this->mode = array_shift($rdata);
157
- $this->key_data = trim(array_shift($rdata), '.');
158
-
159
- //
160
- // the rest of the data is set manually
161
- //
162
- $this->inception = time();
163
- $this->expiration = time() + 86400; // 1 day
164
- $this->error = 0;
165
- $this->key_size = strlen($this->key_data);
166
- $this->other_size = 0;
167
- $this->other_data = '';
168
-
169
- return true;
170
- }
171
-
172
- /**
173
- * parses the rdata of the Net_DNS2_Packet object
174
- *
175
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
176
- *
177
- * @return boolean
178
- * @access protected
179
- *
180
- */
181
- protected function rrSet(Net_DNS2_Packet &$packet)
182
- {
183
- if ($this->rdlength > 0) {
184
-
185
- //
186
- // expand the algorithm
187
- //
188
- $offset = $packet->offset;
189
- $this->algorithm = Net_DNS2_Packet::expand($packet, $offset);
190
-
191
- //
192
- // unpack inception, expiration, mode, error and key size
193
- //
194
- $x = unpack(
195
- '@' . $offset . '/Ninception/Nexpiration/nmode/nerror/nkey_size',
196
- $packet->rdata
197
- );
198
-
199
- $this->inception = Net_DNS2::expandUint32($x['inception']);
200
- $this->expiration = Net_DNS2::expandUint32($x['expiration']);
201
- $this->mode = $x['mode'];
202
- $this->error = $x['error'];
203
- $this->key_size = $x['key_size'];
204
-
205
- $offset += 14;
206
-
207
- //
208
- // if key_size > 0, then copy out the key
209
- //
210
- if ($this->key_size > 0) {
211
-
212
- $this->key_data = substr($packet->rdata, $offset, $this->key_size);
213
- $offset += $this->key_size;
214
- }
215
-
216
- //
217
- // unpack the other length
218
- //
219
- $x = unpack('@' . $offset . '/nother_size', $packet->rdata);
220
-
221
- $this->other_size = $x['other_size'];
222
- $offset += 2;
223
-
224
- //
225
- // if other_size > 0, then copy out the data
226
- //
227
- if ($this->other_size > 0) {
228
-
229
- $this->other_data = substr(
230
- $packet->rdata, $offset, $this->other_size
231
- );
232
- }
233
-
234
- return true;
235
- }
236
-
237
- return false;
238
- }
239
-
240
- /**
241
- * returns the rdata portion of the DNS packet
242
- *
243
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
244
- * compressed names
245
- *
246
- * @return mixed either returns a binary packed
247
- * string or null on failure
248
- * @access protected
249
- *
250
- */
251
- protected function rrGet(Net_DNS2_Packet &$packet)
252
- {
253
- if (strlen($this->algorithm) > 0) {
254
-
255
- //
256
- // make sure the size values are correct
257
- //
258
- $this->key_size = strlen($this->key_data);
259
- $this->other_size = strlen($this->other_data);
260
-
261
- //
262
- // add the algorithm without compression
263
- //
264
- $data = Net_DNS2_Packet::pack($this->algorithm);
265
-
266
- //
267
- // pack in the inception, expiration, mode, error and key size
268
- //
269
- $data .= pack(
270
- 'NNnnn', $this->inception, $this->expiration,
271
- $this->mode, 0, $this->key_size
272
- );
273
-
274
- //
275
- // if the key_size > 0, then add the key
276
- //
277
- if ($this->key_size > 0) {
278
-
279
- $data .= $this->key_data;
280
- }
281
-
282
- //
283
- // pack in the other size
284
- //
285
- $data .= pack('n', $this->other_size);
286
- if ($this->other_size > 0) {
287
-
288
- $data .= $this->other_data;
289
- }
290
-
291
- $packet->offset += strlen($data);
292
-
293
- return $data;
294
- }
295
-
296
- return null;
297
- }
298
- }
299
-
300
- /*
301
- * Local variables:
302
- * tab-width: 4
303
- * c-basic-offset: 4
304
- * c-hanging-comment-ender-p: nil
305
- * End:
306
- */
307
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/TLSA.php DELETED
@@ -1,194 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2012, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2012 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.2.5
49
- *
50
- */
51
-
52
- /**
53
- * TLSA Resource Record - RFC 6698
54
- *
55
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
56
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57
- * | Cert. Usage | Selector | Matching Type | /
58
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /
59
- * / /
60
- * / Certificate Association Data /
61
- * / /
62
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2_RR
70
- *
71
- */
72
- class Net_DNS2_RR_TLSA extends Net_DNS2_RR
73
- {
74
- /*
75
- * The Certificate Usage Field
76
- */
77
- public $cert_usage;
78
-
79
- /*
80
- * The Selector Field
81
- */
82
- public $selector;
83
-
84
- /*
85
- * The Matching Type Field
86
- */
87
- public $matching_type;
88
-
89
- /*
90
- * The Certificate Association Data Field
91
- */
92
- public $certificate;
93
-
94
- /**
95
- * method to return the rdata portion of the packet as a string
96
- *
97
- * @return string
98
- * @access protected
99
- *
100
- */
101
- protected function rrToString()
102
- {
103
- return $this->cert_usage . ' ' . $this->selector . ' ' .
104
- $this->matching_type . ' ' . base64_encode($this->certificate);
105
- }
106
-
107
- /**
108
- * parses the rdata portion from a standard DNS config line
109
- *
110
- * @param array $rdata a string split line of values for the rdata
111
- *
112
- * @return boolean
113
- * @access protected
114
- *
115
- */
116
- protected function rrFromString(array $rdata)
117
- {
118
- $this->cert_usage = array_shift($rdata);
119
- $this->selector = array_shift($rdata);
120
- $this->matching_type = array_shift($rdata);
121
- $this->certificate = base64_decode(implode('', $rdata));
122
-
123
- return true;
124
- }
125
-
126
- /**
127
- * parses the rdata of the Net_DNS2_Packet object
128
- *
129
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
130
- *
131
- * @return boolean
132
- * @access protected
133
- *
134
- */
135
- protected function rrSet(Net_DNS2_Packet &$packet)
136
- {
137
- if ($this->rdlength > 0) {
138
-
139
- //
140
- // unpack the format, keytag and algorithm
141
- //
142
- $x = unpack('Cusage/Cselector/Ctype', $this->rdata);
143
-
144
- $this->cert_usage = $x['usage'];
145
- $this->selector = $x['selector'];
146
- $this->matching_type = $x['type'];
147
-
148
- //
149
- // copy the certificate
150
- //
151
- $this->certificate = substr($this->rdata, 3, $this->rdlength - 3);
152
-
153
- return true;
154
- }
155
-
156
- return false;
157
- }
158
-
159
- /**
160
- * returns the rdata portion of the DNS packet
161
- *
162
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
163
- * compressed names
164
- *
165
- * @return mixed either returns a binary packed
166
- * string or null on failure
167
- * @access protected
168
- *
169
- */
170
- protected function rrGet(Net_DNS2_Packet &$packet)
171
- {
172
- if (strlen($this->certificate) > 0) {
173
-
174
- $data = pack(
175
- 'CCC', $this->cert_usage, $this->selector, $this->matching_type
176
- ) . $this->certificate;
177
-
178
- $packet->offset += strlen($data);
179
-
180
- return $data;
181
- }
182
-
183
- return null;
184
- }
185
- }
186
-
187
- /*
188
- * Local variables:
189
- * tab-width: 4
190
- * c-basic-offset: 4
191
- * c-hanging-comment-ender-p: nil
192
- * End:
193
- */
194
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/TXT.php DELETED
@@ -1,177 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * TXT Resource Record - RFC1035 section 3.3.14
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * / TXT-DATA /
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- *
59
- * @category Networking
60
- * @package Net_DNS2
61
- * @author Mike Pultz <mike@mikepultz.com>
62
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
63
- * @link http://pear.php.net/package/Net_DNS2
64
- * @see Net_DNS2_RR
65
- *
66
- */
67
- class Net_DNS2_RR_TXT extends Net_DNS2_RR
68
- {
69
- /*
70
- * an array of the text strings
71
- */
72
- public $text = array();
73
-
74
- /**
75
- * method to return the rdata portion of the packet as a string
76
- *
77
- * @return string
78
- * @access protected
79
- *
80
- */
81
- protected function rrToString()
82
- {
83
- if (count($this->text) == 0) {
84
- return '""';
85
- }
86
-
87
- $data = '';
88
-
89
- foreach ($this->text as $t) {
90
-
91
- $data .= $this->formatString($t) . ' ';
92
- }
93
-
94
- return trim($data);
95
- }
96
-
97
- /**
98
- * parses the rdata portion from a standard DNS config line
99
- *
100
- * @param array $rdata a string split line of values for the rdata
101
- *
102
- * @return boolean
103
- * @access protected
104
- *
105
- */
106
- protected function rrFromString(array $rdata)
107
- {
108
- $data = $this->buildString($rdata);
109
- if (count($data) > 0) {
110
-
111
- $this->text = $data;
112
- }
113
-
114
- return true;
115
- }
116
-
117
- /**
118
- * parses the rdata of the Net_DNS2_Packet object
119
- *
120
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
121
- *
122
- * @return boolean
123
- * @access protected
124
- *
125
- */
126
- protected function rrSet(Net_DNS2_Packet &$packet)
127
- {
128
- if ($this->rdlength > 0) {
129
-
130
- $length = $packet->offset + $this->rdlength;
131
- $offset = $packet->offset;
132
-
133
- while ($length > $offset) {
134
-
135
- $this->text[] = Net_DNS2_Packet::label($packet, $offset);
136
- }
137
-
138
- return true;
139
- }
140
-
141
- return false;
142
- }
143
-
144
- /**
145
- * returns the rdata portion of the DNS packet
146
- *
147
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
148
- * compressed names
149
- *
150
- * @return mixed either returns a binary packed
151
- * string or null on failure
152
- * @access protected
153
- *
154
- */
155
- protected function rrGet(Net_DNS2_Packet &$packet)
156
- {
157
- $data = null;
158
-
159
- foreach ($this->text as $t) {
160
-
161
- $data .= chr(strlen($t)) . $t;
162
- }
163
-
164
- $packet->offset += strlen($data);
165
-
166
- return $data;
167
- }
168
- }
169
-
170
- /*
171
- * Local variables:
172
- * tab-width: 4
173
- * c-basic-offset: 4
174
- * c-hanging-comment-ender-p: nil
175
- * End:
176
- */
177
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/URI.php DELETED
@@ -1,183 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2011 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.2.0
49
- *
50
- */
51
-
52
- /**
53
- * URI Resource Record - http://tools.ietf.org/html/draft-faltstrom-uri-06
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | PRIORITY |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * | WEIGHT |
59
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
60
- * / TARGET /
61
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
62
- *
63
- * @category Networking
64
- * @package Net_DNS2
65
- * @author Mike Pultz <mike@mikepultz.com>
66
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
67
- * @link http://pear.php.net/package/Net_DNS2
68
- * @see Net_DNS2_RR
69
- *
70
- */
71
- class Net_DNS2_RR_URI extends Net_DNS2_RR
72
- {
73
- /*
74
- * The priority of this target host.
75
- */
76
- public $priority;
77
-
78
- /*
79
- * a relative weight for entries with the same priority
80
- */
81
- public $weight;
82
-
83
- /*
84
- * The domain name of the target host
85
- */
86
- public $target;
87
-
88
- /**
89
- * method to return the rdata portion of the packet as a string
90
- *
91
- * @return string
92
- * @access protected
93
- *
94
- */
95
- protected function rrToString()
96
- {
97
- //
98
- // presentation format has double quotes (") around the target.
99
- //
100
- return $this->priority . ' ' . $this->weight . ' "' .
101
- $this->cleanString($this->target) . '"';
102
- }
103
-
104
- /**
105
- * parses the rdata portion from a standard DNS config line
106
- *
107
- * @param array $rdata a string split line of values for the rdata
108
- *
109
- * @return boolean
110
- * @access protected
111
- *
112
- */
113
- protected function rrFromString(array $rdata)
114
- {
115
- $this->priority = $rdata[0];
116
- $this->weight = $rdata[1];
117
-
118
- //
119
- // make sure to trim the lead/trailing double quote if it's there.
120
- //
121
- $this->target = trim($this->cleanString($rdata[2]), '"');
122
-
123
- return true;
124
- }
125
-
126
- /**
127
- * parses the rdata of the Net_DNS2_Packet object
128
- *
129
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
130
- *
131
- * @return boolean
132
- * @access protected
133
- *
134
- */
135
- protected function rrSet(Net_DNS2_Packet &$packet)
136
- {
137
- if ($this->rdlength > 0) {
138
-
139
- //
140
- // unpack the priority and weight
141
- //
142
- $x = unpack('npriority/nweight', $this->rdata);
143
-
144
- $this->priority = $x['priority'];
145
- $this->weight = $x['weight'];
146
-
147
- $offset = $packet->offset + 4;
148
- $this->target = Net_DNS2_Packet::expand($packet, $offset);
149
-
150
- return true;
151
- }
152
-
153
- return false;
154
- }
155
-
156
- /**
157
- * returns the rdata portion of the DNS packet
158
- *
159
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
160
- * compressed names
161
- *
162
- * @return mixed either returns a binary packed
163
- * string or null on failure
164
- * @access protected
165
- *
166
- */
167
- protected function rrGet(Net_DNS2_Packet &$packet)
168
- {
169
- if (strlen($this->target) > 0) {
170
-
171
- $data = pack('nn', $this->priority, $this->weight);
172
- $packet->offset += 4;
173
-
174
- $data .= $packet->compress(trim($this->target, '"'), $packet->offset);
175
-
176
- return $data;
177
- }
178
-
179
- return null;
180
- }
181
- }
182
-
183
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/WKS.php DELETED
@@ -1,235 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 1.0.1
49
- *
50
- */
51
-
52
- /**
53
- * WKS Resource Record - RFC1035 section 3.4.2
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * | ADDRESS |
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- * | PROTOCOL | |
59
- * +--+--+--+--+--+--+--+--+ |
60
- * | |
61
- * / <BIT MAP> /
62
- * / /
63
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
64
- *
65
- * @category Networking
66
- * @package Net_DNS2
67
- * @author Mike Pultz <mike@mikepultz.com>
68
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
69
- * @link http://pear.php.net/package/Net_DNS2
70
- * @see Net_DNS2_RR
71
- *
72
- */
73
- class Net_DNS2_RR_WKS extends Net_DNS2_RR
74
- {
75
- /*
76
- * The IP address of the service
77
- */
78
- public $address;
79
-
80
- /*
81
- * The protocol of the service
82
- */
83
- public $protocol;
84
-
85
- /*
86
- * bitmap
87
- */
88
- public $bitmap = array();
89
-
90
- /**
91
- * method to return the rdata portion of the packet as a string
92
- *
93
- * @return string
94
- * @access protected
95
- *
96
- */
97
- protected function rrToString()
98
- {
99
- $data = $this->address . ' ' . $this->protocol;
100
-
101
- foreach ($this->bitmap as $port) {
102
- $data .= ' ' . $port;
103
- }
104
-
105
- return $data;
106
- }
107
-
108
- /**
109
- * parses the rdata portion from a standard DNS config line
110
- *
111
- * @param array $rdata a string split line of values for the rdata
112
- *
113
- * @return boolean
114
- * @access protected
115
- *
116
- */
117
- protected function rrFromString(array $rdata)
118
- {
119
- $this->address = strtolower(trim(array_shift($rdata), '.'));
120
- $this->protocol = array_shift($rdata);
121
- $this->bitmap = $rdata;
122
-
123
- return true;
124
- }
125
-
126
- /**
127
- * parses the rdata of the Net_DNS2_Packet object
128
- *
129
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
130
- *
131
- * @return boolean
132
- * @access protected
133
- *
134
- */
135
- protected function rrSet(Net_DNS2_Packet &$packet)
136
- {
137
- if ($this->rdlength > 0) {
138
-
139
- //
140
- // get the address and protocol value
141
- //
142
- $x = unpack('Naddress/Cprotocol', $this->rdata);
143
-
144
- $this->address = long2ip($x['address']);
145
- $this->protocol = $x['protocol'];
146
-
147
- //
148
- // unpack the port list bitmap
149
- //
150
- $port = 0;
151
- foreach (unpack('@5/C*', $this->rdata) as $set) {
152
-
153
- $s = sprintf('%08b', $set);
154
-
155
- for ($i=0; $i<8; $i++, $port++) {
156
- if ($s[$i] == '1') {
157
- $this->bitmap[] = $port;
158
- }
159
- }
160
- }
161
-
162
- return true;
163
- }
164
-
165
- return false;
166
- }
167
-
168
- /**
169
- * returns the rdata portion of the DNS packet
170
- *
171
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
172
- * compressed names
173
- *
174
- * @return mixed either returns a binary packed
175
- * string or null on failure
176
- * @access protected
177
- *
178
- */
179
- protected function rrGet(Net_DNS2_Packet &$packet)
180
- {
181
- if (strlen($this->address) > 0) {
182
-
183
- $data = pack('NC', ip2long($this->address), $this->protocol);
184
-
185
- $ports = array();
186
-
187
- $n = 0;
188
- foreach ($this->bitmap as $port) {
189
- $ports[$port] = 1;
190
-
191
- if ($port > $n) {
192
- $n = $port;
193
- }
194
- }
195
- for ($i=0; $i<ceil($n/8)*8; $i++) {
196
- if (!isset($ports[$i])) {
197
- $ports[$i] = 0;
198
- }
199
- }
200
-
201
- ksort($ports);
202
-
203
- $string = '';
204
- $n = 0;
205
-
206
- foreach ($ports as $s) {
207
-
208
- $string .= $s;
209
- $n++;
210
-
211
- if ($n == 8) {
212
-
213
- $data .= chr(bindec($string));
214
- $string = '';
215
- $n = 0;
216
- }
217
- }
218
-
219
- $packet->offset += strlen($data);
220
-
221
- return $data;
222
- }
223
-
224
- return null;
225
- }
226
- }
227
-
228
- /*
229
- * Local variables:
230
- * tab-width: 4
231
- * c-basic-offset: 4
232
- * c-hanging-comment-ender-p: nil
233
- * End:
234
- */
235
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/RR/X25.php DELETED
@@ -1,160 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * X25 Resource Record - RFC1183 section 3.1
54
- *
55
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
56
- * / PSDN-address /
57
- * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
58
- *
59
- * @category Networking
60
- * @package Net_DNS2
61
- * @author Mike Pultz <mike@mikepultz.com>
62
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
63
- * @link http://pear.php.net/package/Net_DNS2
64
- * @see Net_DNS2_RR
65
- *
66
- */
67
- class Net_DNS2_RR_X25 extends Net_DNS2_RR
68
- {
69
- /*
70
- * The PSDN address
71
- */
72
- public $psdnaddress;
73
-
74
- /**
75
- * method to return the rdata portion of the packet as a string
76
- *
77
- * @return string
78
- * @access protected
79
- *
80
- */
81
- protected function rrToString()
82
- {
83
- return $this->formatString($this->psdnaddress);
84
- }
85
-
86
- /**
87
- * parses the rdata portion from a standard DNS config line
88
- *
89
- * @param array $rdata a string split line of values for the rdata
90
- *
91
- * @return boolean
92
- * @access protected
93
- *
94
- */
95
- protected function rrFromString(array $rdata)
96
- {
97
- $data = $this->buildString($rdata);
98
- if (count($data) == 1) {
99
-
100
- $this->psdnaddress = $data[0];
101
- return true;
102
- }
103
-
104
- return false;
105
- }
106
-
107
- /**
108
- * parses the rdata of the Net_DNS2_Packet object
109
- *
110
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
111
- *
112
- * @return boolean
113
- * @access protected
114
- *
115
- */
116
- protected function rrSet(Net_DNS2_Packet &$packet)
117
- {
118
- if ($this->rdlength > 0) {
119
-
120
- $this->psdnaddress = Net_DNS2_Packet::label($packet, $packet->offset);
121
- return true;
122
- }
123
-
124
- return false;
125
- }
126
-
127
- /**
128
- * returns the rdata portion of the DNS packet
129
- *
130
- * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for
131
- * compressed names
132
- *
133
- * @return mixed either returns a binary packed
134
- * string or null on failure
135
- * @access protected
136
- *
137
- */
138
- protected function rrGet(Net_DNS2_Packet &$packet)
139
- {
140
- if (strlen($this->psdnaddress) > 0) {
141
-
142
- $data = chr(strlen($this->psdnaddress)) . $this->psdnaddress;
143
-
144
- $packet->offset += strlen($data);
145
-
146
- return $data;
147
- }
148
-
149
- return null;
150
- }
151
- }
152
-
153
- /*
154
- * Local variables:
155
- * tab-width: 4
156
- * c-basic-offset: 4
157
- * c-hanging-comment-ender-p: nil
158
- * End:
159
- */
160
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/DNS2/Updater.php DELETED
@@ -1,654 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * DNS Library for handling lookups and updates.
6
- *
7
- * PHP Version 5
8
- *
9
- * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>.
10
- * All rights reserved.
11
- *
12
- * Redistribution and use in source and binary forms, with or without
13
- * modification, are permitted provided that the following conditions
14
- * are met:
15
- *
16
- * * Redistributions of source code must retain the above copyright
17
- * notice, this list of conditions and the following disclaimer.
18
- *
19
- * * Redistributions in binary form must reproduce the above copyright
20
- * notice, this list of conditions and the following disclaimer in
21
- * the documentation and/or other materials provided with the
22
- * distribution.
23
- *
24
- * * Neither the name of Mike Pultz nor the names of his contributors
25
- * may be used to endorse or promote products derived from this
26
- * software without specific prior written permission.
27
- *
28
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC
37
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
- * POSSIBILITY OF SUCH DAMAGE.
40
- *
41
- * @category Networking
42
- * @package Net_DNS2
43
- * @author Mike Pultz <mike@mikepultz.com>
44
- * @copyright 2010 Mike Pultz <mike@mikepultz.com>
45
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
46
- * @version SVN: $Id$
47
- * @link http://pear.php.net/package/Net_DNS2
48
- * @since File available since Release 0.6.0
49
- *
50
- */
51
-
52
- /**
53
- * The main dynamic DNS updater class.
54
- *
55
- * This class provices functions to handle all defined dynamic DNS update
56
- * requests as defined by RFC 2136.
57
- *
58
- * This is separate from the Net_DNS2_Resolver class, as while the underlying
59
- * protocol is the same, the functionality is completely different.
60
- *
61
- * Generally, query (recursive) lookups are done against caching server, while
62
- * update requests are done against authoratative servers.
63
- *
64
- * @category Networking
65
- * @package Net_DNS2
66
- * @author Mike Pultz <mike@mikepultz.com>
67
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
68
- * @link http://pear.php.net/package/Net_DNS2
69
- * @see Net_DNS2
70
- *
71
- */
72
- class Net_DNS2_Updater extends Net_DNS2
73
- {
74
- /*
75
- * a Net_DNS2_Packet_Request object used for the update request
76
- */
77
- private $_packet;
78
-
79
- /**
80
- * Constructor - builds a new Net_DNS2_Updater objected used for doing
81
- * dynamic DNS updates
82
- *
83
- * @param string $zone the domain name to use for DNS updates
84
- * @param mixed $options an array of config options or null
85
- *
86
- * @throws Net_DNS2_Exception
87
- * @access public
88
- *
89
- */
90
- public function __construct($zone, array $options = null)
91
- {
92
- parent::__construct($options);
93
-
94
- //
95
- // create the packet
96
- //
97
- $this->_packet = new Net_DNS2_Packet_Request(
98
- strtolower(trim($zone, " \n\r\t.")), 'SOA', 'IN'
99
- );
100
-
101
- //
102
- // make sure the opcode on the packet is set to UPDATE
103
- //
104
- $this->_packet->header->opcode = Net_DNS2_Lookups::OPCODE_UPDATE;
105
- }
106
-
107
- /**
108
- * checks that the given name matches the name for the zone we're updating
109
- *
110
- * @param string $name The name to be checked.
111
- *
112
- * @return boolean
113
- * @throws Net_DNS2_Exception
114
- * @access private
115
- *
116
- */
117
- private function _checkName($name)
118
- {
119
- if (!preg_match('/' . $this->_packet->question[0]->qname . '$/', $name)) {
120
-
121
- throw new Net_DNS2_Exception(
122
- 'name provided (' . $name . ') does not match zone name (' .
123
- $this->_packet->question[0]->qname . ')',
124
- Net_DNS2_Lookups::E_PACKET_INVALID
125
- );
126
- }
127
-
128
- return true;
129
- }
130
-
131
- /**
132
- * add a signature to the request for authentication
133
- *
134
- * @param string $keyname the key name to use for the TSIG RR
135
- * @param string $signature the key to sign the request.
136
- *
137
- * @return boolean
138
- * @access public
139
- * @see Net_DNS2::signTSIG()
140
- * @deprecated function deprecated in 1.1.0
141
- *
142
- */
143
- public function signature($keyname, $signature)
144
- {
145
- return $this->signTSIG($keyname, $signature);
146
- }
147
-
148
- /**
149
- * 2.5.1 - Add To An RRset
150
- *
151
- * RRs are added to the Update Section whose NAME, TYPE, TTL, RDLENGTH
152
- * and RDATA are those being added, and CLASS is the same as the zone
153
- * class. Any duplicate RRs will be silently ignored by the primary
154
- * master.
155
- *
156
- * @param Net_DNS2_RR $rr the Net_DNS2_RR object to be added to the zone
157
- *
158
- * @return boolean
159
- * @throws Net_DNS2_Exception
160
- * @access public
161
- *
162
- */
163
- public function add(Net_DNS2_RR $rr)
164
- {
165
- $this->_checkName($rr->name);
166
-
167
- //
168
- // add the RR to the "update" section
169
- //
170
- if (!in_array($rr, $this->_packet->authority)) {
171
- $this->_packet->authority[] = $rr;
172
- }
173
-
174
- return true;
175
- }
176
-
177
- /**
178
- * 2.5.4 - Delete An RR From An RRset
179
- *
180
- * RRs to be deleted are added to the Update Section. The NAME, TYPE,
181
- * RDLENGTH and RDATA must match the RR being deleted. TTL must be
182
- * specified as zero (0) and will otherwise be ignored by the primary
183
- * master. CLASS must be specified as NONE to distinguish this from an
184
- * RR addition. If no such RRs exist, then this Update RR will be
185
- * silently ignored by the primary master.
186
- *
187
- * @param Net_DNS2_RR $rr the Net_DNS2_RR object to be deleted from the zone
188
- *
189
- * @return boolean
190
- * @throws Net_DNS2_Exception
191
- * @access public
192
- *
193
- */
194
- public function delete(Net_DNS2_RR $rr)
195
- {
196
- $this->_checkName($rr->name);
197
-
198
- $rr->ttl = 0;
199
- $rr->class = 'NONE';
200
-
201
- //
202
- // add the RR to the "update" section
203
- //
204
- if (!in_array($rr, $this->_packet->authority)) {
205
- $this->_packet->authority[] = $rr;
206
- }
207
-
208
- return true;
209
- }
210
-
211
- /**
212
- * 2.5.2 - Delete An RRset
213
- *
214
- * One RR is added to the Update Section whose NAME and TYPE are those
215
- * of the RRset to be deleted. TTL must be specified as zero (0) and is
216
- * otherwise not used by the primary master. CLASS must be specified as
217
- * ANY. RDLENGTH must be zero (0) and RDATA must therefore be empty.
218
- * If no such RRset exists, then this Update RR will be silently ignored
219
- * by the primary master
220
- *
221
- * @param string $name the RR name to be removed from the zone
222
- * @param string $type the RR type to be removed from the zone
223
- *
224
- * @return boolean
225
- * @throws Net_DNS2_Exception
226
- * @access public
227
- *
228
- */
229
- public function deleteAny($name, $type)
230
- {
231
- $this->_checkName($name);
232
-
233
- $class = Net_DNS2_Lookups::$rr_types_id_to_class[
234
- Net_DNS2_Lookups::$rr_types_by_name[$type]
235
- ];
236
- if (!isset($class)) {
237
-
238
- throw new Net_DNS2_Exception(
239
- 'unknown or un-supported resource record type: ' . $type,
240
- Net_DNS2_Lookups::E_RR_INVALID
241
- );
242
- }
243
-
244
- $rr = new $class;
245
-
246
- $rr->name = $name;
247
- $rr->ttl = 0;
248
- $rr->class = 'ANY';
249
- $rr->rdlength = -1;
250
- $rr->rdata = '';
251
-
252
- //
253
- // add the RR to the "update" section
254
- //
255
- if (!in_array($rr, $this->_packet->authority)) {
256
- $this->_packet->authority[] = $rr;
257
- }
258
-
259
- return true;
260
- }
261
-
262
- /**
263
- * 2.5.3 - Delete All RRsets From A Name
264
- *
265
- * One RR is added to the Update Section whose NAME is that of the name
266
- * to be cleansed of RRsets. TYPE must be specified as ANY. TTL must
267
- * be specified as zero (0) and is otherwise not used by the primary
268
- * master. CLASS must be specified as ANY. RDLENGTH must be zero (0)
269
- * and RDATA must therefore be empty. If no such RRsets exist, then
270
- * this Update RR will be silently ignored by the primary master.
271
- *
272
- * @param string $name the RR name to be removed from the zone
273
- *
274
- * @return boolean
275
- * @throws Net_DNS2_Exception
276
- * @access public
277
- *
278
- */
279
- public function deleteAll($name)
280
- {
281
- $this->_checkName($name);
282
-
283
- //
284
- // the Net_DNS2_RR_ANY class is just an empty stub class used for these
285
- // cases only
286
- //
287
- $rr = new Net_DNS2_RR_ANY;
288
-
289
- $rr->name = $name;
290
- $rr->ttl = 0;
291
- $rr->type = 'ANY';
292
- $rr->class = 'ANY';
293
- $rr->rdlength = -1;
294
- $rr->rdata = '';
295
-
296
- //
297
- // add the RR to the "update" section
298
- //
299
- if (!in_array($rr, $this->_packet->authority)) {
300
- $this->_packet->authority[] = $rr;
301
- }
302
-
303
- return true;
304
- }
305
-
306
- /**
307
- * 2.4.1 - RRset Exists (Value Independent)
308
- *
309
- * At least one RR with a specified NAME and TYPE (in the zone and class
310
- * specified in the Zone Section) must exist.
311
- *
312
- * For this prerequisite, a requestor adds to the section a single RR
313
- * whose NAME and TYPE are equal to that of the zone RRset whose
314
- * existence is required. RDLENGTH is zero and RDATA is therefore
315
- * empty. CLASS must be specified as ANY to differentiate this
316
- * condition from that of an actual RR whose RDLENGTH is naturally zero
317
- * (0) (e.g., NULL). TTL is specified as zero (0).
318
- *
319
- * @param string $name the RR name for the prerequisite
320
- * @param string $type the RR type for the prerequisite
321
- *
322
- * @return boolean
323
- * @throws Net_DNS2_Exception
324
- * @access public
325
- *
326
- */
327
- public function checkExists($name, $type)
328
- {
329
- $this->_checkName($name);
330
-
331
- $class = Net_DNS2_Lookups::$rr_types_id_to_class[
332
- Net_DNS2_Lookups::$rr_types_by_name[$type]
333
- ];
334
- if (!isset($class)) {
335
-
336
- throw new Net_DNS2_Exception(
337
- 'unknown or un-supported resource record type: ' . $type,
338
- Net_DNS2_Lookups::E_RR_INVALID
339
- );
340
- }
341
-
342
- $rr = new $class;
343
-
344
- $rr->name = $name;
345
- $rr->ttl = 0;
346
- $rr->class = 'ANY';
347
- $rr->rdlength = -1;
348
- $rr->rdata = '';
349
-
350
- //
351
- // add the RR to the "prerequisite" section
352
- //
353
- if (!in_array($rr, $this->_packet->answer)) {
354
- $this->_packet->answer[] = $rr;
355
- }
356
-
357
- return true;
358
- }
359
-
360
- /**
361
- * 2.4.2 - RRset Exists (Value Dependent)
362
- *
363
- * A set of RRs with a specified NAME and TYPE exists and has the same
364
- * members with the same RDATAs as the RRset specified here in this
365
- * section. While RRset ordering is undefined and therefore not
366
- * significant to this comparison, the sets be identical in their
367
- * extent.
368
- *
369
- * For this prerequisite, a requestor adds to the section an entire
370
- * RRset whose preexistence is required. NAME and TYPE are that of the
371
- * RRset being denoted. CLASS is that of the zone. TTL must be
372
- * specified as zero (0) and is ignored when comparing RRsets for
373
- * identity.
374
- *
375
- * @param Net_DNS2_RR $rr the RR object to be used as a prerequisite
376
- *
377
- * @return boolean
378
- * @throws Net_DNS2_Exception
379
- * @access public
380
- *
381
- */
382
- public function checkValueExists(Net_DNS2_RR $rr)
383
- {
384
- $this->_checkName($rr->name);
385
-
386
- $rr->ttl = 0;
387
-
388
- //
389
- // add the RR to the "prerequisite" section
390
- //
391
- if (!in_array($rr, $this->_packet->answer)) {
392
- $this->_packet->answer[] = $rr;
393
- }
394
-
395
- return true;
396
- }
397
-
398
- /**
399
- * 2.4.3 - RRset Does Not Exist
400
- *
401
- * No RRs with a specified NAME and TYPE (in the zone and class denoted
402
- * by the Zone Section) can exist.
403
- *
404
- * For this prerequisite, a requestor adds to the section a single RR
405
- * whose NAME and TYPE are equal to that of the RRset whose nonexistence
406
- * is required. The RDLENGTH of this record is zero (0), and RDATA
407
- * field is therefore empty. CLASS must be specified as NONE in order
408
- * to distinguish this condition from a valid RR whose RDLENGTH is
409
- * naturally zero (0) (for example, the NULL RR). TTL must be specified
410
- * as zero (0).
411
- *
412
- * @param string $name the RR name for the prerequisite
413
- * @param string $type the RR type for the prerequisite
414
- *
415
- * @return boolean
416
- * @throws Net_DNS2_Exception
417
- * @access public
418
- *
419
- */
420
- public function checkNotExists($name, $type)
421
- {
422
- $this->_checkName($name);
423
-
424
- $class = Net_DNS2_Lookups::$rr_types_id_to_class[
425
- Net_DNS2_Lookups::$rr_types_by_name[$type]
426
- ];
427
- if (!isset($class)) {
428
-
429
- throw new Net_DNS2_Exception(
430
- 'unknown or un-supported resource record type: ' . $type,
431
- Net_DNS2_Lookups::E_RR_INVALID
432
- );
433
- }
434
-
435
- $rr = new $class;
436
-
437
- $rr->name = $name;
438
- $rr->ttl = 0;
439
- $rr->class = 'NONE';
440
- $rr->rdlength = -1;
441
- $rr->rdata = '';
442
-
443
- //
444
- // add the RR to the "prerequisite" section
445
- //
446
- if (!in_array($rr, $this->_packet->answer)) {
447
- $this->_packet->answer[] = $rr;
448
- }
449
-
450
- return true;
451
- }
452
-
453
- /**
454
- * 2.4.4 - Name Is In Use
455
- *
456
- * Name is in use. At least one RR with a specified NAME (in the zone
457
- * and class specified by the Zone Section) must exist. Note that this
458
- * prerequisite is NOT satisfied by empty nonterminals.
459
- *
460
- * For this prerequisite, a requestor adds to the section a single RR
461
- * whose NAME is equal to that of the name whose ownership of an RR is
462
- * required. RDLENGTH is zero and RDATA is therefore empty. CLASS must
463
- * be specified as ANY to differentiate this condition from that of an
464
- * actual RR whose RDLENGTH is naturally zero (0) (e.g., NULL). TYPE
465
- * must be specified as ANY to differentiate this case from that of an
466
- * RRset existence test. TTL is specified as zero (0).
467
- *
468
- * @param string $name the RR name for the prerequisite
469
- *
470
- * @return boolean
471
- * @throws Net_DNS2_Exception
472
- * @access public
473
- *
474
- */
475
- public function checkNameInUse($name)
476
- {
477
- $this->_checkName($name);
478
-
479
- //
480
- // the Net_DNS2_RR_ANY class is just an empty stub class used for these
481
- // cases only
482
- //
483
- $rr = new Net_DNS2_RR_ANY;
484
-
485
- $rr->name = $name;
486
- $rr->ttl = 0;
487
- $rr->type = 'ANY';
488
- $rr->class = 'ANY';
489
- $rr->rdlength = -1;
490
- $rr->rdata = '';
491
-
492
- //
493
- // add the RR to the "prerequisite" section
494
- //
495
- if (!in_array($rr, $this->_packet->answer)) {
496
- $this->_packet->answer[] = $rr;
497
- }
498
-
499
- return true;
500
- }
501
-
502
- /**
503
- * 2.4.5 - Name Is Not In Use
504
- *
505
- * Name is not in use. No RR of any type is owned by a specified NAME.
506
- * Note that this prerequisite IS satisfied by empty nonterminals.
507
- *
508
- * For this prerequisite, a requestor adds to the section a single RR
509
- * whose NAME is equal to that of the name whose nonownership of any RRs
510
- * is required. RDLENGTH is zero and RDATA is therefore empty. CLASS
511
- * must be specified as NONE. TYPE must be specified as ANY. TTL must
512
- * be specified as zero (0).
513
- *
514
- * @param string $name the RR name for the prerequisite
515
- *
516
- * @return boolean
517
- * @throws Net_DNS2_Exception
518
- * @access public
519
- *
520
- */
521
- public function checkNameNotInUse($name)
522
- {
523
- $this->_checkName($name);
524
-
525
- //
526
- // the Net_DNS2_RR_ANY class is just an empty stub class used for these
527
- // cases only
528
- //
529
- $rr = new Net_DNS2_RR_ANY;
530
-
531
- $rr->name = $name;
532
- $rr->ttl = 0;
533
- $rr->type = 'ANY';
534
- $rr->class = 'NONE';
535
- $rr->rdlength = -1;
536
- $rr->rdata = '';
537
-
538
- //
539
- // add the RR to the "prerequisite" section
540
- //
541
- if (!in_array($rr, $this->_packet->answer)) {
542
- $this->_packet->answer[] = $rr;
543
- }
544
-
545
- return true;
546
- }
547
-
548
- /**
549
- * returns the current internal packet object.
550
- *
551
- * @return Net_DNS2_Packet_Request
552
- * @access public
553
- #
554
- */
555
- public function packet()
556
- {
557
- //
558
- // take a copy
559
- //
560
- $p = $this->_packet;
561
-
562
- //
563
- // check for an authentication method; either TSIG or SIG
564
- //
565
- if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG)
566
- || ($this->auth_signature instanceof Net_DNS2_RR_SIG)
567
- ) {
568
- $p->additional[] = $this->auth_signature;
569
- }
570
-
571
- //
572
- // update the counts
573
- //
574
- $p->header->qdcount = count($p->question);
575
- $p->header->ancount = count($p->answer);
576
- $p->header->nscount = count($p->authority);
577
- $p->header->arcount = count($p->additional);
578
-
579
- return $p;
580
- }
581
-
582
- /**
583
- * executes the update request with the object informaton
584
- *
585
- * @param Net_DNS2_Packet_Response &$response ref to the response object
586
- *
587
- * @return boolean
588
- * @throws Net_DNS2_Exception
589
- * @access public
590
- *
591
- */
592
- public function update(&$response = null)
593
- {
594
- //
595
- // make sure we have some name servers set
596
- //
597
- $this->checkServers(Net_DNS2::RESOLV_CONF);
598
-
599
- //
600
- // check for an authentication method; either TSIG or SIG
601
- //
602
- if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG)
603
- || ($this->auth_signature instanceof Net_DNS2_RR_SIG)
604
- ) {
605
- $this->_packet->additional[] = $this->auth_signature;
606
- }
607
-
608
- //
609
- // update the counts
610
- //
611
- $this->_packet->header->qdcount = count($this->_packet->question);
612
- $this->_packet->header->ancount = count($this->_packet->answer);
613
- $this->_packet->header->nscount = count($this->_packet->authority);
614
- $this->_packet->header->arcount = count($this->_packet->additional);
615
-
616
- //
617
- // make sure we have some data to send
618
- //
619
- if ( ($this->_packet->header->qdcount == 0)
620
- || ($this->_packet->header->nscount == 0)
621
- ) {
622
- throw new Net_DNS2_Exception(
623
- 'empty headers- nothing to send!',
624
- Net_DNS2_Lookups::E_PACKET_INVALID
625
- );
626
- }
627
-
628
- //
629
- // send the packet and get back the response
630
- //
631
- $response = $this->sendPacket($this->_packet, $this->use_tcp);
632
-
633
- //
634
- // clear the internal packet so if we make another request, we don't have
635
- // old data being sent.
636
- //
637
- $this->_packet->reset();
638
-
639
- //
640
- // for updates, we just need to know it worked- we don't actualy need to
641
- // return the response object
642
- //
643
- return true;
644
- }
645
- }
646
-
647
- /*
648
- * Local variables:
649
- * tab-width: 4
650
- * c-basic-offset: 4
651
- * c-hanging-comment-ender-p: nil
652
- * End:
653
- */
654
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Net/IPv4.php CHANGED
File without changes
ip-geo-block.php CHANGED
@@ -13,7 +13,7 @@
13
  * Plugin Name: IP Geo Block
14
  * Plugin URI: http://wordpress.org/plugins/ip-geo-block/
15
  * Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
16
- * Version: 3.0.12.1
17
  * Author: tokkonopapa
18
  * Author URI: http://www.ipgeoblock.com/
19
  * Text Domain: ip-geo-block
13
  * Plugin Name: IP Geo Block
14
  * Plugin URI: http://wordpress.org/plugins/ip-geo-block/
15
  * Description: It blocks any spams, login attempts and malicious access to the admin area posted from outside your nation, and also prevents zero-day exploit.
16
+ * Version: 3.0.13
17
  * Author: tokkonopapa
18
  * Author URI: http://www.ipgeoblock.com/
19
  * Text Domain: ip-geo-block
languages/ip-geo-block-ja.mo CHANGED
Binary file
languages/ip-geo-block-ja.po CHANGED
@@ -2,15 +2,15 @@
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: IP Geo Block 3.0.12\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2018-05-20 16:59+0900\n"
8
- "PO-Revision-Date: 2018-05-20 17:01+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 2.0.6\n"
14
  "X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
15
  "esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
16
  "X-Poedit-Basepath: ..\n"
@@ -28,169 +28,169 @@ msgstr ""
28
  "自国以外から投稿されるスパム、ログインフォーム、さらにゼロデイ攻撃を含む管理領"
29
  "域への悪意あるアクセスからサイトを守ります。"
30
 
31
- #: admin/class-ip-geo-block-admin.php:269
32
  msgid "Import settings ?"
33
  msgstr "設定をインポートしますか?"
34
 
35
- #: admin/class-ip-geo-block-admin.php:270
36
  msgid "Create table ?"
37
  msgstr "テーブルを作成しますか?"
38
 
39
- #: admin/class-ip-geo-block-admin.php:271
40
  msgid "Delete table ?"
41
  msgstr "テーブルを削除しますか?"
42
 
43
- #: admin/class-ip-geo-block-admin.php:272
44
  msgid "Clear statistics ?"
45
  msgstr "統計をクリアしますか?"
46
 
47
- #: admin/class-ip-geo-block-admin.php:273
48
  msgid "Clear cache ?"
49
  msgstr "キャッシュをクリアしますか?"
50
 
51
- #: admin/class-ip-geo-block-admin.php:274
52
  msgid "Clear logs ?"
53
  msgstr "ログをクリアしますか?"
54
 
55
- #: admin/class-ip-geo-block-admin.php:275
56
  msgid "ajax for logged-in user"
57
  msgstr "認証済ユーザー用 ajax"
58
 
59
- #: admin/class-ip-geo-block-admin.php:276
60
  msgid "ajax for non logged-in user"
61
  msgstr "未認証ユーザー用 ajax"
62
 
63
- #: admin/class-ip-geo-block-admin.php:277
64
  #, php-format
65
  msgid "[Found: %d]"
66
  msgstr "[見つかった数:%d]"
67
 
68
- #: admin/class-ip-geo-block-admin.php:278
69
  #, php-format
70
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
71
  msgstr "ログから `%s` を検索し、検証して下さい。"
72
 
73
- #: admin/class-ip-geo-block-admin.php:279
74
  msgid "This feature is available with HTML5 compliant browsers."
75
  msgstr "HTML5準拠のブラウザでのみ機能します。"
76
 
77
- #: admin/class-ip-geo-block-admin.php:280
78
  msgid "The selected row cannot be found in the visible area."
79
  msgstr "可視領域に選択された行が見つかりません。"
80
 
81
- #: admin/class-ip-geo-block-admin.php:281
82
- #: admin/class-ip-geo-block-admin.php:1483
83
  #, php-format
84
  msgid "An error occurred while executing the ajax command `%s`."
85
  msgstr "Ajaxコマンド `%s` の実行中にエラーが発生しました。"
86
 
87
- #: admin/class-ip-geo-block-admin.php:285
88
  msgid "No data available in table"
89
  msgstr "テーブルにデータがありません"
90
 
91
- #: admin/class-ip-geo-block-admin.php:286
92
  msgid "No matching records found"
93
  msgstr "一致するレコードがありません"
94
 
95
- #: admin/class-ip-geo-block-admin.php:287
96
  #: admin/includes/class-admin-ajax.php:111
97
- #: admin/includes/class-admin-ajax.php:237
98
  #: admin/includes/tab-geolocation.php:70
99
  msgid "IP address"
100
  msgstr "IPアドレス"
101
 
102
- #: admin/class-ip-geo-block-admin.php:288
103
  #: admin/includes/class-admin-ajax.php:112
104
- #: admin/includes/class-admin-ajax.php:238
105
  msgid "Code"
106
  msgstr "国"
107
 
108
- #: admin/class-ip-geo-block-admin.php:289
109
  #: admin/includes/class-admin-ajax.php:113
110
- #: admin/includes/class-admin-ajax.php:239
111
  msgid "ASN"
112
  msgstr "AS番号"
113
 
114
- #: admin/class-ip-geo-block-admin.php:290
115
- #: admin/includes/class-admin-ajax.php:240
116
  msgid "Host name"
117
  msgstr "ホスト名"
118
 
119
- #: admin/class-ip-geo-block-admin.php:291
120
  #: admin/includes/class-admin-ajax.php:114
121
- #: admin/includes/class-admin-ajax.php:241
122
  msgid "Target"
123
  msgstr "検証対象"
124
 
125
- #: admin/class-ip-geo-block-admin.php:292
126
- #: admin/includes/class-admin-ajax.php:242
127
  msgid "Failure / Total"
128
  msgstr "ログイン失敗/総計"
129
 
130
- #: admin/class-ip-geo-block-admin.php:293
131
- #: admin/includes/class-admin-ajax.php:243
132
  msgid "Elapsed[sec]"
133
  msgstr "経過 [秒]"
134
 
135
- #: admin/class-ip-geo-block-admin.php:294
136
  #: admin/includes/class-admin-ajax.php:110
137
  msgid "Time"
138
  msgstr "日時"
139
 
140
- #: admin/class-ip-geo-block-admin.php:295
141
  #: admin/includes/class-admin-ajax.php:115
142
  msgid "Result"
143
  msgstr "検証結果"
144
 
145
- #: admin/class-ip-geo-block-admin.php:296
146
  #: admin/includes/class-admin-ajax.php:116
147
  msgid "Request"
148
  msgstr "リクエスト"
149
 
150
- #: admin/class-ip-geo-block-admin.php:297
151
  #: admin/includes/class-admin-ajax.php:117
152
  msgid "User agent"
153
  msgstr "ユーザー・エージェント"
154
 
155
- #: admin/class-ip-geo-block-admin.php:298
156
  #: admin/includes/class-admin-ajax.php:118
157
  msgid "HTTP headers"
158
  msgstr "HTTP ヘッダー"
159
 
160
- #: admin/class-ip-geo-block-admin.php:299
161
  #: admin/includes/class-admin-ajax.php:119
162
  msgid "$_POST data"
163
  msgstr "$_POST データ"
164
 
165
- #: admin/class-ip-geo-block-admin.php:325
166
  msgid "Contribute on GitHub"
167
  msgstr "開発に参加"
168
 
169
- #: admin/class-ip-geo-block-admin.php:339
170
- #: admin/class-ip-geo-block-admin.php:447
171
- #: admin/class-ip-geo-block-admin.php:664
172
  msgid "Settings"
173
  msgstr "設定"
174
 
175
- #: admin/class-ip-geo-block-admin.php:425
176
- #: admin/class-ip-geo-block-admin.php:426
177
- #: admin/class-ip-geo-block-admin.php:436
178
- #: admin/class-ip-geo-block-admin.php:437
179
- #: admin/class-ip-geo-block-admin.php:446
180
- #: admin/class-ip-geo-block-admin.php:455
181
  msgid "IP Geo Block"
182
  msgstr "IP Geo Block"
183
 
184
- #: admin/class-ip-geo-block-admin.php:456
185
- #: admin/class-ip-geo-block-admin.php:669
186
  msgid "Site List"
187
  msgstr "サイト一覧"
188
 
189
- #: admin/class-ip-geo-block-admin.php:485
190
  msgid "You need WordPress 3.7+."
191
- msgstr "WordPress 3.7&thinsp;以上が必要です。"
192
 
193
- #: admin/class-ip-geo-block-admin.php:491
194
  #, php-format
195
  msgid ""
196
  "Now downloading geolocation databases in background. After a little while, "
@@ -201,7 +201,7 @@ msgstr ""
201
  "た後、あなたの国コードと[<strong>マッチング規則</strong>]を[<a href=\"%s\">"
202
  "検証ルールの設定</a>]で確認して下さい。"
203
 
204
- #: admin/class-ip-geo-block-admin.php:497
205
  #, php-format
206
  msgid ""
207
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
@@ -210,11 +210,11 @@ msgstr ""
210
  "[<strong>マッチング規則</strong>]が正しく設定されていません。[<a href=\"%s"
211
  "\">検証ルールの設定</a>]を確認して下さい。"
212
 
213
- #: admin/class-ip-geo-block-admin.php:506
214
  msgid "Local database and matching rule have been updated."
215
  msgstr "ローカル・データベースとマッチング規則を更新しました。"
216
 
217
- #: admin/class-ip-geo-block-admin.php:517
218
  msgid ""
219
  "Once you logout, you will be unable to login again because the number of "
220
  "login attempts reaches the limit."
@@ -222,7 +222,7 @@ msgstr ""
222
  "あなたのIPアドレスのログイン試行可能回数がリミットに達したため、ログアウトする"
223
  "と再びログインする事が出来なくなります。"
224
 
225
- #: admin/class-ip-geo-block-admin.php:519
226
  #, php-format
227
  msgid ""
228
  "Please execute \"<strong>Clear cache</strong>\" on <a href=\"%s\">Statistics "
@@ -231,7 +231,7 @@ msgstr ""
231
  "<a href=\"%s\">[統計]タブ</a>の[<strong>キャッシュのクリア</strong>]を実行"
232
  "し、ロックアウトを回避してください。"
233
 
234
- #: admin/class-ip-geo-block-admin.php:529
235
  msgid ""
236
  "Once you logout, you will be unable to login again because your country code "
237
  "or IP address is in the blacklist."
@@ -239,7 +239,7 @@ msgstr ""
239
  "あなたの国コードまたはIPアドレスがブラックリストに含まれているため、ログアウト"
240
  "すると再びログインする事が出来なくなります。"
241
 
242
- #: admin/class-ip-geo-block-admin.php:530
243
  msgid ""
244
  "Once you logout, you will be unable to login again because your country code "
245
  "or IP address is not in the whitelist."
@@ -247,12 +247,12 @@ msgstr ""
247
  "あなたの国コードまたはIPアドレスがホワイトリストに含まれていないため、ログアウ"
248
  "トすると再びログインする事が出来なくなります。"
249
 
250
- #: admin/class-ip-geo-block-admin.php:534
251
  #, php-format
252
  msgid "Please check your &#8220;%sValidation rule settings%s&#8221;."
253
  msgstr "[%s検証ルールの設定%s]を確認して下さい。"
254
 
255
- #: admin/class-ip-geo-block-admin.php:538
256
  #, php-format
257
  msgid ""
258
  "Please confirm your local geolocation databases at &#8220;%sLocal database "
@@ -262,7 +262,7 @@ msgstr ""
262
  "[%sローカル・データベースの設定%s]で位置情報データベースを確認し、[%sキャッ"
263
  "シュの統計%s]でキャッシュされているあなたのIPアドレスを削除して下さい。"
264
 
265
- #: admin/class-ip-geo-block-admin.php:559
266
  msgid ""
267
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
268
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
@@ -272,56 +272,56 @@ msgstr ""
272
  "されていますが、<strong>IP Geo Allow</strong> と互換性がありません。「&#8220;"
273
  "init&#8221; アクション・フック」を選択してください。"
274
 
275
- #: admin/class-ip-geo-block-admin.php:665
276
  msgid "Statistics"
277
  msgstr "統計"
278
 
279
- #: admin/class-ip-geo-block-admin.php:666
280
  msgid "Logs"
281
  msgstr "ログ"
282
 
283
- #: admin/class-ip-geo-block-admin.php:667
284
  msgid "Search"
285
  msgstr "検索"
286
 
287
- #: admin/class-ip-geo-block-admin.php:668
288
  msgid "Attribution"
289
  msgstr "リンク"
290
 
291
- #: admin/class-ip-geo-block-admin.php:685
292
- #: admin/class-ip-geo-block-admin.php:702
293
  msgid "Network wide"
294
  msgstr "ネットワーク管理"
295
 
296
- #: admin/class-ip-geo-block-admin.php:715
297
  msgid "Toggle all"
298
  msgstr "全てを開閉"
299
 
300
- #: admin/class-ip-geo-block-admin.php:718
301
  msgid ""
302
- "Independent of &#8220;Statistics and Logs settings&#8221;, you can see all "
303
  "the requests validated by this plugin in almost real time."
304
  msgstr ""
305
- "[統計とログの設定]にかかわらず、このプラグインによる検証結果のすべてを、ほぼ"
306
- "リアルタイムに表示します。"
307
 
308
- #: admin/class-ip-geo-block-admin.php:718 admin/includes/tab-accesslog.php:39
309
  msgid "Live update"
310
  msgstr "ライブアップデート"
311
 
312
- #: admin/class-ip-geo-block-admin.php:722
313
  msgid "Open a new window on clicking the link in the chart."
314
  msgstr "チャート内のリンクをクリックすると、新しいウィンドウが開きます。"
315
 
316
- #: admin/class-ip-geo-block-admin.php:722
317
  msgid "Open a new window"
318
  msgstr "別窓で開く"
319
 
320
- #: admin/class-ip-geo-block-admin.php:745
321
  msgid "Thanks for providing these great services for free."
322
  msgstr "これらのすばらしいサービスの提供元に、敬意と感謝の意を表します!"
323
 
324
- #: admin/class-ip-geo-block-admin.php:746
325
  msgid ""
326
  "(Most browsers will redirect you to each site <a href=\"http://www."
327
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
@@ -331,33 +331,33 @@ msgstr ""
331
  "\" title=\"Referer Checker\">参照元を残さずにリンク先にリダイレクトできます</"
332
  "a>。)"
333
 
334
- #: admin/class-ip-geo-block-admin.php:751
335
  msgid "Back to top"
336
  msgstr "トップに戻る"
337
 
338
- #: admin/class-ip-geo-block-admin.php:843
339
  msgid "Enable"
340
  msgstr "有効"
341
 
342
- #: admin/class-ip-geo-block-admin.php:858
343
  msgid "Select one"
344
  msgstr "何れかを選択"
345
 
346
- #: admin/class-ip-geo-block-admin.php:1273
347
  msgid "You do not have sufficient permissions to access this page."
348
  msgstr "このページにアクセスするための十分な権限がありません。"
349
 
350
- #: admin/class-ip-geo-block-admin.php:1300
351
  #: admin/includes/class-admin-rewrite.php:194
352
  #: classes/class-ip-geo-block-cron.php:217
353
  #: classes/class-ip-geo-block-cron.php:321
354
  #: classes/class-ip-geo-block-cron.php:395
355
- #: classes/class-ip-geo-block-opts.php:452
356
  #, php-format
357
  msgid "Unable to write <code>%s</code>. Please check the permission."
358
  msgstr "<code>%s</code> に書き込めません。パーミッションをチェックして下さい。"
359
 
360
- #: admin/class-ip-geo-block-admin.php:1330
361
  msgid "Settings saved."
362
  msgstr "設定を保存しました。"
363
 
@@ -370,12 +370,12 @@ msgstr "利用不可"
370
  msgid "UNKNOWN"
371
  msgstr "不明"
372
 
373
- #: admin/includes/class-admin-ajax.php:198
374
  #, php-format
375
  msgid "The user %s (user ID: %d) is in use."
376
  msgstr "ユーザー %s(ユーザーID:%d)が使用中です。"
377
 
378
- #: admin/includes/class-admin-ajax.php:492
379
  #, php-format
380
  msgid ""
381
  "illegal format at %s. Please delete the corresponding line and try again."
@@ -397,14 +397,14 @@ msgstr "あるいは %s を参照し、手動で設定して下さい。"
397
  #: admin/includes/class-admin-rewrite.php:234
398
  #, php-format
399
  msgid "&#8220;auto_prepend_file&#8221; already defined in %s."
400
- msgstr "%s&thinsp;で既に「auto_prepend_file」が設定されています。"
401
 
402
  #: admin/includes/tab-accesslog.php:19
403
  msgid "Validation logs"
404
  msgstr "検証のログ"
405
 
406
- #: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:765
407
- #: admin/includes/tab-settings.php:1410
408
  msgid "Help"
409
  msgstr "ヘルプ"
410
 
@@ -486,7 +486,7 @@ msgstr "全てをクリア"
486
  msgid "Export logs"
487
  msgstr "ログをエクスポート"
488
 
489
- #: admin/includes/tab-accesslog.php:153 admin/includes/tab-settings.php:1582
490
  #: admin/includes/tab-statistics.php:294
491
  msgid "Export to the local file"
492
  msgstr "ローカル・ファイルへエクスポートする"
@@ -516,26 +516,24 @@ msgid "Search IP address geolocation"
516
  msgstr "IPアドレスの位置情報を検索"
517
 
518
  #: admin/includes/tab-geolocation.php:42
519
- msgid "Geolocation service"
520
- msgstr "位置情報サービス"
521
 
522
- #: admin/includes/tab-geolocation.php:86 admin/includes/tab-settings.php:1101
523
  msgid ""
524
- "<dfn title=\"IP address is always encrypted on recording in cache and logs. "
525
- "Moreover, this option makes the IP address anonymous and restricted on "
526
- "sending to the 3rd parties such as geolocation APIs or whois service."
527
- "\">Anonymize IP address and restrict 3rd party APIs</dfn>"
528
  msgstr ""
529
- "<dfn title=\"IPアドレスは、キャッシュとログに記録される際に常に暗号化されま"
530
- "す。このオプションはさらに、IPアドレスを匿名化し、位置情報サービスやwhoisサー"
531
- "ビスなどの第三者への送信を制限します。\">IPアドレスを匿名化し、APIの使用を制限"
532
- "する</dfn>"
533
 
534
- #: admin/includes/tab-geolocation.php:101
535
- msgid "Find geolocation"
536
  msgstr "位置情報の検索"
537
 
538
- #: admin/includes/tab-geolocation.php:109
539
  msgid "Search now"
540
  msgstr "今すぐ検索"
541
 
@@ -625,10 +623,9 @@ msgid ""
625
  "country code</dfn>"
626
  msgstr ""
627
  "<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード"
628
- "「XX」は、localhost&thinsp;を含むプライベート・アドレスに割り当てられ、また"
629
- "「ZZ」は不明(位置情報データベースに未登録)を表します。どの国にもマッチさせな"
630
- "いことが必要な場合には、「YY」を指定してください。\">国コードのホワイトリスト"
631
- "</dfn>"
632
 
633
  #: admin/includes/tab-settings.php:111
634
  msgid ""
@@ -640,10 +637,9 @@ msgid ""
640
  "country code</dfn>"
641
  msgstr ""
642
  "<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード"
643
- "「XX」は、localhost&thinsp;を含むプライベート・アドレスに割り当てられ、また"
644
- "「ZZ」は不明(位置情報データベースに未登録)を表します。どの国にもマッチさせな"
645
- "いことが必要な場合には、「YY」を指定してください。\">国コードのブラックリスト"
646
- "</dfn>"
647
 
648
  #: admin/includes/tab-settings.php:115
649
  msgid "(comma separated)"
@@ -668,8 +664,8 @@ msgid ""
668
  "sample.\"><span></span></a>&#8221; button (if exists) attached to the "
669
  "following list to confirm that the blocked request is not malicious."
670
  msgstr ""
671
- "[例外]に追加する前に、以下の候補に付いたボタン&thinsp;&#8220;<a class=\"ip-"
672
- "geo-block-icon ip-geo-block-icon-alert\" title=\"このボタンは単なるサンプルで"
673
  "す。\"><span></span></a>&#8221;(もしあれば)をクリックし、遮断されたリクエス"
674
  "トに悪意のないことを確認して下さい。"
675
 
@@ -677,7 +673,7 @@ msgstr ""
677
  msgid "Open CIDR calculator for IPv4 / IPv6."
678
  msgstr "IPv4/IPv6用CIDR変換プログラムを開きます。"
679
 
680
- #: admin/includes/tab-settings.php:127 admin/includes/tab-settings.php:796
681
  msgid "Matching rule"
682
  msgstr "マッチング規則"
683
 
@@ -739,10 +735,9 @@ msgid ""
739
  "addresses</dfn>"
740
  msgstr ""
741
  "<dfn title=\"あなたのサーバーがプロキシー・サーバーやロード・バランサーの背後"
742
- "に位置する場合には、クライアントのIPアドレスを抽出するために"
743
- "「HTTP_X_FORWARDED_FOR」や「HTTP_X_REAL_IP」など、$_SERVER&thinsp;の適切なキー"
744
- "を指定してください。\">IPアドレスを追加抽出する&thinsp;$_SERVER&thinsp;のキー"
745
- "</dfn>"
746
 
747
  #: admin/includes/tab-settings.php:270
748
  msgid ""
@@ -765,8 +760,8 @@ msgstr ""
765
  msgid ""
766
  "<dfn title=\"Select allowed MIME type.\">Whitelist of allowed MIME type</dfn>"
767
  msgstr ""
768
- "<dfn title=\"許可する&thinsp;MIME&thinsp;タイプを指定します。\">許可する"
769
- "&thinsp;MIME&thinsp;タイプのホワイトリスト</dfn>"
770
 
771
  #: admin/includes/tab-settings.php:295
772
  msgid ""
@@ -790,10 +785,11 @@ msgstr ""
790
 
791
  #: admin/includes/tab-settings.php:299
792
  msgid ""
793
- "(&thinsp;See &#8220;<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
794
  "Roles_and_Capabilities\" title=\"Roles and Capabilities &laquo; WordPress "
795
- "Codex\">Roles and Capabilities</a>&#8221;&thinsp;)"
796
  msgstr ""
 
797
  "(&#8220;<a rel=\"noreferrer\" href=\"http://wpdocs.osdn.jp/%E3%83%A6%E3%83%BC"
798
  "%E3%82%B6%E3%83%BC%E3%81%AE%E7%A8%AE%E9%A1%9E%E3%81%A8%E6%A8%A9%E9%99%90\" "
799
  "title=\"ユーザーの種類と権限 - WordPress Codex 日本語版\">ユーザーの種類と権限"
@@ -814,28 +810,39 @@ msgstr ""
814
  "意のあるアップロード防止</dfn>"
815
 
816
  #: admin/includes/tab-settings.php:318 admin/includes/tab-settings.php:499
817
- #: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:1160
818
  msgid "Disable"
819
  msgstr "無効"
820
 
821
  #: admin/includes/tab-settings.php:319
822
  msgid "Verify file extension and MIME type"
823
- msgstr "拡張子と&thinsp;MIME&thinsp;タイプを検証"
824
 
825
  #: admin/includes/tab-settings.php:320
826
  msgid "Verify file extension only"
827
  msgstr "ファイル拡張子のみを検証"
828
 
829
  #: admin/includes/tab-settings.php:330
 
 
 
 
 
 
 
 
 
 
 
830
  #, php-format
831
  msgid ""
832
  "<dfn title=\"You can put your original 403.php and so on into your theme "
833
  "directory.\">Response code</dfn> %s"
834
  msgstr ""
835
- "<dfn title=\"テーマ・ディレクトリには&thinsp;403.php&thinsp;など、独自のファイ"
836
- "ルを設置する事が出来ます。\">レスポンス・コード</dfn> %s"
837
 
838
- #: admin/includes/tab-settings.php:360 admin/includes/tab-settings.php:883
839
  msgid ""
840
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
841
  "to a public facing page, visitors would not be blocked on the page to "
@@ -843,30 +850,18 @@ msgid ""
843
  "[Front-end target settings] section. Empty URL is altered to your home."
844
  "\">Redirect URL</dfn>"
845
  msgstr ""
846
- "<dfn title=\"レスポンス・コード&thinsp;2xx&thinsp;、3xx&thinsp;用のリダイレク"
847
- "ト先&thinsp;URL&thinsp;を指定します。リダイレクトのループを避けるため、自サイ"
848
- "ト内の&thinsp;URL&thinsp;は[フロントエンドの設定]に関わらず遮断の対象外とな"
849
- "ります。空欄の場合、サイトのホームが使用されます。\">リダイレクト先&thinsp;"
850
- "URL</dfn>"
851
 
852
- #: admin/includes/tab-settings.php:378 admin/includes/tab-settings.php:902
853
  msgid ""
854
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
855
  "message</dfn>"
856
  msgstr ""
857
- "<dfn title=\"レスポンス・コード&thinsp;4xx、5xx&thinsp;用のメッセージを指定し"
858
- "ます。\">レスポンス・メッセージ</dfn>"
859
-
860
- #: admin/includes/tab-settings.php:395
861
- msgid ""
862
- "<dfn title=\"This is applied to &#8220;XML-RPC&#8221; and &#8220;Login "
863
- "form&#8221;. Lockout period is defined as expiration time at &#8220;Privacy "
864
- "and record settings&#8221;.\">Max number of failed login attempts per IP "
865
- "address</dfn>"
866
- msgstr ""
867
- "<dfn title=\"[XML-RPC]と[ログイン・フォーム]に適用されます。ロックアウト時"
868
- "間は[プライバシーと記録の設定]の[キャッシュの有効時間]で定義します。\">IP"
869
- "アドレス当たりのログイン試行可能回数</dfn>"
870
 
871
  #: admin/includes/tab-settings.php:423
872
  msgid "Select when to run the validation."
@@ -902,7 +897,7 @@ msgstr ""
902
  "標準的な他のプラグインより早いタイミングで検証を実行します。これによりサーバー"
903
  "の負荷は軽減されますが、<a rel='noreferrer' href='http://www.ipgeoblock.com/"
904
  "codex/validation-timing.html' title='Validation timing | IP Geo Block'>幾つか"
905
- "の制限事項</a>&thinsp;が生じます。"
906
 
907
  #: admin/includes/tab-settings.php:449
908
  msgid "Back-end target settings"
@@ -923,7 +918,7 @@ msgstr "一般公開ページ"
923
 
924
  #: admin/includes/tab-settings.php:480 admin/includes/tab-settings.php:500
925
  #: admin/includes/tab-settings.php:533 admin/includes/tab-settings.php:539
926
- #: admin/includes/tab-settings.php:784
927
  msgid "Block by country"
928
  msgstr "国コードで遮断"
929
 
@@ -1011,7 +1006,7 @@ msgstr "未認証ユーザー用 admin post"
1011
 
1012
  #: admin/includes/tab-settings.php:593
1013
  msgid "Admin ajax/post"
1014
- msgstr "管理領域&thinsp;ajax/post"
1015
 
1016
  #: admin/includes/tab-settings.php:607
1017
  msgid ""
@@ -1026,8 +1021,8 @@ msgstr ""
1026
  "(&#8220;page=&hellip;&#8221; の &#8220;&hellip;&#8221; 部分)を指定し、検証対"
1027
  "象から除外します。"
1028
 
1029
- #: admin/includes/tab-settings.php:607 admin/includes/tab-settings.php:685
1030
- #: admin/includes/tab-settings.php:746
1031
  msgid "Exceptions"
1032
  msgstr "例外"
1033
 
@@ -1037,7 +1032,7 @@ msgstr "未認証ユーザー用を含む項目に限定して表示する"
1037
 
1038
  #: admin/includes/tab-settings.php:611
1039
  msgid "Candidate actions/pages"
1040
- msgstr "候補&thinsp;アクション/ページ"
1041
 
1042
  #: admin/includes/tab-settings.php:625
1043
  #, php-format
@@ -1059,9 +1054,9 @@ msgstr ""
1059
  #: admin/includes/tab-settings.php:627
1060
  #, php-format
1061
  msgid ""
1062
- "It configures &#8220;%s&#8221; to validate a request to the PHP file which "
1063
- "does not load WordPress core. Make sure to deny direct access to the hidden "
1064
- "files beginning with a dot by the server's configuration."
1065
  msgstr ""
1066
  "WordPressコアを読み込まないPHPファイルへのリクエストを検証対象とするため"
1067
  "に、%s を設定します。ドットで始まる隠しファイルへのアクセス拒否がサーバー側で"
@@ -1071,27 +1066,35 @@ msgstr ""
1071
  msgid "Sorry, but your server type is not supported."
1072
  msgstr "このサーバーではサポートされません。"
1073
 
1074
- #: admin/includes/tab-settings.php:664 admin/includes/tab-settings.php:725
 
 
 
 
 
 
 
 
1075
  msgid "Force to load WP core"
1076
  msgstr "WPコアの読み込みを強制"
1077
 
1078
- #: admin/includes/tab-settings.php:669
1079
  msgid "Plugins area"
1080
  msgstr "プラグイン領域"
1081
 
1082
- #: admin/includes/tab-settings.php:730
1083
  msgid "Themes area"
1084
  msgstr "テーマ領域"
1085
 
1086
- #: admin/includes/tab-settings.php:765
1087
  msgid "Front-end target settings"
1088
  msgstr "フロントエンドの設定"
1089
 
1090
- #: admin/includes/tab-settings.php:789
1091
  msgid "Follow &#8220;Validation rule settings&#8221;"
1092
  msgstr "[検証ルールの設定]に従う"
1093
 
1094
- #: admin/includes/tab-settings.php:851
1095
  #, php-format
1096
  msgid ""
1097
  "<dfn title=\"You can configure a different response code from the Back-end. "
@@ -1102,12 +1105,12 @@ msgstr ""
1102
  "フィリエイト・プログラムに対する違反を防止するのに役立つでしょう。\">レスポン"
1103
  "ス・コード</dfn> %s"
1104
 
1105
- #: admin/includes/tab-settings.php:917
1106
  msgid ""
1107
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
1108
  msgstr "<dfn title=\"特定のページを遮断対象に指定します。\">ページ</dfn>"
1109
 
1110
- #: admin/includes/tab-settings.php:929
1111
  msgid ""
1112
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
1113
  "target.\">Post type</dfn>"
@@ -1115,7 +1118,7 @@ msgstr ""
1115
  "<dfn title=\"特定の投稿タイプのシングルページを遮断対象に指定します。\">投稿タ"
1116
  "イプ</dfn>"
1117
 
1118
- #: admin/includes/tab-settings.php:941
1119
  msgid ""
1120
  "<dfn title=\"Specify the individual category on a single page or archive "
1121
  "page as a blocking target.\">Category</dfn>"
@@ -1123,7 +1126,7 @@ msgstr ""
1123
  "<dfn title=\"特定のカテゴリを含むシングルページかアーカイブページを遮断対象に"
1124
  "指定します。\">カテゴリ</dfn>"
1125
 
1126
- #: admin/includes/tab-settings.php:953
1127
  msgid ""
1128
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1129
  "a blocking target.\">Tag</dfn>"
@@ -1131,23 +1134,23 @@ msgstr ""
1131
  "<dfn title=\"特定のタグを含むシングルページかアーカイブページを遮断対象に指定"
1132
  "します。\">タグ</dfn>"
1133
 
1134
- #: admin/includes/tab-settings.php:968
1135
  msgid "Specify the validation target on front-end."
1136
  msgstr "フロントエンドの検証対象を設定します。"
1137
 
1138
- #: admin/includes/tab-settings.php:968
1139
  msgid "Validation target"
1140
  msgstr "検証対象"
1141
 
1142
- #: admin/includes/tab-settings.php:979
1143
  msgid "All requests"
1144
  msgstr "全てのリクエスト"
1145
 
1146
- #: admin/includes/tab-settings.php:980
1147
  msgid "Specify the targets"
1148
  msgstr "ターゲットを指定"
1149
 
1150
- #: admin/includes/tab-settings.php:983
1151
  msgid ""
1152
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1153
  "wp&#8221; action hook. It means that this feature would not be compatible "
@@ -1156,18 +1159,18 @@ msgstr ""
1156
  "[検証のタイミング]が &#8220;wp&#8221; アクション・フックまで遅延されます。こ"
1157
  "れにより、ページ・キャッシュとの互換性がなくなることに注意してください。"
1158
 
1159
- #: admin/includes/tab-settings.php:990
1160
  msgid ""
1161
  "<dfn title=\"Specify the frequency of request for certain period of time."
1162
  "\">Blocking condition</dfn>"
1163
  msgstr "<dfn title=\"特定期間のリクエスト頻度を設定します。\">遮断条件</dfn>"
1164
 
1165
- #: admin/includes/tab-settings.php:992
1166
  #, php-format
1167
  msgid "More than %1$s page view (PV) in %2$s seconds"
1168
  msgstr "%2$s 秒間に %1$s を超えるページビュー (PV)"
1169
 
1170
- #: admin/includes/tab-settings.php:1001
1171
  msgid ""
1172
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1173
  "behaved bots and crawlers</dfn>"
@@ -1175,7 +1178,7 @@ msgstr ""
1175
  "<dfn title=\"リクエスト頻度を検証します。\">行儀の悪いボットやクローラーを遮断"
1176
  "</dfn>"
1177
 
1178
- #: admin/includes/tab-settings.php:1019
1179
  msgid ""
1180
  "A part of user agent string and a qualification connected with a separator "
1181
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
@@ -1189,71 +1192,92 @@ msgstr ""
1189
  "コード、または&nbsp;IPアドレス(CIDR記法)が使えます。また否定を表す記号「!」"
1190
  "を「条件」の直前に配置する事が出来ます。"
1191
 
1192
- #: admin/includes/tab-settings.php:1019
1193
  msgid "UA string and qualification"
1194
- msgstr "ユーザーエージェント(UA)文字列と条件"
1195
 
1196
- #: admin/includes/tab-settings.php:1038
1197
  msgid "Specify the name of actions as exception that is invariably blocked."
1198
  msgstr "常に遮断されるアクション名を例外として指定します。"
1199
 
1200
- #: admin/includes/tab-settings.php:1038
1201
  msgid "Excluded actions"
1202
  msgstr "除外するアクション"
1203
 
1204
- #: admin/includes/tab-settings.php:1057
1205
  msgid ""
1206
  "It enables to verify the host by reverse DNS lookup which would spend some "
1207
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
1208
  "HOST=&hellip;&#8221;in &#8220;UA string and qualification&#8221; will always "
1209
  "return &#8220;true&#8221;."
1210
  msgstr ""
1211
- "DNS&thinsp;逆引きによりホストを検証します(幾らかのサーバー・リソースを消費し"
1212
- "ます)。無効にした場合、[ユーザーエージェント文字列と条件]中の「HOST」、"
1213
  "「HOST=&hellip;」は常に真となります。"
1214
 
1215
- #: admin/includes/tab-settings.php:1057
1216
  msgid "DNS reverse lookup"
1217
- msgstr "DNS&thinsp;逆引き"
1218
 
1219
- #: admin/includes/tab-settings.php:1074
1220
  msgid ""
1221
  "It enables to simulate validation without deployment. The results can be "
1222
- "found at &#8220;Public facing pages&#8221; in Logs."
1223
  msgstr ""
1224
  "機能を有効にする事なくリクエストの検証をシミュレートします。結果はログで確認す"
1225
  "る事が出来ます。"
1226
 
1227
- #: admin/includes/tab-settings.php:1074
1228
  msgid "Simulation mode"
1229
  msgstr "シミュレーション・モード"
1230
 
1231
- #: admin/includes/tab-settings.php:1092
1232
  msgid "Privacy and record settings"
1233
  msgstr "プライバシーと記録の設定"
1234
 
1235
- #: admin/includes/tab-settings.php:1117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1236
  msgid ""
1237
  "<dfn title=\"This option enables to record the IP address, country code and "
1238
  "failure counter of login attempts into the cache on database to minimize the "
1239
- "impact on site speed.\">Record &#8220;IP address cache&#8221;</dfn>"
1240
  msgstr ""
1241
  "<dfn title=\"このオプションは、IPアドレス、国コード、ログイン失敗回数等の"
1242
  "キャッシュへの記録を有効にし、サイト速度への影響を最小化します。\">IPアドレス"
1243
  "をキャッシュに記録</dfn>"
1244
 
1245
- #: admin/includes/tab-settings.php:1133
1246
- #, php-format
1247
  msgid ""
1248
- "<dfn title=\"If user authentication fails consecutively %d times, subsequent "
1249
- "login will also be prohibited for this and garbage collection period."
1250
- "\">Expiration time [sec] for &#8220;IP address cache&#8221;</dfn>"
 
1251
  msgstr ""
1252
  "<dfn title=\"ユーザ認証が連続%d回失敗した場合も、以降のログインがこの期間だけ"
1253
- "(ガベージコレクション周期を含む)禁止されます。\">キャッシュの有効時間 "
1254
- "[sec]</dfn>"
1255
 
1256
- #: admin/includes/tab-settings.php:1149
1257
  msgid ""
1258
  "<dfn title=\"This option enables to record the validation logs including IP "
1259
  "addresses.\">Record &#8220;Logs&#8221;</dfn>"
@@ -1261,52 +1285,52 @@ msgstr ""
1261
  "<dfn title=\"このオプションは、IPアドレスを含む検証ログの記録を有効にしま"
1262
  "す。\">検証のログを記録</dfn>"
1263
 
1264
- #: admin/includes/tab-settings.php:1161
1265
  msgid "When blocked"
1266
  msgstr "遮断時に記録"
1267
 
1268
- #: admin/includes/tab-settings.php:1162
1269
  msgid "When passed"
1270
  msgstr "通過時に記録"
1271
 
1272
- #: admin/includes/tab-settings.php:1163
1273
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1274
  msgstr "遮断時または遮断対象国の通過時に記録"
1275
 
1276
- #: admin/includes/tab-settings.php:1164
1277
  msgid "Unauthenticated visitor"
1278
  msgstr "未認証の訪問者を記録"
1279
 
1280
- #: admin/includes/tab-settings.php:1165
1281
  msgid "Authenticated user"
1282
  msgstr "認証済のユーザーを記録"
1283
 
1284
- #: admin/includes/tab-settings.php:1166
1285
  msgid "All the validation"
1286
  msgstr "すべての検証を記録"
1287
 
1288
- #: admin/includes/tab-settings.php:1174
 
1289
  msgid ""
1290
- "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST keys to be "
1291
- "recorded with their values in &#8220;Logs&#8221;</dfn>"
1292
  msgstr ""
1293
- "<dfn title=\"例)action, comment, log, pwd, FILES\">ログに記録する際に内容を展"
1294
- "開する$_POSTのキー</dfn>"
1295
 
1296
- #: admin/includes/tab-settings.php:1191
1297
- #, php-format
1298
  msgid ""
1299
- "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1300
- "\">Expiration time [sec] for &#8220;Logs&#8221;</dfn>"
1301
  msgstr ""
1302
- "<dfn title=\"ログの最大エントリー数は %d に制限されます。\">ログの有効時間 "
1303
- "[sec]</dfn>"
1304
 
1305
- #: admin/includes/tab-settings.php:1209
1306
  msgid "Maximum entries of &#8220;Logs&#8221;"
1307
  msgstr "記録するログの最大エントリ数"
1308
 
1309
- #: admin/includes/tab-settings.php:1226
1310
  msgid ""
1311
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1312
  "&#8220;Live update&#8221;</dfn>"
@@ -1314,19 +1338,19 @@ msgstr ""
1314
  "<dfn title=\"SQLiteデータベース・ソースを選択します。\">ライブアップデート用"
1315
  "SQLiteデータベース・ソースの選択</dfn>"
1316
 
1317
- #: admin/includes/tab-settings.php:1238
1318
  msgid "Ordinary file"
1319
  msgstr "通常のファイル"
1320
 
1321
- #: admin/includes/tab-settings.php:1239
1322
  msgid "In-Memory"
1323
  msgstr "イン・メモリ"
1324
 
1325
- #: admin/includes/tab-settings.php:1242
1326
  msgid "PDO_SQLITE driver not available"
1327
  msgstr "PDO_SQLITEドライバが利用出来ません。"
1328
 
1329
- #: admin/includes/tab-settings.php:1243
1330
  msgid ""
1331
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1332
  "without conflict with other plugins."
@@ -1334,7 +1358,7 @@ msgstr ""
1334
  "数十ミリ秒のオーバーヘッドが生じますが、他のプラグインと競合することなく、安全"
1335
  "に使用できます。"
1336
 
1337
- #: admin/includes/tab-settings.php:1244
1338
  msgid ""
1339
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1340
  "with other plugins using this method."
@@ -1342,15 +1366,15 @@ msgstr ""
1342
  "数ミリ秒のオーバーヘッドが生じます。同手法を用いている他のプラグインと競合する"
1343
  "可能性があります。"
1344
 
1345
- #: admin/includes/tab-settings.php:1253
1346
  msgid "Reset database source of &#8220;Live update&#8221;"
1347
  msgstr "ライブアップデートのデータソースをリセットする"
1348
 
1349
- #: admin/includes/tab-settings.php:1261
1350
  msgid "Reset now"
1351
  msgstr "今すぐリセット"
1352
 
1353
- #: admin/includes/tab-settings.php:1269 admin/includes/tab-settings.php:1442
1354
  msgid ""
1355
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1356
  "once and activate again."
@@ -1358,58 +1382,45 @@ msgstr ""
1358
  "WP-Cronのタスクが見つかりません。 一旦このプラグインを停止させた後、再度、有効"
1359
  "化してみてください。"
1360
 
1361
- #: admin/includes/tab-settings.php:1275
1362
  msgid ""
1363
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1364
- "expired entries in ip address cache and logs.\">Cleanup interval [sec] for "
1365
- "&#8220;IP address cache&#8221; and &#8220;Logs&#8221;</dfn>"
1366
  msgstr ""
1367
- "<dfn title=\"このオプションは、有効期限の切れたエントリーをIPアドレスのキャッ"
1368
- "シュとログから削除するWP-Cronイベントの起動周期を設定します。\">ガベージコレク"
1369
- "ション周期 [秒]</dfn>"
1370
 
1371
- #: admin/includes/tab-settings.php:1284 admin/includes/tab-settings.php:1459
1372
  #, php-format
1373
  msgid "Next schedule: %s"
1374
  msgstr "次回日時:%s"
1375
 
1376
- #: admin/includes/tab-settings.php:1292
1377
- msgid ""
1378
- "<dfn title=\"This option enables to record the number blocked countries and "
1379
- "the number of blocked requests per day.\">Record &#8220;Statistics&#8221;</"
1380
- "dfn>"
1381
- msgstr ""
1382
- "<dfn title=\"このオプションは、国別遮断数や1日あたりの遮断数など、統計の記録を"
1383
- "有効にします。\">検証の統計を記録</dfn>"
1384
-
1385
- #: admin/includes/tab-settings.php:1309
1386
- msgid "Maximum period for &#8220;Statistics&#8221; [day]"
1387
- msgstr "記録する統計の最大期間(日)"
1388
-
1389
- #: admin/includes/tab-settings.php:1327
1390
  msgid "Remove all settings and records at uninstallation"
1391
  msgstr "アンインストール時に設定と記録を全て削除"
1392
 
1393
- #: admin/includes/tab-settings.php:1344
1394
  msgid "Geolocation API settings"
1395
  msgstr "位置情報APIの設定"
1396
 
1397
- #: admin/includes/tab-settings.php:1365
1398
  msgid ""
1399
- "<dfn title=\"IP address cache and local database are scanned at the top "
1400
  "priority.\">API selection and key settings</dfn>"
1401
  msgstr ""
1402
  "<dfn title=\"IPアドレスのキャッシュとローカルのデータベースが最優先で検索され"
1403
  "ます。\">APIの選択とキーの設定</dfn>"
1404
 
1405
- #: admin/includes/tab-settings.php:1385
1406
  msgid "Timeout for network API [sec]"
1407
  msgstr "ネットワークAPIのタイムアウト[秒]"
1408
 
1409
- #: admin/includes/tab-settings.php:1403
1410
  #, php-format
1411
  msgid ""
1412
- "Can not find geolocation API libraries in <code>%s</code>. It seems to have "
1413
  "failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
1414
  "tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
1415
  "contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
@@ -1431,60 +1442,60 @@ msgstr ""
1431
  "Geo Block\">FAQ</a> を参照し、適切な書き込み権限と共に <code>ip-geo-api</"
1432
  "code> をインストールしてください。"
1433
 
1434
- #: admin/includes/tab-settings.php:1410
1435
  msgid "Local database settings"
1436
  msgstr "ローカル・データベースの設定"
1437
 
1438
- #: admin/includes/tab-settings.php:1424
1439
  msgid "database"
1440
  msgstr "ファイル"
1441
 
1442
- #: admin/includes/tab-settings.php:1425 classes/class-ip-geo-block-cron.php:419
1443
  #, php-format
1444
  msgid "Last update: %s"
1445
  msgstr "最終更新:%s"
1446
 
1447
- #: admin/includes/tab-settings.php:1448
1448
  msgid "Auto updating (once a month)"
1449
  msgstr "自動更新(月1回)"
1450
 
1451
- #: admin/includes/tab-settings.php:1466
1452
  msgid "Download database"
1453
  msgstr "データベースのダウンロード"
1454
 
1455
- #: admin/includes/tab-settings.php:1474
1456
  msgid "Download now"
1457
  msgstr "今すぐダウンロード"
1458
 
1459
- #: admin/includes/tab-settings.php:1485
1460
  msgid "Submission settings"
1461
  msgstr "投稿時の設定"
1462
 
1463
- #: admin/includes/tab-settings.php:1497
1464
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
1465
  msgstr "全体が&lt;p&gt;タグで囲われます。使用可能タグ:"
1466
 
1467
- #: admin/includes/tab-settings.php:1497
1468
  msgid "Message on comment form"
1469
  msgstr "投稿フォーム上のメッセージ"
1470
 
1471
- #: admin/includes/tab-settings.php:1509
1472
  msgid "None"
1473
  msgstr "なし"
1474
 
1475
- #: admin/includes/tab-settings.php:1510
1476
  msgid "Top"
1477
  msgstr "上部"
1478
 
1479
- #: admin/includes/tab-settings.php:1511
1480
  msgid "Bottom"
1481
  msgstr "下部"
1482
 
1483
- #: admin/includes/tab-settings.php:1522
1484
  msgid "Plugin settings"
1485
  msgstr "プラグインの設定"
1486
 
1487
- #: admin/includes/tab-settings.php:1535
1488
  msgid ""
1489
  "<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
1490
  "settings</dfn>"
@@ -1492,7 +1503,7 @@ msgstr ""
1492
  "<dfn title=\"全ての設定をネットワーク全体で同期させます。\">ネットワーク内で設"
1493
  "定を同期</dfn>"
1494
 
1495
- #: admin/includes/tab-settings.php:1555
1496
  msgid ""
1497
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
1498
  "dfn>"
@@ -1500,45 +1511,37 @@ msgstr ""
1500
  "<dfn title=\"Google Maps JavaScript API に有効なキー\">Google Maps API キー</"
1501
  "dfn>"
1502
 
1503
- #: admin/includes/tab-settings.php:1569
1504
- msgid ""
1505
- "You need to click the &#8220;Save Changes&#8221; button for imported "
1506
- "settings to take effect."
1507
- msgstr ""
1508
- "インポートされた設定を有効にするには、[変更を保存]ボタンをクリックする必要が"
1509
- "あります。"
1510
-
1511
- #: admin/includes/tab-settings.php:1575
1512
  msgid "Export / Import settings"
1513
  msgstr "設定のエクスポート、インポート"
1514
 
1515
- #: admin/includes/tab-settings.php:1582
1516
  msgid "Export settings"
1517
  msgstr "エクスポート"
1518
 
1519
- #: admin/includes/tab-settings.php:1583
1520
  msgid "Import from the local file"
1521
  msgstr "ローカル・ファイルからインポートします"
1522
 
1523
- #: admin/includes/tab-settings.php:1583
1524
  msgid "Import settings"
1525
  msgstr "インポート"
1526
 
1527
- #: admin/includes/tab-settings.php:1592
1528
  msgid "Import pre-defined settings"
1529
  msgstr "プリセットのインポート"
1530
 
1531
- #: admin/includes/tab-settings.php:1599
1532
  msgid ""
1533
  "Import the default settings to revert to the &#8220;Right after "
1534
  "installing&#8221; state"
1535
  msgstr "インストール直後の状態に戻すための設定値をインポートします"
1536
 
1537
- #: admin/includes/tab-settings.php:1599
1538
  msgid "Default settings"
1539
  msgstr "初期設定"
1540
 
1541
- #: admin/includes/tab-settings.php:1600
1542
  msgid ""
1543
  "Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
1544
  "for the &#8220;Back-end target settings&#8221;"
@@ -1546,33 +1549,34 @@ msgstr ""
1546
  "「ゼロデイ攻撃の遮断」など、主に[バックエンドの設定]の推奨設定をインポートし"
1547
  "ます。"
1548
 
1549
- #: admin/includes/tab-settings.php:1600
1550
  msgid "Best for Back-end"
1551
  msgstr "バックエンドの推奨設定"
1552
 
1553
- #: admin/includes/tab-settings.php:1610
1554
  msgid "Delete DB tables for this plugin"
1555
  msgstr "このプラグイン用データベース・テーブルの削除"
1556
 
1557
- #: admin/includes/tab-settings.php:1618
1558
  msgid "Delete now"
1559
  msgstr "今すぐ削除"
1560
 
1561
- #: admin/includes/tab-settings.php:1626
1562
  msgid "Create DB tables for this plugin"
1563
  msgstr "このプラグイン用データベース・テーブルの作成"
1564
 
1565
- #: admin/includes/tab-settings.php:1634
1566
  msgid "Create now"
1567
  msgstr "今すぐ作成"
1568
 
1569
- #: admin/includes/tab-settings.php:1644
1570
  msgid ""
1571
- "<dfn title=\"When an unexpected blocking has occurred, please press the "
1572
- "button to find the blocked request in the dumped information which may help "
1573
- "to solve the issue.\">Diagnostic information</dfn><br />[ <a rel=\"noreferrer"
1574
- "\" href=\"https://wordpress.org/support/plugin/ip-geo-block\" title="
1575
- "\"WordPress &#8250; Support &raquo; IP Geo Block\">support forum</a> ]"
 
1576
  msgstr ""
1577
  "<dfn title=\"予期しない遮断が発生した場合は、ダンプされた診断情報を元にリクエ"
1578
  "ストの遮断理由を推定し、問題解決に役立ててください。\">診断情報</dfn><br /"
@@ -1580,15 +1584,15 @@ msgstr ""
1580
  "block\" title=\"WordPress &#8250; Support &raquo; IP Geo Block\">サポート・"
1581
  "フォーラム</a> ]"
1582
 
1583
- #: admin/includes/tab-settings.php:1651
1584
  msgid "Please copy &amp; paste when submitting your issue to support forum."
1585
  msgstr "フォーラムに問題を投稿する際、コピーして張り付けてください。"
1586
 
1587
- #: admin/includes/tab-settings.php:1651
1588
  msgid "Show information"
1589
  msgstr "情報を表示"
1590
 
1591
- #: admin/includes/tab-settings.php:1667
1592
  msgid ""
1593
  "To enhance the protection ability, please refer to &#8220;<a rel=\"noreferrer"
1594
  "\" href=\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-"
@@ -1598,9 +1602,9 @@ msgstr ""
1598
  "防御性能をより高めるための設定については、&#8220;<a rel=\"noreferrer\" href="
1599
  "\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-settings.html"
1600
  "\" title=\"The best practice for target settings | IP Geo Block\">The best "
1601
- "practice fortarget settings</a>&#8220;&thinsp;を参照してください。"
1602
 
1603
- #: admin/includes/tab-settings.php:1668
1604
  msgid ""
1605
  "If you have any troubles with these, please check FAQ at <a rel=\"noreferrer"
1606
  "\" href=\"https://wordpress.org/plugins/ip-geo-block/faq/\" title=\"IP Geo "
@@ -1614,31 +1618,32 @@ msgstr ""
1614
  "com/codex/#faq\" title=\"Codex | IP Geo Block\">Codex</a> の FAQ を参照してく"
1615
  "ださい。"
1616
 
1617
- #: admin/includes/tab-settings.php:1675
1618
  msgid ""
1619
- "While Geolite2&thinsp;/&thinsp;Maxmind and IP2Location will fetch the local "
1620
- "databases, others will pass an IP address to the 3rd parties' API via HTTP."
1621
  msgstr ""
1622
  "MaxmindとIP2Locationはローカルのデータベースを検索しますが、他はHTTPを介して外"
1623
  "部のAPIにIPアドレスを渡します。"
1624
 
1625
- #: admin/includes/tab-settings.php:1676
1626
  msgid ""
1627
- "Please select the appropriate APIs to fit the privacy law&thinsp;/&thinsp;"
1628
- "regulation in your country&thinsp;/&thinsp;region."
1629
- msgstr "自国のプライバシー関連法規に合わせ、適切なAPIを選択して下さい。"
 
 
1630
 
1631
- #: admin/includes/tab-settings.php:1685
1632
  #, php-format
1633
  msgid ""
1634
  "Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
1635
  "2.0.0+%s."
1636
  msgstr ""
1637
- "Maxmind GeoLite2&thinsp;データベースと&thinsp;API&thinsp;には、PHP&thinsp;バー"
1638
- "ジョン&thinsp;5.4.0&thinsp;以上と&thinsp;%sPECL phar 2.0.0&thinsp;以上%sが必要"
1639
- "です。"
1640
 
1641
- #: admin/includes/tab-settings.php:1693
1642
  msgid ""
1643
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1644
  "ipgeoblock.com/codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block"
@@ -1650,7 +1655,7 @@ msgstr ""
1650
  "end\" title=\"Codex | IP Geo Block\">Blocking on front-end</a>&#8221; を参照し"
1651
  "てください。"
1652
 
1653
- #: admin/includes/tab-settings.php:1694
1654
  msgid ""
1655
  "If you find any issues or have something to suggest, please feel free to "
1656
  "open an issue at <a rel=\"noreferrer\" href=\"https://wordpress.org/support/"
@@ -1662,7 +1667,7 @@ msgstr ""
1662
  "&#8250; Support &raquo; IP Geo Block\">サポートフォーラム</a> に投稿をお願いし"
1663
  "ます。"
1664
 
1665
- #: admin/includes/tab-settings.php:1701
1666
  msgid ""
1667
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1668
  "ipgeoblock.com/codex/record-settings-and-logs.html\" title=\"Codex | IP Geo "
@@ -1717,7 +1722,7 @@ msgid "Statistics in Logs"
1717
  msgstr "ログの統計"
1718
 
1719
  #: admin/includes/tab-statistics.php:217
1720
- msgid "Statistics in IP address cache"
1721
  msgstr "キャッシュの統計"
1722
 
1723
  #: admin/includes/tab-statistics.php:230
@@ -1765,8 +1770,8 @@ msgstr "検証の統計を記録し分析するためには、適切な条件を
1765
 
1766
  #: admin/includes/tab-statistics.php:431
1767
  #, php-format
1768
- msgid "[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled."
1769
- msgstr "[ %sIPアドレスをキャッシュに記録%s]が無効です。"
1770
 
1771
  #: admin/includes/tab-statistics.php:432
1772
  msgid "Please set the proper condition to record IP address in cache."
@@ -1775,11 +1780,11 @@ msgstr ""
1775
 
1776
  #: classes/class-ip-geo-block-apis.php:661
1777
  msgid ""
1778
- "You need to select at least one IP geolocation service. Otherwise "
1779
- "<strong>you'll be blocked</strong> after the cache expires."
1780
  msgstr ""
1781
- "少なくとも1つ以上の位置情報サービスを選択して下さい。未選択の場合、キャッシュ"
1782
- "の有効期限切れと共にロックアウトされます。"
1783
 
1784
  #: classes/class-ip-geo-block-cron.php:222
1785
  #, php-format
@@ -1822,7 +1827,7 @@ msgstr ""
1822
  "php#WordPress_Upgrade_Constants\" title=\"Editing wp-config.php &laquo; "
1823
  "WordPress Codex\">このドキュメント</a>を参照してください。"
1824
 
1825
- #: classes/class-ip-geo-block-logs.php:138
1826
  #, php-format
1827
  msgid ""
1828
  "Creating a DB table %s had failed. Once de-activate this plugin, and then "
@@ -1831,7 +1836,7 @@ msgstr ""
1831
  "%s 用のテーブルが作成されていません。一旦このプラグインを無効化し、再度有効化"
1832
  "して下さい。"
1833
 
1834
- #: classes/class-ip-geo-block-logs.php:143
1835
  #, php-format
1836
  msgid ""
1837
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
@@ -1840,7 +1845,7 @@ msgstr ""
1840
  "%s 用のカラム型が一致しません。一旦このプラグインを無効化し、再度有効化して下"
1841
  "さい。"
1842
 
1843
- #: classes/class-ip-geo-block.php:415
1844
  msgid "Dashboard"
1845
  msgstr "ダッシュボード"
1846
 
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: IP Geo Block 3.0.13\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2018-08-08 20:16-0700\n"
8
+ "PO-Revision-Date: 2018-08-08 20:19-0700\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.0.9\n"
14
  "X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
15
  "esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
16
  "X-Poedit-Basepath: ..\n"
28
  "自国以外から投稿されるスパム、ログインフォーム、さらにゼロデイ攻撃を含む管理領"
29
  "域への悪意あるアクセスからサイトを守ります。"
30
 
31
+ #: admin/class-ip-geo-block-admin.php:286
32
  msgid "Import settings ?"
33
  msgstr "設定をインポートしますか?"
34
 
35
+ #: admin/class-ip-geo-block-admin.php:287
36
  msgid "Create table ?"
37
  msgstr "テーブルを作成しますか?"
38
 
39
+ #: admin/class-ip-geo-block-admin.php:288
40
  msgid "Delete table ?"
41
  msgstr "テーブルを削除しますか?"
42
 
43
+ #: admin/class-ip-geo-block-admin.php:289
44
  msgid "Clear statistics ?"
45
  msgstr "統計をクリアしますか?"
46
 
47
+ #: admin/class-ip-geo-block-admin.php:290
48
  msgid "Clear cache ?"
49
  msgstr "キャッシュをクリアしますか?"
50
 
51
+ #: admin/class-ip-geo-block-admin.php:291
52
  msgid "Clear logs ?"
53
  msgstr "ログをクリアしますか?"
54
 
55
+ #: admin/class-ip-geo-block-admin.php:292
56
  msgid "ajax for logged-in user"
57
  msgstr "認証済ユーザー用 ajax"
58
 
59
+ #: admin/class-ip-geo-block-admin.php:293
60
  msgid "ajax for non logged-in user"
61
  msgstr "未認証ユーザー用 ajax"
62
 
63
+ #: admin/class-ip-geo-block-admin.php:294
64
  #, php-format
65
  msgid "[Found: %d]"
66
  msgstr "[見つかった数:%d]"
67
 
68
+ #: admin/class-ip-geo-block-admin.php:295
69
  #, php-format
70
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
71
  msgstr "ログから `%s` を検索し、検証して下さい。"
72
 
73
+ #: admin/class-ip-geo-block-admin.php:296
74
  msgid "This feature is available with HTML5 compliant browsers."
75
  msgstr "HTML5準拠のブラウザでのみ機能します。"
76
 
77
+ #: admin/class-ip-geo-block-admin.php:297
78
  msgid "The selected row cannot be found in the visible area."
79
  msgstr "可視領域に選択された行が見つかりません。"
80
 
81
+ #: admin/class-ip-geo-block-admin.php:298
82
+ #: admin/class-ip-geo-block-admin.php:1514
83
  #, php-format
84
  msgid "An error occurred while executing the ajax command `%s`."
85
  msgstr "Ajaxコマンド `%s` の実行中にエラーが発生しました。"
86
 
87
+ #: admin/class-ip-geo-block-admin.php:302
88
  msgid "No data available in table"
89
  msgstr "テーブルにデータがありません"
90
 
91
+ #: admin/class-ip-geo-block-admin.php:303
92
  msgid "No matching records found"
93
  msgstr "一致するレコードがありません"
94
 
95
+ #: admin/class-ip-geo-block-admin.php:304
96
  #: admin/includes/class-admin-ajax.php:111
97
+ #: admin/includes/class-admin-ajax.php:242
98
  #: admin/includes/tab-geolocation.php:70
99
  msgid "IP address"
100
  msgstr "IPアドレス"
101
 
102
+ #: admin/class-ip-geo-block-admin.php:305
103
  #: admin/includes/class-admin-ajax.php:112
104
+ #: admin/includes/class-admin-ajax.php:243
105
  msgid "Code"
106
  msgstr "国"
107
 
108
+ #: admin/class-ip-geo-block-admin.php:306
109
  #: admin/includes/class-admin-ajax.php:113
110
+ #: admin/includes/class-admin-ajax.php:244
111
  msgid "ASN"
112
  msgstr "AS番号"
113
 
114
+ #: admin/class-ip-geo-block-admin.php:307
115
+ #: admin/includes/class-admin-ajax.php:245
116
  msgid "Host name"
117
  msgstr "ホスト名"
118
 
119
+ #: admin/class-ip-geo-block-admin.php:308
120
  #: admin/includes/class-admin-ajax.php:114
121
+ #: admin/includes/class-admin-ajax.php:246
122
  msgid "Target"
123
  msgstr "検証対象"
124
 
125
+ #: admin/class-ip-geo-block-admin.php:309
126
+ #: admin/includes/class-admin-ajax.php:247
127
  msgid "Failure / Total"
128
  msgstr "ログイン失敗/総計"
129
 
130
+ #: admin/class-ip-geo-block-admin.php:310
131
+ #: admin/includes/class-admin-ajax.php:248
132
  msgid "Elapsed[sec]"
133
  msgstr "経過 [秒]"
134
 
135
+ #: admin/class-ip-geo-block-admin.php:311
136
  #: admin/includes/class-admin-ajax.php:110
137
  msgid "Time"
138
  msgstr "日時"
139
 
140
+ #: admin/class-ip-geo-block-admin.php:312
141
  #: admin/includes/class-admin-ajax.php:115
142
  msgid "Result"
143
  msgstr "検証結果"
144
 
145
+ #: admin/class-ip-geo-block-admin.php:313
146
  #: admin/includes/class-admin-ajax.php:116
147
  msgid "Request"
148
  msgstr "リクエスト"
149
 
150
+ #: admin/class-ip-geo-block-admin.php:314
151
  #: admin/includes/class-admin-ajax.php:117
152
  msgid "User agent"
153
  msgstr "ユーザー・エージェント"
154
 
155
+ #: admin/class-ip-geo-block-admin.php:315
156
  #: admin/includes/class-admin-ajax.php:118
157
  msgid "HTTP headers"
158
  msgstr "HTTP ヘッダー"
159
 
160
+ #: admin/class-ip-geo-block-admin.php:316
161
  #: admin/includes/class-admin-ajax.php:119
162
  msgid "$_POST data"
163
  msgstr "$_POST データ"
164
 
165
+ #: admin/class-ip-geo-block-admin.php:342
166
  msgid "Contribute on GitHub"
167
  msgstr "開発に参加"
168
 
169
+ #: admin/class-ip-geo-block-admin.php:356
170
+ #: admin/class-ip-geo-block-admin.php:475
171
+ #: admin/class-ip-geo-block-admin.php:692
172
  msgid "Settings"
173
  msgstr "設定"
174
 
175
+ #: admin/class-ip-geo-block-admin.php:453
176
+ #: admin/class-ip-geo-block-admin.php:454
177
+ #: admin/class-ip-geo-block-admin.php:464
178
+ #: admin/class-ip-geo-block-admin.php:465
179
+ #: admin/class-ip-geo-block-admin.php:474
180
+ #: admin/class-ip-geo-block-admin.php:483
181
  msgid "IP Geo Block"
182
  msgstr "IP Geo Block"
183
 
184
+ #: admin/class-ip-geo-block-admin.php:484
185
+ #: admin/class-ip-geo-block-admin.php:697
186
  msgid "Site List"
187
  msgstr "サイト一覧"
188
 
189
+ #: admin/class-ip-geo-block-admin.php:513
190
  msgid "You need WordPress 3.7+."
191
+ msgstr "WordPress 3.7 以上が必要です。"
192
 
193
+ #: admin/class-ip-geo-block-admin.php:519
194
  #, php-format
195
  msgid ""
196
  "Now downloading geolocation databases in background. After a little while, "
201
  "た後、あなたの国コードと[<strong>マッチング規則</strong>]を[<a href=\"%s\">"
202
  "検証ルールの設定</a>]で確認して下さい。"
203
 
204
+ #: admin/class-ip-geo-block-admin.php:525
205
  #, php-format
206
  msgid ""
207
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
210
  "[<strong>マッチング規則</strong>]が正しく設定されていません。[<a href=\"%s"
211
  "\">検証ルールの設定</a>]を確認して下さい。"
212
 
213
+ #: admin/class-ip-geo-block-admin.php:534
214
  msgid "Local database and matching rule have been updated."
215
  msgstr "ローカル・データベースとマッチング規則を更新しました。"
216
 
217
+ #: admin/class-ip-geo-block-admin.php:545
218
  msgid ""
219
  "Once you logout, you will be unable to login again because the number of "
220
  "login attempts reaches the limit."
222
  "あなたのIPアドレスのログイン試行可能回数がリミットに達したため、ログアウトする"
223
  "と再びログインする事が出来なくなります。"
224
 
225
+ #: admin/class-ip-geo-block-admin.php:547
226
  #, php-format
227
  msgid ""
228
  "Please execute \"<strong>Clear cache</strong>\" on <a href=\"%s\">Statistics "
231
  "<a href=\"%s\">[統計]タブ</a>の[<strong>キャッシュのクリア</strong>]を実行"
232
  "し、ロックアウトを回避してください。"
233
 
234
+ #: admin/class-ip-geo-block-admin.php:557
235
  msgid ""
236
  "Once you logout, you will be unable to login again because your country code "
237
  "or IP address is in the blacklist."
239
  "あなたの国コードまたはIPアドレスがブラックリストに含まれているため、ログアウト"
240
  "すると再びログインする事が出来なくなります。"
241
 
242
+ #: admin/class-ip-geo-block-admin.php:558
243
  msgid ""
244
  "Once you logout, you will be unable to login again because your country code "
245
  "or IP address is not in the whitelist."
247
  "あなたの国コードまたはIPアドレスがホワイトリストに含まれていないため、ログアウ"
248
  "トすると再びログインする事が出来なくなります。"
249
 
250
+ #: admin/class-ip-geo-block-admin.php:562
251
  #, php-format
252
  msgid "Please check your &#8220;%sValidation rule settings%s&#8221;."
253
  msgstr "[%s検証ルールの設定%s]を確認して下さい。"
254
 
255
+ #: admin/class-ip-geo-block-admin.php:566
256
  #, php-format
257
  msgid ""
258
  "Please confirm your local geolocation databases at &#8220;%sLocal database "
262
  "[%sローカル・データベースの設定%s]で位置情報データベースを確認し、[%sキャッ"
263
  "シュの統計%s]でキャッシュされているあなたのIPアドレスを削除して下さい。"
264
 
265
+ #: admin/class-ip-geo-block-admin.php:587
266
  msgid ""
267
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
268
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
272
  "されていますが、<strong>IP Geo Allow</strong> と互換性がありません。「&#8220;"
273
  "init&#8221; アクション・フック」を選択してください。"
274
 
275
+ #: admin/class-ip-geo-block-admin.php:693
276
  msgid "Statistics"
277
  msgstr "統計"
278
 
279
+ #: admin/class-ip-geo-block-admin.php:694
280
  msgid "Logs"
281
  msgstr "ログ"
282
 
283
+ #: admin/class-ip-geo-block-admin.php:695
284
  msgid "Search"
285
  msgstr "検索"
286
 
287
+ #: admin/class-ip-geo-block-admin.php:696
288
  msgid "Attribution"
289
  msgstr "リンク"
290
 
291
+ #: admin/class-ip-geo-block-admin.php:713
292
+ #: admin/class-ip-geo-block-admin.php:730
293
  msgid "Network wide"
294
  msgstr "ネットワーク管理"
295
 
296
+ #: admin/class-ip-geo-block-admin.php:743
297
  msgid "Toggle all"
298
  msgstr "全てを開閉"
299
 
300
+ #: admin/class-ip-geo-block-admin.php:746
301
  msgid ""
302
+ "Independent of &#8220;Privacy and record settings&#8221;, you can see all "
303
  "the requests validated by this plugin in almost real time."
304
  msgstr ""
305
+ "[プライバシーと記録の設定]にかかわらず、このプラグインによる検証結果のすべて"
306
+ "を、ほぼリアルタイムに表示します。"
307
 
308
+ #: admin/class-ip-geo-block-admin.php:746 admin/includes/tab-accesslog.php:39
309
  msgid "Live update"
310
  msgstr "ライブアップデート"
311
 
312
+ #: admin/class-ip-geo-block-admin.php:750
313
  msgid "Open a new window on clicking the link in the chart."
314
  msgstr "チャート内のリンクをクリックすると、新しいウィンドウが開きます。"
315
 
316
+ #: admin/class-ip-geo-block-admin.php:750
317
  msgid "Open a new window"
318
  msgstr "別窓で開く"
319
 
320
+ #: admin/class-ip-geo-block-admin.php:773
321
  msgid "Thanks for providing these great services for free."
322
  msgstr "これらのすばらしいサービスの提供元に、敬意と感謝の意を表します!"
323
 
324
+ #: admin/class-ip-geo-block-admin.php:774
325
  msgid ""
326
  "(Most browsers will redirect you to each site <a href=\"http://www."
327
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
331
  "\" title=\"Referer Checker\">参照元を残さずにリンク先にリダイレクトできます</"
332
  "a>。)"
333
 
334
+ #: admin/class-ip-geo-block-admin.php:779
335
  msgid "Back to top"
336
  msgstr "トップに戻る"
337
 
338
+ #: admin/class-ip-geo-block-admin.php:871
339
  msgid "Enable"
340
  msgstr "有効"
341
 
342
+ #: admin/class-ip-geo-block-admin.php:886
343
  msgid "Select one"
344
  msgstr "何れかを選択"
345
 
346
+ #: admin/class-ip-geo-block-admin.php:1304
347
  msgid "You do not have sufficient permissions to access this page."
348
  msgstr "このページにアクセスするための十分な権限がありません。"
349
 
350
+ #: admin/class-ip-geo-block-admin.php:1331
351
  #: admin/includes/class-admin-rewrite.php:194
352
  #: classes/class-ip-geo-block-cron.php:217
353
  #: classes/class-ip-geo-block-cron.php:321
354
  #: classes/class-ip-geo-block-cron.php:395
355
+ #: classes/class-ip-geo-block-opts.php:459
356
  #, php-format
357
  msgid "Unable to write <code>%s</code>. Please check the permission."
358
  msgstr "<code>%s</code> に書き込めません。パーミッションをチェックして下さい。"
359
 
360
+ #: admin/class-ip-geo-block-admin.php:1361
361
  msgid "Settings saved."
362
  msgstr "設定を保存しました。"
363
 
370
  msgid "UNKNOWN"
371
  msgstr "不明"
372
 
373
+ #: admin/includes/class-admin-ajax.php:203
374
  #, php-format
375
  msgid "The user %s (user ID: %d) is in use."
376
  msgstr "ユーザー %s(ユーザーID:%d)が使用中です。"
377
 
378
+ #: admin/includes/class-admin-ajax.php:499
379
  #, php-format
380
  msgid ""
381
  "illegal format at %s. Please delete the corresponding line and try again."
397
  #: admin/includes/class-admin-rewrite.php:234
398
  #, php-format
399
  msgid "&#8220;auto_prepend_file&#8221; already defined in %s."
400
+ msgstr "%s で既に「auto_prepend_file」が設定されています。"
401
 
402
  #: admin/includes/tab-accesslog.php:19
403
  msgid "Validation logs"
404
  msgstr "検証のログ"
405
 
406
+ #: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:766
407
+ #: admin/includes/tab-settings.php:1425
408
  msgid "Help"
409
  msgstr "ヘルプ"
410
 
486
  msgid "Export logs"
487
  msgstr "ログをエクスポート"
488
 
489
+ #: admin/includes/tab-accesslog.php:153 admin/includes/tab-settings.php:1595
490
  #: admin/includes/tab-statistics.php:294
491
  msgid "Export to the local file"
492
  msgstr "ローカル・ファイルへエクスポートする"
516
  msgstr "IPアドレスの位置情報を検索"
517
 
518
  #: admin/includes/tab-geolocation.php:42
519
+ msgid "Geolocation API"
520
+ msgstr "位置情報API"
521
 
522
+ #: admin/includes/tab-geolocation.php:86 admin/includes/tab-settings.php:1099
523
  msgid ""
524
+ "<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
525
+ "Moreover, this option replaces the end of IP address with &#8220;***&#8221; "
526
+ "to make it anonymous.\">Anonymize IP address</dfn>"
 
527
  msgstr ""
528
+ "<dfn title=\"IPアドレスは、常に暗号化されてキャッシュとログに記録されます。こ"
529
+ "のオプションはさらに、IPアドレスの末尾を「***」に置き換えて匿名化します。\">IP"
530
+ "アドレスを匿名化する</dfn>"
 
531
 
532
+ #: admin/includes/tab-geolocation.php:102
533
+ msgid "Search geolocation"
534
  msgstr "位置情報の検索"
535
 
536
+ #: admin/includes/tab-geolocation.php:110
537
  msgid "Search now"
538
  msgstr "今すぐ検索"
539
 
623
  "country code</dfn>"
624
  msgstr ""
625
  "<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード"
626
+ "「XX」は、localhost を含むプライベート・アドレスに割り当てられ、また「ZZ」は不"
627
+ "明(位置情報データベースに未登録)を表します。どの国にもマッチさせないことが必"
628
+ "要な場合には、「YY」を指定してください。\">国コードのホワイトリスト</dfn>"
 
629
 
630
  #: admin/includes/tab-settings.php:111
631
  msgid ""
637
  "country code</dfn>"
638
  msgstr ""
639
  "<dfn title=\"空欄の場合、「国コードで遮断」はバイパスされます。特別なコード"
640
+ "「XX」は、localhost を含むプライベート・アドレスに割り当てられ、また「ZZ」は不"
641
+ "明(位置情報データベースに未登録)を表します。どの国にもマッチさせないことが必"
642
+ "要な場合には、「YY」を指定してください。\">国コードのブラックリスト</dfn>"
 
643
 
644
  #: admin/includes/tab-settings.php:115
645
  msgid "(comma separated)"
664
  "sample.\"><span></span></a>&#8221; button (if exists) attached to the "
665
  "following list to confirm that the blocked request is not malicious."
666
  msgstr ""
667
+ "[例外]に追加する前に、以下の候補に付いたボタン &#8220;<a class=\"ip-geo-"
668
+ "block-icon ip-geo-block-icon-alert\" title=\"このボタンは単なるサンプルで"
669
  "す。\"><span></span></a>&#8221;(もしあれば)をクリックし、遮断されたリクエス"
670
  "トに悪意のないことを確認して下さい。"
671
 
673
  msgid "Open CIDR calculator for IPv4 / IPv6."
674
  msgstr "IPv4/IPv6用CIDR変換プログラムを開きます。"
675
 
676
+ #: admin/includes/tab-settings.php:127 admin/includes/tab-settings.php:794
677
  msgid "Matching rule"
678
  msgstr "マッチング規則"
679
 
735
  "addresses</dfn>"
736
  msgstr ""
737
  "<dfn title=\"あなたのサーバーがプロキシー・サーバーやロード・バランサーの背後"
738
+ "に位置する場合は、クライアントのIPアドレスを抽出するため"
739
+ "「HTTP_X_FORWARDED_FOR」や「HTTP_X_REAL_IP」など、$_SERVER の適切なキーを指定"
740
+ "してください。\">IPアドレスを追加抽出する $_SERVER のキー</dfn>"
 
741
 
742
  #: admin/includes/tab-settings.php:270
743
  msgid ""
760
  msgid ""
761
  "<dfn title=\"Select allowed MIME type.\">Whitelist of allowed MIME type</dfn>"
762
  msgstr ""
763
+ "<dfn title=\"許可する MIME タイプを指定します。\">許可する MIME タイプのホワイ"
764
+ "トリスト</dfn>"
765
 
766
  #: admin/includes/tab-settings.php:295
767
  msgid ""
785
 
786
  #: admin/includes/tab-settings.php:299
787
  msgid ""
788
+ "( See &#8220;<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
789
  "Roles_and_Capabilities\" title=\"Roles and Capabilities &laquo; WordPress "
790
+ "Codex\">Roles and Capabilities</a>&#8221; )"
791
  msgstr ""
792
+
793
  "(&#8220;<a rel=\"noreferrer\" href=\"http://wpdocs.osdn.jp/%E3%83%A6%E3%83%BC"
794
  "%E3%82%B6%E3%83%BC%E3%81%AE%E7%A8%AE%E9%A1%9E%E3%81%A8%E6%A8%A9%E9%99%90\" "
795
  "title=\"ユーザーの種類と権限 - WordPress Codex 日本語版\">ユーザーの種類と権限"
810
  "意のあるアップロード防止</dfn>"
811
 
812
  #: admin/includes/tab-settings.php:318 admin/includes/tab-settings.php:499
813
+ #: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:1209
814
  msgid "Disable"
815
  msgstr "無効"
816
 
817
  #: admin/includes/tab-settings.php:319
818
  msgid "Verify file extension and MIME type"
819
+ msgstr "拡張子と MIME タイプを検証"
820
 
821
  #: admin/includes/tab-settings.php:320
822
  msgid "Verify file extension only"
823
  msgstr "ファイル拡張子のみを検証"
824
 
825
  #: admin/includes/tab-settings.php:330
826
+ msgid ""
827
+ "<dfn title=\"This is applied to &#8220;XML-RPC&#8221; and &#8220;Login "
828
+ "form&#8221;. Lockout period is defined as expiration time of &#8220;IP "
829
+ "address Cache&#8221; in &#8220;Privacy and record settings&#8221; section."
830
+ "\">Max number of failed login attempts per IP address</dfn>"
831
+ msgstr ""
832
+ "<dfn title=\"[XML-RPC]と[ログイン・フォーム]に適用されます。ロックアウト時"
833
+ "間は[プライバシーと記録の設定]&raquo;[IPアドレスのキャッシュ]&raquo;[有効"
834
+ "時間]で定義します。\">IPアドレス当たりのログイン試行可能回数</dfn>"
835
+
836
+ #: admin/includes/tab-settings.php:355
837
  #, php-format
838
  msgid ""
839
  "<dfn title=\"You can put your original 403.php and so on into your theme "
840
  "directory.\">Response code</dfn> %s"
841
  msgstr ""
842
+ "<dfn title=\"テーマ・ディレクトリには 403.php など、独自のファイルを設置する事"
843
+ "が出来ます。\">レスポンス・コード</dfn> %s"
844
 
845
+ #: admin/includes/tab-settings.php:385 admin/includes/tab-settings.php:881
846
  msgid ""
847
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
848
  "to a public facing page, visitors would not be blocked on the page to "
850
  "[Front-end target settings] section. Empty URL is altered to your home."
851
  "\">Redirect URL</dfn>"
852
  msgstr ""
853
+ "<dfn title=\"レスポンス・コード 2xx3xx 用のリダイレクト先 URL を指定しま"
854
+ "す。リダイレクトのループを避けるため、自サイト内の URL は[フロントエンドの設"
855
+ "定]に関わらず遮断の対象外となります。空欄の場合、サイトのホームが使用されま"
856
+ "す。\">リダイレクト先 URL</dfn>"
 
857
 
858
+ #: admin/includes/tab-settings.php:403 admin/includes/tab-settings.php:900
859
  msgid ""
860
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
861
  "message</dfn>"
862
  msgstr ""
863
+ "<dfn title=\"レスポンス・コード 4xx、5xx 用のメッセージを指定します。\">レスポ"
864
+ "ンス・メッセージ</dfn>"
 
 
 
 
 
 
 
 
 
 
 
865
 
866
  #: admin/includes/tab-settings.php:423
867
  msgid "Select when to run the validation."
897
  "標準的な他のプラグインより早いタイミングで検証を実行します。これによりサーバー"
898
  "の負荷は軽減されますが、<a rel='noreferrer' href='http://www.ipgeoblock.com/"
899
  "codex/validation-timing.html' title='Validation timing | IP Geo Block'>幾つか"
900
+ "の制限事項</a> が生じます。"
901
 
902
  #: admin/includes/tab-settings.php:449
903
  msgid "Back-end target settings"
918
 
919
  #: admin/includes/tab-settings.php:480 admin/includes/tab-settings.php:500
920
  #: admin/includes/tab-settings.php:533 admin/includes/tab-settings.php:539
921
+ #: admin/includes/tab-settings.php:785
922
  msgid "Block by country"
923
  msgstr "国コードで遮断"
924
 
1006
 
1007
  #: admin/includes/tab-settings.php:593
1008
  msgid "Admin ajax/post"
1009
+ msgstr "管理領域 ajax/post"
1010
 
1011
  #: admin/includes/tab-settings.php:607
1012
  msgid ""
1021
  "(&#8220;page=&hellip;&#8221; の &#8220;&hellip;&#8221; 部分)を指定し、検証対"
1022
  "象から除外します。"
1023
 
1024
+ #: admin/includes/tab-settings.php:607 admin/includes/tab-settings.php:686
1025
+ #: admin/includes/tab-settings.php:747
1026
  msgid "Exceptions"
1027
  msgstr "例外"
1028
 
1032
 
1033
  #: admin/includes/tab-settings.php:611
1034
  msgid "Candidate actions/pages"
1035
+ msgstr "候補 アクション/ページ"
1036
 
1037
  #: admin/includes/tab-settings.php:625
1038
  #, php-format
1054
  #: admin/includes/tab-settings.php:627
1055
  #, php-format
1056
  msgid ""
1057
+ "It configures &#8220;%s&#8221; to validate a direct request to the PHP file "
1058
+ "which does not load WordPress core. Make sure to deny direct access to the "
1059
+ "hidden files beginning with a dot by the server's configuration."
1060
  msgstr ""
1061
  "WordPressコアを読み込まないPHPファイルへのリクエストを検証対象とするため"
1062
  "に、%s を設定します。ドットで始まる隠しファイルへのアクセス拒否がサーバー側で"
1066
  msgid "Sorry, but your server type is not supported."
1067
  msgstr "このサーバーではサポートされません。"
1068
 
1069
+ #: admin/includes/tab-settings.php:629
1070
+ msgid ""
1071
+ "You need to click the &#8220;Save Changes&#8221; button for imported "
1072
+ "settings to take effect."
1073
+ msgstr ""
1074
+ "インポートされた設定を有効にするには、[変更を保存]ボタンをクリックする必要が"
1075
+ "あります。"
1076
+
1077
+ #: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:726
1078
  msgid "Force to load WP core"
1079
  msgstr "WPコアの読み込みを強制"
1080
 
1081
+ #: admin/includes/tab-settings.php:670
1082
  msgid "Plugins area"
1083
  msgstr "プラグイン領域"
1084
 
1085
+ #: admin/includes/tab-settings.php:731
1086
  msgid "Themes area"
1087
  msgstr "テーマ領域"
1088
 
1089
+ #: admin/includes/tab-settings.php:766
1090
  msgid "Front-end target settings"
1091
  msgstr "フロントエンドの設定"
1092
 
1093
+ #: admin/includes/tab-settings.php:804
1094
  msgid "Follow &#8220;Validation rule settings&#8221;"
1095
  msgstr "[検証ルールの設定]に従う"
1096
 
1097
+ #: admin/includes/tab-settings.php:849
1098
  #, php-format
1099
  msgid ""
1100
  "<dfn title=\"You can configure a different response code from the Back-end. "
1105
  "フィリエイト・プログラムに対する違反を防止するのに役立つでしょう。\">レスポン"
1106
  "ス・コード</dfn> %s"
1107
 
1108
+ #: admin/includes/tab-settings.php:915
1109
  msgid ""
1110
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
1111
  msgstr "<dfn title=\"特定のページを遮断対象に指定します。\">ページ</dfn>"
1112
 
1113
+ #: admin/includes/tab-settings.php:927
1114
  msgid ""
1115
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
1116
  "target.\">Post type</dfn>"
1118
  "<dfn title=\"特定の投稿タイプのシングルページを遮断対象に指定します。\">投稿タ"
1119
  "イプ</dfn>"
1120
 
1121
+ #: admin/includes/tab-settings.php:939
1122
  msgid ""
1123
  "<dfn title=\"Specify the individual category on a single page or archive "
1124
  "page as a blocking target.\">Category</dfn>"
1126
  "<dfn title=\"特定のカテゴリを含むシングルページかアーカイブページを遮断対象に"
1127
  "指定します。\">カテゴリ</dfn>"
1128
 
1129
+ #: admin/includes/tab-settings.php:951
1130
  msgid ""
1131
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1132
  "a blocking target.\">Tag</dfn>"
1134
  "<dfn title=\"特定のタグを含むシングルページかアーカイブページを遮断対象に指定"
1135
  "します。\">タグ</dfn>"
1136
 
1137
+ #: admin/includes/tab-settings.php:966
1138
  msgid "Specify the validation target on front-end."
1139
  msgstr "フロントエンドの検証対象を設定します。"
1140
 
1141
+ #: admin/includes/tab-settings.php:966
1142
  msgid "Validation target"
1143
  msgstr "検証対象"
1144
 
1145
+ #: admin/includes/tab-settings.php:977
1146
  msgid "All requests"
1147
  msgstr "全てのリクエスト"
1148
 
1149
+ #: admin/includes/tab-settings.php:978
1150
  msgid "Specify the targets"
1151
  msgstr "ターゲットを指定"
1152
 
1153
+ #: admin/includes/tab-settings.php:981
1154
  msgid ""
1155
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1156
  "wp&#8221; action hook. It means that this feature would not be compatible "
1159
  "[検証のタイミング]が &#8220;wp&#8221; アクション・フックまで遅延されます。こ"
1160
  "れにより、ページ・キャッシュとの互換性がなくなることに注意してください。"
1161
 
1162
+ #: admin/includes/tab-settings.php:988
1163
  msgid ""
1164
  "<dfn title=\"Specify the frequency of request for certain period of time."
1165
  "\">Blocking condition</dfn>"
1166
  msgstr "<dfn title=\"特定期間のリクエスト頻度を設定します。\">遮断条件</dfn>"
1167
 
1168
+ #: admin/includes/tab-settings.php:990
1169
  #, php-format
1170
  msgid "More than %1$s page view (PV) in %2$s seconds"
1171
  msgstr "%2$s 秒間に %1$s を超えるページビュー (PV)"
1172
 
1173
+ #: admin/includes/tab-settings.php:999
1174
  msgid ""
1175
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1176
  "behaved bots and crawlers</dfn>"
1178
  "<dfn title=\"リクエスト頻度を検証します。\">行儀の悪いボットやクローラーを遮断"
1179
  "</dfn>"
1180
 
1181
+ #: admin/includes/tab-settings.php:1017
1182
  msgid ""
1183
  "A part of user agent string and a qualification connected with a separator "
1184
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
1192
  "コード、または&nbsp;IPアドレス(CIDR記法)が使えます。また否定を表す記号「!」"
1193
  "を「条件」の直前に配置する事が出来ます。"
1194
 
1195
+ #: admin/includes/tab-settings.php:1017
1196
  msgid "UA string and qualification"
1197
+ msgstr "ユーザーエージェント文字列と条件"
1198
 
1199
+ #: admin/includes/tab-settings.php:1036
1200
  msgid "Specify the name of actions as exception that is invariably blocked."
1201
  msgstr "常に遮断されるアクション名を例外として指定します。"
1202
 
1203
+ #: admin/includes/tab-settings.php:1036
1204
  msgid "Excluded actions"
1205
  msgstr "除外するアクション"
1206
 
1207
+ #: admin/includes/tab-settings.php:1055
1208
  msgid ""
1209
  "It enables to verify the host by reverse DNS lookup which would spend some "
1210
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
1211
  "HOST=&hellip;&#8221;in &#8220;UA string and qualification&#8221; will always "
1212
  "return &#8220;true&#8221;."
1213
  msgstr ""
1214
+ "DNS 逆引きによりホストを検証します(幾らかのサーバー・リソースを消費します)。"
1215
+ "無効にした場合、[ユーザーエージェント文字列と条件]中の「HOST」、"
1216
  "「HOST=&hellip;」は常に真となります。"
1217
 
1218
+ #: admin/includes/tab-settings.php:1055
1219
  msgid "DNS reverse lookup"
1220
+ msgstr "DNS 逆引き"
1221
 
1222
+ #: admin/includes/tab-settings.php:1072
1223
  msgid ""
1224
  "It enables to simulate validation without deployment. The results can be "
1225
+ "found as &#8220;public&#8221; in Logs."
1226
  msgstr ""
1227
  "機能を有効にする事なくリクエストの検証をシミュレートします。結果はログで確認す"
1228
  "る事が出来ます。"
1229
 
1230
+ #: admin/includes/tab-settings.php:1072
1231
  msgid "Simulation mode"
1232
  msgstr "シミュレーション・モード"
1233
 
1234
+ #: admin/includes/tab-settings.php:1090
1235
  msgid "Privacy and record settings"
1236
  msgstr "プライバシーと記録の設定"
1237
 
1238
+ #: admin/includes/tab-settings.php:1115
1239
+ msgid ""
1240
+ "<dfn title=\"This option restricts not to send IP address to the external "
1241
+ "Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
1242
+ msgstr ""
1243
+ "<dfn title=\"このオプションは、IPアドレスを外部の位置情報APIへ送信することを制"
1244
+ "限します。\">外部APIへの送信を制限する</dfn>"
1245
+
1246
+ #: admin/includes/tab-settings.php:1131
1247
+ msgid ""
1248
+ "<dfn title=\"This option enables to record the number blocked countries and "
1249
+ "the number of blocked requests per day.\">Record &#8220;Statistics&#8221;</"
1250
+ "dfn>"
1251
+ msgstr ""
1252
+ "<dfn title=\"このオプションは、国別遮断数や1日あたりの遮断数など、統計の記録を"
1253
+ "有効にします。\">検証の統計を記録</dfn>"
1254
+
1255
+ #: admin/includes/tab-settings.php:1148
1256
+ msgid "Maximum period for &#8220;Statistics&#8221; [days]"
1257
+ msgstr "記録する統計の最大期間[日]"
1258
+
1259
+ #: admin/includes/tab-settings.php:1166
1260
  msgid ""
1261
  "<dfn title=\"This option enables to record the IP address, country code and "
1262
  "failure counter of login attempts into the cache on database to minimize the "
1263
+ "impact on site speed.\">Record &#8220;IP address Cache&#8221;</dfn>"
1264
  msgstr ""
1265
  "<dfn title=\"このオプションは、IPアドレス、国コード、ログイン失敗回数等の"
1266
  "キャッシュへの記録を有効にし、サイト速度への影響を最小化します。\">IPアドレス"
1267
  "をキャッシュに記録</dfn>"
1268
 
1269
+ #: admin/includes/tab-settings.php:1182
 
1270
  msgid ""
1271
+ "<dfn title=\"If user authentication fails consecutively beyond &#8220;Max "
1272
+ "number of failed login attempts per IP address&#8221;, subsequent login will "
1273
+ "also be prohibited for this period.\">Expiration time [sec] for each entry</"
1274
+ "dfn>"
1275
  msgstr ""
1276
  "<dfn title=\"ユーザ認証が連続%d回失敗した場合も、以降のログインがこの期間だけ"
1277
+ "(ガベージコレクション周期を含む)禁止されます。\">各エントリーの有効期間 "
1278
+ "[秒]</dfn>"
1279
 
1280
+ #: admin/includes/tab-settings.php:1198
1281
  msgid ""
1282
  "<dfn title=\"This option enables to record the validation logs including IP "
1283
  "addresses.\">Record &#8220;Logs&#8221;</dfn>"
1285
  "<dfn title=\"このオプションは、IPアドレスを含む検証ログの記録を有効にしま"
1286
  "す。\">検証のログを記録</dfn>"
1287
 
1288
+ #: admin/includes/tab-settings.php:1210
1289
  msgid "When blocked"
1290
  msgstr "遮断時に記録"
1291
 
1292
+ #: admin/includes/tab-settings.php:1211
1293
  msgid "When passed"
1294
  msgstr "通過時に記録"
1295
 
1296
+ #: admin/includes/tab-settings.php:1212
1297
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1298
  msgstr "遮断時または遮断対象国の通過時に記録"
1299
 
1300
+ #: admin/includes/tab-settings.php:1213
1301
  msgid "Unauthenticated visitor"
1302
  msgstr "未認証の訪問者を記録"
1303
 
1304
+ #: admin/includes/tab-settings.php:1214
1305
  msgid "Authenticated user"
1306
  msgstr "認証済のユーザーを記録"
1307
 
1308
+ #: admin/includes/tab-settings.php:1215
1309
  msgid "All the validation"
1310
  msgstr "すべての検証を記録"
1311
 
1312
+ #: admin/includes/tab-settings.php:1224
1313
+ #, php-format
1314
  msgid ""
1315
+ "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1316
+ "\">Expiration time [days] for each entry</dfn>"
1317
  msgstr ""
1318
+ "<dfn title=\"ログの最大エントリー数は %d に制限されます。\">各エントリーの有効"
1319
+ "期間[日]</dfn>"
1320
 
1321
+ #: admin/includes/tab-settings.php:1240
 
1322
  msgid ""
1323
+ "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
1324
+ "with value</dfn>"
1325
  msgstr ""
1326
+ "<dfn title=\"例)action, comment, log, pwd, FILES\">内容を展開する$_POSTのキー"
1327
+ "</dfn>"
1328
 
1329
+ #: admin/includes/tab-settings.php:1259
1330
  msgid "Maximum entries of &#8220;Logs&#8221;"
1331
  msgstr "記録するログの最大エントリ数"
1332
 
1333
+ #: admin/includes/tab-settings.php:1276
1334
  msgid ""
1335
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1336
  "&#8220;Live update&#8221;</dfn>"
1338
  "<dfn title=\"SQLiteデータベース・ソースを選択します。\">ライブアップデート用"
1339
  "SQLiteデータベース・ソースの選択</dfn>"
1340
 
1341
+ #: admin/includes/tab-settings.php:1288
1342
  msgid "Ordinary file"
1343
  msgstr "通常のファイル"
1344
 
1345
+ #: admin/includes/tab-settings.php:1289
1346
  msgid "In-Memory"
1347
  msgstr "イン・メモリ"
1348
 
1349
+ #: admin/includes/tab-settings.php:1292
1350
  msgid "PDO_SQLITE driver not available"
1351
  msgstr "PDO_SQLITEドライバが利用出来ません。"
1352
 
1353
+ #: admin/includes/tab-settings.php:1293
1354
  msgid ""
1355
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1356
  "without conflict with other plugins."
1358
  "数十ミリ秒のオーバーヘッドが生じますが、他のプラグインと競合することなく、安全"
1359
  "に使用できます。"
1360
 
1361
+ #: admin/includes/tab-settings.php:1294
1362
  msgid ""
1363
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1364
  "with other plugins using this method."
1366
  "数ミリ秒のオーバーヘッドが生じます。同手法を用いている他のプラグインと競合する"
1367
  "可能性があります。"
1368
 
1369
+ #: admin/includes/tab-settings.php:1303
1370
  msgid "Reset database source of &#8220;Live update&#8221;"
1371
  msgstr "ライブアップデートのデータソースをリセットする"
1372
 
1373
+ #: admin/includes/tab-settings.php:1311
1374
  msgid "Reset now"
1375
  msgstr "今すぐリセット"
1376
 
1377
+ #: admin/includes/tab-settings.php:1319 admin/includes/tab-settings.php:1457
1378
  msgid ""
1379
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1380
  "once and activate again."
1382
  "WP-Cronのタスクが見つかりません。 一旦このプラグインを停止させた後、再度、有効"
1383
  "化してみてください。"
1384
 
1385
+ #: admin/includes/tab-settings.php:1325
1386
  msgid ""
1387
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1388
+ "expired entries in &#8220;IP address Cache&#8221; and &#8220;Logs&#8221;."
1389
+ "\">Interval [sec] to cleanup expired entries of IP address</dfn>"
1390
  msgstr ""
1391
+ "<dfn title=\"このオプションは、有効期限の切れたIPアドレスのエントリーを削除す"
1392
+ "WP-Cronイベントの起動周期を設定します。\">ガベージコレクション周期[秒]</"
1393
+ "dfn>"
1394
 
1395
+ #: admin/includes/tab-settings.php:1334 admin/includes/tab-settings.php:1474
1396
  #, php-format
1397
  msgid "Next schedule: %s"
1398
  msgstr "次回日時:%s"
1399
 
1400
+ #: admin/includes/tab-settings.php:1342
 
 
 
 
 
 
 
 
 
 
 
 
 
1401
  msgid "Remove all settings and records at uninstallation"
1402
  msgstr "アンインストール時に設定と記録を全て削除"
1403
 
1404
+ #: admin/includes/tab-settings.php:1359
1405
  msgid "Geolocation API settings"
1406
  msgstr "位置情報APIの設定"
1407
 
1408
+ #: admin/includes/tab-settings.php:1380
1409
  msgid ""
1410
+ "<dfn title=\"IP address Cache and local databases are scanned at the top "
1411
  "priority.\">API selection and key settings</dfn>"
1412
  msgstr ""
1413
  "<dfn title=\"IPアドレスのキャッシュとローカルのデータベースが最優先で検索され"
1414
  "ます。\">APIの選択とキーの設定</dfn>"
1415
 
1416
+ #: admin/includes/tab-settings.php:1400
1417
  msgid "Timeout for network API [sec]"
1418
  msgstr "ネットワークAPIのタイムアウト[秒]"
1419
 
1420
+ #: admin/includes/tab-settings.php:1418
1421
  #, php-format
1422
  msgid ""
1423
+ "Can not find Geolocation API libraries in <code>%s</code>. It seems to have "
1424
  "failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
1425
  "tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
1426
  "contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
1442
  "Geo Block\">FAQ</a> を参照し、適切な書き込み権限と共に <code>ip-geo-api</"
1443
  "code> をインストールしてください。"
1444
 
1445
+ #: admin/includes/tab-settings.php:1425
1446
  msgid "Local database settings"
1447
  msgstr "ローカル・データベースの設定"
1448
 
1449
+ #: admin/includes/tab-settings.php:1439
1450
  msgid "database"
1451
  msgstr "ファイル"
1452
 
1453
+ #: admin/includes/tab-settings.php:1440 classes/class-ip-geo-block-cron.php:419
1454
  #, php-format
1455
  msgid "Last update: %s"
1456
  msgstr "最終更新:%s"
1457
 
1458
+ #: admin/includes/tab-settings.php:1463
1459
  msgid "Auto updating (once a month)"
1460
  msgstr "自動更新(月1回)"
1461
 
1462
+ #: admin/includes/tab-settings.php:1481
1463
  msgid "Download database"
1464
  msgstr "データベースのダウンロード"
1465
 
1466
+ #: admin/includes/tab-settings.php:1489
1467
  msgid "Download now"
1468
  msgstr "今すぐダウンロード"
1469
 
1470
+ #: admin/includes/tab-settings.php:1500
1471
  msgid "Submission settings"
1472
  msgstr "投稿時の設定"
1473
 
1474
+ #: admin/includes/tab-settings.php:1512
1475
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
1476
  msgstr "全体が&lt;p&gt;タグで囲われます。使用可能タグ:"
1477
 
1478
+ #: admin/includes/tab-settings.php:1512
1479
  msgid "Message on comment form"
1480
  msgstr "投稿フォーム上のメッセージ"
1481
 
1482
+ #: admin/includes/tab-settings.php:1524
1483
  msgid "None"
1484
  msgstr "なし"
1485
 
1486
+ #: admin/includes/tab-settings.php:1525
1487
  msgid "Top"
1488
  msgstr "上部"
1489
 
1490
+ #: admin/includes/tab-settings.php:1526
1491
  msgid "Bottom"
1492
  msgstr "下部"
1493
 
1494
+ #: admin/includes/tab-settings.php:1537
1495
  msgid "Plugin settings"
1496
  msgstr "プラグインの設定"
1497
 
1498
+ #: admin/includes/tab-settings.php:1550
1499
  msgid ""
1500
  "<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
1501
  "settings</dfn>"
1503
  "<dfn title=\"全ての設定をネットワーク全体で同期させます。\">ネットワーク内で設"
1504
  "定を同期</dfn>"
1505
 
1506
+ #: admin/includes/tab-settings.php:1570
1507
  msgid ""
1508
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
1509
  "dfn>"
1511
  "<dfn title=\"Google Maps JavaScript API に有効なキー\">Google Maps API キー</"
1512
  "dfn>"
1513
 
1514
+ #: admin/includes/tab-settings.php:1588
 
 
 
 
 
 
 
 
1515
  msgid "Export / Import settings"
1516
  msgstr "設定のエクスポート、インポート"
1517
 
1518
+ #: admin/includes/tab-settings.php:1595
1519
  msgid "Export settings"
1520
  msgstr "エクスポート"
1521
 
1522
+ #: admin/includes/tab-settings.php:1596
1523
  msgid "Import from the local file"
1524
  msgstr "ローカル・ファイルからインポートします"
1525
 
1526
+ #: admin/includes/tab-settings.php:1596
1527
  msgid "Import settings"
1528
  msgstr "インポート"
1529
 
1530
+ #: admin/includes/tab-settings.php:1605
1531
  msgid "Import pre-defined settings"
1532
  msgstr "プリセットのインポート"
1533
 
1534
+ #: admin/includes/tab-settings.php:1612
1535
  msgid ""
1536
  "Import the default settings to revert to the &#8220;Right after "
1537
  "installing&#8221; state"
1538
  msgstr "インストール直後の状態に戻すための設定値をインポートします"
1539
 
1540
+ #: admin/includes/tab-settings.php:1612
1541
  msgid "Default settings"
1542
  msgstr "初期設定"
1543
 
1544
+ #: admin/includes/tab-settings.php:1613
1545
  msgid ""
1546
  "Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
1547
  "for the &#8220;Back-end target settings&#8221;"
1549
  "「ゼロデイ攻撃の遮断」など、主に[バックエンドの設定]の推奨設定をインポートし"
1550
  "ます。"
1551
 
1552
+ #: admin/includes/tab-settings.php:1613
1553
  msgid "Best for Back-end"
1554
  msgstr "バックエンドの推奨設定"
1555
 
1556
+ #: admin/includes/tab-settings.php:1623
1557
  msgid "Delete DB tables for this plugin"
1558
  msgstr "このプラグイン用データベース・テーブルの削除"
1559
 
1560
+ #: admin/includes/tab-settings.php:1631
1561
  msgid "Delete now"
1562
  msgstr "今すぐ削除"
1563
 
1564
+ #: admin/includes/tab-settings.php:1639
1565
  msgid "Create DB tables for this plugin"
1566
  msgstr "このプラグイン用データベース・テーブルの作成"
1567
 
1568
+ #: admin/includes/tab-settings.php:1647
1569
  msgid "Create now"
1570
  msgstr "今すぐ作成"
1571
 
1572
+ #: admin/includes/tab-settings.php:1657
1573
  msgid ""
1574
+ "<dfn title=\"When you have some unexpected blocking experiences, please "
1575
+ "press the button to find the blocked requests at the end of dumped "
1576
+ "information which may help you to solve the issues.\">Diagnostic "
1577
+ "information</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
1578
+ "support/plugin/ip-geo-block\" title=\"WordPress &#8250; Support &raquo; IP "
1579
+ "Geo Block\">support forum</a> ]"
1580
  msgstr ""
1581
  "<dfn title=\"予期しない遮断が発生した場合は、ダンプされた診断情報を元にリクエ"
1582
  "ストの遮断理由を推定し、問題解決に役立ててください。\">診断情報</dfn><br /"
1584
  "block\" title=\"WordPress &#8250; Support &raquo; IP Geo Block\">サポート・"
1585
  "フォーラム</a> ]"
1586
 
1587
+ #: admin/includes/tab-settings.php:1664
1588
  msgid "Please copy &amp; paste when submitting your issue to support forum."
1589
  msgstr "フォーラムに問題を投稿する際、コピーして張り付けてください。"
1590
 
1591
+ #: admin/includes/tab-settings.php:1664
1592
  msgid "Show information"
1593
  msgstr "情報を表示"
1594
 
1595
+ #: admin/includes/tab-settings.php:1680
1596
  msgid ""
1597
  "To enhance the protection ability, please refer to &#8220;<a rel=\"noreferrer"
1598
  "\" href=\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-"
1602
  "防御性能をより高めるための設定については、&#8220;<a rel=\"noreferrer\" href="
1603
  "\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-settings.html"
1604
  "\" title=\"The best practice for target settings | IP Geo Block\">The best "
1605
+ "practice fortarget settings</a>&#8220; を参照してください。"
1606
 
1607
+ #: admin/includes/tab-settings.php:1681
1608
  msgid ""
1609
  "If you have any troubles with these, please check FAQ at <a rel=\"noreferrer"
1610
  "\" href=\"https://wordpress.org/plugins/ip-geo-block/faq/\" title=\"IP Geo "
1618
  "com/codex/#faq\" title=\"Codex | IP Geo Block\">Codex</a> の FAQ を参照してく"
1619
  "ださい。"
1620
 
1621
+ #: admin/includes/tab-settings.php:1688
1622
  msgid ""
1623
+ "While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
1624
+ "others will pass an IP address to the 3rd parties' API via HTTP."
1625
  msgstr ""
1626
  "MaxmindとIP2Locationはローカルのデータベースを検索しますが、他はHTTPを介して外"
1627
  "部のAPIにIPアドレスを渡します。"
1628
 
1629
+ #: admin/includes/tab-settings.php:1689
1630
  msgid ""
1631
+ "Please select the appropriate APIs to fit the privacy law / regulation in "
1632
+ "your country / region."
1633
+ msgstr ""
1634
+ "あなたの国/地域におけるプライバシー保護の法規・条例に適合するよう、適切なAPI"
1635
+ "を選択して下さい。"
1636
 
1637
+ #: admin/includes/tab-settings.php:1698
1638
  #, php-format
1639
  msgid ""
1640
  "Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
1641
  "2.0.0+%s."
1642
  msgstr ""
1643
+ "Maxmind GeoLite2 データベースと API には、PHP バージョン 5.4.0 以上と %sPECL "
1644
+ "phar 2.0.0 以上%sが必要です。"
 
1645
 
1646
+ #: admin/includes/tab-settings.php:1706
1647
  msgid ""
1648
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1649
  "ipgeoblock.com/codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block"
1655
  "end\" title=\"Codex | IP Geo Block\">Blocking on front-end</a>&#8221; を参照し"
1656
  "てください。"
1657
 
1658
+ #: admin/includes/tab-settings.php:1707
1659
  msgid ""
1660
  "If you find any issues or have something to suggest, please feel free to "
1661
  "open an issue at <a rel=\"noreferrer\" href=\"https://wordpress.org/support/"
1667
  "&#8250; Support &raquo; IP Geo Block\">サポートフォーラム</a> に投稿をお願いし"
1668
  "ます。"
1669
 
1670
+ #: admin/includes/tab-settings.php:1714
1671
  msgid ""
1672
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1673
  "ipgeoblock.com/codex/record-settings-and-logs.html\" title=\"Codex | IP Geo "
1722
  msgstr "ログの統計"
1723
 
1724
  #: admin/includes/tab-statistics.php:217
1725
+ msgid "Statistics in IP address Cache"
1726
  msgstr "キャッシュの統計"
1727
 
1728
  #: admin/includes/tab-statistics.php:230
1770
 
1771
  #: admin/includes/tab-statistics.php:431
1772
  #, php-format
1773
+ msgid "[ %sRecord &#8220;IP address Cache&#8221;%s ] is disabled."
1774
+ msgstr "[%sIPアドレスをキャッシュに記録%s]が無効です。"
1775
 
1776
  #: admin/includes/tab-statistics.php:432
1777
  msgid "Please set the proper condition to record IP address in cache."
1780
 
1781
  #: classes/class-ip-geo-block-apis.php:661
1782
  msgid ""
1783
+ "You need to select at least one IP Geolocation API. Otherwise <strong>you'll "
1784
+ "be blocked</strong> after the cache expires."
1785
  msgstr ""
1786
+ "少なくとも1つ以上の位置情報APIを選択して下さい。未選択の場合、キャッシュの有効"
1787
+ "期限切れと共にロックアウトされます。"
1788
 
1789
  #: classes/class-ip-geo-block-cron.php:222
1790
  #, php-format
1827
  "php#WordPress_Upgrade_Constants\" title=\"Editing wp-config.php &laquo; "
1828
  "WordPress Codex\">このドキュメント</a>を参照してください。"
1829
 
1830
+ #: classes/class-ip-geo-block-logs.php:234
1831
  #, php-format
1832
  msgid ""
1833
  "Creating a DB table %s had failed. Once de-activate this plugin, and then "
1836
  "%s 用のテーブルが作成されていません。一旦このプラグインを無効化し、再度有効化"
1837
  "して下さい。"
1838
 
1839
+ #: classes/class-ip-geo-block-logs.php:239
1840
  #, php-format
1841
  msgid ""
1842
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1845
  "%s 用のカラム型が一致しません。一旦このプラグインを無効化し、再度有効化して下"
1846
  "さい。"
1847
 
1848
+ #: classes/class-ip-geo-block.php:416
1849
  msgid "Dashboard"
1850
  msgstr "ダッシュボード"
1851
 
languages/ip-geo-block.mo CHANGED
Binary file
languages/ip-geo-block.po CHANGED
@@ -2,15 +2,15 @@
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: IP Geo Block 3.0.12\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2018-05-20 16:59+0900\n"
8
- "PO-Revision-Date: 2018-05-20 17:01+0900\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 2.0.6\n"
14
  "X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
15
  "esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
16
  "X-Poedit-Basepath: ..\n"
@@ -26,169 +26,169 @@ msgid ""
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
 
29
- #: admin/class-ip-geo-block-admin.php:269
30
  msgid "Import settings ?"
31
  msgstr ""
32
 
33
- #: admin/class-ip-geo-block-admin.php:270
34
  msgid "Create table ?"
35
  msgstr ""
36
 
37
- #: admin/class-ip-geo-block-admin.php:271
38
  msgid "Delete table ?"
39
  msgstr ""
40
 
41
- #: admin/class-ip-geo-block-admin.php:272
42
  msgid "Clear statistics ?"
43
  msgstr ""
44
 
45
- #: admin/class-ip-geo-block-admin.php:273
46
  msgid "Clear cache ?"
47
  msgstr ""
48
 
49
- #: admin/class-ip-geo-block-admin.php:274
50
  msgid "Clear logs ?"
51
  msgstr ""
52
 
53
- #: admin/class-ip-geo-block-admin.php:275
54
  msgid "ajax for logged-in user"
55
  msgstr ""
56
 
57
- #: admin/class-ip-geo-block-admin.php:276
58
  msgid "ajax for non logged-in user"
59
  msgstr ""
60
 
61
- #: admin/class-ip-geo-block-admin.php:277
62
  #, php-format
63
  msgid "[Found: %d]"
64
  msgstr ""
65
 
66
- #: admin/class-ip-geo-block-admin.php:278
67
  #, php-format
68
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
69
  msgstr ""
70
 
71
- #: admin/class-ip-geo-block-admin.php:279
72
  msgid "This feature is available with HTML5 compliant browsers."
73
  msgstr ""
74
 
75
- #: admin/class-ip-geo-block-admin.php:280
76
  msgid "The selected row cannot be found in the visible area."
77
  msgstr ""
78
 
79
- #: admin/class-ip-geo-block-admin.php:281
80
- #: admin/class-ip-geo-block-admin.php:1483
81
  #, php-format
82
  msgid "An error occurred while executing the ajax command `%s`."
83
  msgstr ""
84
 
85
- #: admin/class-ip-geo-block-admin.php:285
86
  msgid "No data available in table"
87
  msgstr ""
88
 
89
- #: admin/class-ip-geo-block-admin.php:286
90
  msgid "No matching records found"
91
  msgstr ""
92
 
93
- #: admin/class-ip-geo-block-admin.php:287
94
  #: admin/includes/class-admin-ajax.php:111
95
- #: admin/includes/class-admin-ajax.php:237
96
  #: admin/includes/tab-geolocation.php:70
97
  msgid "IP address"
98
  msgstr ""
99
 
100
- #: admin/class-ip-geo-block-admin.php:288
101
  #: admin/includes/class-admin-ajax.php:112
102
- #: admin/includes/class-admin-ajax.php:238
103
  msgid "Code"
104
  msgstr ""
105
 
106
- #: admin/class-ip-geo-block-admin.php:289
107
  #: admin/includes/class-admin-ajax.php:113
108
- #: admin/includes/class-admin-ajax.php:239
109
  msgid "ASN"
110
  msgstr ""
111
 
112
- #: admin/class-ip-geo-block-admin.php:290
113
- #: admin/includes/class-admin-ajax.php:240
114
  msgid "Host name"
115
  msgstr ""
116
 
117
- #: admin/class-ip-geo-block-admin.php:291
118
  #: admin/includes/class-admin-ajax.php:114
119
- #: admin/includes/class-admin-ajax.php:241
120
  msgid "Target"
121
  msgstr ""
122
 
123
- #: admin/class-ip-geo-block-admin.php:292
124
- #: admin/includes/class-admin-ajax.php:242
125
  msgid "Failure / Total"
126
  msgstr ""
127
 
128
- #: admin/class-ip-geo-block-admin.php:293
129
- #: admin/includes/class-admin-ajax.php:243
130
  msgid "Elapsed[sec]"
131
  msgstr ""
132
 
133
- #: admin/class-ip-geo-block-admin.php:294
134
  #: admin/includes/class-admin-ajax.php:110
135
  msgid "Time"
136
  msgstr ""
137
 
138
- #: admin/class-ip-geo-block-admin.php:295
139
  #: admin/includes/class-admin-ajax.php:115
140
  msgid "Result"
141
  msgstr ""
142
 
143
- #: admin/class-ip-geo-block-admin.php:296
144
  #: admin/includes/class-admin-ajax.php:116
145
  msgid "Request"
146
  msgstr ""
147
 
148
- #: admin/class-ip-geo-block-admin.php:297
149
  #: admin/includes/class-admin-ajax.php:117
150
  msgid "User agent"
151
  msgstr ""
152
 
153
- #: admin/class-ip-geo-block-admin.php:298
154
  #: admin/includes/class-admin-ajax.php:118
155
  msgid "HTTP headers"
156
  msgstr ""
157
 
158
- #: admin/class-ip-geo-block-admin.php:299
159
  #: admin/includes/class-admin-ajax.php:119
160
  msgid "$_POST data"
161
  msgstr ""
162
 
163
- #: admin/class-ip-geo-block-admin.php:325
164
  msgid "Contribute on GitHub"
165
  msgstr ""
166
 
167
- #: admin/class-ip-geo-block-admin.php:339
168
- #: admin/class-ip-geo-block-admin.php:447
169
- #: admin/class-ip-geo-block-admin.php:664
170
  msgid "Settings"
171
  msgstr ""
172
 
173
- #: admin/class-ip-geo-block-admin.php:425
174
- #: admin/class-ip-geo-block-admin.php:426
175
- #: admin/class-ip-geo-block-admin.php:436
176
- #: admin/class-ip-geo-block-admin.php:437
177
- #: admin/class-ip-geo-block-admin.php:446
178
- #: admin/class-ip-geo-block-admin.php:455
179
  msgid "IP Geo Block"
180
  msgstr ""
181
 
182
- #: admin/class-ip-geo-block-admin.php:456
183
- #: admin/class-ip-geo-block-admin.php:669
184
  msgid "Site List"
185
  msgstr ""
186
 
187
- #: admin/class-ip-geo-block-admin.php:485
188
  msgid "You need WordPress 3.7+."
189
  msgstr ""
190
 
191
- #: admin/class-ip-geo-block-admin.php:491
192
  #, php-format
193
  msgid ""
194
  "Now downloading geolocation databases in background. After a little while, "
@@ -196,48 +196,48 @@ msgid ""
196
  "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
197
  msgstr ""
198
 
199
- #: admin/class-ip-geo-block-admin.php:497
200
  #, php-format
201
  msgid ""
202
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
203
  "confirm it at <a href=\"%s\">Validation rule settings</a>."
204
  msgstr ""
205
 
206
- #: admin/class-ip-geo-block-admin.php:506
207
  msgid "Local database and matching rule have been updated."
208
  msgstr ""
209
 
210
- #: admin/class-ip-geo-block-admin.php:517
211
  msgid ""
212
  "Once you logout, you will be unable to login again because the number of "
213
  "login attempts reaches the limit."
214
  msgstr ""
215
 
216
- #: admin/class-ip-geo-block-admin.php:519
217
  #, php-format
218
  msgid ""
219
  "Please execute \"<strong>Clear cache</strong>\" on <a href=\"%s\">Statistics "
220
  "tab</a> to prevent locking yourself out."
221
  msgstr ""
222
 
223
- #: admin/class-ip-geo-block-admin.php:529
224
  msgid ""
225
  "Once you logout, you will be unable to login again because your country code "
226
  "or IP address is in the blacklist."
227
  msgstr ""
228
 
229
- #: admin/class-ip-geo-block-admin.php:530
230
  msgid ""
231
  "Once you logout, you will be unable to login again because your country code "
232
  "or IP address is not in the whitelist."
233
  msgstr ""
234
 
235
- #: admin/class-ip-geo-block-admin.php:534
236
  #, php-format
237
  msgid "Please check your &#8220;%sValidation rule settings%s&#8221;."
238
  msgstr ""
239
 
240
- #: admin/class-ip-geo-block-admin.php:538
241
  #, php-format
242
  msgid ""
243
  "Please confirm your local geolocation databases at &#8220;%sLocal database "
@@ -245,94 +245,94 @@ msgid ""
245
  "%sStatistics in cache%s&#8221; section."
246
  msgstr ""
247
 
248
- #: admin/class-ip-geo-block-admin.php:559
249
  msgid ""
250
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
251
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
252
  "select &#8220;init&#8221; action hook."
253
  msgstr ""
254
 
255
- #: admin/class-ip-geo-block-admin.php:665
256
  msgid "Statistics"
257
  msgstr ""
258
 
259
- #: admin/class-ip-geo-block-admin.php:666
260
  msgid "Logs"
261
  msgstr ""
262
 
263
- #: admin/class-ip-geo-block-admin.php:667
264
  msgid "Search"
265
  msgstr ""
266
 
267
- #: admin/class-ip-geo-block-admin.php:668
268
  msgid "Attribution"
269
  msgstr ""
270
 
271
- #: admin/class-ip-geo-block-admin.php:685
272
- #: admin/class-ip-geo-block-admin.php:702
273
  msgid "Network wide"
274
  msgstr ""
275
 
276
- #: admin/class-ip-geo-block-admin.php:715
277
  msgid "Toggle all"
278
  msgstr ""
279
 
280
- #: admin/class-ip-geo-block-admin.php:718
281
  msgid ""
282
- "Independent of &#8220;Statistics and Logs settings&#8221;, you can see all "
283
  "the requests validated by this plugin in almost real time."
284
  msgstr ""
285
 
286
- #: admin/class-ip-geo-block-admin.php:718 admin/includes/tab-accesslog.php:39
287
  msgid "Live update"
288
  msgstr ""
289
 
290
- #: admin/class-ip-geo-block-admin.php:722
291
  msgid "Open a new window on clicking the link in the chart."
292
  msgstr ""
293
 
294
- #: admin/class-ip-geo-block-admin.php:722
295
  msgid "Open a new window"
296
  msgstr ""
297
 
298
- #: admin/class-ip-geo-block-admin.php:745
299
  msgid "Thanks for providing these great services for free."
300
  msgstr ""
301
 
302
- #: admin/class-ip-geo-block-admin.php:746
303
  msgid ""
304
  "(Most browsers will redirect you to each site <a href=\"http://www."
305
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
306
  "when you click the link</a>.)"
307
  msgstr ""
308
 
309
- #: admin/class-ip-geo-block-admin.php:751
310
  msgid "Back to top"
311
  msgstr ""
312
 
313
- #: admin/class-ip-geo-block-admin.php:843
314
  msgid "Enable"
315
  msgstr ""
316
 
317
- #: admin/class-ip-geo-block-admin.php:858
318
  msgid "Select one"
319
  msgstr ""
320
 
321
- #: admin/class-ip-geo-block-admin.php:1273
322
  msgid "You do not have sufficient permissions to access this page."
323
  msgstr ""
324
 
325
- #: admin/class-ip-geo-block-admin.php:1300
326
  #: admin/includes/class-admin-rewrite.php:194
327
  #: classes/class-ip-geo-block-cron.php:217
328
  #: classes/class-ip-geo-block-cron.php:321
329
  #: classes/class-ip-geo-block-cron.php:395
330
- #: classes/class-ip-geo-block-opts.php:452
331
  #, php-format
332
  msgid "Unable to write <code>%s</code>. Please check the permission."
333
  msgstr ""
334
 
335
- #: admin/class-ip-geo-block-admin.php:1330
336
  msgid "Settings saved."
337
  msgstr ""
338
 
@@ -345,12 +345,12 @@ msgstr ""
345
  msgid "UNKNOWN"
346
  msgstr ""
347
 
348
- #: admin/includes/class-admin-ajax.php:198
349
  #, php-format
350
  msgid "The user %s (user ID: %d) is in use."
351
  msgstr ""
352
 
353
- #: admin/includes/class-admin-ajax.php:492
354
  #, php-format
355
  msgid ""
356
  "illegal format at %s. Please delete the corresponding line and try again."
@@ -378,8 +378,8 @@ msgstr ""
378
  msgid "Validation logs"
379
  msgstr ""
380
 
381
- #: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:765
382
- #: admin/includes/tab-settings.php:1410
383
  msgid "Help"
384
  msgstr ""
385
 
@@ -461,7 +461,7 @@ msgstr ""
461
  msgid "Export logs"
462
  msgstr ""
463
 
464
- #: admin/includes/tab-accesslog.php:153 admin/includes/tab-settings.php:1582
465
  #: admin/includes/tab-statistics.php:294
466
  msgid "Export to the local file"
467
  msgstr ""
@@ -491,22 +491,21 @@ msgid "Search IP address geolocation"
491
  msgstr ""
492
 
493
  #: admin/includes/tab-geolocation.php:42
494
- msgid "Geolocation service"
495
  msgstr ""
496
 
497
- #: admin/includes/tab-geolocation.php:86 admin/includes/tab-settings.php:1101
498
  msgid ""
499
- "<dfn title=\"IP address is always encrypted on recording in cache and logs. "
500
- "Moreover, this option makes the IP address anonymous and restricted on "
501
- "sending to the 3rd parties such as geolocation APIs or whois service."
502
- "\">Anonymize IP address and restrict 3rd party APIs</dfn>"
503
  msgstr ""
504
 
505
- #: admin/includes/tab-geolocation.php:101
506
- msgid "Find geolocation"
507
  msgstr ""
508
 
509
- #: admin/includes/tab-geolocation.php:109
510
  msgid "Search now"
511
  msgstr ""
512
 
@@ -629,7 +628,7 @@ msgstr ""
629
  msgid "Open CIDR calculator for IPv4 / IPv6."
630
  msgstr ""
631
 
632
- #: admin/includes/tab-settings.php:127 admin/includes/tab-settings.php:796
633
  msgid "Matching rule"
634
  msgstr ""
635
 
@@ -711,9 +710,9 @@ msgstr ""
711
 
712
  #: admin/includes/tab-settings.php:299
713
  msgid ""
714
- "(&thinsp;See &#8220;<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
715
  "Roles_and_Capabilities\" title=\"Roles and Capabilities &laquo; WordPress "
716
- "Codex\">Roles and Capabilities</a>&#8221;&thinsp;)"
717
  msgstr ""
718
 
719
  #: admin/includes/tab-settings.php:307
@@ -726,7 +725,7 @@ msgid ""
726
  msgstr ""
727
 
728
  #: admin/includes/tab-settings.php:318 admin/includes/tab-settings.php:499
729
- #: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:1160
730
  msgid "Disable"
731
  msgstr ""
732
 
@@ -739,13 +738,21 @@ msgid "Verify file extension only"
739
  msgstr ""
740
 
741
  #: admin/includes/tab-settings.php:330
 
 
 
 
 
 
 
 
742
  #, php-format
743
  msgid ""
744
  "<dfn title=\"You can put your original 403.php and so on into your theme "
745
  "directory.\">Response code</dfn> %s"
746
  msgstr ""
747
 
748
- #: admin/includes/tab-settings.php:360 admin/includes/tab-settings.php:883
749
  msgid ""
750
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
751
  "to a public facing page, visitors would not be blocked on the page to "
@@ -754,20 +761,12 @@ msgid ""
754
  "\">Redirect URL</dfn>"
755
  msgstr ""
756
 
757
- #: admin/includes/tab-settings.php:378 admin/includes/tab-settings.php:902
758
  msgid ""
759
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
760
  "message</dfn>"
761
  msgstr ""
762
 
763
- #: admin/includes/tab-settings.php:395
764
- msgid ""
765
- "<dfn title=\"This is applied to &#8220;XML-RPC&#8221; and &#8220;Login "
766
- "form&#8221;. Lockout period is defined as expiration time at &#8220;Privacy "
767
- "and record settings&#8221;.\">Max number of failed login attempts per IP "
768
- "address</dfn>"
769
- msgstr ""
770
-
771
  #: admin/includes/tab-settings.php:423
772
  msgid "Select when to run the validation."
773
  msgstr ""
@@ -817,7 +816,7 @@ msgstr ""
817
 
818
  #: admin/includes/tab-settings.php:480 admin/includes/tab-settings.php:500
819
  #: admin/includes/tab-settings.php:533 admin/includes/tab-settings.php:539
820
- #: admin/includes/tab-settings.php:784
821
  msgid "Block by country"
822
  msgstr ""
823
 
@@ -909,8 +908,8 @@ msgid ""
909
  "Zero-day Exploit&#8221; (for logged-in user)."
910
  msgstr ""
911
 
912
- #: admin/includes/tab-settings.php:607 admin/includes/tab-settings.php:685
913
- #: admin/includes/tab-settings.php:746
914
  msgid "Exceptions"
915
  msgstr ""
916
 
@@ -938,36 +937,42 @@ msgstr ""
938
  #: admin/includes/tab-settings.php:627
939
  #, php-format
940
  msgid ""
941
- "It configures &#8220;%s&#8221; to validate a request to the PHP file which "
942
- "does not load WordPress core. Make sure to deny direct access to the hidden "
943
- "files beginning with a dot by the server's configuration."
944
  msgstr ""
945
 
946
  #: admin/includes/tab-settings.php:628
947
  msgid "Sorry, but your server type is not supported."
948
  msgstr ""
949
 
950
- #: admin/includes/tab-settings.php:664 admin/includes/tab-settings.php:725
 
 
 
 
 
 
951
  msgid "Force to load WP core"
952
  msgstr ""
953
 
954
- #: admin/includes/tab-settings.php:669
955
  msgid "Plugins area"
956
  msgstr ""
957
 
958
- #: admin/includes/tab-settings.php:730
959
  msgid "Themes area"
960
  msgstr ""
961
 
962
- #: admin/includes/tab-settings.php:765
963
  msgid "Front-end target settings"
964
  msgstr ""
965
 
966
- #: admin/includes/tab-settings.php:789
967
  msgid "Follow &#8220;Validation rule settings&#8221;"
968
  msgstr ""
969
 
970
- #: admin/includes/tab-settings.php:851
971
  #, php-format
972
  msgid ""
973
  "<dfn title=\"You can configure a different response code from the Back-end. "
@@ -975,70 +980,70 @@ msgid ""
975
  "\">Response code</dfn> %s"
976
  msgstr ""
977
 
978
- #: admin/includes/tab-settings.php:917
979
  msgid ""
980
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
981
  msgstr ""
982
 
983
- #: admin/includes/tab-settings.php:929
984
  msgid ""
985
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
986
  "target.\">Post type</dfn>"
987
  msgstr ""
988
 
989
- #: admin/includes/tab-settings.php:941
990
  msgid ""
991
  "<dfn title=\"Specify the individual category on a single page or archive "
992
  "page as a blocking target.\">Category</dfn>"
993
  msgstr ""
994
 
995
- #: admin/includes/tab-settings.php:953
996
  msgid ""
997
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
998
  "a blocking target.\">Tag</dfn>"
999
  msgstr ""
1000
 
1001
- #: admin/includes/tab-settings.php:968
1002
  msgid "Specify the validation target on front-end."
1003
  msgstr ""
1004
 
1005
- #: admin/includes/tab-settings.php:968
1006
  msgid "Validation target"
1007
  msgstr ""
1008
 
1009
- #: admin/includes/tab-settings.php:979
1010
  msgid "All requests"
1011
  msgstr ""
1012
 
1013
- #: admin/includes/tab-settings.php:980
1014
  msgid "Specify the targets"
1015
  msgstr ""
1016
 
1017
- #: admin/includes/tab-settings.php:983
1018
  msgid ""
1019
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1020
  "wp&#8221; action hook. It means that this feature would not be compatible "
1021
  "with any page caching."
1022
  msgstr ""
1023
 
1024
- #: admin/includes/tab-settings.php:990
1025
  msgid ""
1026
  "<dfn title=\"Specify the frequency of request for certain period of time."
1027
  "\">Blocking condition</dfn>"
1028
  msgstr ""
1029
 
1030
- #: admin/includes/tab-settings.php:992
1031
  #, php-format
1032
  msgid "More than %1$s page view (PV) in %2$s seconds"
1033
  msgstr ""
1034
 
1035
- #: admin/includes/tab-settings.php:1001
1036
  msgid ""
1037
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1038
  "behaved bots and crawlers</dfn>"
1039
  msgstr ""
1040
 
1041
- #: admin/includes/tab-settings.php:1019
1042
  msgid ""
1043
  "A part of user agent string and a qualification connected with a separator "
1044
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
@@ -1048,19 +1053,19 @@ msgid ""
1048
  "qualification&#8221;."
1049
  msgstr ""
1050
 
1051
- #: admin/includes/tab-settings.php:1019
1052
  msgid "UA string and qualification"
1053
  msgstr ""
1054
 
1055
- #: admin/includes/tab-settings.php:1038
1056
  msgid "Specify the name of actions as exception that is invariably blocked."
1057
  msgstr ""
1058
 
1059
- #: admin/includes/tab-settings.php:1038
1060
  msgid "Excluded actions"
1061
  msgstr ""
1062
 
1063
- #: admin/includes/tab-settings.php:1057
1064
  msgid ""
1065
  "It enables to verify the host by reverse DNS lookup which would spend some "
1066
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
@@ -1068,175 +1073,181 @@ msgid ""
1068
  "return &#8220;true&#8221;."
1069
  msgstr ""
1070
 
1071
- #: admin/includes/tab-settings.php:1057
1072
  msgid "DNS reverse lookup"
1073
  msgstr ""
1074
 
1075
- #: admin/includes/tab-settings.php:1074
1076
  msgid ""
1077
  "It enables to simulate validation without deployment. The results can be "
1078
- "found at &#8220;Public facing pages&#8221; in Logs."
1079
  msgstr ""
1080
 
1081
- #: admin/includes/tab-settings.php:1074
1082
  msgid "Simulation mode"
1083
  msgstr ""
1084
 
1085
- #: admin/includes/tab-settings.php:1092
1086
  msgid "Privacy and record settings"
1087
  msgstr ""
1088
 
1089
- #: admin/includes/tab-settings.php:1117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1090
  msgid ""
1091
  "<dfn title=\"This option enables to record the IP address, country code and "
1092
  "failure counter of login attempts into the cache on database to minimize the "
1093
- "impact on site speed.\">Record &#8220;IP address cache&#8221;</dfn>"
1094
  msgstr ""
1095
 
1096
- #: admin/includes/tab-settings.php:1133
1097
- #, php-format
1098
  msgid ""
1099
- "<dfn title=\"If user authentication fails consecutively %d times, subsequent "
1100
- "login will also be prohibited for this and garbage collection period."
1101
- "\">Expiration time [sec] for &#8220;IP address cache&#8221;</dfn>"
 
1102
  msgstr ""
1103
 
1104
- #: admin/includes/tab-settings.php:1149
1105
  msgid ""
1106
  "<dfn title=\"This option enables to record the validation logs including IP "
1107
  "addresses.\">Record &#8220;Logs&#8221;</dfn>"
1108
  msgstr ""
1109
 
1110
- #: admin/includes/tab-settings.php:1161
1111
  msgid "When blocked"
1112
  msgstr ""
1113
 
1114
- #: admin/includes/tab-settings.php:1162
1115
  msgid "When passed"
1116
  msgstr ""
1117
 
1118
- #: admin/includes/tab-settings.php:1163
1119
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1120
  msgstr ""
1121
 
1122
- #: admin/includes/tab-settings.php:1164
1123
  msgid "Unauthenticated visitor"
1124
  msgstr ""
1125
 
1126
- #: admin/includes/tab-settings.php:1165
1127
  msgid "Authenticated user"
1128
  msgstr ""
1129
 
1130
- #: admin/includes/tab-settings.php:1166
1131
  msgid "All the validation"
1132
  msgstr ""
1133
 
1134
- #: admin/includes/tab-settings.php:1174
 
1135
  msgid ""
1136
- "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST keys to be "
1137
- "recorded with their values in &#8220;Logs&#8221;</dfn>"
1138
  msgstr ""
1139
 
1140
- #: admin/includes/tab-settings.php:1191
1141
- #, php-format
1142
  msgid ""
1143
- "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1144
- "\">Expiration time [sec] for &#8220;Logs&#8221;</dfn>"
1145
  msgstr ""
1146
 
1147
- #: admin/includes/tab-settings.php:1209
1148
  msgid "Maximum entries of &#8220;Logs&#8221;"
1149
  msgstr ""
1150
 
1151
- #: admin/includes/tab-settings.php:1226
1152
  msgid ""
1153
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1154
  "&#8220;Live update&#8221;</dfn>"
1155
  msgstr ""
1156
 
1157
- #: admin/includes/tab-settings.php:1238
1158
  msgid "Ordinary file"
1159
  msgstr ""
1160
 
1161
- #: admin/includes/tab-settings.php:1239
1162
  msgid "In-Memory"
1163
  msgstr ""
1164
 
1165
- #: admin/includes/tab-settings.php:1242
1166
  msgid "PDO_SQLITE driver not available"
1167
  msgstr ""
1168
 
1169
- #: admin/includes/tab-settings.php:1243
1170
  msgid ""
1171
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1172
  "without conflict with other plugins."
1173
  msgstr ""
1174
 
1175
- #: admin/includes/tab-settings.php:1244
1176
  msgid ""
1177
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1178
  "with other plugins using this method."
1179
  msgstr ""
1180
 
1181
- #: admin/includes/tab-settings.php:1253
1182
  msgid "Reset database source of &#8220;Live update&#8221;"
1183
  msgstr ""
1184
 
1185
- #: admin/includes/tab-settings.php:1261
1186
  msgid "Reset now"
1187
  msgstr ""
1188
 
1189
- #: admin/includes/tab-settings.php:1269 admin/includes/tab-settings.php:1442
1190
  msgid ""
1191
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1192
  "once and activate again."
1193
  msgstr ""
1194
 
1195
- #: admin/includes/tab-settings.php:1275
1196
  msgid ""
1197
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1198
- "expired entries in ip address cache and logs.\">Cleanup interval [sec] for "
1199
- "&#8220;IP address cache&#8221; and &#8220;Logs&#8221;</dfn>"
1200
  msgstr ""
1201
 
1202
- #: admin/includes/tab-settings.php:1284 admin/includes/tab-settings.php:1459
1203
  #, php-format
1204
  msgid "Next schedule: %s"
1205
  msgstr ""
1206
 
1207
- #: admin/includes/tab-settings.php:1292
1208
- msgid ""
1209
- "<dfn title=\"This option enables to record the number blocked countries and "
1210
- "the number of blocked requests per day.\">Record &#8220;Statistics&#8221;</"
1211
- "dfn>"
1212
- msgstr ""
1213
-
1214
- #: admin/includes/tab-settings.php:1309
1215
- msgid "Maximum period for &#8220;Statistics&#8221; [day]"
1216
- msgstr ""
1217
-
1218
- #: admin/includes/tab-settings.php:1327
1219
  msgid "Remove all settings and records at uninstallation"
1220
  msgstr ""
1221
 
1222
- #: admin/includes/tab-settings.php:1344
1223
  msgid "Geolocation API settings"
1224
  msgstr ""
1225
 
1226
- #: admin/includes/tab-settings.php:1365
1227
  msgid ""
1228
- "<dfn title=\"IP address cache and local database are scanned at the top "
1229
  "priority.\">API selection and key settings</dfn>"
1230
  msgstr ""
1231
 
1232
- #: admin/includes/tab-settings.php:1385
1233
  msgid "Timeout for network API [sec]"
1234
  msgstr ""
1235
 
1236
- #: admin/includes/tab-settings.php:1403
1237
  #, php-format
1238
  msgid ""
1239
- "Can not find geolocation API libraries in <code>%s</code>. It seems to have "
1240
  "failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
1241
  "tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
1242
  "contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
@@ -1248,151 +1259,146 @@ msgid ""
1248
  "troubles? | IP Geo Block\">this instruction</a>."
1249
  msgstr ""
1250
 
1251
- #: admin/includes/tab-settings.php:1410
1252
  msgid "Local database settings"
1253
  msgstr ""
1254
 
1255
- #: admin/includes/tab-settings.php:1424
1256
  msgid "database"
1257
  msgstr ""
1258
 
1259
- #: admin/includes/tab-settings.php:1425 classes/class-ip-geo-block-cron.php:419
1260
  #, php-format
1261
  msgid "Last update: %s"
1262
  msgstr ""
1263
 
1264
- #: admin/includes/tab-settings.php:1448
1265
  msgid "Auto updating (once a month)"
1266
  msgstr ""
1267
 
1268
- #: admin/includes/tab-settings.php:1466
1269
  msgid "Download database"
1270
  msgstr ""
1271
 
1272
- #: admin/includes/tab-settings.php:1474
1273
  msgid "Download now"
1274
  msgstr ""
1275
 
1276
- #: admin/includes/tab-settings.php:1485
1277
  msgid "Submission settings"
1278
  msgstr ""
1279
 
1280
- #: admin/includes/tab-settings.php:1497
1281
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
1282
  msgstr ""
1283
 
1284
- #: admin/includes/tab-settings.php:1497
1285
  msgid "Message on comment form"
1286
  msgstr ""
1287
 
1288
- #: admin/includes/tab-settings.php:1509
1289
  msgid "None"
1290
  msgstr ""
1291
 
1292
- #: admin/includes/tab-settings.php:1510
1293
  msgid "Top"
1294
  msgstr ""
1295
 
1296
- #: admin/includes/tab-settings.php:1511
1297
  msgid "Bottom"
1298
  msgstr ""
1299
 
1300
- #: admin/includes/tab-settings.php:1522
1301
  msgid "Plugin settings"
1302
  msgstr ""
1303
 
1304
- #: admin/includes/tab-settings.php:1535
1305
  msgid ""
1306
  "<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
1307
  "settings</dfn>"
1308
  msgstr ""
1309
 
1310
- #: admin/includes/tab-settings.php:1555
1311
  msgid ""
1312
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
1313
  "dfn>"
1314
  msgstr ""
1315
 
1316
- #: admin/includes/tab-settings.php:1569
1317
- msgid ""
1318
- "You need to click the &#8220;Save Changes&#8221; button for imported "
1319
- "settings to take effect."
1320
- msgstr ""
1321
-
1322
- #: admin/includes/tab-settings.php:1575
1323
  msgid "Export / Import settings"
1324
  msgstr ""
1325
 
1326
- #: admin/includes/tab-settings.php:1582
1327
  msgid "Export settings"
1328
  msgstr ""
1329
 
1330
- #: admin/includes/tab-settings.php:1583
1331
  msgid "Import from the local file"
1332
  msgstr ""
1333
 
1334
- #: admin/includes/tab-settings.php:1583
1335
  msgid "Import settings"
1336
  msgstr ""
1337
 
1338
- #: admin/includes/tab-settings.php:1592
1339
  msgid "Import pre-defined settings"
1340
  msgstr ""
1341
 
1342
- #: admin/includes/tab-settings.php:1599
1343
  msgid ""
1344
  "Import the default settings to revert to the &#8220;Right after "
1345
  "installing&#8221; state"
1346
  msgstr ""
1347
 
1348
- #: admin/includes/tab-settings.php:1599
1349
  msgid "Default settings"
1350
  msgstr ""
1351
 
1352
- #: admin/includes/tab-settings.php:1600
1353
  msgid ""
1354
  "Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
1355
  "for the &#8220;Back-end target settings&#8221;"
1356
  msgstr ""
1357
 
1358
- #: admin/includes/tab-settings.php:1600
1359
  msgid "Best for Back-end"
1360
  msgstr ""
1361
 
1362
- #: admin/includes/tab-settings.php:1610
1363
  msgid "Delete DB tables for this plugin"
1364
  msgstr ""
1365
 
1366
- #: admin/includes/tab-settings.php:1618
1367
  msgid "Delete now"
1368
  msgstr ""
1369
 
1370
- #: admin/includes/tab-settings.php:1626
1371
  msgid "Create DB tables for this plugin"
1372
  msgstr ""
1373
 
1374
- #: admin/includes/tab-settings.php:1634
1375
  msgid "Create now"
1376
  msgstr ""
1377
 
1378
- #: admin/includes/tab-settings.php:1644
1379
  msgid ""
1380
- "<dfn title=\"When an unexpected blocking has occurred, please press the "
1381
- "button to find the blocked request in the dumped information which may help "
1382
- "to solve the issue.\">Diagnostic information</dfn><br />[ <a rel=\"noreferrer"
1383
- "\" href=\"https://wordpress.org/support/plugin/ip-geo-block\" title="
1384
- "\"WordPress &#8250; Support &raquo; IP Geo Block\">support forum</a> ]"
 
1385
  msgstr ""
1386
 
1387
- #: admin/includes/tab-settings.php:1651
1388
  msgid "Please copy &amp; paste when submitting your issue to support forum."
1389
  msgstr ""
1390
 
1391
- #: admin/includes/tab-settings.php:1651
1392
  msgid "Show information"
1393
  msgstr ""
1394
 
1395
- #: admin/includes/tab-settings.php:1667
1396
  msgid ""
1397
  "To enhance the protection ability, please refer to &#8220;<a rel=\"noreferrer"
1398
  "\" href=\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-"
@@ -1400,7 +1406,7 @@ msgid ""
1400
  "\">The best practice for target settings</a>&#8221;."
1401
  msgstr ""
1402
 
1403
- #: admin/includes/tab-settings.php:1668
1404
  msgid ""
1405
  "If you have any troubles with these, please check FAQ at <a rel=\"noreferrer"
1406
  "\" href=\"https://wordpress.org/plugins/ip-geo-block/faq/\" title=\"IP Geo "
@@ -1409,26 +1415,26 @@ msgid ""
1409
  "\">Codex</a>."
1410
  msgstr ""
1411
 
1412
- #: admin/includes/tab-settings.php:1675
1413
  msgid ""
1414
- "While Geolite2&thinsp;/&thinsp;Maxmind and IP2Location will fetch the local "
1415
- "databases, others will pass an IP address to the 3rd parties' API via HTTP."
1416
  msgstr ""
1417
 
1418
- #: admin/includes/tab-settings.php:1676
1419
  msgid ""
1420
- "Please select the appropriate APIs to fit the privacy law&thinsp;/&thinsp;"
1421
- "regulation in your country&thinsp;/&thinsp;region."
1422
  msgstr ""
1423
 
1424
- #: admin/includes/tab-settings.php:1685
1425
  #, php-format
1426
  msgid ""
1427
  "Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
1428
  "2.0.0+%s."
1429
  msgstr ""
1430
 
1431
- #: admin/includes/tab-settings.php:1693
1432
  msgid ""
1433
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1434
  "ipgeoblock.com/codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block"
@@ -1436,7 +1442,7 @@ msgid ""
1436
  "cache plugin."
1437
  msgstr ""
1438
 
1439
- #: admin/includes/tab-settings.php:1694
1440
  msgid ""
1441
  "If you find any issues or have something to suggest, please feel free to "
1442
  "open an issue at <a rel=\"noreferrer\" href=\"https://wordpress.org/support/"
@@ -1444,7 +1450,7 @@ msgid ""
1444
  "\">support forum</a>."
1445
  msgstr ""
1446
 
1447
- #: admin/includes/tab-settings.php:1701
1448
  msgid ""
1449
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1450
  "ipgeoblock.com/codex/record-settings-and-logs.html\" title=\"Codex | IP Geo "
@@ -1496,7 +1502,7 @@ msgid "Statistics in Logs"
1496
  msgstr ""
1497
 
1498
  #: admin/includes/tab-statistics.php:217
1499
- msgid "Statistics in IP address cache"
1500
  msgstr ""
1501
 
1502
  #: admin/includes/tab-statistics.php:230
@@ -1544,7 +1550,7 @@ msgstr ""
1544
 
1545
  #: admin/includes/tab-statistics.php:431
1546
  #, php-format
1547
- msgid "[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled."
1548
  msgstr ""
1549
 
1550
  #: admin/includes/tab-statistics.php:432
@@ -1553,8 +1559,8 @@ msgstr ""
1553
 
1554
  #: classes/class-ip-geo-block-apis.php:661
1555
  msgid ""
1556
- "You need to select at least one IP geolocation service. Otherwise "
1557
- "<strong>you'll be blocked</strong> after the cache expires."
1558
  msgstr ""
1559
 
1560
  #: classes/class-ip-geo-block-cron.php:222
@@ -1588,21 +1594,21 @@ msgid ""
1588
  "details."
1589
  msgstr ""
1590
 
1591
- #: classes/class-ip-geo-block-logs.php:138
1592
  #, php-format
1593
  msgid ""
1594
  "Creating a DB table %s had failed. Once de-activate this plugin, and then "
1595
  "activate again."
1596
  msgstr ""
1597
 
1598
- #: classes/class-ip-geo-block-logs.php:143
1599
  #, php-format
1600
  msgid ""
1601
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1602
  "again."
1603
  msgstr ""
1604
 
1605
- #: classes/class-ip-geo-block.php:415
1606
  msgid "Dashboard"
1607
  msgstr ""
1608
 
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: IP Geo Block 3.0.13\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2018-08-08 20:16-0700\n"
8
+ "PO-Revision-Date: 2018-08-08 20:19-0700\n"
9
  "Language-Team: \n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.0.9\n"
14
  "X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
15
  "esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
16
  "X-Poedit-Basepath: ..\n"
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
 
29
+ #: admin/class-ip-geo-block-admin.php:286
30
  msgid "Import settings ?"
31
  msgstr ""
32
 
33
+ #: admin/class-ip-geo-block-admin.php:287
34
  msgid "Create table ?"
35
  msgstr ""
36
 
37
+ #: admin/class-ip-geo-block-admin.php:288
38
  msgid "Delete table ?"
39
  msgstr ""
40
 
41
+ #: admin/class-ip-geo-block-admin.php:289
42
  msgid "Clear statistics ?"
43
  msgstr ""
44
 
45
+ #: admin/class-ip-geo-block-admin.php:290
46
  msgid "Clear cache ?"
47
  msgstr ""
48
 
49
+ #: admin/class-ip-geo-block-admin.php:291
50
  msgid "Clear logs ?"
51
  msgstr ""
52
 
53
+ #: admin/class-ip-geo-block-admin.php:292
54
  msgid "ajax for logged-in user"
55
  msgstr ""
56
 
57
+ #: admin/class-ip-geo-block-admin.php:293
58
  msgid "ajax for non logged-in user"
59
  msgstr ""
60
 
61
+ #: admin/class-ip-geo-block-admin.php:294
62
  #, php-format
63
  msgid "[Found: %d]"
64
  msgstr ""
65
 
66
+ #: admin/class-ip-geo-block-admin.php:295
67
  #, php-format
68
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
69
  msgstr ""
70
 
71
+ #: admin/class-ip-geo-block-admin.php:296
72
  msgid "This feature is available with HTML5 compliant browsers."
73
  msgstr ""
74
 
75
+ #: admin/class-ip-geo-block-admin.php:297
76
  msgid "The selected row cannot be found in the visible area."
77
  msgstr ""
78
 
79
+ #: admin/class-ip-geo-block-admin.php:298
80
+ #: admin/class-ip-geo-block-admin.php:1514
81
  #, php-format
82
  msgid "An error occurred while executing the ajax command `%s`."
83
  msgstr ""
84
 
85
+ #: admin/class-ip-geo-block-admin.php:302
86
  msgid "No data available in table"
87
  msgstr ""
88
 
89
+ #: admin/class-ip-geo-block-admin.php:303
90
  msgid "No matching records found"
91
  msgstr ""
92
 
93
+ #: admin/class-ip-geo-block-admin.php:304
94
  #: admin/includes/class-admin-ajax.php:111
95
+ #: admin/includes/class-admin-ajax.php:242
96
  #: admin/includes/tab-geolocation.php:70
97
  msgid "IP address"
98
  msgstr ""
99
 
100
+ #: admin/class-ip-geo-block-admin.php:305
101
  #: admin/includes/class-admin-ajax.php:112
102
+ #: admin/includes/class-admin-ajax.php:243
103
  msgid "Code"
104
  msgstr ""
105
 
106
+ #: admin/class-ip-geo-block-admin.php:306
107
  #: admin/includes/class-admin-ajax.php:113
108
+ #: admin/includes/class-admin-ajax.php:244
109
  msgid "ASN"
110
  msgstr ""
111
 
112
+ #: admin/class-ip-geo-block-admin.php:307
113
+ #: admin/includes/class-admin-ajax.php:245
114
  msgid "Host name"
115
  msgstr ""
116
 
117
+ #: admin/class-ip-geo-block-admin.php:308
118
  #: admin/includes/class-admin-ajax.php:114
119
+ #: admin/includes/class-admin-ajax.php:246
120
  msgid "Target"
121
  msgstr ""
122
 
123
+ #: admin/class-ip-geo-block-admin.php:309
124
+ #: admin/includes/class-admin-ajax.php:247
125
  msgid "Failure / Total"
126
  msgstr ""
127
 
128
+ #: admin/class-ip-geo-block-admin.php:310
129
+ #: admin/includes/class-admin-ajax.php:248
130
  msgid "Elapsed[sec]"
131
  msgstr ""
132
 
133
+ #: admin/class-ip-geo-block-admin.php:311
134
  #: admin/includes/class-admin-ajax.php:110
135
  msgid "Time"
136
  msgstr ""
137
 
138
+ #: admin/class-ip-geo-block-admin.php:312
139
  #: admin/includes/class-admin-ajax.php:115
140
  msgid "Result"
141
  msgstr ""
142
 
143
+ #: admin/class-ip-geo-block-admin.php:313
144
  #: admin/includes/class-admin-ajax.php:116
145
  msgid "Request"
146
  msgstr ""
147
 
148
+ #: admin/class-ip-geo-block-admin.php:314
149
  #: admin/includes/class-admin-ajax.php:117
150
  msgid "User agent"
151
  msgstr ""
152
 
153
+ #: admin/class-ip-geo-block-admin.php:315
154
  #: admin/includes/class-admin-ajax.php:118
155
  msgid "HTTP headers"
156
  msgstr ""
157
 
158
+ #: admin/class-ip-geo-block-admin.php:316
159
  #: admin/includes/class-admin-ajax.php:119
160
  msgid "$_POST data"
161
  msgstr ""
162
 
163
+ #: admin/class-ip-geo-block-admin.php:342
164
  msgid "Contribute on GitHub"
165
  msgstr ""
166
 
167
+ #: admin/class-ip-geo-block-admin.php:356
168
+ #: admin/class-ip-geo-block-admin.php:475
169
+ #: admin/class-ip-geo-block-admin.php:692
170
  msgid "Settings"
171
  msgstr ""
172
 
173
+ #: admin/class-ip-geo-block-admin.php:453
174
+ #: admin/class-ip-geo-block-admin.php:454
175
+ #: admin/class-ip-geo-block-admin.php:464
176
+ #: admin/class-ip-geo-block-admin.php:465
177
+ #: admin/class-ip-geo-block-admin.php:474
178
+ #: admin/class-ip-geo-block-admin.php:483
179
  msgid "IP Geo Block"
180
  msgstr ""
181
 
182
+ #: admin/class-ip-geo-block-admin.php:484
183
+ #: admin/class-ip-geo-block-admin.php:697
184
  msgid "Site List"
185
  msgstr ""
186
 
187
+ #: admin/class-ip-geo-block-admin.php:513
188
  msgid "You need WordPress 3.7+."
189
  msgstr ""
190
 
191
+ #: admin/class-ip-geo-block-admin.php:519
192
  #, php-format
193
  msgid ""
194
  "Now downloading geolocation databases in background. After a little while, "
196
  "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
197
  msgstr ""
198
 
199
+ #: admin/class-ip-geo-block-admin.php:525
200
  #, php-format
201
  msgid ""
202
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
203
  "confirm it at <a href=\"%s\">Validation rule settings</a>."
204
  msgstr ""
205
 
206
+ #: admin/class-ip-geo-block-admin.php:534
207
  msgid "Local database and matching rule have been updated."
208
  msgstr ""
209
 
210
+ #: admin/class-ip-geo-block-admin.php:545
211
  msgid ""
212
  "Once you logout, you will be unable to login again because the number of "
213
  "login attempts reaches the limit."
214
  msgstr ""
215
 
216
+ #: admin/class-ip-geo-block-admin.php:547
217
  #, php-format
218
  msgid ""
219
  "Please execute \"<strong>Clear cache</strong>\" on <a href=\"%s\">Statistics "
220
  "tab</a> to prevent locking yourself out."
221
  msgstr ""
222
 
223
+ #: admin/class-ip-geo-block-admin.php:557
224
  msgid ""
225
  "Once you logout, you will be unable to login again because your country code "
226
  "or IP address is in the blacklist."
227
  msgstr ""
228
 
229
+ #: admin/class-ip-geo-block-admin.php:558
230
  msgid ""
231
  "Once you logout, you will be unable to login again because your country code "
232
  "or IP address is not in the whitelist."
233
  msgstr ""
234
 
235
+ #: admin/class-ip-geo-block-admin.php:562
236
  #, php-format
237
  msgid "Please check your &#8220;%sValidation rule settings%s&#8221;."
238
  msgstr ""
239
 
240
+ #: admin/class-ip-geo-block-admin.php:566
241
  #, php-format
242
  msgid ""
243
  "Please confirm your local geolocation databases at &#8220;%sLocal database "
245
  "%sStatistics in cache%s&#8221; section."
246
  msgstr ""
247
 
248
+ #: admin/class-ip-geo-block-admin.php:587
249
  msgid ""
250
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
251
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
252
  "select &#8220;init&#8221; action hook."
253
  msgstr ""
254
 
255
+ #: admin/class-ip-geo-block-admin.php:693
256
  msgid "Statistics"
257
  msgstr ""
258
 
259
+ #: admin/class-ip-geo-block-admin.php:694
260
  msgid "Logs"
261
  msgstr ""
262
 
263
+ #: admin/class-ip-geo-block-admin.php:695
264
  msgid "Search"
265
  msgstr ""
266
 
267
+ #: admin/class-ip-geo-block-admin.php:696
268
  msgid "Attribution"
269
  msgstr ""
270
 
271
+ #: admin/class-ip-geo-block-admin.php:713
272
+ #: admin/class-ip-geo-block-admin.php:730
273
  msgid "Network wide"
274
  msgstr ""
275
 
276
+ #: admin/class-ip-geo-block-admin.php:743
277
  msgid "Toggle all"
278
  msgstr ""
279
 
280
+ #: admin/class-ip-geo-block-admin.php:746
281
  msgid ""
282
+ "Independent of &#8220;Privacy and record settings&#8221;, you can see all "
283
  "the requests validated by this plugin in almost real time."
284
  msgstr ""
285
 
286
+ #: admin/class-ip-geo-block-admin.php:746 admin/includes/tab-accesslog.php:39
287
  msgid "Live update"
288
  msgstr ""
289
 
290
+ #: admin/class-ip-geo-block-admin.php:750
291
  msgid "Open a new window on clicking the link in the chart."
292
  msgstr ""
293
 
294
+ #: admin/class-ip-geo-block-admin.php:750
295
  msgid "Open a new window"
296
  msgstr ""
297
 
298
+ #: admin/class-ip-geo-block-admin.php:773
299
  msgid "Thanks for providing these great services for free."
300
  msgstr ""
301
 
302
+ #: admin/class-ip-geo-block-admin.php:774
303
  msgid ""
304
  "(Most browsers will redirect you to each site <a href=\"http://www."
305
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
306
  "when you click the link</a>.)"
307
  msgstr ""
308
 
309
+ #: admin/class-ip-geo-block-admin.php:779
310
  msgid "Back to top"
311
  msgstr ""
312
 
313
+ #: admin/class-ip-geo-block-admin.php:871
314
  msgid "Enable"
315
  msgstr ""
316
 
317
+ #: admin/class-ip-geo-block-admin.php:886
318
  msgid "Select one"
319
  msgstr ""
320
 
321
+ #: admin/class-ip-geo-block-admin.php:1304
322
  msgid "You do not have sufficient permissions to access this page."
323
  msgstr ""
324
 
325
+ #: admin/class-ip-geo-block-admin.php:1331
326
  #: admin/includes/class-admin-rewrite.php:194
327
  #: classes/class-ip-geo-block-cron.php:217
328
  #: classes/class-ip-geo-block-cron.php:321
329
  #: classes/class-ip-geo-block-cron.php:395
330
+ #: classes/class-ip-geo-block-opts.php:459
331
  #, php-format
332
  msgid "Unable to write <code>%s</code>. Please check the permission."
333
  msgstr ""
334
 
335
+ #: admin/class-ip-geo-block-admin.php:1361
336
  msgid "Settings saved."
337
  msgstr ""
338
 
345
  msgid "UNKNOWN"
346
  msgstr ""
347
 
348
+ #: admin/includes/class-admin-ajax.php:203
349
  #, php-format
350
  msgid "The user %s (user ID: %d) is in use."
351
  msgstr ""
352
 
353
+ #: admin/includes/class-admin-ajax.php:499
354
  #, php-format
355
  msgid ""
356
  "illegal format at %s. Please delete the corresponding line and try again."
378
  msgid "Validation logs"
379
  msgstr ""
380
 
381
+ #: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:766
382
+ #: admin/includes/tab-settings.php:1425
383
  msgid "Help"
384
  msgstr ""
385
 
461
  msgid "Export logs"
462
  msgstr ""
463
 
464
+ #: admin/includes/tab-accesslog.php:153 admin/includes/tab-settings.php:1595
465
  #: admin/includes/tab-statistics.php:294
466
  msgid "Export to the local file"
467
  msgstr ""
491
  msgstr ""
492
 
493
  #: admin/includes/tab-geolocation.php:42
494
+ msgid "Geolocation API"
495
  msgstr ""
496
 
497
+ #: admin/includes/tab-geolocation.php:86 admin/includes/tab-settings.php:1099
498
  msgid ""
499
+ "<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
500
+ "Moreover, this option replaces the end of IP address with &#8220;***&#8221; "
501
+ "to make it anonymous.\">Anonymize IP address</dfn>"
 
502
  msgstr ""
503
 
504
+ #: admin/includes/tab-geolocation.php:102
505
+ msgid "Search geolocation"
506
  msgstr ""
507
 
508
+ #: admin/includes/tab-geolocation.php:110
509
  msgid "Search now"
510
  msgstr ""
511
 
628
  msgid "Open CIDR calculator for IPv4 / IPv6."
629
  msgstr ""
630
 
631
+ #: admin/includes/tab-settings.php:127 admin/includes/tab-settings.php:794
632
  msgid "Matching rule"
633
  msgstr ""
634
 
710
 
711
  #: admin/includes/tab-settings.php:299
712
  msgid ""
713
+ "( See &#8220;<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
714
  "Roles_and_Capabilities\" title=\"Roles and Capabilities &laquo; WordPress "
715
+ "Codex\">Roles and Capabilities</a>&#8221; )"
716
  msgstr ""
717
 
718
  #: admin/includes/tab-settings.php:307
725
  msgstr ""
726
 
727
  #: admin/includes/tab-settings.php:318 admin/includes/tab-settings.php:499
728
+ #: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:1209
729
  msgid "Disable"
730
  msgstr ""
731
 
738
  msgstr ""
739
 
740
  #: admin/includes/tab-settings.php:330
741
+ msgid ""
742
+ "<dfn title=\"This is applied to &#8220;XML-RPC&#8221; and &#8220;Login "
743
+ "form&#8221;. Lockout period is defined as expiration time of &#8220;IP "
744
+ "address Cache&#8221; in &#8220;Privacy and record settings&#8221; section."
745
+ "\">Max number of failed login attempts per IP address</dfn>"
746
+ msgstr ""
747
+
748
+ #: admin/includes/tab-settings.php:355
749
  #, php-format
750
  msgid ""
751
  "<dfn title=\"You can put your original 403.php and so on into your theme "
752
  "directory.\">Response code</dfn> %s"
753
  msgstr ""
754
 
755
+ #: admin/includes/tab-settings.php:385 admin/includes/tab-settings.php:881
756
  msgid ""
757
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
758
  "to a public facing page, visitors would not be blocked on the page to "
761
  "\">Redirect URL</dfn>"
762
  msgstr ""
763
 
764
+ #: admin/includes/tab-settings.php:403 admin/includes/tab-settings.php:900
765
  msgid ""
766
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
767
  "message</dfn>"
768
  msgstr ""
769
 
 
 
 
 
 
 
 
 
770
  #: admin/includes/tab-settings.php:423
771
  msgid "Select when to run the validation."
772
  msgstr ""
816
 
817
  #: admin/includes/tab-settings.php:480 admin/includes/tab-settings.php:500
818
  #: admin/includes/tab-settings.php:533 admin/includes/tab-settings.php:539
819
+ #: admin/includes/tab-settings.php:785
820
  msgid "Block by country"
821
  msgstr ""
822
 
908
  "Zero-day Exploit&#8221; (for logged-in user)."
909
  msgstr ""
910
 
911
+ #: admin/includes/tab-settings.php:607 admin/includes/tab-settings.php:686
912
+ #: admin/includes/tab-settings.php:747
913
  msgid "Exceptions"
914
  msgstr ""
915
 
937
  #: admin/includes/tab-settings.php:627
938
  #, php-format
939
  msgid ""
940
+ "It configures &#8220;%s&#8221; to validate a direct request to the PHP file "
941
+ "which does not load WordPress core. Make sure to deny direct access to the "
942
+ "hidden files beginning with a dot by the server's configuration."
943
  msgstr ""
944
 
945
  #: admin/includes/tab-settings.php:628
946
  msgid "Sorry, but your server type is not supported."
947
  msgstr ""
948
 
949
+ #: admin/includes/tab-settings.php:629
950
+ msgid ""
951
+ "You need to click the &#8220;Save Changes&#8221; button for imported "
952
+ "settings to take effect."
953
+ msgstr ""
954
+
955
+ #: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:726
956
  msgid "Force to load WP core"
957
  msgstr ""
958
 
959
+ #: admin/includes/tab-settings.php:670
960
  msgid "Plugins area"
961
  msgstr ""
962
 
963
+ #: admin/includes/tab-settings.php:731
964
  msgid "Themes area"
965
  msgstr ""
966
 
967
+ #: admin/includes/tab-settings.php:766
968
  msgid "Front-end target settings"
969
  msgstr ""
970
 
971
+ #: admin/includes/tab-settings.php:804
972
  msgid "Follow &#8220;Validation rule settings&#8221;"
973
  msgstr ""
974
 
975
+ #: admin/includes/tab-settings.php:849
976
  #, php-format
977
  msgid ""
978
  "<dfn title=\"You can configure a different response code from the Back-end. "
980
  "\">Response code</dfn> %s"
981
  msgstr ""
982
 
983
+ #: admin/includes/tab-settings.php:915
984
  msgid ""
985
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
986
  msgstr ""
987
 
988
+ #: admin/includes/tab-settings.php:927
989
  msgid ""
990
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
991
  "target.\">Post type</dfn>"
992
  msgstr ""
993
 
994
+ #: admin/includes/tab-settings.php:939
995
  msgid ""
996
  "<dfn title=\"Specify the individual category on a single page or archive "
997
  "page as a blocking target.\">Category</dfn>"
998
  msgstr ""
999
 
1000
+ #: admin/includes/tab-settings.php:951
1001
  msgid ""
1002
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1003
  "a blocking target.\">Tag</dfn>"
1004
  msgstr ""
1005
 
1006
+ #: admin/includes/tab-settings.php:966
1007
  msgid "Specify the validation target on front-end."
1008
  msgstr ""
1009
 
1010
+ #: admin/includes/tab-settings.php:966
1011
  msgid "Validation target"
1012
  msgstr ""
1013
 
1014
+ #: admin/includes/tab-settings.php:977
1015
  msgid "All requests"
1016
  msgstr ""
1017
 
1018
+ #: admin/includes/tab-settings.php:978
1019
  msgid "Specify the targets"
1020
  msgstr ""
1021
 
1022
+ #: admin/includes/tab-settings.php:981
1023
  msgid ""
1024
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1025
  "wp&#8221; action hook. It means that this feature would not be compatible "
1026
  "with any page caching."
1027
  msgstr ""
1028
 
1029
+ #: admin/includes/tab-settings.php:988
1030
  msgid ""
1031
  "<dfn title=\"Specify the frequency of request for certain period of time."
1032
  "\">Blocking condition</dfn>"
1033
  msgstr ""
1034
 
1035
+ #: admin/includes/tab-settings.php:990
1036
  #, php-format
1037
  msgid "More than %1$s page view (PV) in %2$s seconds"
1038
  msgstr ""
1039
 
1040
+ #: admin/includes/tab-settings.php:999
1041
  msgid ""
1042
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1043
  "behaved bots and crawlers</dfn>"
1044
  msgstr ""
1045
 
1046
+ #: admin/includes/tab-settings.php:1017
1047
  msgid ""
1048
  "A part of user agent string and a qualification connected with a separator "
1049
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
1053
  "qualification&#8221;."
1054
  msgstr ""
1055
 
1056
+ #: admin/includes/tab-settings.php:1017
1057
  msgid "UA string and qualification"
1058
  msgstr ""
1059
 
1060
+ #: admin/includes/tab-settings.php:1036
1061
  msgid "Specify the name of actions as exception that is invariably blocked."
1062
  msgstr ""
1063
 
1064
+ #: admin/includes/tab-settings.php:1036
1065
  msgid "Excluded actions"
1066
  msgstr ""
1067
 
1068
+ #: admin/includes/tab-settings.php:1055
1069
  msgid ""
1070
  "It enables to verify the host by reverse DNS lookup which would spend some "
1071
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
1073
  "return &#8220;true&#8221;."
1074
  msgstr ""
1075
 
1076
+ #: admin/includes/tab-settings.php:1055
1077
  msgid "DNS reverse lookup"
1078
  msgstr ""
1079
 
1080
+ #: admin/includes/tab-settings.php:1072
1081
  msgid ""
1082
  "It enables to simulate validation without deployment. The results can be "
1083
+ "found as &#8220;public&#8221; in Logs."
1084
  msgstr ""
1085
 
1086
+ #: admin/includes/tab-settings.php:1072
1087
  msgid "Simulation mode"
1088
  msgstr ""
1089
 
1090
+ #: admin/includes/tab-settings.php:1090
1091
  msgid "Privacy and record settings"
1092
  msgstr ""
1093
 
1094
+ #: admin/includes/tab-settings.php:1115
1095
+ msgid ""
1096
+ "<dfn title=\"This option restricts not to send IP address to the external "
1097
+ "Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
1098
+ msgstr ""
1099
+
1100
+ #: admin/includes/tab-settings.php:1131
1101
+ msgid ""
1102
+ "<dfn title=\"This option enables to record the number blocked countries and "
1103
+ "the number of blocked requests per day.\">Record &#8220;Statistics&#8221;</"
1104
+ "dfn>"
1105
+ msgstr ""
1106
+
1107
+ #: admin/includes/tab-settings.php:1148
1108
+ msgid "Maximum period for &#8220;Statistics&#8221; [days]"
1109
+ msgstr ""
1110
+
1111
+ #: admin/includes/tab-settings.php:1166
1112
  msgid ""
1113
  "<dfn title=\"This option enables to record the IP address, country code and "
1114
  "failure counter of login attempts into the cache on database to minimize the "
1115
+ "impact on site speed.\">Record &#8220;IP address Cache&#8221;</dfn>"
1116
  msgstr ""
1117
 
1118
+ #: admin/includes/tab-settings.php:1182
 
1119
  msgid ""
1120
+ "<dfn title=\"If user authentication fails consecutively beyond &#8220;Max "
1121
+ "number of failed login attempts per IP address&#8221;, subsequent login will "
1122
+ "also be prohibited for this period.\">Expiration time [sec] for each entry</"
1123
+ "dfn>"
1124
  msgstr ""
1125
 
1126
+ #: admin/includes/tab-settings.php:1198
1127
  msgid ""
1128
  "<dfn title=\"This option enables to record the validation logs including IP "
1129
  "addresses.\">Record &#8220;Logs&#8221;</dfn>"
1130
  msgstr ""
1131
 
1132
+ #: admin/includes/tab-settings.php:1210
1133
  msgid "When blocked"
1134
  msgstr ""
1135
 
1136
+ #: admin/includes/tab-settings.php:1211
1137
  msgid "When passed"
1138
  msgstr ""
1139
 
1140
+ #: admin/includes/tab-settings.php:1212
1141
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1142
  msgstr ""
1143
 
1144
+ #: admin/includes/tab-settings.php:1213
1145
  msgid "Unauthenticated visitor"
1146
  msgstr ""
1147
 
1148
+ #: admin/includes/tab-settings.php:1214
1149
  msgid "Authenticated user"
1150
  msgstr ""
1151
 
1152
+ #: admin/includes/tab-settings.php:1215
1153
  msgid "All the validation"
1154
  msgstr ""
1155
 
1156
+ #: admin/includes/tab-settings.php:1224
1157
+ #, php-format
1158
  msgid ""
1159
+ "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1160
+ "\">Expiration time [days] for each entry</dfn>"
1161
  msgstr ""
1162
 
1163
+ #: admin/includes/tab-settings.php:1240
 
1164
  msgid ""
1165
+ "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
1166
+ "with value</dfn>"
1167
  msgstr ""
1168
 
1169
+ #: admin/includes/tab-settings.php:1259
1170
  msgid "Maximum entries of &#8220;Logs&#8221;"
1171
  msgstr ""
1172
 
1173
+ #: admin/includes/tab-settings.php:1276
1174
  msgid ""
1175
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1176
  "&#8220;Live update&#8221;</dfn>"
1177
  msgstr ""
1178
 
1179
+ #: admin/includes/tab-settings.php:1288
1180
  msgid "Ordinary file"
1181
  msgstr ""
1182
 
1183
+ #: admin/includes/tab-settings.php:1289
1184
  msgid "In-Memory"
1185
  msgstr ""
1186
 
1187
+ #: admin/includes/tab-settings.php:1292
1188
  msgid "PDO_SQLITE driver not available"
1189
  msgstr ""
1190
 
1191
+ #: admin/includes/tab-settings.php:1293
1192
  msgid ""
1193
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1194
  "without conflict with other plugins."
1195
  msgstr ""
1196
 
1197
+ #: admin/includes/tab-settings.php:1294
1198
  msgid ""
1199
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1200
  "with other plugins using this method."
1201
  msgstr ""
1202
 
1203
+ #: admin/includes/tab-settings.php:1303
1204
  msgid "Reset database source of &#8220;Live update&#8221;"
1205
  msgstr ""
1206
 
1207
+ #: admin/includes/tab-settings.php:1311
1208
  msgid "Reset now"
1209
  msgstr ""
1210
 
1211
+ #: admin/includes/tab-settings.php:1319 admin/includes/tab-settings.php:1457
1212
  msgid ""
1213
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1214
  "once and activate again."
1215
  msgstr ""
1216
 
1217
+ #: admin/includes/tab-settings.php:1325
1218
  msgid ""
1219
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1220
+ "expired entries in &#8220;IP address Cache&#8221; and &#8220;Logs&#8221;."
1221
+ "\">Interval [sec] to cleanup expired entries of IP address</dfn>"
1222
  msgstr ""
1223
 
1224
+ #: admin/includes/tab-settings.php:1334 admin/includes/tab-settings.php:1474
1225
  #, php-format
1226
  msgid "Next schedule: %s"
1227
  msgstr ""
1228
 
1229
+ #: admin/includes/tab-settings.php:1342
 
 
 
 
 
 
 
 
 
 
 
1230
  msgid "Remove all settings and records at uninstallation"
1231
  msgstr ""
1232
 
1233
+ #: admin/includes/tab-settings.php:1359
1234
  msgid "Geolocation API settings"
1235
  msgstr ""
1236
 
1237
+ #: admin/includes/tab-settings.php:1380
1238
  msgid ""
1239
+ "<dfn title=\"IP address Cache and local databases are scanned at the top "
1240
  "priority.\">API selection and key settings</dfn>"
1241
  msgstr ""
1242
 
1243
+ #: admin/includes/tab-settings.php:1400
1244
  msgid "Timeout for network API [sec]"
1245
  msgstr ""
1246
 
1247
+ #: admin/includes/tab-settings.php:1418
1248
  #, php-format
1249
  msgid ""
1250
+ "Can not find Geolocation API libraries in <code>%s</code>. It seems to have "
1251
  "failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
1252
  "tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
1253
  "contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
1259
  "troubles? | IP Geo Block\">this instruction</a>."
1260
  msgstr ""
1261
 
1262
+ #: admin/includes/tab-settings.php:1425
1263
  msgid "Local database settings"
1264
  msgstr ""
1265
 
1266
+ #: admin/includes/tab-settings.php:1439
1267
  msgid "database"
1268
  msgstr ""
1269
 
1270
+ #: admin/includes/tab-settings.php:1440 classes/class-ip-geo-block-cron.php:419
1271
  #, php-format
1272
  msgid "Last update: %s"
1273
  msgstr ""
1274
 
1275
+ #: admin/includes/tab-settings.php:1463
1276
  msgid "Auto updating (once a month)"
1277
  msgstr ""
1278
 
1279
+ #: admin/includes/tab-settings.php:1481
1280
  msgid "Download database"
1281
  msgstr ""
1282
 
1283
+ #: admin/includes/tab-settings.php:1489
1284
  msgid "Download now"
1285
  msgstr ""
1286
 
1287
+ #: admin/includes/tab-settings.php:1500
1288
  msgid "Submission settings"
1289
  msgstr ""
1290
 
1291
+ #: admin/includes/tab-settings.php:1512
1292
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
1293
  msgstr ""
1294
 
1295
+ #: admin/includes/tab-settings.php:1512
1296
  msgid "Message on comment form"
1297
  msgstr ""
1298
 
1299
+ #: admin/includes/tab-settings.php:1524
1300
  msgid "None"
1301
  msgstr ""
1302
 
1303
+ #: admin/includes/tab-settings.php:1525
1304
  msgid "Top"
1305
  msgstr ""
1306
 
1307
+ #: admin/includes/tab-settings.php:1526
1308
  msgid "Bottom"
1309
  msgstr ""
1310
 
1311
+ #: admin/includes/tab-settings.php:1537
1312
  msgid "Plugin settings"
1313
  msgstr ""
1314
 
1315
+ #: admin/includes/tab-settings.php:1550
1316
  msgid ""
1317
  "<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
1318
  "settings</dfn>"
1319
  msgstr ""
1320
 
1321
+ #: admin/includes/tab-settings.php:1570
1322
  msgid ""
1323
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
1324
  "dfn>"
1325
  msgstr ""
1326
 
1327
+ #: admin/includes/tab-settings.php:1588
 
 
 
 
 
 
1328
  msgid "Export / Import settings"
1329
  msgstr ""
1330
 
1331
+ #: admin/includes/tab-settings.php:1595
1332
  msgid "Export settings"
1333
  msgstr ""
1334
 
1335
+ #: admin/includes/tab-settings.php:1596
1336
  msgid "Import from the local file"
1337
  msgstr ""
1338
 
1339
+ #: admin/includes/tab-settings.php:1596
1340
  msgid "Import settings"
1341
  msgstr ""
1342
 
1343
+ #: admin/includes/tab-settings.php:1605
1344
  msgid "Import pre-defined settings"
1345
  msgstr ""
1346
 
1347
+ #: admin/includes/tab-settings.php:1612
1348
  msgid ""
1349
  "Import the default settings to revert to the &#8220;Right after "
1350
  "installing&#8221; state"
1351
  msgstr ""
1352
 
1353
+ #: admin/includes/tab-settings.php:1612
1354
  msgid "Default settings"
1355
  msgstr ""
1356
 
1357
+ #: admin/includes/tab-settings.php:1613
1358
  msgid ""
1359
  "Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
1360
  "for the &#8220;Back-end target settings&#8221;"
1361
  msgstr ""
1362
 
1363
+ #: admin/includes/tab-settings.php:1613
1364
  msgid "Best for Back-end"
1365
  msgstr ""
1366
 
1367
+ #: admin/includes/tab-settings.php:1623
1368
  msgid "Delete DB tables for this plugin"
1369
  msgstr ""
1370
 
1371
+ #: admin/includes/tab-settings.php:1631
1372
  msgid "Delete now"
1373
  msgstr ""
1374
 
1375
+ #: admin/includes/tab-settings.php:1639
1376
  msgid "Create DB tables for this plugin"
1377
  msgstr ""
1378
 
1379
+ #: admin/includes/tab-settings.php:1647
1380
  msgid "Create now"
1381
  msgstr ""
1382
 
1383
+ #: admin/includes/tab-settings.php:1657
1384
  msgid ""
1385
+ "<dfn title=\"When you have some unexpected blocking experiences, please "
1386
+ "press the button to find the blocked requests at the end of dumped "
1387
+ "information which may help you to solve the issues.\">Diagnostic "
1388
+ "information</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
1389
+ "support/plugin/ip-geo-block\" title=\"WordPress &#8250; Support &raquo; IP "
1390
+ "Geo Block\">support forum</a> ]"
1391
  msgstr ""
1392
 
1393
+ #: admin/includes/tab-settings.php:1664
1394
  msgid "Please copy &amp; paste when submitting your issue to support forum."
1395
  msgstr ""
1396
 
1397
+ #: admin/includes/tab-settings.php:1664
1398
  msgid "Show information"
1399
  msgstr ""
1400
 
1401
+ #: admin/includes/tab-settings.php:1680
1402
  msgid ""
1403
  "To enhance the protection ability, please refer to &#8220;<a rel=\"noreferrer"
1404
  "\" href=\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-"
1406
  "\">The best practice for target settings</a>&#8221;."
1407
  msgstr ""
1408
 
1409
+ #: admin/includes/tab-settings.php:1681
1410
  msgid ""
1411
  "If you have any troubles with these, please check FAQ at <a rel=\"noreferrer"
1412
  "\" href=\"https://wordpress.org/plugins/ip-geo-block/faq/\" title=\"IP Geo "
1415
  "\">Codex</a>."
1416
  msgstr ""
1417
 
1418
+ #: admin/includes/tab-settings.php:1688
1419
  msgid ""
1420
+ "While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
1421
+ "others will pass an IP address to the 3rd parties' API via HTTP."
1422
  msgstr ""
1423
 
1424
+ #: admin/includes/tab-settings.php:1689
1425
  msgid ""
1426
+ "Please select the appropriate APIs to fit the privacy law / regulation in "
1427
+ "your country / region."
1428
  msgstr ""
1429
 
1430
+ #: admin/includes/tab-settings.php:1698
1431
  #, php-format
1432
  msgid ""
1433
  "Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
1434
  "2.0.0+%s."
1435
  msgstr ""
1436
 
1437
+ #: admin/includes/tab-settings.php:1706
1438
  msgid ""
1439
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1440
  "ipgeoblock.com/codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block"
1442
  "cache plugin."
1443
  msgstr ""
1444
 
1445
+ #: admin/includes/tab-settings.php:1707
1446
  msgid ""
1447
  "If you find any issues or have something to suggest, please feel free to "
1448
  "open an issue at <a rel=\"noreferrer\" href=\"https://wordpress.org/support/"
1450
  "\">support forum</a>."
1451
  msgstr ""
1452
 
1453
+ #: admin/includes/tab-settings.php:1714
1454
  msgid ""
1455
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1456
  "ipgeoblock.com/codex/record-settings-and-logs.html\" title=\"Codex | IP Geo "
1502
  msgstr ""
1503
 
1504
  #: admin/includes/tab-statistics.php:217
1505
+ msgid "Statistics in IP address Cache"
1506
  msgstr ""
1507
 
1508
  #: admin/includes/tab-statistics.php:230
1550
 
1551
  #: admin/includes/tab-statistics.php:431
1552
  #, php-format
1553
+ msgid "[ %sRecord &#8220;IP address Cache&#8221;%s ] is disabled."
1554
  msgstr ""
1555
 
1556
  #: admin/includes/tab-statistics.php:432
1559
 
1560
  #: classes/class-ip-geo-block-apis.php:661
1561
  msgid ""
1562
+ "You need to select at least one IP Geolocation API. Otherwise <strong>you'll "
1563
+ "be blocked</strong> after the cache expires."
1564
  msgstr ""
1565
 
1566
  #: classes/class-ip-geo-block-cron.php:222
1594
  "details."
1595
  msgstr ""
1596
 
1597
+ #: classes/class-ip-geo-block-logs.php:234
1598
  #, php-format
1599
  msgid ""
1600
  "Creating a DB table %s had failed. Once de-activate this plugin, and then "
1601
  "activate again."
1602
  msgstr ""
1603
 
1604
+ #: classes/class-ip-geo-block-logs.php:239
1605
  #, php-format
1606
  msgid ""
1607
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1608
  "again."
1609
  msgstr ""
1610
 
1611
+ #: classes/class-ip-geo-block.php:416
1612
  msgid "Dashboard"
1613
  msgstr ""
1614
 
languages/ip-geo-block.pot CHANGED
@@ -2,17 +2,17 @@
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: IP Geo Block 3.0.12\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
- "POT-Creation-Date: 2018-05-20 16:59+0900\n"
8
- "PO-Revision-Date: 2018-05-20 17:00+0900\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "Language: en\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Poedit 2.0.6\n"
16
  "X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
17
  "esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
18
  "X-Poedit-Basepath: ..\n"
@@ -26,169 +26,169 @@ msgid ""
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
 
29
- #: admin/class-ip-geo-block-admin.php:269
30
  msgid "Import settings ?"
31
  msgstr ""
32
 
33
- #: admin/class-ip-geo-block-admin.php:270
34
  msgid "Create table ?"
35
  msgstr ""
36
 
37
- #: admin/class-ip-geo-block-admin.php:271
38
  msgid "Delete table ?"
39
  msgstr ""
40
 
41
- #: admin/class-ip-geo-block-admin.php:272
42
  msgid "Clear statistics ?"
43
  msgstr ""
44
 
45
- #: admin/class-ip-geo-block-admin.php:273
46
  msgid "Clear cache ?"
47
  msgstr ""
48
 
49
- #: admin/class-ip-geo-block-admin.php:274
50
  msgid "Clear logs ?"
51
  msgstr ""
52
 
53
- #: admin/class-ip-geo-block-admin.php:275
54
  msgid "ajax for logged-in user"
55
  msgstr ""
56
 
57
- #: admin/class-ip-geo-block-admin.php:276
58
  msgid "ajax for non logged-in user"
59
  msgstr ""
60
 
61
- #: admin/class-ip-geo-block-admin.php:277
62
  #, php-format
63
  msgid "[Found: %d]"
64
  msgstr ""
65
 
66
- #: admin/class-ip-geo-block-admin.php:278
67
  #, php-format
68
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
69
  msgstr ""
70
 
71
- #: admin/class-ip-geo-block-admin.php:279
72
  msgid "This feature is available with HTML5 compliant browsers."
73
  msgstr ""
74
 
75
- #: admin/class-ip-geo-block-admin.php:280
76
  msgid "The selected row cannot be found in the visible area."
77
  msgstr ""
78
 
79
- #: admin/class-ip-geo-block-admin.php:281
80
- #: admin/class-ip-geo-block-admin.php:1483
81
  #, php-format
82
  msgid "An error occurred while executing the ajax command `%s`."
83
  msgstr ""
84
 
85
- #: admin/class-ip-geo-block-admin.php:285
86
  msgid "No data available in table"
87
  msgstr ""
88
 
89
- #: admin/class-ip-geo-block-admin.php:286
90
  msgid "No matching records found"
91
  msgstr ""
92
 
93
- #: admin/class-ip-geo-block-admin.php:287
94
  #: admin/includes/class-admin-ajax.php:111
95
- #: admin/includes/class-admin-ajax.php:237
96
  #: admin/includes/tab-geolocation.php:70
97
  msgid "IP address"
98
  msgstr ""
99
 
100
- #: admin/class-ip-geo-block-admin.php:288
101
  #: admin/includes/class-admin-ajax.php:112
102
- #: admin/includes/class-admin-ajax.php:238
103
  msgid "Code"
104
  msgstr ""
105
 
106
- #: admin/class-ip-geo-block-admin.php:289
107
  #: admin/includes/class-admin-ajax.php:113
108
- #: admin/includes/class-admin-ajax.php:239
109
  msgid "ASN"
110
  msgstr ""
111
 
112
- #: admin/class-ip-geo-block-admin.php:290
113
- #: admin/includes/class-admin-ajax.php:240
114
  msgid "Host name"
115
  msgstr ""
116
 
117
- #: admin/class-ip-geo-block-admin.php:291
118
  #: admin/includes/class-admin-ajax.php:114
119
- #: admin/includes/class-admin-ajax.php:241
120
  msgid "Target"
121
  msgstr ""
122
 
123
- #: admin/class-ip-geo-block-admin.php:292
124
- #: admin/includes/class-admin-ajax.php:242
125
  msgid "Failure / Total"
126
  msgstr ""
127
 
128
- #: admin/class-ip-geo-block-admin.php:293
129
- #: admin/includes/class-admin-ajax.php:243
130
  msgid "Elapsed[sec]"
131
  msgstr ""
132
 
133
- #: admin/class-ip-geo-block-admin.php:294
134
  #: admin/includes/class-admin-ajax.php:110
135
  msgid "Time"
136
  msgstr ""
137
 
138
- #: admin/class-ip-geo-block-admin.php:295
139
  #: admin/includes/class-admin-ajax.php:115
140
  msgid "Result"
141
  msgstr ""
142
 
143
- #: admin/class-ip-geo-block-admin.php:296
144
  #: admin/includes/class-admin-ajax.php:116
145
  msgid "Request"
146
  msgstr ""
147
 
148
- #: admin/class-ip-geo-block-admin.php:297
149
  #: admin/includes/class-admin-ajax.php:117
150
  msgid "User agent"
151
  msgstr ""
152
 
153
- #: admin/class-ip-geo-block-admin.php:298
154
  #: admin/includes/class-admin-ajax.php:118
155
  msgid "HTTP headers"
156
  msgstr ""
157
 
158
- #: admin/class-ip-geo-block-admin.php:299
159
  #: admin/includes/class-admin-ajax.php:119
160
  msgid "$_POST data"
161
  msgstr ""
162
 
163
- #: admin/class-ip-geo-block-admin.php:325
164
  msgid "Contribute on GitHub"
165
  msgstr ""
166
 
167
- #: admin/class-ip-geo-block-admin.php:339
168
- #: admin/class-ip-geo-block-admin.php:447
169
- #: admin/class-ip-geo-block-admin.php:664
170
  msgid "Settings"
171
  msgstr ""
172
 
173
- #: admin/class-ip-geo-block-admin.php:425
174
- #: admin/class-ip-geo-block-admin.php:426
175
- #: admin/class-ip-geo-block-admin.php:436
176
- #: admin/class-ip-geo-block-admin.php:437
177
- #: admin/class-ip-geo-block-admin.php:446
178
- #: admin/class-ip-geo-block-admin.php:455
179
  msgid "IP Geo Block"
180
  msgstr ""
181
 
182
- #: admin/class-ip-geo-block-admin.php:456
183
- #: admin/class-ip-geo-block-admin.php:669
184
  msgid "Site List"
185
  msgstr ""
186
 
187
- #: admin/class-ip-geo-block-admin.php:485
188
  msgid "You need WordPress 3.7+."
189
  msgstr ""
190
 
191
- #: admin/class-ip-geo-block-admin.php:491
192
  #, php-format
193
  msgid ""
194
  "Now downloading geolocation databases in background. After a little while, "
@@ -196,48 +196,48 @@ msgid ""
196
  "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
197
  msgstr ""
198
 
199
- #: admin/class-ip-geo-block-admin.php:497
200
  #, php-format
201
  msgid ""
202
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
203
  "confirm it at <a href=\"%s\">Validation rule settings</a>."
204
  msgstr ""
205
 
206
- #: admin/class-ip-geo-block-admin.php:506
207
  msgid "Local database and matching rule have been updated."
208
  msgstr ""
209
 
210
- #: admin/class-ip-geo-block-admin.php:517
211
  msgid ""
212
  "Once you logout, you will be unable to login again because the number of "
213
  "login attempts reaches the limit."
214
  msgstr ""
215
 
216
- #: admin/class-ip-geo-block-admin.php:519
217
  #, php-format
218
  msgid ""
219
  "Please execute \"<strong>Clear cache</strong>\" on <a href=\"%s\">Statistics "
220
  "tab</a> to prevent locking yourself out."
221
  msgstr ""
222
 
223
- #: admin/class-ip-geo-block-admin.php:529
224
  msgid ""
225
  "Once you logout, you will be unable to login again because your country code "
226
  "or IP address is in the blacklist."
227
  msgstr ""
228
 
229
- #: admin/class-ip-geo-block-admin.php:530
230
  msgid ""
231
  "Once you logout, you will be unable to login again because your country code "
232
  "or IP address is not in the whitelist."
233
  msgstr ""
234
 
235
- #: admin/class-ip-geo-block-admin.php:534
236
  #, php-format
237
  msgid "Please check your &#8220;%sValidation rule settings%s&#8221;."
238
  msgstr ""
239
 
240
- #: admin/class-ip-geo-block-admin.php:538
241
  #, php-format
242
  msgid ""
243
  "Please confirm your local geolocation databases at &#8220;%sLocal database "
@@ -245,94 +245,94 @@ msgid ""
245
  "%sStatistics in cache%s&#8221; section."
246
  msgstr ""
247
 
248
- #: admin/class-ip-geo-block-admin.php:559
249
  msgid ""
250
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
251
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
252
  "select &#8220;init&#8221; action hook."
253
  msgstr ""
254
 
255
- #: admin/class-ip-geo-block-admin.php:665
256
  msgid "Statistics"
257
  msgstr ""
258
 
259
- #: admin/class-ip-geo-block-admin.php:666
260
  msgid "Logs"
261
  msgstr ""
262
 
263
- #: admin/class-ip-geo-block-admin.php:667
264
  msgid "Search"
265
  msgstr ""
266
 
267
- #: admin/class-ip-geo-block-admin.php:668
268
  msgid "Attribution"
269
  msgstr ""
270
 
271
- #: admin/class-ip-geo-block-admin.php:685
272
- #: admin/class-ip-geo-block-admin.php:702
273
  msgid "Network wide"
274
  msgstr ""
275
 
276
- #: admin/class-ip-geo-block-admin.php:715
277
  msgid "Toggle all"
278
  msgstr ""
279
 
280
- #: admin/class-ip-geo-block-admin.php:718
281
  msgid ""
282
- "Independent of &#8220;Statistics and Logs settings&#8221;, you can see all "
283
  "the requests validated by this plugin in almost real time."
284
  msgstr ""
285
 
286
- #: admin/class-ip-geo-block-admin.php:718 admin/includes/tab-accesslog.php:39
287
  msgid "Live update"
288
  msgstr ""
289
 
290
- #: admin/class-ip-geo-block-admin.php:722
291
  msgid "Open a new window on clicking the link in the chart."
292
  msgstr ""
293
 
294
- #: admin/class-ip-geo-block-admin.php:722
295
  msgid "Open a new window"
296
  msgstr ""
297
 
298
- #: admin/class-ip-geo-block-admin.php:745
299
  msgid "Thanks for providing these great services for free."
300
  msgstr ""
301
 
302
- #: admin/class-ip-geo-block-admin.php:746
303
  msgid ""
304
  "(Most browsers will redirect you to each site <a href=\"http://www."
305
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
306
  "when you click the link</a>.)"
307
  msgstr ""
308
 
309
- #: admin/class-ip-geo-block-admin.php:751
310
  msgid "Back to top"
311
  msgstr ""
312
 
313
- #: admin/class-ip-geo-block-admin.php:843
314
  msgid "Enable"
315
  msgstr ""
316
 
317
- #: admin/class-ip-geo-block-admin.php:858
318
  msgid "Select one"
319
  msgstr ""
320
 
321
- #: admin/class-ip-geo-block-admin.php:1273
322
  msgid "You do not have sufficient permissions to access this page."
323
  msgstr ""
324
 
325
- #: admin/class-ip-geo-block-admin.php:1300
326
  #: admin/includes/class-admin-rewrite.php:194
327
  #: classes/class-ip-geo-block-cron.php:217
328
  #: classes/class-ip-geo-block-cron.php:321
329
  #: classes/class-ip-geo-block-cron.php:395
330
- #: classes/class-ip-geo-block-opts.php:452
331
  #, php-format
332
  msgid "Unable to write <code>%s</code>. Please check the permission."
333
  msgstr ""
334
 
335
- #: admin/class-ip-geo-block-admin.php:1330
336
  msgid "Settings saved."
337
  msgstr ""
338
 
@@ -345,12 +345,12 @@ msgstr ""
345
  msgid "UNKNOWN"
346
  msgstr ""
347
 
348
- #: admin/includes/class-admin-ajax.php:198
349
  #, php-format
350
  msgid "The user %s (user ID: %d) is in use."
351
  msgstr ""
352
 
353
- #: admin/includes/class-admin-ajax.php:492
354
  #, php-format
355
  msgid ""
356
  "illegal format at %s. Please delete the corresponding line and try again."
@@ -378,8 +378,8 @@ msgstr ""
378
  msgid "Validation logs"
379
  msgstr ""
380
 
381
- #: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:765
382
- #: admin/includes/tab-settings.php:1410
383
  msgid "Help"
384
  msgstr ""
385
 
@@ -461,7 +461,7 @@ msgstr ""
461
  msgid "Export logs"
462
  msgstr ""
463
 
464
- #: admin/includes/tab-accesslog.php:153 admin/includes/tab-settings.php:1582
465
  #: admin/includes/tab-statistics.php:294
466
  msgid "Export to the local file"
467
  msgstr ""
@@ -491,22 +491,21 @@ msgid "Search IP address geolocation"
491
  msgstr ""
492
 
493
  #: admin/includes/tab-geolocation.php:42
494
- msgid "Geolocation service"
495
  msgstr ""
496
 
497
- #: admin/includes/tab-geolocation.php:86 admin/includes/tab-settings.php:1101
498
  msgid ""
499
- "<dfn title=\"IP address is always encrypted on recording in cache and logs. "
500
- "Moreover, this option makes the IP address anonymous and restricted on "
501
- "sending to the 3rd parties such as geolocation APIs or whois service."
502
- "\">Anonymize IP address and restrict 3rd party APIs</dfn>"
503
  msgstr ""
504
 
505
- #: admin/includes/tab-geolocation.php:101
506
- msgid "Find geolocation"
507
  msgstr ""
508
 
509
- #: admin/includes/tab-geolocation.php:109
510
  msgid "Search now"
511
  msgstr ""
512
 
@@ -629,7 +628,7 @@ msgstr ""
629
  msgid "Open CIDR calculator for IPv4 / IPv6."
630
  msgstr ""
631
 
632
- #: admin/includes/tab-settings.php:127 admin/includes/tab-settings.php:796
633
  msgid "Matching rule"
634
  msgstr ""
635
 
@@ -711,9 +710,9 @@ msgstr ""
711
 
712
  #: admin/includes/tab-settings.php:299
713
  msgid ""
714
- "(&thinsp;See &#8220;<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
715
  "Roles_and_Capabilities\" title=\"Roles and Capabilities &laquo; WordPress "
716
- "Codex\">Roles and Capabilities</a>&#8221;&thinsp;)"
717
  msgstr ""
718
 
719
  #: admin/includes/tab-settings.php:307
@@ -726,7 +725,7 @@ msgid ""
726
  msgstr ""
727
 
728
  #: admin/includes/tab-settings.php:318 admin/includes/tab-settings.php:499
729
- #: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:1160
730
  msgid "Disable"
731
  msgstr ""
732
 
@@ -739,13 +738,21 @@ msgid "Verify file extension only"
739
  msgstr ""
740
 
741
  #: admin/includes/tab-settings.php:330
 
 
 
 
 
 
 
 
742
  #, php-format
743
  msgid ""
744
  "<dfn title=\"You can put your original 403.php and so on into your theme "
745
  "directory.\">Response code</dfn> %s"
746
  msgstr ""
747
 
748
- #: admin/includes/tab-settings.php:360 admin/includes/tab-settings.php:883
749
  msgid ""
750
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
751
  "to a public facing page, visitors would not be blocked on the page to "
@@ -754,20 +761,12 @@ msgid ""
754
  "\">Redirect URL</dfn>"
755
  msgstr ""
756
 
757
- #: admin/includes/tab-settings.php:378 admin/includes/tab-settings.php:902
758
  msgid ""
759
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
760
  "message</dfn>"
761
  msgstr ""
762
 
763
- #: admin/includes/tab-settings.php:395
764
- msgid ""
765
- "<dfn title=\"This is applied to &#8220;XML-RPC&#8221; and &#8220;Login "
766
- "form&#8221;. Lockout period is defined as expiration time at &#8220;Privacy "
767
- "and record settings&#8221;.\">Max number of failed login attempts per IP "
768
- "address</dfn>"
769
- msgstr ""
770
-
771
  #: admin/includes/tab-settings.php:423
772
  msgid "Select when to run the validation."
773
  msgstr ""
@@ -817,7 +816,7 @@ msgstr ""
817
 
818
  #: admin/includes/tab-settings.php:480 admin/includes/tab-settings.php:500
819
  #: admin/includes/tab-settings.php:533 admin/includes/tab-settings.php:539
820
- #: admin/includes/tab-settings.php:784
821
  msgid "Block by country"
822
  msgstr ""
823
 
@@ -909,8 +908,8 @@ msgid ""
909
  "Zero-day Exploit&#8221; (for logged-in user)."
910
  msgstr ""
911
 
912
- #: admin/includes/tab-settings.php:607 admin/includes/tab-settings.php:685
913
- #: admin/includes/tab-settings.php:746
914
  msgid "Exceptions"
915
  msgstr ""
916
 
@@ -938,36 +937,42 @@ msgstr ""
938
  #: admin/includes/tab-settings.php:627
939
  #, php-format
940
  msgid ""
941
- "It configures &#8220;%s&#8221; to validate a request to the PHP file which "
942
- "does not load WordPress core. Make sure to deny direct access to the hidden "
943
- "files beginning with a dot by the server's configuration."
944
  msgstr ""
945
 
946
  #: admin/includes/tab-settings.php:628
947
  msgid "Sorry, but your server type is not supported."
948
  msgstr ""
949
 
950
- #: admin/includes/tab-settings.php:664 admin/includes/tab-settings.php:725
 
 
 
 
 
 
951
  msgid "Force to load WP core"
952
  msgstr ""
953
 
954
- #: admin/includes/tab-settings.php:669
955
  msgid "Plugins area"
956
  msgstr ""
957
 
958
- #: admin/includes/tab-settings.php:730
959
  msgid "Themes area"
960
  msgstr ""
961
 
962
- #: admin/includes/tab-settings.php:765
963
  msgid "Front-end target settings"
964
  msgstr ""
965
 
966
- #: admin/includes/tab-settings.php:789
967
  msgid "Follow &#8220;Validation rule settings&#8221;"
968
  msgstr ""
969
 
970
- #: admin/includes/tab-settings.php:851
971
  #, php-format
972
  msgid ""
973
  "<dfn title=\"You can configure a different response code from the Back-end. "
@@ -975,70 +980,70 @@ msgid ""
975
  "\">Response code</dfn> %s"
976
  msgstr ""
977
 
978
- #: admin/includes/tab-settings.php:917
979
  msgid ""
980
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
981
  msgstr ""
982
 
983
- #: admin/includes/tab-settings.php:929
984
  msgid ""
985
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
986
  "target.\">Post type</dfn>"
987
  msgstr ""
988
 
989
- #: admin/includes/tab-settings.php:941
990
  msgid ""
991
  "<dfn title=\"Specify the individual category on a single page or archive "
992
  "page as a blocking target.\">Category</dfn>"
993
  msgstr ""
994
 
995
- #: admin/includes/tab-settings.php:953
996
  msgid ""
997
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
998
  "a blocking target.\">Tag</dfn>"
999
  msgstr ""
1000
 
1001
- #: admin/includes/tab-settings.php:968
1002
  msgid "Specify the validation target on front-end."
1003
  msgstr ""
1004
 
1005
- #: admin/includes/tab-settings.php:968
1006
  msgid "Validation target"
1007
  msgstr ""
1008
 
1009
- #: admin/includes/tab-settings.php:979
1010
  msgid "All requests"
1011
  msgstr ""
1012
 
1013
- #: admin/includes/tab-settings.php:980
1014
  msgid "Specify the targets"
1015
  msgstr ""
1016
 
1017
- #: admin/includes/tab-settings.php:983
1018
  msgid ""
1019
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1020
  "wp&#8221; action hook. It means that this feature would not be compatible "
1021
  "with any page caching."
1022
  msgstr ""
1023
 
1024
- #: admin/includes/tab-settings.php:990
1025
  msgid ""
1026
  "<dfn title=\"Specify the frequency of request for certain period of time."
1027
  "\">Blocking condition</dfn>"
1028
  msgstr ""
1029
 
1030
- #: admin/includes/tab-settings.php:992
1031
  #, php-format
1032
  msgid "More than %1$s page view (PV) in %2$s seconds"
1033
  msgstr ""
1034
 
1035
- #: admin/includes/tab-settings.php:1001
1036
  msgid ""
1037
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1038
  "behaved bots and crawlers</dfn>"
1039
  msgstr ""
1040
 
1041
- #: admin/includes/tab-settings.php:1019
1042
  msgid ""
1043
  "A part of user agent string and a qualification connected with a separator "
1044
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
@@ -1048,19 +1053,19 @@ msgid ""
1048
  "qualification&#8221;."
1049
  msgstr ""
1050
 
1051
- #: admin/includes/tab-settings.php:1019
1052
  msgid "UA string and qualification"
1053
  msgstr ""
1054
 
1055
- #: admin/includes/tab-settings.php:1038
1056
  msgid "Specify the name of actions as exception that is invariably blocked."
1057
  msgstr ""
1058
 
1059
- #: admin/includes/tab-settings.php:1038
1060
  msgid "Excluded actions"
1061
  msgstr ""
1062
 
1063
- #: admin/includes/tab-settings.php:1057
1064
  msgid ""
1065
  "It enables to verify the host by reverse DNS lookup which would spend some "
1066
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
@@ -1068,175 +1073,181 @@ msgid ""
1068
  "return &#8220;true&#8221;."
1069
  msgstr ""
1070
 
1071
- #: admin/includes/tab-settings.php:1057
1072
  msgid "DNS reverse lookup"
1073
  msgstr ""
1074
 
1075
- #: admin/includes/tab-settings.php:1074
1076
  msgid ""
1077
  "It enables to simulate validation without deployment. The results can be "
1078
- "found at &#8220;Public facing pages&#8221; in Logs."
1079
  msgstr ""
1080
 
1081
- #: admin/includes/tab-settings.php:1074
1082
  msgid "Simulation mode"
1083
  msgstr ""
1084
 
1085
- #: admin/includes/tab-settings.php:1092
1086
  msgid "Privacy and record settings"
1087
  msgstr ""
1088
 
1089
- #: admin/includes/tab-settings.php:1117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1090
  msgid ""
1091
  "<dfn title=\"This option enables to record the IP address, country code and "
1092
  "failure counter of login attempts into the cache on database to minimize the "
1093
- "impact on site speed.\">Record &#8220;IP address cache&#8221;</dfn>"
1094
  msgstr ""
1095
 
1096
- #: admin/includes/tab-settings.php:1133
1097
- #, php-format
1098
  msgid ""
1099
- "<dfn title=\"If user authentication fails consecutively %d times, subsequent "
1100
- "login will also be prohibited for this and garbage collection period."
1101
- "\">Expiration time [sec] for &#8220;IP address cache&#8221;</dfn>"
 
1102
  msgstr ""
1103
 
1104
- #: admin/includes/tab-settings.php:1149
1105
  msgid ""
1106
  "<dfn title=\"This option enables to record the validation logs including IP "
1107
  "addresses.\">Record &#8220;Logs&#8221;</dfn>"
1108
  msgstr ""
1109
 
1110
- #: admin/includes/tab-settings.php:1161
1111
  msgid "When blocked"
1112
  msgstr ""
1113
 
1114
- #: admin/includes/tab-settings.php:1162
1115
  msgid "When passed"
1116
  msgstr ""
1117
 
1118
- #: admin/includes/tab-settings.php:1163
1119
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1120
  msgstr ""
1121
 
1122
- #: admin/includes/tab-settings.php:1164
1123
  msgid "Unauthenticated visitor"
1124
  msgstr ""
1125
 
1126
- #: admin/includes/tab-settings.php:1165
1127
  msgid "Authenticated user"
1128
  msgstr ""
1129
 
1130
- #: admin/includes/tab-settings.php:1166
1131
  msgid "All the validation"
1132
  msgstr ""
1133
 
1134
- #: admin/includes/tab-settings.php:1174
 
1135
  msgid ""
1136
- "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST keys to be "
1137
- "recorded with their values in &#8220;Logs&#8221;</dfn>"
1138
  msgstr ""
1139
 
1140
- #: admin/includes/tab-settings.php:1191
1141
- #, php-format
1142
  msgid ""
1143
- "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1144
- "\">Expiration time [sec] for &#8220;Logs&#8221;</dfn>"
1145
  msgstr ""
1146
 
1147
- #: admin/includes/tab-settings.php:1209
1148
  msgid "Maximum entries of &#8220;Logs&#8221;"
1149
  msgstr ""
1150
 
1151
- #: admin/includes/tab-settings.php:1226
1152
  msgid ""
1153
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1154
  "&#8220;Live update&#8221;</dfn>"
1155
  msgstr ""
1156
 
1157
- #: admin/includes/tab-settings.php:1238
1158
  msgid "Ordinary file"
1159
  msgstr ""
1160
 
1161
- #: admin/includes/tab-settings.php:1239
1162
  msgid "In-Memory"
1163
  msgstr ""
1164
 
1165
- #: admin/includes/tab-settings.php:1242
1166
  msgid "PDO_SQLITE driver not available"
1167
  msgstr ""
1168
 
1169
- #: admin/includes/tab-settings.php:1243
1170
  msgid ""
1171
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1172
  "without conflict with other plugins."
1173
  msgstr ""
1174
 
1175
- #: admin/includes/tab-settings.php:1244
1176
  msgid ""
1177
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1178
  "with other plugins using this method."
1179
  msgstr ""
1180
 
1181
- #: admin/includes/tab-settings.php:1253
1182
  msgid "Reset database source of &#8220;Live update&#8221;"
1183
  msgstr ""
1184
 
1185
- #: admin/includes/tab-settings.php:1261
1186
  msgid "Reset now"
1187
  msgstr ""
1188
 
1189
- #: admin/includes/tab-settings.php:1269 admin/includes/tab-settings.php:1442
1190
  msgid ""
1191
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1192
  "once and activate again."
1193
  msgstr ""
1194
 
1195
- #: admin/includes/tab-settings.php:1275
1196
  msgid ""
1197
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1198
- "expired entries in ip address cache and logs.\">Cleanup interval [sec] for "
1199
- "&#8220;IP address cache&#8221; and &#8220;Logs&#8221;</dfn>"
1200
  msgstr ""
1201
 
1202
- #: admin/includes/tab-settings.php:1284 admin/includes/tab-settings.php:1459
1203
  #, php-format
1204
  msgid "Next schedule: %s"
1205
  msgstr ""
1206
 
1207
- #: admin/includes/tab-settings.php:1292
1208
- msgid ""
1209
- "<dfn title=\"This option enables to record the number blocked countries and "
1210
- "the number of blocked requests per day.\">Record &#8220;Statistics&#8221;</"
1211
- "dfn>"
1212
- msgstr ""
1213
-
1214
- #: admin/includes/tab-settings.php:1309
1215
- msgid "Maximum period for &#8220;Statistics&#8221; [day]"
1216
- msgstr ""
1217
-
1218
- #: admin/includes/tab-settings.php:1327
1219
  msgid "Remove all settings and records at uninstallation"
1220
  msgstr ""
1221
 
1222
- #: admin/includes/tab-settings.php:1344
1223
  msgid "Geolocation API settings"
1224
  msgstr ""
1225
 
1226
- #: admin/includes/tab-settings.php:1365
1227
  msgid ""
1228
- "<dfn title=\"IP address cache and local database are scanned at the top "
1229
  "priority.\">API selection and key settings</dfn>"
1230
  msgstr ""
1231
 
1232
- #: admin/includes/tab-settings.php:1385
1233
  msgid "Timeout for network API [sec]"
1234
  msgstr ""
1235
 
1236
- #: admin/includes/tab-settings.php:1403
1237
  #, php-format
1238
  msgid ""
1239
- "Can not find geolocation API libraries in <code>%s</code>. It seems to have "
1240
  "failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
1241
  "tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
1242
  "contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
@@ -1248,151 +1259,146 @@ msgid ""
1248
  "troubles? | IP Geo Block\">this instruction</a>."
1249
  msgstr ""
1250
 
1251
- #: admin/includes/tab-settings.php:1410
1252
  msgid "Local database settings"
1253
  msgstr ""
1254
 
1255
- #: admin/includes/tab-settings.php:1424
1256
  msgid "database"
1257
  msgstr ""
1258
 
1259
- #: admin/includes/tab-settings.php:1425 classes/class-ip-geo-block-cron.php:419
1260
  #, php-format
1261
  msgid "Last update: %s"
1262
  msgstr ""
1263
 
1264
- #: admin/includes/tab-settings.php:1448
1265
  msgid "Auto updating (once a month)"
1266
  msgstr ""
1267
 
1268
- #: admin/includes/tab-settings.php:1466
1269
  msgid "Download database"
1270
  msgstr ""
1271
 
1272
- #: admin/includes/tab-settings.php:1474
1273
  msgid "Download now"
1274
  msgstr ""
1275
 
1276
- #: admin/includes/tab-settings.php:1485
1277
  msgid "Submission settings"
1278
  msgstr ""
1279
 
1280
- #: admin/includes/tab-settings.php:1497
1281
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
1282
  msgstr ""
1283
 
1284
- #: admin/includes/tab-settings.php:1497
1285
  msgid "Message on comment form"
1286
  msgstr ""
1287
 
1288
- #: admin/includes/tab-settings.php:1509
1289
  msgid "None"
1290
  msgstr ""
1291
 
1292
- #: admin/includes/tab-settings.php:1510
1293
  msgid "Top"
1294
  msgstr ""
1295
 
1296
- #: admin/includes/tab-settings.php:1511
1297
  msgid "Bottom"
1298
  msgstr ""
1299
 
1300
- #: admin/includes/tab-settings.php:1522
1301
  msgid "Plugin settings"
1302
  msgstr ""
1303
 
1304
- #: admin/includes/tab-settings.php:1535
1305
  msgid ""
1306
  "<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
1307
  "settings</dfn>"
1308
  msgstr ""
1309
 
1310
- #: admin/includes/tab-settings.php:1555
1311
  msgid ""
1312
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
1313
  "dfn>"
1314
  msgstr ""
1315
 
1316
- #: admin/includes/tab-settings.php:1569
1317
- msgid ""
1318
- "You need to click the &#8220;Save Changes&#8221; button for imported "
1319
- "settings to take effect."
1320
- msgstr ""
1321
-
1322
- #: admin/includes/tab-settings.php:1575
1323
  msgid "Export / Import settings"
1324
  msgstr ""
1325
 
1326
- #: admin/includes/tab-settings.php:1582
1327
  msgid "Export settings"
1328
  msgstr ""
1329
 
1330
- #: admin/includes/tab-settings.php:1583
1331
  msgid "Import from the local file"
1332
  msgstr ""
1333
 
1334
- #: admin/includes/tab-settings.php:1583
1335
  msgid "Import settings"
1336
  msgstr ""
1337
 
1338
- #: admin/includes/tab-settings.php:1592
1339
  msgid "Import pre-defined settings"
1340
  msgstr ""
1341
 
1342
- #: admin/includes/tab-settings.php:1599
1343
  msgid ""
1344
  "Import the default settings to revert to the &#8220;Right after "
1345
  "installing&#8221; state"
1346
  msgstr ""
1347
 
1348
- #: admin/includes/tab-settings.php:1599
1349
  msgid "Default settings"
1350
  msgstr ""
1351
 
1352
- #: admin/includes/tab-settings.php:1600
1353
  msgid ""
1354
  "Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
1355
  "for the &#8220;Back-end target settings&#8221;"
1356
  msgstr ""
1357
 
1358
- #: admin/includes/tab-settings.php:1600
1359
  msgid "Best for Back-end"
1360
  msgstr ""
1361
 
1362
- #: admin/includes/tab-settings.php:1610
1363
  msgid "Delete DB tables for this plugin"
1364
  msgstr ""
1365
 
1366
- #: admin/includes/tab-settings.php:1618
1367
  msgid "Delete now"
1368
  msgstr ""
1369
 
1370
- #: admin/includes/tab-settings.php:1626
1371
  msgid "Create DB tables for this plugin"
1372
  msgstr ""
1373
 
1374
- #: admin/includes/tab-settings.php:1634
1375
  msgid "Create now"
1376
  msgstr ""
1377
 
1378
- #: admin/includes/tab-settings.php:1644
1379
  msgid ""
1380
- "<dfn title=\"When an unexpected blocking has occurred, please press the "
1381
- "button to find the blocked request in the dumped information which may help "
1382
- "to solve the issue.\">Diagnostic information</dfn><br />[ <a rel=\"noreferrer"
1383
- "\" href=\"https://wordpress.org/support/plugin/ip-geo-block\" title="
1384
- "\"WordPress &#8250; Support &raquo; IP Geo Block\">support forum</a> ]"
 
1385
  msgstr ""
1386
 
1387
- #: admin/includes/tab-settings.php:1651
1388
  msgid "Please copy &amp; paste when submitting your issue to support forum."
1389
  msgstr ""
1390
 
1391
- #: admin/includes/tab-settings.php:1651
1392
  msgid "Show information"
1393
  msgstr ""
1394
 
1395
- #: admin/includes/tab-settings.php:1667
1396
  msgid ""
1397
  "To enhance the protection ability, please refer to &#8220;<a rel=\"noreferrer"
1398
  "\" href=\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-"
@@ -1400,7 +1406,7 @@ msgid ""
1400
  "\">The best practice for target settings</a>&#8221;."
1401
  msgstr ""
1402
 
1403
- #: admin/includes/tab-settings.php:1668
1404
  msgid ""
1405
  "If you have any troubles with these, please check FAQ at <a rel=\"noreferrer"
1406
  "\" href=\"https://wordpress.org/plugins/ip-geo-block/faq/\" title=\"IP Geo "
@@ -1409,26 +1415,26 @@ msgid ""
1409
  "\">Codex</a>."
1410
  msgstr ""
1411
 
1412
- #: admin/includes/tab-settings.php:1675
1413
  msgid ""
1414
- "While Geolite2&thinsp;/&thinsp;Maxmind and IP2Location will fetch the local "
1415
- "databases, others will pass an IP address to the 3rd parties' API via HTTP."
1416
  msgstr ""
1417
 
1418
- #: admin/includes/tab-settings.php:1676
1419
  msgid ""
1420
- "Please select the appropriate APIs to fit the privacy law&thinsp;/&thinsp;"
1421
- "regulation in your country&thinsp;/&thinsp;region."
1422
  msgstr ""
1423
 
1424
- #: admin/includes/tab-settings.php:1685
1425
  #, php-format
1426
  msgid ""
1427
  "Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
1428
  "2.0.0+%s."
1429
  msgstr ""
1430
 
1431
- #: admin/includes/tab-settings.php:1693
1432
  msgid ""
1433
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1434
  "ipgeoblock.com/codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block"
@@ -1436,7 +1442,7 @@ msgid ""
1436
  "cache plugin."
1437
  msgstr ""
1438
 
1439
- #: admin/includes/tab-settings.php:1694
1440
  msgid ""
1441
  "If you find any issues or have something to suggest, please feel free to "
1442
  "open an issue at <a rel=\"noreferrer\" href=\"https://wordpress.org/support/"
@@ -1444,7 +1450,7 @@ msgid ""
1444
  "\">support forum</a>."
1445
  msgstr ""
1446
 
1447
- #: admin/includes/tab-settings.php:1701
1448
  msgid ""
1449
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1450
  "ipgeoblock.com/codex/record-settings-and-logs.html\" title=\"Codex | IP Geo "
@@ -1496,7 +1502,7 @@ msgid "Statistics in Logs"
1496
  msgstr ""
1497
 
1498
  #: admin/includes/tab-statistics.php:217
1499
- msgid "Statistics in IP address cache"
1500
  msgstr ""
1501
 
1502
  #: admin/includes/tab-statistics.php:230
@@ -1544,7 +1550,7 @@ msgstr ""
1544
 
1545
  #: admin/includes/tab-statistics.php:431
1546
  #, php-format
1547
- msgid "[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled."
1548
  msgstr ""
1549
 
1550
  #: admin/includes/tab-statistics.php:432
@@ -1553,8 +1559,8 @@ msgstr ""
1553
 
1554
  #: classes/class-ip-geo-block-apis.php:661
1555
  msgid ""
1556
- "You need to select at least one IP geolocation service. Otherwise "
1557
- "<strong>you'll be blocked</strong> after the cache expires."
1558
  msgstr ""
1559
 
1560
  #: classes/class-ip-geo-block-cron.php:222
@@ -1588,21 +1594,21 @@ msgid ""
1588
  "details."
1589
  msgstr ""
1590
 
1591
- #: classes/class-ip-geo-block-logs.php:138
1592
  #, php-format
1593
  msgid ""
1594
  "Creating a DB table %s had failed. Once de-activate this plugin, and then "
1595
  "activate again."
1596
  msgstr ""
1597
 
1598
- #: classes/class-ip-geo-block-logs.php:143
1599
  #, php-format
1600
  msgid ""
1601
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1602
  "again."
1603
  msgstr ""
1604
 
1605
- #: classes/class-ip-geo-block.php:415
1606
  msgid "Dashboard"
1607
  msgstr ""
1608
 
2
  # This file is distributed under the same license as the IP Geo Block package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: IP Geo Block 3.0.13\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ip-geo-block\n"
7
+ "POT-Creation-Date: 2018-08-08 20:16-0700\n"
8
+ "PO-Revision-Date: 2018-08-08 20:16-0700\n"
9
  "Last-Translator: tokkonopapa <tokkonopapa@yahoo.com>\n"
10
  "Language-Team: \n"
11
  "Language: en\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 2.0.9\n"
16
  "X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
17
  "esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
18
  "X-Poedit-Basepath: ..\n"
26
  "posted from outside your nation, and also prevents zero-day exploit."
27
  msgstr ""
28
 
29
+ #: admin/class-ip-geo-block-admin.php:286
30
  msgid "Import settings ?"
31
  msgstr ""
32
 
33
+ #: admin/class-ip-geo-block-admin.php:287
34
  msgid "Create table ?"
35
  msgstr ""
36
 
37
+ #: admin/class-ip-geo-block-admin.php:288
38
  msgid "Delete table ?"
39
  msgstr ""
40
 
41
+ #: admin/class-ip-geo-block-admin.php:289
42
  msgid "Clear statistics ?"
43
  msgstr ""
44
 
45
+ #: admin/class-ip-geo-block-admin.php:290
46
  msgid "Clear cache ?"
47
  msgstr ""
48
 
49
+ #: admin/class-ip-geo-block-admin.php:291
50
  msgid "Clear logs ?"
51
  msgstr ""
52
 
53
+ #: admin/class-ip-geo-block-admin.php:292
54
  msgid "ajax for logged-in user"
55
  msgstr ""
56
 
57
+ #: admin/class-ip-geo-block-admin.php:293
58
  msgid "ajax for non logged-in user"
59
  msgstr ""
60
 
61
+ #: admin/class-ip-geo-block-admin.php:294
62
  #, php-format
63
  msgid "[Found: %d]"
64
  msgstr ""
65
 
66
+ #: admin/class-ip-geo-block-admin.php:295
67
  #, php-format
68
  msgid "Find and verify `%s` on &#8220;Logs&#8221; tab."
69
  msgstr ""
70
 
71
+ #: admin/class-ip-geo-block-admin.php:296
72
  msgid "This feature is available with HTML5 compliant browsers."
73
  msgstr ""
74
 
75
+ #: admin/class-ip-geo-block-admin.php:297
76
  msgid "The selected row cannot be found in the visible area."
77
  msgstr ""
78
 
79
+ #: admin/class-ip-geo-block-admin.php:298
80
+ #: admin/class-ip-geo-block-admin.php:1514
81
  #, php-format
82
  msgid "An error occurred while executing the ajax command `%s`."
83
  msgstr ""
84
 
85
+ #: admin/class-ip-geo-block-admin.php:302
86
  msgid "No data available in table"
87
  msgstr ""
88
 
89
+ #: admin/class-ip-geo-block-admin.php:303
90
  msgid "No matching records found"
91
  msgstr ""
92
 
93
+ #: admin/class-ip-geo-block-admin.php:304
94
  #: admin/includes/class-admin-ajax.php:111
95
+ #: admin/includes/class-admin-ajax.php:242
96
  #: admin/includes/tab-geolocation.php:70
97
  msgid "IP address"
98
  msgstr ""
99
 
100
+ #: admin/class-ip-geo-block-admin.php:305
101
  #: admin/includes/class-admin-ajax.php:112
102
+ #: admin/includes/class-admin-ajax.php:243
103
  msgid "Code"
104
  msgstr ""
105
 
106
+ #: admin/class-ip-geo-block-admin.php:306
107
  #: admin/includes/class-admin-ajax.php:113
108
+ #: admin/includes/class-admin-ajax.php:244
109
  msgid "ASN"
110
  msgstr ""
111
 
112
+ #: admin/class-ip-geo-block-admin.php:307
113
+ #: admin/includes/class-admin-ajax.php:245
114
  msgid "Host name"
115
  msgstr ""
116
 
117
+ #: admin/class-ip-geo-block-admin.php:308
118
  #: admin/includes/class-admin-ajax.php:114
119
+ #: admin/includes/class-admin-ajax.php:246
120
  msgid "Target"
121
  msgstr ""
122
 
123
+ #: admin/class-ip-geo-block-admin.php:309
124
+ #: admin/includes/class-admin-ajax.php:247
125
  msgid "Failure / Total"
126
  msgstr ""
127
 
128
+ #: admin/class-ip-geo-block-admin.php:310
129
+ #: admin/includes/class-admin-ajax.php:248
130
  msgid "Elapsed[sec]"
131
  msgstr ""
132
 
133
+ #: admin/class-ip-geo-block-admin.php:311
134
  #: admin/includes/class-admin-ajax.php:110
135
  msgid "Time"
136
  msgstr ""
137
 
138
+ #: admin/class-ip-geo-block-admin.php:312
139
  #: admin/includes/class-admin-ajax.php:115
140
  msgid "Result"
141
  msgstr ""
142
 
143
+ #: admin/class-ip-geo-block-admin.php:313
144
  #: admin/includes/class-admin-ajax.php:116
145
  msgid "Request"
146
  msgstr ""
147
 
148
+ #: admin/class-ip-geo-block-admin.php:314
149
  #: admin/includes/class-admin-ajax.php:117
150
  msgid "User agent"
151
  msgstr ""
152
 
153
+ #: admin/class-ip-geo-block-admin.php:315
154
  #: admin/includes/class-admin-ajax.php:118
155
  msgid "HTTP headers"
156
  msgstr ""
157
 
158
+ #: admin/class-ip-geo-block-admin.php:316
159
  #: admin/includes/class-admin-ajax.php:119
160
  msgid "$_POST data"
161
  msgstr ""
162
 
163
+ #: admin/class-ip-geo-block-admin.php:342
164
  msgid "Contribute on GitHub"
165
  msgstr ""
166
 
167
+ #: admin/class-ip-geo-block-admin.php:356
168
+ #: admin/class-ip-geo-block-admin.php:475
169
+ #: admin/class-ip-geo-block-admin.php:692
170
  msgid "Settings"
171
  msgstr ""
172
 
173
+ #: admin/class-ip-geo-block-admin.php:453
174
+ #: admin/class-ip-geo-block-admin.php:454
175
+ #: admin/class-ip-geo-block-admin.php:464
176
+ #: admin/class-ip-geo-block-admin.php:465
177
+ #: admin/class-ip-geo-block-admin.php:474
178
+ #: admin/class-ip-geo-block-admin.php:483
179
  msgid "IP Geo Block"
180
  msgstr ""
181
 
182
+ #: admin/class-ip-geo-block-admin.php:484
183
+ #: admin/class-ip-geo-block-admin.php:697
184
  msgid "Site List"
185
  msgstr ""
186
 
187
+ #: admin/class-ip-geo-block-admin.php:513
188
  msgid "You need WordPress 3.7+."
189
  msgstr ""
190
 
191
+ #: admin/class-ip-geo-block-admin.php:519
192
  #, php-format
193
  msgid ""
194
  "Now downloading geolocation databases in background. After a little while, "
196
  "strong>&#8221; at <a href=\"%s\">Validation rule settings</a>."
197
  msgstr ""
198
 
199
+ #: admin/class-ip-geo-block-admin.php:525
200
  #, php-format
201
  msgid ""
202
  "The &#8220;<strong>Matching rule</strong>&#8221; is not set properly. Please "
203
  "confirm it at <a href=\"%s\">Validation rule settings</a>."
204
  msgstr ""
205
 
206
+ #: admin/class-ip-geo-block-admin.php:534
207
  msgid "Local database and matching rule have been updated."
208
  msgstr ""
209
 
210
+ #: admin/class-ip-geo-block-admin.php:545
211
  msgid ""
212
  "Once you logout, you will be unable to login again because the number of "
213
  "login attempts reaches the limit."
214
  msgstr ""
215
 
216
+ #: admin/class-ip-geo-block-admin.php:547
217
  #, php-format
218
  msgid ""
219
  "Please execute \"<strong>Clear cache</strong>\" on <a href=\"%s\">Statistics "
220
  "tab</a> to prevent locking yourself out."
221
  msgstr ""
222
 
223
+ #: admin/class-ip-geo-block-admin.php:557
224
  msgid ""
225
  "Once you logout, you will be unable to login again because your country code "
226
  "or IP address is in the blacklist."
227
  msgstr ""
228
 
229
+ #: admin/class-ip-geo-block-admin.php:558
230
  msgid ""
231
  "Once you logout, you will be unable to login again because your country code "
232
  "or IP address is not in the whitelist."
233
  msgstr ""
234
 
235
+ #: admin/class-ip-geo-block-admin.php:562
236
  #, php-format
237
  msgid "Please check your &#8220;%sValidation rule settings%s&#8221;."
238
  msgstr ""
239
 
240
+ #: admin/class-ip-geo-block-admin.php:566
241
  #, php-format
242
  msgid ""
243
  "Please confirm your local geolocation databases at &#8220;%sLocal database "
245
  "%sStatistics in cache%s&#8221; section."
246
  msgstr ""
247
 
248
+ #: admin/class-ip-geo-block-admin.php:587
249
  msgid ""
250
  "&#8220;mu-plugins&#8221; (ip-geo-block-mu.php) at &#8220;Validation "
251
  "timing&#8221; is imcompatible with <strong>IP Geo Allow</strong>. Please "
252
  "select &#8220;init&#8221; action hook."
253
  msgstr ""
254
 
255
+ #: admin/class-ip-geo-block-admin.php:693
256
  msgid "Statistics"
257
  msgstr ""
258
 
259
+ #: admin/class-ip-geo-block-admin.php:694
260
  msgid "Logs"
261
  msgstr ""
262
 
263
+ #: admin/class-ip-geo-block-admin.php:695
264
  msgid "Search"
265
  msgstr ""
266
 
267
+ #: admin/class-ip-geo-block-admin.php:696
268
  msgid "Attribution"
269
  msgstr ""
270
 
271
+ #: admin/class-ip-geo-block-admin.php:713
272
+ #: admin/class-ip-geo-block-admin.php:730
273
  msgid "Network wide"
274
  msgstr ""
275
 
276
+ #: admin/class-ip-geo-block-admin.php:743
277
  msgid "Toggle all"
278
  msgstr ""
279
 
280
+ #: admin/class-ip-geo-block-admin.php:746
281
  msgid ""
282
+ "Independent of &#8220;Privacy and record settings&#8221;, you can see all "
283
  "the requests validated by this plugin in almost real time."
284
  msgstr ""
285
 
286
+ #: admin/class-ip-geo-block-admin.php:746 admin/includes/tab-accesslog.php:39
287
  msgid "Live update"
288
  msgstr ""
289
 
290
+ #: admin/class-ip-geo-block-admin.php:750
291
  msgid "Open a new window on clicking the link in the chart."
292
  msgstr ""
293
 
294
+ #: admin/class-ip-geo-block-admin.php:750
295
  msgid "Open a new window"
296
  msgstr ""
297
 
298
+ #: admin/class-ip-geo-block-admin.php:773
299
  msgid "Thanks for providing these great services for free."
300
  msgstr ""
301
 
302
+ #: admin/class-ip-geo-block-admin.php:774
303
  msgid ""
304
  "(Most browsers will redirect you to each site <a href=\"http://www."
305
  "ipgeoblock.com/etc/referer.html\" title=\"Referer Checker\">without referrer "
306
  "when you click the link</a>.)"
307
  msgstr ""
308
 
309
+ #: admin/class-ip-geo-block-admin.php:779
310
  msgid "Back to top"
311
  msgstr ""
312
 
313
+ #: admin/class-ip-geo-block-admin.php:871
314
  msgid "Enable"
315
  msgstr ""
316
 
317
+ #: admin/class-ip-geo-block-admin.php:886
318
  msgid "Select one"
319
  msgstr ""
320
 
321
+ #: admin/class-ip-geo-block-admin.php:1304
322
  msgid "You do not have sufficient permissions to access this page."
323
  msgstr ""
324
 
325
+ #: admin/class-ip-geo-block-admin.php:1331
326
  #: admin/includes/class-admin-rewrite.php:194
327
  #: classes/class-ip-geo-block-cron.php:217
328
  #: classes/class-ip-geo-block-cron.php:321
329
  #: classes/class-ip-geo-block-cron.php:395
330
+ #: classes/class-ip-geo-block-opts.php:459
331
  #, php-format
332
  msgid "Unable to write <code>%s</code>. Please check the permission."
333
  msgstr ""
334
 
335
+ #: admin/class-ip-geo-block-admin.php:1361
336
  msgid "Settings saved."
337
  msgstr ""
338
 
345
  msgid "UNKNOWN"
346
  msgstr ""
347
 
348
+ #: admin/includes/class-admin-ajax.php:203
349
  #, php-format
350
  msgid "The user %s (user ID: %d) is in use."
351
  msgstr ""
352
 
353
+ #: admin/includes/class-admin-ajax.php:499
354
  #, php-format
355
  msgid ""
356
  "illegal format at %s. Please delete the corresponding line and try again."
378
  msgid "Validation logs"
379
  msgstr ""
380
 
381
+ #: admin/includes/tab-accesslog.php:19 admin/includes/tab-settings.php:766
382
+ #: admin/includes/tab-settings.php:1425
383
  msgid "Help"
384
  msgstr ""
385
 
461
  msgid "Export logs"
462
  msgstr ""
463
 
464
+ #: admin/includes/tab-accesslog.php:153 admin/includes/tab-settings.php:1595
465
  #: admin/includes/tab-statistics.php:294
466
  msgid "Export to the local file"
467
  msgstr ""
491
  msgstr ""
492
 
493
  #: admin/includes/tab-geolocation.php:42
494
+ msgid "Geolocation API"
495
  msgstr ""
496
 
497
+ #: admin/includes/tab-geolocation.php:86 admin/includes/tab-settings.php:1099
498
  msgid ""
499
+ "<dfn title=\"IP address is always encrypted on recording in Cache and Logs. "
500
+ "Moreover, this option replaces the end of IP address with &#8220;***&#8221; "
501
+ "to make it anonymous.\">Anonymize IP address</dfn>"
 
502
  msgstr ""
503
 
504
+ #: admin/includes/tab-geolocation.php:102
505
+ msgid "Search geolocation"
506
  msgstr ""
507
 
508
+ #: admin/includes/tab-geolocation.php:110
509
  msgid "Search now"
510
  msgstr ""
511
 
628
  msgid "Open CIDR calculator for IPv4 / IPv6."
629
  msgstr ""
630
 
631
+ #: admin/includes/tab-settings.php:127 admin/includes/tab-settings.php:794
632
  msgid "Matching rule"
633
  msgstr ""
634
 
710
 
711
  #: admin/includes/tab-settings.php:299
712
  msgid ""
713
+ "( See &#8220;<a rel=\"noreferrer\" href=\"https://codex.wordpress.org/"
714
  "Roles_and_Capabilities\" title=\"Roles and Capabilities &laquo; WordPress "
715
+ "Codex\">Roles and Capabilities</a>&#8221; )"
716
  msgstr ""
717
 
718
  #: admin/includes/tab-settings.php:307
725
  msgstr ""
726
 
727
  #: admin/includes/tab-settings.php:318 admin/includes/tab-settings.php:499
728
+ #: admin/includes/tab-settings.php:623 admin/includes/tab-settings.php:1209
729
  msgid "Disable"
730
  msgstr ""
731
 
738
  msgstr ""
739
 
740
  #: admin/includes/tab-settings.php:330
741
+ msgid ""
742
+ "<dfn title=\"This is applied to &#8220;XML-RPC&#8221; and &#8220;Login "
743
+ "form&#8221;. Lockout period is defined as expiration time of &#8220;IP "
744
+ "address Cache&#8221; in &#8220;Privacy and record settings&#8221; section."
745
+ "\">Max number of failed login attempts per IP address</dfn>"
746
+ msgstr ""
747
+
748
+ #: admin/includes/tab-settings.php:355
749
  #, php-format
750
  msgid ""
751
  "<dfn title=\"You can put your original 403.php and so on into your theme "
752
  "directory.\">Response code</dfn> %s"
753
  msgstr ""
754
 
755
+ #: admin/includes/tab-settings.php:385 admin/includes/tab-settings.php:881
756
  msgid ""
757
  "<dfn title=\"Specify the URL for response code 2xx and 3xx. If it is pointed "
758
  "to a public facing page, visitors would not be blocked on the page to "
761
  "\">Redirect URL</dfn>"
762
  msgstr ""
763
 
764
+ #: admin/includes/tab-settings.php:403 admin/includes/tab-settings.php:900
765
  msgid ""
766
  "<dfn title=\"Specify the message for response code 4xx and 5xx.\">Response "
767
  "message</dfn>"
768
  msgstr ""
769
 
 
 
 
 
 
 
 
 
770
  #: admin/includes/tab-settings.php:423
771
  msgid "Select when to run the validation."
772
  msgstr ""
816
 
817
  #: admin/includes/tab-settings.php:480 admin/includes/tab-settings.php:500
818
  #: admin/includes/tab-settings.php:533 admin/includes/tab-settings.php:539
819
+ #: admin/includes/tab-settings.php:785
820
  msgid "Block by country"
821
  msgstr ""
822
 
908
  "Zero-day Exploit&#8221; (for logged-in user)."
909
  msgstr ""
910
 
911
+ #: admin/includes/tab-settings.php:607 admin/includes/tab-settings.php:686
912
+ #: admin/includes/tab-settings.php:747
913
  msgid "Exceptions"
914
  msgstr ""
915
 
937
  #: admin/includes/tab-settings.php:627
938
  #, php-format
939
  msgid ""
940
+ "It configures &#8220;%s&#8221; to validate a direct request to the PHP file "
941
+ "which does not load WordPress core. Make sure to deny direct access to the "
942
+ "hidden files beginning with a dot by the server's configuration."
943
  msgstr ""
944
 
945
  #: admin/includes/tab-settings.php:628
946
  msgid "Sorry, but your server type is not supported."
947
  msgstr ""
948
 
949
+ #: admin/includes/tab-settings.php:629
950
+ msgid ""
951
+ "You need to click the &#8220;Save Changes&#8221; button for imported "
952
+ "settings to take effect."
953
+ msgstr ""
954
+
955
+ #: admin/includes/tab-settings.php:665 admin/includes/tab-settings.php:726
956
  msgid "Force to load WP core"
957
  msgstr ""
958
 
959
+ #: admin/includes/tab-settings.php:670
960
  msgid "Plugins area"
961
  msgstr ""
962
 
963
+ #: admin/includes/tab-settings.php:731
964
  msgid "Themes area"
965
  msgstr ""
966
 
967
+ #: admin/includes/tab-settings.php:766
968
  msgid "Front-end target settings"
969
  msgstr ""
970
 
971
+ #: admin/includes/tab-settings.php:804
972
  msgid "Follow &#8220;Validation rule settings&#8221;"
973
  msgstr ""
974
 
975
+ #: admin/includes/tab-settings.php:849
976
  #, php-format
977
  msgid ""
978
  "<dfn title=\"You can configure a different response code from the Back-end. "
980
  "\">Response code</dfn> %s"
981
  msgstr ""
982
 
983
+ #: admin/includes/tab-settings.php:915
984
  msgid ""
985
  "<dfn title=\"Specify the individual page as a blocking target.\">Page</dfn>"
986
  msgstr ""
987
 
988
+ #: admin/includes/tab-settings.php:927
989
  msgid ""
990
  "<dfn title=\"Specify the individual post type on a single page as a blocking "
991
  "target.\">Post type</dfn>"
992
  msgstr ""
993
 
994
+ #: admin/includes/tab-settings.php:939
995
  msgid ""
996
  "<dfn title=\"Specify the individual category on a single page or archive "
997
  "page as a blocking target.\">Category</dfn>"
998
  msgstr ""
999
 
1000
+ #: admin/includes/tab-settings.php:951
1001
  msgid ""
1002
  "<dfn title=\"Specify the individual tag on a single page or archive page as "
1003
  "a blocking target.\">Tag</dfn>"
1004
  msgstr ""
1005
 
1006
+ #: admin/includes/tab-settings.php:966
1007
  msgid "Specify the validation target on front-end."
1008
  msgstr ""
1009
 
1010
+ #: admin/includes/tab-settings.php:966
1011
  msgid "Validation target"
1012
  msgstr ""
1013
 
1014
+ #: admin/includes/tab-settings.php:977
1015
  msgid "All requests"
1016
  msgstr ""
1017
 
1018
+ #: admin/includes/tab-settings.php:978
1019
  msgid "Specify the targets"
1020
  msgstr ""
1021
 
1022
+ #: admin/includes/tab-settings.php:981
1023
  msgid ""
1024
  "Notice that &#8220;Validation timing&#8221; is deferred till &#8220;"
1025
  "wp&#8221; action hook. It means that this feature would not be compatible "
1026
  "with any page caching."
1027
  msgstr ""
1028
 
1029
+ #: admin/includes/tab-settings.php:988
1030
  msgid ""
1031
  "<dfn title=\"Specify the frequency of request for certain period of time."
1032
  "\">Blocking condition</dfn>"
1033
  msgstr ""
1034
 
1035
+ #: admin/includes/tab-settings.php:990
1036
  #, php-format
1037
  msgid "More than %1$s page view (PV) in %2$s seconds"
1038
  msgstr ""
1039
 
1040
+ #: admin/includes/tab-settings.php:999
1041
  msgid ""
1042
  "<dfn title=\"It will validate the frequency of request.\">Block badly-"
1043
  "behaved bots and crawlers</dfn>"
1044
  msgstr ""
1045
 
1046
+ #: admin/includes/tab-settings.php:1017
1047
  msgid ""
1048
  "A part of user agent string and a qualification connected with a separator "
1049
  "that indicates an applicable rule and can be &#8220;:&#8221; (pass) or "
1053
  "qualification&#8221;."
1054
  msgstr ""
1055
 
1056
+ #: admin/includes/tab-settings.php:1017
1057
  msgid "UA string and qualification"
1058
  msgstr ""
1059
 
1060
+ #: admin/includes/tab-settings.php:1036
1061
  msgid "Specify the name of actions as exception that is invariably blocked."
1062
  msgstr ""
1063
 
1064
+ #: admin/includes/tab-settings.php:1036
1065
  msgid "Excluded actions"
1066
  msgstr ""
1067
 
1068
+ #: admin/includes/tab-settings.php:1055
1069
  msgid ""
1070
  "It enables to verify the host by reverse DNS lookup which would spend some "
1071
  "server resources. If it is disabled, &#8220;HOST&#8221; and &#8220;"
1073
  "return &#8220;true&#8221;."
1074
  msgstr ""
1075
 
1076
+ #: admin/includes/tab-settings.php:1055
1077
  msgid "DNS reverse lookup"
1078
  msgstr ""
1079
 
1080
+ #: admin/includes/tab-settings.php:1072
1081
  msgid ""
1082
  "It enables to simulate validation without deployment. The results can be "
1083
+ "found as &#8220;public&#8221; in Logs."
1084
  msgstr ""
1085
 
1086
+ #: admin/includes/tab-settings.php:1072
1087
  msgid "Simulation mode"
1088
  msgstr ""
1089
 
1090
+ #: admin/includes/tab-settings.php:1090
1091
  msgid "Privacy and record settings"
1092
  msgstr ""
1093
 
1094
+ #: admin/includes/tab-settings.php:1115
1095
+ msgid ""
1096
+ "<dfn title=\"This option restricts not to send IP address to the external "
1097
+ "Geolocation APIs.\">Do not send IP address to external APIs</dfn>"
1098
+ msgstr ""
1099
+
1100
+ #: admin/includes/tab-settings.php:1131
1101
+ msgid ""
1102
+ "<dfn title=\"This option enables to record the number blocked countries and "
1103
+ "the number of blocked requests per day.\">Record &#8220;Statistics&#8221;</"
1104
+ "dfn>"
1105
+ msgstr ""
1106
+
1107
+ #: admin/includes/tab-settings.php:1148
1108
+ msgid "Maximum period for &#8220;Statistics&#8221; [days]"
1109
+ msgstr ""
1110
+
1111
+ #: admin/includes/tab-settings.php:1166
1112
  msgid ""
1113
  "<dfn title=\"This option enables to record the IP address, country code and "
1114
  "failure counter of login attempts into the cache on database to minimize the "
1115
+ "impact on site speed.\">Record &#8220;IP address Cache&#8221;</dfn>"
1116
  msgstr ""
1117
 
1118
+ #: admin/includes/tab-settings.php:1182
 
1119
  msgid ""
1120
+ "<dfn title=\"If user authentication fails consecutively beyond &#8220;Max "
1121
+ "number of failed login attempts per IP address&#8221;, subsequent login will "
1122
+ "also be prohibited for this period.\">Expiration time [sec] for each entry</"
1123
+ "dfn>"
1124
  msgstr ""
1125
 
1126
+ #: admin/includes/tab-settings.php:1198
1127
  msgid ""
1128
  "<dfn title=\"This option enables to record the validation logs including IP "
1129
  "addresses.\">Record &#8220;Logs&#8221;</dfn>"
1130
  msgstr ""
1131
 
1132
+ #: admin/includes/tab-settings.php:1210
1133
  msgid "When blocked"
1134
  msgstr ""
1135
 
1136
+ #: admin/includes/tab-settings.php:1211
1137
  msgid "When passed"
1138
  msgstr ""
1139
 
1140
+ #: admin/includes/tab-settings.php:1212
1141
  msgid "When &#8220;blocked&#8221; or &#8220;passed (not in whitelist)&#8221;"
1142
  msgstr ""
1143
 
1144
+ #: admin/includes/tab-settings.php:1213
1145
  msgid "Unauthenticated visitor"
1146
  msgstr ""
1147
 
1148
+ #: admin/includes/tab-settings.php:1214
1149
  msgid "Authenticated user"
1150
  msgstr ""
1151
 
1152
+ #: admin/includes/tab-settings.php:1215
1153
  msgid "All the validation"
1154
  msgstr ""
1155
 
1156
+ #: admin/includes/tab-settings.php:1224
1157
+ #, php-format
1158
  msgid ""
1159
+ "<dfn title=\"The maximum number of entries in the logs is also limited to %d."
1160
+ "\">Expiration time [days] for each entry</dfn>"
1161
  msgstr ""
1162
 
1163
+ #: admin/includes/tab-settings.php:1240
 
1164
  msgid ""
1165
+ "<dfn title=\"e.g. action, comment, log, pwd, FILES\">$_POST key to record "
1166
+ "with value</dfn>"
1167
  msgstr ""
1168
 
1169
+ #: admin/includes/tab-settings.php:1259
1170
  msgid "Maximum entries of &#8220;Logs&#8221;"
1171
  msgstr ""
1172
 
1173
+ #: admin/includes/tab-settings.php:1276
1174
  msgid ""
1175
  "<dfn title=\"Select SQLite database source.\">Database source of SQLite for "
1176
  "&#8220;Live update&#8221;</dfn>"
1177
  msgstr ""
1178
 
1179
+ #: admin/includes/tab-settings.php:1288
1180
  msgid "Ordinary file"
1181
  msgstr ""
1182
 
1183
+ #: admin/includes/tab-settings.php:1289
1184
  msgid "In-Memory"
1185
  msgstr ""
1186
 
1187
+ #: admin/includes/tab-settings.php:1292
1188
  msgid "PDO_SQLITE driver not available"
1189
  msgstr ""
1190
 
1191
+ #: admin/includes/tab-settings.php:1293
1192
  msgid ""
1193
  "It takes a few tens of milliseconds as overhead. It can be safely used "
1194
  "without conflict with other plugins."
1195
  msgstr ""
1196
 
1197
+ #: admin/includes/tab-settings.php:1294
1198
  msgid ""
1199
  "It takes a few milliseconds as overhead. There is a possibility of conflict "
1200
  "with other plugins using this method."
1201
  msgstr ""
1202
 
1203
+ #: admin/includes/tab-settings.php:1303
1204
  msgid "Reset database source of &#8220;Live update&#8221;"
1205
  msgstr ""
1206
 
1207
+ #: admin/includes/tab-settings.php:1311
1208
  msgid "Reset now"
1209
  msgstr ""
1210
 
1211
+ #: admin/includes/tab-settings.php:1319 admin/includes/tab-settings.php:1457
1212
  msgid ""
1213
  "Task could not be found in WP-Cron. Please try to deactivate this plugin "
1214
  "once and activate again."
1215
  msgstr ""
1216
 
1217
+ #: admin/includes/tab-settings.php:1325
1218
  msgid ""
1219
  "<dfn title=\"This option enables to schedule the WP-Cron event to remove the "
1220
+ "expired entries in &#8220;IP address Cache&#8221; and &#8220;Logs&#8221;."
1221
+ "\">Interval [sec] to cleanup expired entries of IP address</dfn>"
1222
  msgstr ""
1223
 
1224
+ #: admin/includes/tab-settings.php:1334 admin/includes/tab-settings.php:1474
1225
  #, php-format
1226
  msgid "Next schedule: %s"
1227
  msgstr ""
1228
 
1229
+ #: admin/includes/tab-settings.php:1342
 
 
 
 
 
 
 
 
 
 
 
1230
  msgid "Remove all settings and records at uninstallation"
1231
  msgstr ""
1232
 
1233
+ #: admin/includes/tab-settings.php:1359
1234
  msgid "Geolocation API settings"
1235
  msgstr ""
1236
 
1237
+ #: admin/includes/tab-settings.php:1380
1238
  msgid ""
1239
+ "<dfn title=\"IP address Cache and local databases are scanned at the top "
1240
  "priority.\">API selection and key settings</dfn>"
1241
  msgstr ""
1242
 
1243
+ #: admin/includes/tab-settings.php:1400
1244
  msgid "Timeout for network API [sec]"
1245
  msgstr ""
1246
 
1247
+ #: admin/includes/tab-settings.php:1418
1248
  #, php-format
1249
  msgid ""
1250
+ "Can not find Geolocation API libraries in <code>%s</code>. It seems to have "
1251
  "failed downloading <a rel=\"noreferrer\" href=\"https://github.com/"
1252
  "tokkonopapa/WordPress-IP-Geo-API/archive/master.zip\" title=\"Download the "
1253
  "contents of tokkonopapa/WordPress-IP-Geo-API as a zip file\">ZIP file</a> "
1259
  "troubles? | IP Geo Block\">this instruction</a>."
1260
  msgstr ""
1261
 
1262
+ #: admin/includes/tab-settings.php:1425
1263
  msgid "Local database settings"
1264
  msgstr ""
1265
 
1266
+ #: admin/includes/tab-settings.php:1439
1267
  msgid "database"
1268
  msgstr ""
1269
 
1270
+ #: admin/includes/tab-settings.php:1440 classes/class-ip-geo-block-cron.php:419
1271
  #, php-format
1272
  msgid "Last update: %s"
1273
  msgstr ""
1274
 
1275
+ #: admin/includes/tab-settings.php:1463
1276
  msgid "Auto updating (once a month)"
1277
  msgstr ""
1278
 
1279
+ #: admin/includes/tab-settings.php:1481
1280
  msgid "Download database"
1281
  msgstr ""
1282
 
1283
+ #: admin/includes/tab-settings.php:1489
1284
  msgid "Download now"
1285
  msgstr ""
1286
 
1287
+ #: admin/includes/tab-settings.php:1500
1288
  msgid "Submission settings"
1289
  msgstr ""
1290
 
1291
+ #: admin/includes/tab-settings.php:1512
1292
  msgid "The whole will be wrapped by &lt;p&gt; tag. Allowed tags: "
1293
  msgstr ""
1294
 
1295
+ #: admin/includes/tab-settings.php:1512
1296
  msgid "Message on comment form"
1297
  msgstr ""
1298
 
1299
+ #: admin/includes/tab-settings.php:1524
1300
  msgid "None"
1301
  msgstr ""
1302
 
1303
+ #: admin/includes/tab-settings.php:1525
1304
  msgid "Top"
1305
  msgstr ""
1306
 
1307
+ #: admin/includes/tab-settings.php:1526
1308
  msgid "Bottom"
1309
  msgstr ""
1310
 
1311
+ #: admin/includes/tab-settings.php:1537
1312
  msgid "Plugin settings"
1313
  msgstr ""
1314
 
1315
+ #: admin/includes/tab-settings.php:1550
1316
  msgid ""
1317
  "<dfn title=\"Synchronize all settings over the network wide.\">Network wide "
1318
  "settings</dfn>"
1319
  msgstr ""
1320
 
1321
+ #: admin/includes/tab-settings.php:1570
1322
  msgid ""
1323
  "<dfn title=\"Valid key for Google Maps JavaScript API\">Google Maps API key</"
1324
  "dfn>"
1325
  msgstr ""
1326
 
1327
+ #: admin/includes/tab-settings.php:1588
 
 
 
 
 
 
1328
  msgid "Export / Import settings"
1329
  msgstr ""
1330
 
1331
+ #: admin/includes/tab-settings.php:1595
1332
  msgid "Export settings"
1333
  msgstr ""
1334
 
1335
+ #: admin/includes/tab-settings.php:1596
1336
  msgid "Import from the local file"
1337
  msgstr ""
1338
 
1339
+ #: admin/includes/tab-settings.php:1596
1340
  msgid "Import settings"
1341
  msgstr ""
1342
 
1343
+ #: admin/includes/tab-settings.php:1605
1344
  msgid "Import pre-defined settings"
1345
  msgstr ""
1346
 
1347
+ #: admin/includes/tab-settings.php:1612
1348
  msgid ""
1349
  "Import the default settings to revert to the &#8220;Right after "
1350
  "installing&#8221; state"
1351
  msgstr ""
1352
 
1353
+ #: admin/includes/tab-settings.php:1612
1354
  msgid "Default settings"
1355
  msgstr ""
1356
 
1357
+ #: admin/includes/tab-settings.php:1613
1358
  msgid ""
1359
  "Import the preferred settings mainly by enabling Zero-day Exploit Prevention "
1360
  "for the &#8220;Back-end target settings&#8221;"
1361
  msgstr ""
1362
 
1363
+ #: admin/includes/tab-settings.php:1613
1364
  msgid "Best for Back-end"
1365
  msgstr ""
1366
 
1367
+ #: admin/includes/tab-settings.php:1623
1368
  msgid "Delete DB tables for this plugin"
1369
  msgstr ""
1370
 
1371
+ #: admin/includes/tab-settings.php:1631
1372
  msgid "Delete now"
1373
  msgstr ""
1374
 
1375
+ #: admin/includes/tab-settings.php:1639
1376
  msgid "Create DB tables for this plugin"
1377
  msgstr ""
1378
 
1379
+ #: admin/includes/tab-settings.php:1647
1380
  msgid "Create now"
1381
  msgstr ""
1382
 
1383
+ #: admin/includes/tab-settings.php:1657
1384
  msgid ""
1385
+ "<dfn title=\"When you have some unexpected blocking experiences, please "
1386
+ "press the button to find the blocked requests at the end of dumped "
1387
+ "information which may help you to solve the issues.\">Diagnostic "
1388
+ "information</dfn><br />[ <a rel=\"noreferrer\" href=\"https://wordpress.org/"
1389
+ "support/plugin/ip-geo-block\" title=\"WordPress &#8250; Support &raquo; IP "
1390
+ "Geo Block\">support forum</a> ]"
1391
  msgstr ""
1392
 
1393
+ #: admin/includes/tab-settings.php:1664
1394
  msgid "Please copy &amp; paste when submitting your issue to support forum."
1395
  msgstr ""
1396
 
1397
+ #: admin/includes/tab-settings.php:1664
1398
  msgid "Show information"
1399
  msgstr ""
1400
 
1401
+ #: admin/includes/tab-settings.php:1680
1402
  msgid ""
1403
  "To enhance the protection ability, please refer to &#8220;<a rel=\"noreferrer"
1404
  "\" href=\"http://www.ipgeoblock.com/codex/the-best-practice-for-target-"
1406
  "\">The best practice for target settings</a>&#8221;."
1407
  msgstr ""
1408
 
1409
+ #: admin/includes/tab-settings.php:1681
1410
  msgid ""
1411
  "If you have any troubles with these, please check FAQ at <a rel=\"noreferrer"
1412
  "\" href=\"https://wordpress.org/plugins/ip-geo-block/faq/\" title=\"IP Geo "
1415
  "\">Codex</a>."
1416
  msgstr ""
1417
 
1418
+ #: admin/includes/tab-settings.php:1688
1419
  msgid ""
1420
+ "While Geolite2 / Maxmind and IP2Location will fetch the local databases, "
1421
+ "others will pass an IP address to the 3rd parties' API via HTTP."
1422
  msgstr ""
1423
 
1424
+ #: admin/includes/tab-settings.php:1689
1425
  msgid ""
1426
+ "Please select the appropriate APIs to fit the privacy law / regulation in "
1427
+ "your country / region."
1428
  msgstr ""
1429
 
1430
+ #: admin/includes/tab-settings.php:1698
1431
  #, php-format
1432
  msgid ""
1433
  "Maxmind GeoLite2 databases and APIs need PHP version 5.4.0+ and %sPECL phar "
1434
  "2.0.0+%s."
1435
  msgstr ""
1436
 
1437
+ #: admin/includes/tab-settings.php:1706
1438
  msgid ""
1439
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1440
  "ipgeoblock.com/codex/#blocking-on-front-end\" title=\"Codex | IP Geo Block"
1442
  "cache plugin."
1443
  msgstr ""
1444
 
1445
+ #: admin/includes/tab-settings.php:1707
1446
  msgid ""
1447
  "If you find any issues or have something to suggest, please feel free to "
1448
  "open an issue at <a rel=\"noreferrer\" href=\"https://wordpress.org/support/"
1450
  "\">support forum</a>."
1451
  msgstr ""
1452
 
1453
+ #: admin/includes/tab-settings.php:1714
1454
  msgid ""
1455
  "Please refer to the document &#8220;<a rel=\"noreferrer\" href=\"http://www."
1456
  "ipgeoblock.com/codex/record-settings-and-logs.html\" title=\"Codex | IP Geo "
1502
  msgstr ""
1503
 
1504
  #: admin/includes/tab-statistics.php:217
1505
+ msgid "Statistics in IP address Cache"
1506
  msgstr ""
1507
 
1508
  #: admin/includes/tab-statistics.php:230
1550
 
1551
  #: admin/includes/tab-statistics.php:431
1552
  #, php-format
1553
+ msgid "[ %sRecord &#8220;IP address Cache&#8221;%s ] is disabled."
1554
  msgstr ""
1555
 
1556
  #: admin/includes/tab-statistics.php:432
1559
 
1560
  #: classes/class-ip-geo-block-apis.php:661
1561
  msgid ""
1562
+ "You need to select at least one IP Geolocation API. Otherwise <strong>you'll "
1563
+ "be blocked</strong> after the cache expires."
1564
  msgstr ""
1565
 
1566
  #: classes/class-ip-geo-block-cron.php:222
1594
  "details."
1595
  msgstr ""
1596
 
1597
+ #: classes/class-ip-geo-block-logs.php:234
1598
  #, php-format
1599
  msgid ""
1600
  "Creating a DB table %s had failed. Once de-activate this plugin, and then "
1601
  "activate again."
1602
  msgstr ""
1603
 
1604
+ #: classes/class-ip-geo-block-logs.php:239
1605
  #, php-format
1606
  msgid ""
1607
  "Column type in %s unmatched. Once de-activate this plugin, and then activate "
1608
  "again."
1609
  msgstr ""
1610
 
1611
+ #: classes/class-ip-geo-block.php:416
1612
  msgid "Dashboard"
1613
  msgstr ""
1614