SiteGuard WP Plugin - Version 1.2.1

Version Description

  • Supported with WP 4.2
Download this release

Release Info

Developer jp-secure
Plugin Icon 128x128 SiteGuard WP Plugin
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2.0 to 1.2.1

Files changed (103) hide show
  1. {trunk/images → images}/sg_logo_3037x414.jpg +0 -0
  2. readme.txt +4 -2
  3. siteguard.php +2 -2
  4. trunk/admin/siteguard-login-history-table.php +0 -109
  5. trunk/admin/siteguard-menu-admin-filter.php +0 -111
  6. trunk/admin/siteguard-menu-captcha.php +0 -158
  7. trunk/admin/siteguard-menu-dashboard.php +0 -97
  8. trunk/admin/siteguard-menu-disable-pingback.php +0 -67
  9. trunk/admin/siteguard-menu-fail-once.php +0 -84
  10. trunk/admin/siteguard-menu-init.php +0 -73
  11. trunk/admin/siteguard-menu-login-alert.php +0 -99
  12. trunk/admin/siteguard-menu-login-lock.php +0 -138
  13. trunk/admin/siteguard-menu-rename-login.php +0 -130
  14. trunk/admin/siteguard-menu-same-error.php +0 -76
  15. trunk/admin/siteguard-menu-updates-notify.php +0 -145
  16. trunk/admin/siteguard-menu-waf-tuning-support.php +0 -303
  17. trunk/admin/siteguard-waf-exclude-rule-table.php +0 -127
  18. trunk/classes/siteguard-admin-filter.php +0 -109
  19. trunk/classes/siteguard-base.php +0 -61
  20. trunk/classes/siteguard-captcha.php +0 -219
  21. trunk/classes/siteguard-config.php +0 -20
  22. trunk/classes/siteguard-disable-pingback.php +0 -23
  23. trunk/classes/siteguard-htaccess.php +0 -192
  24. trunk/classes/siteguard-login-alert.php +0 -52
  25. trunk/classes/siteguard-login-history.php +0 -119
  26. trunk/classes/siteguard-login-lock.php +0 -132
  27. trunk/classes/siteguard-rename-login.php +0 -155
  28. trunk/classes/siteguard-updates-notify.php +0 -274
  29. trunk/classes/siteguard-waf-exclude-rule.php +0 -233
  30. trunk/css/siteguard-menu.css +0 -149
  31. trunk/images/dummy.png +0 -0
  32. trunk/images/plugin-icon.png +0 -0
  33. trunk/images/sg_wp_plugin_logo_40.png +0 -0
  34. trunk/images/yes.png +0 -0
  35. trunk/images/yes_glay.png +0 -0
  36. trunk/languages/siteguard-ja.mo +0 -0
  37. trunk/languages/siteguard-ja.po +0 -760
  38. trunk/languages/siteguard.pot +0 -802
  39. trunk/license.txt +0 -674
  40. trunk/readme.txt +0 -138
  41. trunk/really-simple-captcha/gentium/FONTLOG.txt +0 -153
  42. trunk/really-simple-captcha/gentium/GENTIUM-FAQ.txt +0 -249
  43. trunk/really-simple-captcha/gentium/GenBasB.ttf +0 -0
  44. trunk/really-simple-captcha/gentium/GenBasBI.ttf +0 -0
  45. trunk/really-simple-captcha/gentium/GenBasI.ttf +0 -0
  46. trunk/really-simple-captcha/gentium/GenBasR.ttf +0 -0
  47. trunk/really-simple-captcha/gentium/GenBkBasB.ttf +0 -0
  48. trunk/really-simple-captcha/gentium/GenBkBasBI.ttf +0 -0
  49. trunk/really-simple-captcha/gentium/GenBkBasI.ttf +0 -0
  50. trunk/really-simple-captcha/gentium/GenBkBasR.ttf +0 -0
  51. trunk/really-simple-captcha/gentium/OFL-FAQ.txt +0 -216
  52. trunk/really-simple-captcha/gentium/OFL.txt +0 -94
  53. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/LICENSE_E +0 -16
  54. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/LICENSE_J +0 -15
  55. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/README_E +0 -82
  56. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/README_J +0 -90
  57. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/m++ipa.pe +0 -120
  58. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-black.ttf +0 -0
  59. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-bold.ttf +0 -0
  60. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-heavy.ttf +0 -0
  61. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-light.ttf +0 -0
  62. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-medium.ttf +0 -0
  63. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-regular.ttf +0 -0
  64. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-thin.ttf +0 -0
  65. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-bold.ttf +0 -0
  66. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-light.ttf +0 -0
  67. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-medium.ttf +0 -0
  68. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-regular.ttf +0 -0
  69. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-thin.ttf +0 -0
  70. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-bold.ttf +0 -0
  71. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-light.ttf +0 -0
  72. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-medium.ttf +0 -0
  73. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-regular.ttf +0 -0
  74. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-thin.ttf +0 -0
  75. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-black.ttf +0 -0
  76. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-bold.ttf +0 -0
  77. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-heavy.ttf +0 -0
  78. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-light.ttf +0 -0
  79. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-medium.ttf +0 -0
  80. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-regular.ttf +0 -0
  81. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-thin.ttf +0 -0
  82. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-black.ttf +0 -0
  83. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-bold.ttf +0 -0
  84. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-heavy.ttf +0 -0
  85. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-light.ttf +0 -0
  86. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-medium.ttf +0 -0
  87. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-regular.ttf +0 -0
  88. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-thin.ttf +0 -0
  89. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-bold.ttf +0 -0
  90. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-light.ttf +0 -0
  91. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-medium.ttf +0 -0
  92. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-regular.ttf +0 -0
  93. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-thin.ttf +0 -0
  94. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-black.ttf +0 -0
  95. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-bold.ttf +0 -0
  96. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-heavy.ttf +0 -0
  97. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-light.ttf +0 -0
  98. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-medium.ttf +0 -0
  99. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-regular.ttf +0 -0
  100. trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-thin.ttf +0 -0
  101. trunk/really-simple-captcha/siteguard-really-simple-captcha.php +0 -403
  102. trunk/siteguard.php +0 -184
  103. trunk/uninstall.php +0 -21
{trunk/images → images}/sg_logo_3037x414.jpg RENAMED
File without changes
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: jp-secure
3
  Donate link: -
4
  Tags: security, waf, brute force, password list, login lock, login alert, captcha, pingback, fail once
5
  Requires at least: 3.9
6
- Tested up to: 4.1
7
- Stable tag: 1.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -102,6 +102,8 @@ If you have created your own language pack, or have an update of an existing one
102
  [Japanese Page](http://www.jp-secure.com/cont/products/siteguard_wp_plugin/faq.html)
103
 
104
  == Changelog ==
 
 
105
  = 1.2.0 =
106
  * Add the "Updates Notify" feature
107
  * Fix bug that login via XML-RPC to fail, if the CAPTCHA is enabled
3
  Donate link: -
4
  Tags: security, waf, brute force, password list, login lock, login alert, captcha, pingback, fail once
5
  Requires at least: 3.9
6
+ Tested up to: 4.2
7
+ Stable tag: 1.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
102
  [Japanese Page](http://www.jp-secure.com/cont/products/siteguard_wp_plugin/faq.html)
103
 
104
  == Changelog ==
105
+ = 1.2.1 =
106
+ * Supported with WP 4.2
107
  = 1.2.0 =
108
  * Add the "Updates Notify" feature
109
  * Fix bug that login via XML-RPC to fail, if the CAPTCHA is enabled
siteguard.php CHANGED
@@ -7,7 +7,7 @@ Author: JP-Secure
7
  Author URI: http://www.jp-secure.com/eng/
8
  Text Domain: siteguard
9
  Domain Path: /languages/
10
- Version: 1.2.0
11
  */
12
 
13
  /* Copyright 2014 JP-Secure Inc
@@ -30,7 +30,7 @@ if ( ! defined( 'ABSPATH' ) ) {
30
  exit;
31
  }
32
 
33
- define( 'SITEGUARD_VERSION', '1.2.0' );
34
 
35
  define( 'SITEGUARD_PATH', plugin_dir_path( __FILE__ ) );
36
  define( 'SITEGUARD_URL_PATH', plugin_dir_url( __FILE__ ) );
7
  Author URI: http://www.jp-secure.com/eng/
8
  Text Domain: siteguard
9
  Domain Path: /languages/
10
+ Version: 1.2.1
11
  */
12
 
13
  /* Copyright 2014 JP-Secure Inc
30
  exit;
31
  }
32
 
33
+ define( 'SITEGUARD_VERSION', '1.2.1' );
34
 
35
  define( 'SITEGUARD_PATH', plugin_dir_path( __FILE__ ) );
36
  define( 'SITEGUARD_URL_PATH', plugin_dir_url( __FILE__ ) );
trunk/admin/siteguard-login-history-table.php DELETED
@@ -1,109 +0,0 @@
1
- <?php
2
- if ( ! class_exists( 'WP_List_Table' ) ) {
3
- require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
4
- }
5
-
6
- class SiteGuard_LoginHistory_Table extends WP_List_Table {
7
-
8
- function __construct( ) {
9
- global $status, $page;
10
-
11
- //Set parent defaults
12
- parent::__construct( array(
13
- 'singular' => 'event', //singular name of the listed records
14
- 'plural' => 'events', //plural name of the listed records
15
- 'ajax' => false, //does this table support ajax?
16
- ) );
17
- }
18
-
19
- function column_default( $item, $column_name ) {
20
- switch ( $column_name ) {
21
- case 'operation':
22
- return SiteGuard_LoginHistory::convert_operation( $item[ $column_name ] );
23
- case 'time':
24
- case 'login_name':
25
- case 'ip_address':
26
- return $item[ $column_name ];
27
- default:
28
- return print_r( $item, true ); //Show the whole array for troubleshooting purposes
29
- }
30
- }
31
-
32
- function get_columns( ) {
33
- $columns = array(
34
- #'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
35
- 'time' => esc_html__( 'Date Time', 'siteguard' ),
36
- 'operation' => esc_html__( 'Operation', 'siteguard' ),
37
- 'login_name' => esc_html__( 'Login Name', 'siteguard' ),
38
- 'ip_address' => esc_html__( 'IP Address', 'siteguard' ),
39
- );
40
- return $columns;
41
- }
42
-
43
- function get_sortable_columns( ) {
44
- $sortable_columns = array(
45
- 'time' => array( 'id', true ), //true means it's already sorted
46
- 'operation' => array( 'operation', false ), //true means it's already sorted
47
- 'login_name' => array( 'login_name', false ),
48
- 'ip_address' => array( 'ip_address', false )
49
- );
50
- return $sortable_columns;
51
- }
52
-
53
- function get_bulk_actions( ) {
54
- #$actions = array(
55
- # 'delete' => __( 'Delete' ),
56
- #);
57
- $actions = array();
58
- return $actions;
59
- }
60
-
61
-
62
- function process_bulk_action( ) {
63
- return;
64
- }
65
-
66
- function usort_reorder( $a, $b ){
67
- $orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'id'; //If no sort, default to id
68
- $order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'desc'; //If no order, default to desc
69
- if ( 'id' == $orderby ) {
70
- $result = ( $a > $b ? 1 : ( $a < $b ? -1 : 0 ) );
71
- } else {
72
- $result = strcmp( $a[ $orderby ], $b[ $orderby ] ); //Determine sort order
73
- }
74
- return ( 'asc' == $order ) ? $result : -$result; //Send final sort direction to usort
75
- }
76
-
77
- function prepare_items( ) {
78
- global $login_history;
79
-
80
- $per_page = 10;
81
-
82
- $columns = $this->get_columns( );
83
- $hidden = array();
84
- $sortable = $this->get_sortable_columns( );
85
-
86
- $this->_column_headers = array( $columns, $hidden, $sortable );
87
-
88
- $this->process_bulk_action( );
89
-
90
- $data = $login_history->get_history( );
91
-
92
- $total_items = count( $data );
93
- $current_page = $this->get_pagenum( );
94
-
95
- if ( $total_items > 0 ) {
96
- usort( $data, array( $this, 'usort_reorder' ) );
97
- $data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
98
- }
99
-
100
- $this->items = $data;
101
-
102
- $this->set_pagination_args( array(
103
- 'total_items' => $total_items, //WE have to calculate the total number of items
104
- 'per_page' => $per_page, //WE have to determine how many items to show on a page
105
- 'total_pages' => ceil( $total_items / $per_page ) //WE have to calculate the total number of pages
106
- ) );
107
- }
108
- }
109
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-admin-filter.php DELETED
@@ -1,111 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Menu_Admin_Filter extends SiteGuard_Base {
4
- function __construct( ) {
5
- $this->render_page( );
6
- }
7
- function cvt_camma2ret( $exclude ) {
8
- $result = str_replace( ' ', '', $exclude );
9
- return str_replace( ',', "\r\n", $result );
10
- }
11
- function cvt_ret2camma( $exclude ) {
12
- $result = str_replace( ' ', '', $exclude );
13
- $result = str_replace( ',', '', $result );
14
- $result = preg_replace( '/(\r\n){2,}/', "\r\n", $result );
15
- $result = preg_replace( '/\r\n$/', '', $result );
16
- $result = str_replace( "\r\n", ',', $result );
17
- $result = str_replace( "\r", ',', $result );
18
- return str_replace( "\n", ',', $result );
19
- }
20
- function render_page( ) {
21
- global $admin_filter, $config;
22
-
23
- $opt_name_feature = 'admin_filter_enable';
24
- $opt_name_exclude = 'admin_filter_exclude_path';
25
-
26
- $opt_val_feature = $config->get( $opt_name_feature );
27
- $opt_val_exclude = $this->cvt_camma2ret( $config->get( $opt_name_exclude ) );
28
- if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-admin-filter-submit' ) ) {
29
- $error = false;
30
- if ( '1' == $_POST[ $opt_name_feature ] && false == $this->check_module( 'rewrite' ) ) {
31
- echo '<div class="error settings-error"><p><strong>';
32
- esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
33
- echo '</strong></p></div>';
34
- $error = true;
35
- $config->set( $opt_name_feature, '0' );
36
- $config->update( );
37
- $admin_filter->feature_off( );
38
- $opt_val_feature = '0';
39
- }
40
- if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
41
- echo '<div class="error settings-error"><p><strong>';
42
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
43
- echo '</strong></p></div>';
44
- $error = true;
45
- }
46
- if ( false == $error ) {
47
- $opt_val_feature = $_POST[ $opt_name_feature ];
48
- $opt_val_exclude = $this->cvt_ret2camma( stripslashes( $_POST[ $opt_name_exclude ] ) );
49
- $config->set( $opt_name_feature, $opt_val_feature );
50
- $config->set( $opt_name_exclude, $opt_val_exclude );
51
- $config->update( );
52
- $opt_val_exclude = $this->cvt_camma2ret( $opt_val_exclude );
53
- $mark = $admin_filter->get_mark( );
54
- if ( '0' == $opt_val_feature ) {
55
- $admin_filter->feature_off( );
56
- } else {
57
- $admin_filter->feature_on( $_SERVER['REMOTE_ADDR'] );
58
- }
59
- ?>
60
- <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
61
- <?php
62
- }
63
- }
64
-
65
- echo '<div class="wrap">';
66
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
67
- echo '<h2>' . esc_html__( 'Admin Page IP Filter', 'siteguard' ) . '</h2>';
68
- ?>
69
- <form name="form1" method="post" action="">
70
- <table class="form-table">
71
- <tr>
72
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
73
- <td>
74
- <ul class="siteguard-radios">
75
- <li>
76
- <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_feature ? 'checked' : '' ) ?> >
77
- <label for="<?php echo $opt_name_feature.'_on' ?>" ><?php echo esc_html_e( 'ON', 'siteguard' ) ?></label>
78
- </li>
79
- <li>
80
- <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_feature ? 'checked' : '') ?> >
81
- <label for="<?php echo $opt_name_feature.'_off' ?>" ><?php echo esc_html_e( 'OFF', 'siteguard' ) ?></label>
82
- </li>
83
- </ul>
84
- <?php
85
- echo '<p class="description">';
86
- esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
87
- echo '</p>';
88
- ?>
89
- </td>
90
- </tr><tr>
91
- <th scope="row"><label for="<?php echo $opt_name_exclude ?>"><?php echo esc_html_e( 'Exclude Path', 'siteguard' ) ?></label></th>
92
- <td><textarea name="<?php echo $opt_name_exclude ?>" id="<?php echo $opt_name_exclude ?>" col=40 rows=5 ><?php echo esc_textarea( $opt_val_exclude ) ?></textarea>
93
- <p class="description"><?php esc_html_e( 'The path of /wp-admin/ henceforth is specified. To specify more than one, separate them with new line. ', 'siteguard' ) ?></p></td>
94
- </tr>
95
- </table>
96
- <input type="hidden" name="update" value="Y">
97
- <div class="siteguard-description">
98
- <?php esc_html_e( 'It is the function for the protection against the attack to the management page (under /wp-admin/.) To the access from the connection source IP address which does not login to the management page, 404 (Not Found) is returned. At the login, the connection source IP address is recorded and the access to that page is allowed. The connection source IP address which does not login for more than 24 hours is sequentially deleted. The URL (under /wp-admin/) where this function is excluded can be specified.', 'siteguard' ); ?>
99
- </div>
100
- <hr />
101
- <?php
102
- wp_nonce_field( 'siteguard-menu-admin-filter-submit' );
103
- submit_button( );
104
- ?>
105
- </form>
106
- </div>
107
-
108
- <?php
109
- }
110
- }
111
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-captcha.php DELETED
@@ -1,158 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Menu_CAPTCHA extends SiteGuard_Base {
4
- function __construct( ) {
5
- $this->render_page( );
6
- }
7
- function is_captcha_switch_value( $value ) {
8
- if ( '0' == $value || '1' == $value || '2' == $value ) {
9
- return true;
10
- }
11
- return false;
12
- }
13
- function render_page( ) {
14
- global $config, $captcha;
15
-
16
- $opt_name_enable = 'captcha_enable';
17
- $opt_name_login = 'captcha_login';
18
- $opt_name_comment = 'captcha_comment';
19
- $opt_name_lostpassword = 'captcha_lostpasswd';
20
- $opt_name_registuser = 'captcha_registuser';
21
-
22
- $opt_val_enable = $config->get( $opt_name_enable );
23
- $opt_val_login = $config->get( $opt_name_login );
24
- $opt_val_comment = $config->get( $opt_name_comment );
25
- $opt_val_lostpassword = $config->get( $opt_name_lostpassword );
26
- $opt_val_registuser = $config->get( $opt_name_registuser );
27
- if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-captcha-submit' ) ) {
28
- $error = false;
29
- if ( '1' == $_POST[ $opt_name_enable ] ) {
30
- $ret = $captcha->check_requirements( );
31
- if ( is_wp_error( $ret ) ) {
32
- echo '<div class="error settings-error"><p><strong>' . $ret->get_error_message( ) . '</strong></p></div>';
33
- $error = true;
34
- $config->set( $opt_name_enable, '0' );
35
- $config->update( );
36
- }
37
- }
38
- if ( ( false == $this->is_switch_value( $_POST[ $opt_name_enable ] ) )
39
- || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_login ] ) )
40
- || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_comment ] ) )
41
- || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_lostpassword ] ) )
42
- || ( false == $this->is_captcha_switch_value( $_POST[ $opt_name_registuser ] ) ) ) {
43
- echo '<div class="error settings-error"><p><strong>';
44
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
45
- echo '</strong></p></div>';
46
- $error = true;
47
- }
48
- if ( false == $error ) {
49
- $opt_val_enable = $_POST[ $opt_name_enable ];
50
- $opt_val_login = $_POST[ $opt_name_login ];
51
- $opt_val_comment = $_POST[ $opt_name_comment ];
52
- $opt_val_lostpassword = $_POST[ $opt_name_lostpassword ];
53
- $opt_val_registuser = $_POST[ $opt_name_registuser ];
54
- $config->set( $opt_name_enable, $opt_val_enable );
55
- $config->set( $opt_name_login, $opt_val_login );
56
- $config->set( $opt_name_comment, $opt_val_comment );
57
- $config->set( $opt_name_lostpassword, $opt_val_lostpassword );
58
- $config->set( $opt_name_registuser, $opt_val_registuser );
59
- $config->update( );
60
- ?>
61
- <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
62
- <?php
63
- }
64
- }
65
-
66
- echo '<div class="wrap">';
67
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
68
- echo '<h2>' . esc_html__( 'CAPTCHA', 'siteguard' ) . '</h2>';
69
- ?>
70
- <form name="form1" method="post" action="">
71
- <table class="form-table">
72
- <tr>
73
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
74
- <td>
75
- <ul class="siteguard-radios">
76
- <li>
77
- <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_enable ? 'checked' : '') ?> >
78
- <label for="<?php echo $opt_name_enable.'_on' ?>"><?php esc_html_e( 'ON', 'siteguard' ) ?></label>
79
- </li><li>
80
- <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_enable ? 'checked' : '') ?> >
81
- <label for="<?php echo $opt_name_enable.'_off' ?>"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
82
- </li>
83
- </ul>
84
- <?php
85
- $error = $captcha->check_requirements( );
86
- if ( is_wp_error( $error ) ) {
87
- echo '<p class="description">';
88
- echo $error->get_error_message( );
89
- echo '</p>';
90
- }
91
- ?>
92
- </td>
93
- </tr><tr>
94
- <th scope="row"><?php esc_html_e( 'Login page', 'siteguard' ); ?></th>
95
- <td>
96
- <input type="radio" name="<?php echo $opt_name_login ?>" id="<?php echo $opt_name_login.'_jp' ?>" value="1" <?php echo ( '1' == $opt_val_login ? 'checked' : '') ?> >
97
- <label for="<?php echo $opt_name_login.'_jp' ?>"><?php esc_html_e( 'Hiragana (Japanese)', 'siteguard' ) ?></label>
98
- <br />
99
- <input type="radio" name="<?php echo $opt_name_login ?>" id="<?php echo $opt_name_login.'_en' ?>" value="2" <?php echo ( '2' == $opt_val_login ? 'checked' : '') ?> >
100
- <label for="<?php echo $opt_name_login.'_en' ?>"><?php esc_html_e( 'Alphanumeric', 'siteguard' ) ?></label>
101
- <br />
102
- <input type="radio" name="<?php echo $opt_name_login ?>" id="<?php echo $opt_name_login.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_login ? 'checked' : '') ?> >
103
- <label for="<?php echo $opt_name_login.'_off' ?>"><?php esc_html_e( 'Disable', 'siteguard' ) ?></label>
104
- </td>
105
- </tr><tr>
106
- <th scope="row"><?php esc_html_e( 'Comment page', 'siteguard' ); ?></th>
107
- <td>
108
- <input type="radio" name="<?php echo $opt_name_comment ?>" id="<?php echo $opt_name_comment.'_jp' ?>" value="1" <?php echo ( '1' == $opt_val_comment ? 'checked' : '') ?> >
109
- <label for="<?php echo $opt_name_comment.'_jp' ?>"><?php esc_html_e( 'Hiragana (Japanese)', 'siteguard' ) ?></label>
110
- <br />
111
- <input type="radio" name="<?php echo $opt_name_comment ?>" id="<?php echo $opt_name_comment.'_en' ?>" value="2" <?php echo ( '2' == $opt_val_comment ? 'checked' : '') ?> >
112
- <label for="<?php echo $opt_name_comment.'_en' ?>"><?php esc_html_e( 'Alphanumeric', 'siteguard' ) ?></label>
113
- <br />
114
- <input type="radio" name="<?php echo $opt_name_comment ?>" id="<?php echo $opt_name_comment.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_comment ? 'checked' : '') ?> >
115
- <label for="<?php echo $opt_name_comment.'_off' ?>"><?php esc_html_e( 'Disable', 'siteguard' ) ?></label>
116
- </td>
117
- </tr><tr>
118
- <th scope="row"><?php esc_html_e( 'Lost password page', 'siteguard' ); ?></th>
119
- <td>
120
- <input type="radio" name="<?php echo $opt_name_lostpassword ?>" id="<?php echo $opt_name_lostpassword.'_jp' ?>" value="1" <?php echo ( '1' == $opt_val_lostpassword ? 'checked' : '') ?> >
121
- <label for="<?php echo $opt_name_lostpassword.'_jp' ?>"><?php esc_html_e( 'Hiragana (Japanese)', 'siteguard' ) ?></label>
122
- <br />
123
- <input type="radio" name="<?php echo $opt_name_lostpassword ?>" id="<?php echo $opt_name_lostpassword.'_en' ?>" value="2" <?php echo ( '2' == $opt_val_lostpassword ? 'checked' : '') ?> >
124
- <label for="<?php echo $opt_name_lostpassword.'_en' ?>"><?php esc_html_e( 'Alphanumeric', 'siteguard' ) ?></label>
125
- <br />
126
- <input type="radio" name="<?php echo $opt_name_lostpassword ?>" id="<?php echo $opt_name_lostpassword.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_lostpassword ? 'checked' : '') ?> >
127
- <label for="<?php echo $opt_name_lostpassword.'_off' ?>"><?php esc_html_e( 'Disable', 'siteguard' ) ?></label>
128
- </td>
129
- </tr><tr>
130
- <th scope="row"><?php esc_html_e( 'Registration user page', 'siteguard' ); ?></th>
131
- <td>
132
- <input type="radio" name="<?php echo $opt_name_registuser ?>" id="<?php echo $opt_name_registuser.'_jp' ?>" value="1" <?php echo ( '1' == $opt_val_registuser ? 'checked' : '') ?> >
133
- <label for="<?php echo $opt_name_registuser.'_jp' ?>"><?php esc_html_e( 'Hiragana (Japanese)', 'siteguard' ) ?></label>
134
- <br />
135
- <input type="radio" name="<?php echo $opt_name_registuser ?>" id="<?php echo $opt_name_registuser.'_en' ?>" value="2" <?php echo ( '2' == $opt_val_registuser ? 'checked' : '') ?> >
136
- <label for="<?php echo $opt_name_registuser.'_en' ?>"><?php esc_html_e( 'Alphanumeric', 'siteguard' ) ?></label>
137
- <br />
138
- <input type="radio" name="<?php echo $opt_name_registuser ?>" id="<?php echo $opt_name_registuser.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_registuser ? 'checked' : '') ?> >
139
- <label for="<?php echo $opt_name_registuser.'_off' ?>"><?php esc_html_e( 'Disable', 'siteguard' ) ?></label>
140
- </td>
141
- </tr>
142
- </table>
143
- <div class="siteguard-description">
144
- <?php esc_html_e( 'It is the function to decrease the vulnerability against an illegal login attempt attack such as a brute force attack or a password list attack, or to receive less comment spam. For the character of CAPTCHA, hiragana and alphanumeric characters can be selected.', 'siteguard' ) ?>
145
- </div>
146
- <input type="hidden" name="update" value="Y">
147
- <hr />
148
-
149
- <?php
150
- wp_nonce_field( 'siteguard-menu-captcha-submit' );
151
- submit_button();
152
- ?>
153
- </form>
154
- </div>
155
- <?php
156
- }
157
- }
158
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-dashboard.php DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
-
3
- require_once( 'siteguard-login-history-table.php' );
4
-
5
- class SiteGuard_Menu_Dashboard extends SiteGuard_Base {
6
- var $wp_list_table;
7
- function __construct( ) {
8
- $this->wp_list_table = new SiteGuard_LoginHistory_Table( );
9
- $this->wp_list_table->prepare_items( );
10
- $this->render_page( );
11
- }
12
- function render_page( ) {
13
- global $config, $login_history;
14
- $img_path = SITEGUARD_URL_PATH . 'images/';
15
- $admin_filter_enable = $config->get( 'admin_filter_enable' );
16
- $renamelogin_enable = $config->get( 'renamelogin_enable' );
17
- $captcha_enable = $config->get( 'captcha_enable' );
18
- $same_error_enable = $config->get( 'same_login_error' );
19
- $loginlock_enable = $config->get( 'loginlock_enable' );
20
- $loginalert_enable = $config->get( 'loginalert_enable' );
21
- $fail_once_enable = $config->get( 'loginlock_fail_once' );
22
- $disable_pingback_enable = $config->get( 'disable_pingback_enable' );
23
- $updates_notify_enable = $config->get( 'updates_notify_enable' );
24
- $waf_exclude_rule_enable = $config->get( 'waf_exclude_rule_enable' );
25
- echo '<div class="wrap">';
26
- echo '<img src="' . $img_path . 'sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
27
- echo '<h2>' . esc_html__( 'Dashboard', 'siteguard' ) . "</h2>\n";
28
- echo '<div class="siteguard-description">'
29
- . esc_html__( 'You can find docs, FAQ and more detailed information about SiteGuard WP Plugin on ', 'siteguard' )
30
- . '<a href="' . esc_html__( 'http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index_en.html', 'siteguard' ) . '" target="_blank">' . esc_html__( 'SiteGuard WP Plugin Page', 'siteguard' ) . '</a>' . esc_html__( '.', 'siteguard' ) . '</div>';
31
- echo '<h3>' . esc_html__( 'Setting status', 'siteguard' ) . "</h3>\n";
32
- ?>
33
- <table class="siteguard-form-table">
34
- <tr>
35
- <th scpoe="row">
36
- <img src=<?php echo '"' . $img_path . ( $admin_filter_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
37
- <a href="?page=siteguard_admin_filter"><?php esc_html_e( 'Admin Page IP Filter', 'siteguard' ) ?></a></th>
38
- <td><?php esc_html_e( 'The management directory (/wp-admin/) is protected against the connection source which does not login.', 'siteguard' ) ?></td>
39
- </tr><tr>
40
- <th scpoe="row">
41
- <img src=<?php echo '"' . $img_path . ( $renamelogin_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
42
- <a href="?page=siteguard_rename_login"><?php esc_html_e( 'Rename Login', 'siteguard' ) ?></a></th>
43
- <td><?php esc_html_e( 'The login page name is changed.', 'siteguard' ) ?></td>
44
- </tr><tr>
45
- <th scpoe="row">
46
- <img src=<?php echo '"' . $img_path . ( $captcha_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
47
- <a href="?page=siteguard_captcha"><?php esc_html_e( 'CAPTCHA', 'siteguard' ) ?></a></th>
48
- <td><?php esc_html_e( 'CAPTCHA is added to the login page or comment post.', 'siteguard' ) ?></td>
49
- </tr><tr>
50
- <th scpoe="row">
51
- <img src=<?php echo '"' . $img_path . ( $same_error_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
52
- <a href="?page=siteguard_same_error"><?php esc_html_e( 'Same Login Error Message', 'siteguard' ) ?></a></th>
53
- <td><?php esc_html_e( 'Instead of the detailed error message at the login error, the single message is returned.', 'siteguard' ) ?></td>
54
- </tr><tr>
55
- <th scope="row">
56
- <img src=<?php echo '"' . $img_path . ( $loginlock_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
57
- <a href="?page=siteguard_login_lock"><?php esc_html_e( 'Login Lock', 'siteguard' ) ?></a></th>
58
- <td><?php esc_html_e( 'The connection source which repeats login failure is being locked within a certain period.', 'siteguard' ) ?></td>
59
- </tr><tr>
60
- <th scope="row">
61
- <img src=<?php echo '"' . $img_path . ( $loginalert_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
62
- <a href="?page=siteguard_login_alert"><?php esc_html_e( 'Login Alert', 'siteguard' ) ?></a></th>
63
- <td><?php esc_html_e( 'E-mail notifies that there was login.', 'siteguard' ) ?></td>
64
- </tr><tr>
65
- <th scope="row">
66
- <img src=<?php echo '"' . $img_path . ( $fail_once_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
67
- <a href="?page=siteguard_fail_once"><?php esc_html_e( 'Fail once', 'siteguard' ) ?></a></th>
68
- <td><?php esc_html_e( 'The first login must fail even if the input is correct.', 'siteguard' ) ?></td>
69
- </tr><tr>
70
- <th scpoe="row">
71
- <img src=<?php echo '"' . $img_path . ( $disable_pingback_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
72
- <a href="?page=siteguard_disable_pingback"><?php esc_html_e( 'Disable Pingback', 'siteguard' ) ?></a></th>
73
- <td><?php esc_html_e( 'The abuse of pingback is prevented.', 'siteguard' ) ?></td>
74
- </tr><tr>
75
- <th scpoe="row">
76
- <img src=<?php echo '"' . $img_path . ( $updates_notify_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
77
- <a href="?page=siteguard_updates_notify"><?php esc_html_e( 'Updates Notify', 'siteguard' ) ?></a></th>
78
- <td><?php esc_html_e( 'If WordPress core, plugins, and themes updates are needed , sends email to notify administrators.', 'siteguard' ) ?></td>
79
- </tr><tr>
80
- <th scpoe="row">
81
- <img src=<?php echo '"' . $img_path . ( $waf_exclude_rule_enable == '1' ? 'yes.png" alt="yes"' : 'yes_glay.png" alt="no"' ) ?>>
82
- <a href="?page=siteguard_waf_tuning_support"><?php esc_html_e( 'WAF Tuning Support', 'siteguard' ) ?></a></th>
83
- <td><?php esc_html_e( 'The exclude rule for WAF (SiteGuard Lite) is created.', 'siteguard' ) ?></td>
84
- </tr>
85
- </table>
86
- <hr />
87
- <form name="form1" method="post" action="">
88
- <?php echo '<h3>' . esc_html__( 'Login history', 'siteguard' ) . "</h3>\n"; ?>
89
- <?php $this->wp_list_table->display( ) ?>
90
- <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ) ?>">
91
- </form>
92
- </div>
93
- <?php
94
- }
95
- }
96
-
97
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-disable-pingback.php DELETED
@@ -1,67 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Menu_Disable_Pingback extends SiteGuard_Base {
4
- function __construct( ) {
5
- $this->render_page( );
6
- }
7
- function render_page( ) {
8
- global $config;
9
-
10
- $opt_name_feature = 'disable_pingback_enable';
11
- $opt_val_feature = $config->get( $opt_name_feature );
12
- if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-disable-pingback-submit' ) ) {
13
- $error = false;
14
- if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
15
- echo '<div class="error settings-error"><p><strong>';
16
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
17
- echo '</strong></p></div>';
18
- $error = true;
19
- }
20
- if ( false == $error ) {
21
- $opt_val_feature = $_POST[ $opt_name_feature ];
22
- $config->set( $opt_name_feature, $opt_val_feature );
23
- $config->update( );
24
- ?>
25
- <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
26
- <?php
27
- }
28
- }
29
-
30
- echo '<div class="wrap">';
31
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
32
- echo '<h2>' . esc_html__( 'Disable Pingback', 'siteguard' ) . '</h2>';
33
- ?>
34
- <form name="form1" method="post" action="">
35
-
36
- <table class="form-table">
37
- <tr>
38
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
39
- <td>
40
- <ul class="siteguard-radios">
41
- <li>
42
- <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_feature ? 'checked' : '') ?> >
43
- <label for="<?php echo $opt_name_feature.'_on' ?>"><?php echo esc_html_e( 'ON', 'siteguard' ) ?></label>
44
- </li><li>
45
- <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_feature ? 'checked' : '') ?> >
46
- <label for="<?php echo $opt_name_feature.'_off' ?>"><?php echo esc_html_e( 'OFF', 'siteguard' ) ?></label>
47
- </li>
48
- </ul>
49
- </td>
50
- </tr>
51
- </table>
52
- <input type="hidden" name="update" value="Y">
53
- <div class="siteguard-description">
54
- <?php esc_html_e( 'The pingback function is disabled and its abuse is prevented.', 'siteguard' ) ?>
55
- </div>
56
- <hr />
57
- <?php
58
- wp_nonce_field( 'siteguard-menu-disable-pingback-submit' );
59
- submit_button( );
60
- ?>
61
- </form>
62
- </div>
63
- <?php
64
- }
65
- }
66
-
67
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-fail-once.php DELETED
@@ -1,84 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Menu_Fail_Once extends SiteGuard_Base {
4
- function __construct( ) {
5
- $this->render_page( );
6
- }
7
- function render_page( ) {
8
- global $config;
9
-
10
- $opt_name_fail_once = 'loginlock_fail_once';
11
- $opt_name_admin_only = 'fail_once_admin_only';
12
-
13
- $opt_val_fail_once = $config->get( $opt_name_fail_once );
14
- $opt_val_admin_only = $config->get( $opt_name_admin_only );
15
- if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-fail-once-submit' ) ) {
16
- $error = false;
17
- if ( false == $this->is_switch_value( $_POST[ $opt_name_fail_once ] ) ) {
18
- echo '<div class="error settings-error"><p><strong>';
19
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
20
- echo '</strong></p></div>';
21
- $error = true;
22
- }
23
- if ( false == $error ) {
24
- $opt_val_fail_once = $_POST[ $opt_name_fail_once ];
25
- if ( isset( $_POST[ $opt_name_admin_only ] ) ) {
26
- $opt_val_admin_only = $_POST[ $opt_name_admin_only ];
27
- } else {
28
- $opt_val_admin_only = '0';
29
- }
30
- $config->set( $opt_name_fail_once, $opt_val_fail_once );
31
- $config->set( $opt_name_admin_only, $opt_val_admin_only );
32
- $config->update( );
33
- ?>
34
- <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
35
- <?php
36
- }
37
- }
38
-
39
- echo '<div class="wrap">';
40
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
41
- echo '<h2>' . esc_html__( 'Fail once', 'siteguard' ) . '</h2>';
42
- ?>
43
- <form name="form1" method="post" action="">
44
- <table class="form-table">
45
- <tr>
46
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
47
- <td>
48
- <ul class="siteguard-radios">
49
- <li>
50
- <input type="radio" name="<?php echo $opt_name_fail_once ?>" id="<?php echo $opt_name_fail_once.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_fail_once ? 'checked' : '') ?> >
51
- <label for="<?php echo $opt_name_fail_once.'_on' ?>"><?php esc_html_e( 'ON', 'siteguard' ) ?></label>
52
- </li><li>
53
- <input type="radio" name="<?php echo $opt_name_fail_once ?>" id="<?php echo $opt_name_fail_once.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_fail_once ? 'checked' : '') ?> >
54
- <label for="<?php echo $opt_name_fail_once.'_off' ?>"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
55
- </li>
56
- </ul>
57
- </td>
58
- <td>
59
- </tr><tr>
60
- <th scope="row"><?php esc_html_e( 'Target user', 'siteguard' ) ?></th>
61
- <td>
62
- <input type="checkbox" name="<?php echo $opt_name_admin_only ?>" id="<?php echo $opt_name_admin_only ?>" value="1" <?php echo ( '1' == $opt_val_admin_only ? 'checked' : '' ) ?> >
63
- <label for="<?php echo $opt_name_admin_only ?>"><?php esc_html_e( 'Admin only', 'siteguard' ) ?></label>
64
- </td>
65
- </tr>
66
- </table>
67
- <input type="hidden" name="update" value="Y">
68
- <div class="siteguard-description">
69
- <?php esc_html_e( 'It is the function to decrease the vulnerability against a password list attack. Even is the login input is correct, the first login must fail. After 5 seconds and later within 60 seconds, another correct login input make login succeed. At the first login failure, the following error message is displayed.', 'siteguard' ); ?>
70
- </div>
71
- <hr />
72
-
73
- <?php
74
- wp_nonce_field( 'siteguard-menu-fail-once-submit' );
75
- submit_button( );
76
- ?>
77
-
78
- </form>
79
- </div>
80
-
81
- <?php
82
- }
83
- }
84
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-init.php DELETED
@@ -1,73 +0,0 @@
1
- <?php
2
- class SiteGuard_Menu_INIT extends SiteGuard_Base {
3
- function __construct( ) {
4
- add_action( 'admin_menu', array( &$this, 'add_pages' ) );
5
- if ( isset( $_GET['page'] ) && false !== strpos( $_GET['page'], 'siteguard' ) ) {
6
- add_action( 'admin_print_styles', array( $this, 'menu_styles' ) );
7
- }
8
- }
9
- function menu_styles( ) {
10
- wp_enqueue_style( 'siteguard-menu', SITEGUARD_URL_PATH . 'css/siteguard-menu.css' );
11
- }
12
- function add_pages( ) {
13
- $icon_path = SITEGUARD_URL_PATH . 'images/plugin-icon.png';
14
- add_menu_page( esc_html__( 'SiteGuard', 'siteguard' ), esc_html__( 'SiteGuard', 'siteguard' ), 'manage_options', 'siteguard', array( $this, 'menu_dashboard' ), $icon_path );
15
- add_submenu_page( 'siteguard', esc_html__( 'Dashboard', 'siteguard' ), esc_html__( 'Dashboard', 'siteguard' ) , 'manage_options', 'siteguard', array( $this, 'menu_dashboard' ) );
16
- add_submenu_page( 'siteguard', esc_html__( 'Admin Page IP Filter', 'siteguard' ), esc_html__( 'Admin Page IP Filter', 'siteguard' ), 'manage_options', 'siteguard_admin_filter', array( $this, 'menu_admin_filter' ) );
17
- add_submenu_page( 'siteguard', esc_html__( 'Rename Login', 'siteguard' ), esc_html__( 'Rename Login', 'siteguard' ), 'manage_options', 'siteguard_rename_login', array( $this, 'menu_rename_login' ) );
18
- add_submenu_page( 'siteguard', esc_html__( 'CAPTCHA', 'siteguard' ), esc_html__( 'CAPTCHA', 'siteguard' ), 'manage_options', 'siteguard_captcha', array( $this, 'menu_captcha' ) );
19
- add_submenu_page( 'siteguard', esc_html__( 'Same Login Error Message', 'siteguard' ), esc_html__( 'Same Login Error Message', 'siteguard' ), 'manage_options', 'siteguard_same_error', array( $this, 'menu_same_error' ) );
20
- add_submenu_page( 'siteguard', esc_html__( 'Login Lock', 'siteguard' ), esc_html__( 'Login Lock', 'siteguard' ), 'manage_options', 'siteguard_login_lock', array( $this, 'menu_login_lock' ) );
21
- add_submenu_page( 'siteguard', esc_html__( 'Login Alert', 'siteguard' ), esc_html__( 'Login Alert', 'siteguard' ), 'manage_options', 'siteguard_login_alert', array( $this, 'menu_login_alert' ) );
22
- add_submenu_page( 'siteguard', esc_html__( 'Fail once', 'siteguard' ), esc_html__( 'Fail once', 'siteguard' ), 'manage_options', 'siteguard_fail_once', array( $this, 'menu_fail_once' ) );
23
- add_submenu_page( 'siteguard', esc_html__( 'Disable Pingback', 'siteguard' ), esc_html__( 'Disable Pingback', 'siteguard' ), 'manage_options', 'siteguard_disable_pingback', array( $this, 'menu_disable_pingback' ) );
24
- add_submenu_page( 'siteguard', esc_html__( 'Updates Notify', 'siteguard' ), esc_html__( 'Updates Notify', 'siteguard' ), 'manage_options', 'siteguard_updates_notify', array( $this, 'menu_updates_notify' ) );
25
- add_submenu_page( 'siteguard', esc_html__( 'WAF Tuning Support', 'siteguard' ), esc_html__( 'WAF Tuning Support', 'siteguard' ), 'manage_options', 'siteguard_waf_tuning_support', array( $this, 'menu_waf_tuning_support' ) );
26
- }
27
-
28
- function menu_dashboard( ) {
29
- include( 'siteguard-menu-dashboard.php' );
30
- $dashboard_menu = new SiteGuard_Menu_Dashboard( );
31
- }
32
- function menu_admin_filter( ) {
33
- include( 'siteguard-menu-admin-filter.php' );
34
- $admin_filter_menu = new SiteGuard_Menu_Admin_Filter( );
35
- }
36
- function menu_rename_login( ) {
37
- include( 'siteguard-menu-rename-login.php' );
38
- $rename_login_menu = new SiteGuard_Menu_Rename_Login( );
39
- }
40
- function menu_captcha( ) {
41
- include( 'siteguard-menu-captcha.php' );
42
- $captcha_menu = new SiteGuard_Menu_CAPTCHA( );
43
- }
44
- function menu_same_error( ) {
45
- include( 'siteguard-menu-same-error.php' );
46
- $same_error_menu = new SiteGuard_Menu_Same_Error( );
47
- }
48
- function menu_login_lock( ) {
49
- include( 'siteguard-menu-login-lock.php' );
50
- $login_lock_menu = new SiteGuard_Menu_Login_Lock( );
51
- }
52
- function menu_login_alert( ) {
53
- include( 'siteguard-menu-login-alert.php' );
54
- $login_alert_menu = new SiteGuard_Menu_Login_Alert( );
55
- }
56
- function menu_fail_once( ) {
57
- include( 'siteguard-menu-fail-once.php' );
58
- $fail_once_menu = new SiteGuard_Menu_Fail_Once( );
59
- }
60
- function menu_disable_pingback( ) {
61
- include( 'siteguard-menu-disable-pingback.php' );
62
- $disable_pingback_menu = new SiteGuard_Menu_Disable_Pingback( );
63
- }
64
- function menu_updates_notify( ) {
65
- include( 'siteguard-menu-updates-notify.php' );
66
- $waf_updates_notify_menu = new SiteGuard_Menu_Updates_Notify( );
67
- }
68
- function menu_waf_tuning_support( ) {
69
- include( 'siteguard-menu-waf-tuning-support.php' );
70
- $waf_tuning_support_menu = new SiteGuard_Menu_WAF_Tuning_Support( );
71
- }
72
- }
73
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-login-alert.php DELETED
@@ -1,99 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Menu_Login_Alert extends SiteGuard_Base {
4
- function __construct( ) {
5
- $this->render_page( );
6
- }
7
- function render_page( ) {
8
- global $config;
9
-
10
- $opt_name_feature = 'loginalert_enable';
11
- $opt_name_subject = 'loginalert_subject';
12
- $opt_name_body = 'loginalert_body';
13
- $opt_name_admin = 'loginalert_admin_only';
14
-
15
- $opt_val_feature = $config->get( $opt_name_feature );
16
- $opt_val_subject = $config->get( $opt_name_subject );
17
- $opt_val_body = $config->get( $opt_name_body );
18
- $opt_val_admin = $config->get( $opt_name_admin );
19
- if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-login-alert-submit' ) ) {
20
- $error = false;
21
- if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
22
- echo '<div class="error settings-error"><p><strong>';
23
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
24
- echo '</strong></p></div>';
25
- $error = true;
26
- }
27
- if ( false == $error ) {
28
- $opt_val_feature = $_POST[ $opt_name_feature ];
29
- $opt_val_subject = $_POST[ $opt_name_subject ];
30
- $opt_val_body = $_POST[ $opt_name_body ];
31
- if ( isset( $_POST[ $opt_name_admin ] ) ) {
32
- $opt_val_admin = $_POST[ $opt_name_admin ];
33
- } else {
34
- $opt_val_admin = '0';
35
- }
36
- $config->set( $opt_name_feature, $opt_val_feature );
37
- $config->set( $opt_name_subject, $opt_val_subject );
38
- $config->set( $opt_name_body, $opt_val_body );
39
- $config->set( $opt_name_admin, $opt_val_admin );
40
- $config->update( );
41
- ?>
42
- <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
43
- <?php
44
- }
45
- }
46
-
47
- echo '<div class="wrap">';
48
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
49
- echo '<h2>' . esc_html__( 'Login Alert', 'siteguard' ) . '</h2>';
50
- ?>
51
- <form name="form1" method="post" action="">
52
- <table class="form-table">
53
- <tr>
54
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
55
- <td>
56
- <ul class="siteguard-radios">
57
- <li>
58
- <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_feature ? 'checked' : '') ?> >
59
- <label for="<?php echo $opt_name_feature.'_on' ?>"><?php echo esc_html_e( 'ON', 'siteguard' ) ?></label>
60
- </li><li>
61
- <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_feature ? 'checked' : '') ?> >
62
- <label for="<?php echo $opt_name_feature.'_off' ?>"><?php echo esc_html_e( 'OFF', 'siteguard' ) ?></label>
63
- </li>
64
- </ul>
65
- </td>
66
- </tr><tr>
67
- <th scope="row"><label for="<?php echo $opt_name_subject ?>"><?php esc_html_e( 'Subject', 'siteguard' ); ?></label></th>
68
- <td>
69
- <input type="text" name="<?php echo $opt_name_subject ?>" id="<?php echo $opt_name_subject ?>" size="50" value="<?php echo esc_attr( $opt_val_subject ) ?>" >
70
- </td>
71
- </tr><tr>
72
- <th scope="row"><label for="<?php echo $opt_name_body ?>"><?php esc_html_e( 'Body', 'siteguard' ); ?></label></th>
73
- <td>
74
- <textarea name="<?php echo $opt_name_body ?>" id="<?php echo $opt_name_body ?>" cols="50" rows="5" ><?php echo esc_textarea( $opt_val_body ) ?></textarea>
75
- </td>
76
- </tr><tr>
77
- <th scope="row"><?php esc_html_e( 'Recipients', 'siteguard' ) ?></th>
78
- <td>
79
- <input type="checkbox" name="<?php echo $opt_name_admin ?>" id="<?php echo $opt_name_admin ?>" value="1" <?php echo ( '1' == $opt_val_admin ? 'checked' : '' ) ?> >
80
- <label for="<?php echo $opt_name_admin ?>"><?php esc_html_e( 'Admin only', 'siteguard' ) ?></label>
81
- </td>
82
- </tr>
83
- </table>
84
- <input type="hidden" name="update" value="Y">
85
- <div class="siteguard-description">
86
- <?php esc_html_e( 'It is the function to make it easier to notice unauthorized login. E-mail will be sent to a login user when logged in. If you receive an e-mail to there is no logged-in idea, please suspect unauthorized login. The subject and the mail body, the following variables can be used. (Site Name:%SITENAME%, User Name:%USERNAME%, DATE:%DATE%, Time:%TIME%, IP Address:%IPADDRESS%, User-Agent:%USERAGENT%, Referer:%REFERER%) Access by the XML-RPC will not be notified.', 'siteguard' ) ?>
87
- </div>
88
- <hr />
89
- <?php
90
- wp_nonce_field( 'siteguard-menu-login-alert-submit' );
91
- submit_button( );
92
- ?>
93
- </form>
94
- </div>
95
- <?php
96
- }
97
- }
98
-
99
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-login-lock.php DELETED
@@ -1,138 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Menu_Login_Lock extends SiteGuard_Base {
4
- function __construct( ) {
5
- $this->render_page( );
6
- }
7
- function is_interval_value( $value ) {
8
- if ( '1' == $value || '5' == $value || '30' == $value ) {
9
- return true;
10
- }
11
- return false;
12
- }
13
- function is_threshold_value( $value ) {
14
- if ( '3' == $value || '10' == $value || '100' == $value ) {
15
- return true;
16
- }
17
- return false;
18
- }
19
- function is_locksec_value( $value ) {
20
- if ( '30' == $value || '60' == $value || '300' == $value ) {
21
- return true;
22
- }
23
- return false;
24
- }
25
- function render_page( ) {
26
- global $config;
27
-
28
- $opt_name_enable = 'loginlock_enable';
29
- $opt_name_interval = 'loginlock_interval';
30
- $opt_name_threshold = 'loginlock_threshold';
31
- $opt_name_locksec = 'loginlock_locksec';
32
-
33
- $opt_val_enable = $config->get( $opt_name_enable );
34
- $opt_val_interval = $config->get( $opt_name_interval );
35
- $opt_val_threshold = $config->get( $opt_name_threshold );
36
- $opt_val_locksec = $config->get( $opt_name_locksec );
37
- if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-login-lock-submit' ) ) {
38
- $error = false;
39
- if ( ( false == $this->is_switch_value( $_POST[ $opt_name_enable ] ) )
40
- || ( false == $this->is_interval_value( $_POST[ $opt_name_interval ] ) )
41
- || ( false == $this->is_threshold_value( $_POST[ $opt_name_threshold ] ) )
42
- || ( false == $this->is_locksec_value( $_POST[ $opt_name_locksec ] ) ) ) {
43
- echo '<div class="error settings-error"><p><strong>';
44
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
45
- echo '</strong></p></div>';
46
- $error = true;
47
- }
48
- if ( false == $error ) {
49
- $opt_val_enable = $_POST[ $opt_name_enable ];
50
- $opt_val_interval = $_POST[ $opt_name_interval ];
51
- $opt_val_threshold = $_POST[ $opt_name_threshold ];
52
- $opt_val_locksec = $_POST[ $opt_name_locksec ];
53
- $config->set( $opt_name_enable, $opt_val_enable );
54
- $config->set( $opt_name_interval, $opt_val_interval );
55
- $config->set( $opt_name_threshold, $opt_val_threshold );
56
- $config->set( $opt_name_locksec, $opt_val_locksec );
57
- $config->update( );
58
- ?>
59
- <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
60
- <?php
61
- }
62
- }
63
-
64
- echo '<div class="wrap">';
65
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
66
- echo '<h2>' . esc_html__( 'Login Lock', 'siteguard' ) . '</h2>';
67
- ?>
68
- <form name="form1" method="post" action="">
69
- <table class="form-table">
70
- <tr>
71
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
72
- <td>
73
- <ul class="siteguard-radios">
74
- <li>
75
- <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_enable ? 'checked' : '') ?> >
76
- <label for="<?php echo $opt_name_enable.'_on' ?>"><?php esc_html_e( 'ON', 'siteguard' ) ?></label>
77
- </li><li>
78
- <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_enable ? 'checked' : '') ?> >
79
- <label for="<?php echo $opt_name_enable.'_off' ?>"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
80
- </li>
81
- </ul>
82
- </td>
83
- </tr><tr>
84
- <th scope="row"><?php esc_html_e( 'Interval', 'siteguard' ); ?></th>
85
- <td>
86
- <input type="radio" name="<?php echo $opt_name_interval ?>" id="<?php echo $opt_name_interval.'_1' ?>" value="1" <?php echo ( '1' == $opt_val_interval ? 'checked' : '') ?> >
87
- <label for="<?php echo $opt_name_interval.'_1' ?>"><?php esc_html_e( '1 second', 'siteguard' ) ?></label>
88
- <br />
89
- <input type="radio" name="<?php echo $opt_name_interval ?>" id="<?php echo $opt_name_interval.'_5' ?>" value="5" <?php echo ( '5' == $opt_val_interval ? 'checked' : '') ?> >
90
- <label for="<?php echo $opt_name_interval.'_5' ?>"><?php esc_html_e( '5 seconds', 'siteguard' ) ?></label>
91
- <br />
92
- <input type="radio" name="<?php echo $opt_name_interval ?>" id="<?php echo $opt_name_interval.'_30' ?>" value="30" <?php echo ( '30' == $opt_val_interval ? 'checked' : '') ?> >
93
- <label for="<?php echo $opt_name_interval.'_30' ?>"><?php esc_html_e( '30 seconds', 'siteguard' ) ?></label>
94
- </td>
95
- </tr><tr>
96
- <th scope="row"><?php esc_html_e( 'Threshold', 'siteguard' ); ?></th>
97
- <td>
98
- <input type="radio" name="<?php echo $opt_name_threshold ?>" id="<?php echo $opt_name_threshold.'_3' ?>" value="3" <?php echo ( '3' == $opt_val_threshold ? 'checked' : '') ?> >
99
- <label for="<?php echo $opt_name_threshold.'_3' ?>"><?php esc_html_e( '3 times', 'siteguard' ) ?></label>
100
- <br />
101
- <input type="radio" name="<?php echo $opt_name_threshold ?>" id="<?php echo $opt_name_threshold.'_10' ?>" value="10" <?php echo ( '10' == $opt_val_threshold ? 'checked' : '') ?> >
102
- <label for="<?php echo $opt_name_threshold.'_10' ?>"><?php esc_html_e( '10 times', 'siteguard' ) ?></label>
103
- <br />
104
- <input type="radio" name="<?php echo $opt_name_threshold ?>" id="<?php echo $opt_name_threshold.'_100' ?>" value="100" <?php echo ( '100' == $opt_val_threshold ? 'checked' : '') ?> >
105
- <label for="<?php echo $opt_name_threshold.'_100' ?>"><?php esc_html_e( '100 times', 'siteguard' ) ?></label>
106
- </td>
107
- </tr><tr>
108
- <th scope="row"><?php esc_html_e( 'Lock Time', 'siteguard' ); ?></th>
109
- <td>
110
- <input type="radio" name="<?php echo $opt_name_locksec ?>" id="<?php echo $opt_name_locksec.'_30' ?>" value="30" <?php echo ( '30' == $opt_val_locksec ? 'checked' : '') ?> >
111
- <label for="<?php echo $opt_name_locksec.'_30' ?>"><?php esc_html_e( '30 seconds', 'siteguard' ) ?></label>
112
- <br />
113
- <input type="radio" name="<?php echo $opt_name_locksec ?>" id="<?php echo $opt_name_locksec.'_60' ?>" value="60" <?php echo ( '60' == $opt_val_locksec ? 'checked' : '') ?> >
114
- <label for="<?php echo $opt_name_locksec.'_60' ?>"><?php esc_html_e( '1 minute', 'siteguard' ) ?></label>
115
- <br />
116
- <input type="radio" name="<?php echo $opt_name_locksec ?>" id="<?php echo $opt_name_locksec.'_300' ?>" value="300" <?php echo ( '300' == $opt_val_locksec ? 'checked' : '') ?> >
117
- <label for="<?php echo $opt_name_locksec.'_300' ?>"><?php esc_html_e( '5 minutes', 'siteguard' ) ?></label>
118
- </td>
119
- </tr>
120
- </table>
121
- <div class="siteguard-description">
122
- <?php esc_html_e( 'It is the function to decrease the vulnerability against an illegal login attempt attack such as a brute force attack or a password list attack. Especially, it is the function to prevent an automated attack. The connection source IP address the number of login failure of which reaches the specified number within the specified period is blocked for the specified time. Each user account is not locked.', 'siteguard' ) ?>
123
- </div>
124
- <hr />
125
- <input type="hidden" name="update" value="Y">
126
-
127
- <?php
128
- wp_nonce_field( 'siteguard-menu-login-lock-submit' );
129
- submit_button( );
130
- ?>
131
-
132
- </form>
133
- </div>
134
-
135
- <?php
136
- }
137
- }
138
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-rename-login.php DELETED
@@ -1,130 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Menu_Rename_Login extends SiteGuard_Base {
4
- function __construct( ) {
5
- $this->render_page( );
6
- }
7
- function render_page( ) {
8
- global $rename_login, $config;
9
-
10
- $opt_name_feature = 'renamelogin_enable';
11
- $opt_name_rename_login_path = 'renamelogin_path';
12
-
13
- $opt_val_feature = $config->get( $opt_name_feature );
14
- $opt_val_rename_login_path = $config->get( $opt_name_rename_login_path );
15
- if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-rename-login-submit' ) ) {
16
- $error = false;
17
- if ( '1' == $_POST[ $opt_name_feature ] && false == $this->check_module( 'rewrite' ) ) {
18
- echo '<div class="error settings-error"><p><strong>';
19
- esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
20
- echo '</strong></p></div>';
21
- $error = true;
22
- $config->set( $opt_name_feature, '0' );
23
- $config->update( );
24
- $rename_login->feature_off( );
25
- $opt_val_feature = '0';
26
- }
27
- if ( false == $this->is_switch_value( $_POST[ $opt_name_feature ] ) ) {
28
- echo '<div class="error settings-error"><p><strong>';
29
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
30
- echo '</strong></p></div>';
31
- $error = true;
32
- }
33
- if ( '1' == $_POST[ $opt_name_feature ] ) {
34
- $incompatible_plugin = $rename_login->get_active_incompatible_plugin( );
35
- if ( null != $incompatible_plugin ) {
36
- echo '<div class="error settings-error"><p><strong>';
37
- echo esc_html__( 'This function and Plugin "', 'siteguard' ) . $incompatible_plugin . esc_html__( '" cannot be used at the same time.', 'siteguard' );
38
- echo '</strong></p></div>';
39
- $error = true;
40
- $config->set( $opt_name_feature, '0' );
41
- $config->update( );
42
- $rename_login->feature_off( );
43
- $opt_val_feature = '0';
44
- $opt_val_rename_login_path = stripslashes( $_POST[ $opt_name_rename_login_path ] );
45
- }
46
- }
47
- if ( 1 != preg_match( '/^[a-zA-Z0-9_-]+$/', $_POST[ $opt_name_rename_login_path ] ) ) {
48
- echo '<div class="error settings-error"><p><strong>';
49
- esc_html_e( 'It is only an alphanumeric character, a hyphen, and an underbar that can be used for New Login Path.', 'siteguard' );
50
- echo '</strong></p></div>';
51
- $opt_val_rename_login_path = stripslashes( $_POST[ $opt_name_rename_login_path ] );
52
- $error = true;
53
- }
54
- if ( 1 == preg_match( '/^(wp-admin|wp-login$|login$)/', $_POST[ $opt_name_rename_login_path ], $matches ) ) {
55
- echo '<div class="error settings-error"><p><strong>';
56
- echo esc_html( $matches[0] ) . esc_html__( ' can not be used for New Login Path.', 'siteguard' );
57
- echo '</strong></p></div>';
58
- $opt_val_rename_login_path = stripslashes( $_POST[ $opt_name_rename_login_path ] );
59
- $error = true;
60
- }
61
- if ( false == $error ) {
62
- $opt_val_feature = $_POST[ $opt_name_feature ];
63
- $opt_val_rename_login_path = $_POST[ $opt_name_rename_login_path ];
64
- $config->set( $opt_name_feature, $opt_val_feature );
65
- $config->set( $opt_name_rename_login_path, $opt_val_rename_login_path );
66
- $config->update( );
67
- if ( '0' == $opt_val_feature ) {
68
- $rename_login->feature_off( );
69
- } else {
70
- $rename_login->feature_on( );
71
- $rename_login->send_notify( );
72
- }
73
- ?>
74
- <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
75
- <?php
76
- }
77
- }
78
-
79
- echo '<div class="wrap">';
80
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
81
- echo '<h2>' . esc_html__( 'Rename Login', 'siteguard' ) . '</h2>';
82
- ?>
83
- <form name="form1" method="post" action="">
84
- <table class="form-table">
85
- <tr>
86
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
87
- <td>
88
- <ul class="siteguard-radios">
89
- <li>
90
- <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_feature ? 'checked' : '') ?> >
91
- <label for="<?php echo $opt_name_feature.'_on' ?>"><?php echo esc_html_e( 'ON', 'siteguard' ) ?></label>
92
- </li><li>
93
- <input type="radio" name="<?php echo $opt_name_feature ?>" id="<?php echo $opt_name_feature.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_feature ? 'checked' : '') ?> >
94
- <label for="<?php echo $opt_name_feature.'_off' ?>"><?php echo esc_html_e( 'OFF', 'siteguard' ) ?></label>
95
- </li>
96
- </ul>
97
- <?php
98
- echo '<p class="description">';
99
- esc_html_e( 'To use this function, “mod_rewrite” should be loaded on Apache.', 'siteguard' );
100
- echo '</p>';
101
- ?>
102
- </td>
103
- </tr><tr>
104
- <th scope="row"><label for="<?php echo $opt_name_rename_login_path ?>"><?php esc_html_e( 'New Login Path', 'siteguard' ); ?></label></th>
105
- <td>
106
- <?php echo site_url() . '/' ?><input type="text" name="<?php echo $opt_name_rename_login_path ?>" id="<?php echo $opt_name_rename_login_path ?>" value="<?php echo esc_attr( $opt_val_rename_login_path ) ?>" >
107
- <?php
108
- echo '<p class="description">';
109
- esc_html_e( 'An alphanumeric character, a hyphen, and an underbar can be used.', 'siteguard' );
110
- echo '</p>';
111
- ?>
112
- </td>
113
- </tr>
114
- </table>
115
- <input type="hidden" name="update" value="Y">
116
- <div class="siteguard-description">
117
- <?php esc_html_e( 'It is the function to decrease the vulnerability against an illegal login attempt attack such as a brute force attack or a password list attack. The login page name (wp-login.php) is changed. The initial value is “login_&lt;5 random digits&gt;” but it can be changed to a favorite name.', 'siteguard' ) ?>
118
- </div>
119
- <hr />
120
- <?php
121
- wp_nonce_field( 'siteguard-menu-rename-login-submit' );
122
- submit_button( );
123
- ?>
124
- </form>
125
- </div>
126
- <?php
127
- }
128
- }
129
-
130
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-same-error.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Menu_Same_Error extends SiteGuard_Base {
4
- function __construct( ) {
5
- $this->render_page( );
6
- }
7
- function render_page( ) {
8
- global $config, $captcha;
9
-
10
- $opt_name_enable = 'same_login_error';
11
-
12
- $opt_val_enable = $config->get( $opt_name_enable );
13
- if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-same-error-submit' ) ) {
14
- $error = false;
15
- if ( '1' == $_POST[ $opt_name_enable ] ) {
16
- $ret = $captcha->check_requirements( );
17
- if ( is_wp_error( $ret ) ) {
18
- echo '<div class="error settings-error"><p><strong>' . $ret->get_error_message( ) . '</strong></p></div>';
19
- $error = true;
20
- $config->set( $opt_name_enable, '0' );
21
- $config->update( );
22
- }
23
- }
24
- if ( false == $this->is_switch_value( $_POST[ $opt_name_enable ] ) ) {
25
- echo '<div class="error settings-error"><p><strong>';
26
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
27
- echo '</strong></p></div>';
28
- $error = true;
29
- }
30
- if ( false == $error ) {
31
- $opt_val_enable = $_POST[ $opt_name_enable ];
32
- $config->set( $opt_name_enable, $opt_val_enable );
33
- $config->update( );
34
- ?>
35
- <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
36
- <?php
37
- }
38
- }
39
-
40
- echo '<div class="wrap">';
41
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
42
- echo '<h2>' . esc_html__( 'Same Login Error Message', 'siteguard' ) . '</h2>';
43
- ?>
44
- <form name="form1" method="post" action="">
45
- <table class="form-table">
46
- <tr>
47
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
48
- <td>
49
- <ul class="siteguard-radios">
50
- <li>
51
- <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_enable ? 'checked' : '') ?> >
52
- <label for="<?php echo $opt_name_enable.'_on' ?>"><?php esc_html_e( 'ON', 'siteguard' ) ?></label>
53
- </li><li>
54
- <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_enable ? 'checked' : '') ?> >
55
- <label for="<?php echo $opt_name_enable.'_off' ?>"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
56
- </li>
57
- </ul>
58
- </td>
59
- </tr>
60
- </table>
61
- <input type="hidden" name="update" value="Y">
62
- <div class="siteguard-description">
63
- <?php esc_html_e( 'It is the function to decrease the vulnerability against the attack to examine if a user name exists. All error messages about the login should be equalized. The single error message is displayed even if anyone of a username, password, or CAPTCHA is wrong.', 'siteguard' ) ?>
64
- </div>
65
- <hr />
66
-
67
- <?php
68
- wp_nonce_field( 'siteguard-menu-same-error-submit' );
69
- submit_button();
70
- ?>
71
- </form>
72
- </div>
73
- <?php
74
- }
75
- }
76
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-updates-notify.php DELETED
@@ -1,145 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Menu_Updates_Notify extends SiteGuard_Base {
4
- function __construct( ) {
5
- $this->render_page( );
6
- }
7
- function is_notify_value( $value ) {
8
- if ( '0' == $value || '1' == $value || '2' == $value ) {
9
- return true;
10
- }
11
- return false;
12
- }
13
- function render_page( ) {
14
- global $config, $updates_notify;
15
-
16
- $opt_name_enable = 'updates_notify_enable';
17
- $opt_name_wpcore = 'notify_wpcore';
18
- $opt_name_plugins = 'notify_plugins';
19
- $opt_name_themes = 'notify_themes';
20
-
21
- $opt_val_enable = $config->get( $opt_name_enable );
22
- $opt_val_wpcore = $config->get( $opt_name_wpcore );
23
- $opt_val_plugins = $config->get( $opt_name_plugins );
24
- $opt_val_themes = $config->get( $opt_name_themes );
25
- if ( isset( $_POST['update'] ) && check_admin_referer( 'siteguard-menu-updates-notify-submit' ) ) {
26
- $error = false;
27
- if ( ( false == $this->is_switch_value( $_POST[ $opt_name_enable ] ) )
28
- || ( false == $this->is_switch_value( $_POST[ $opt_name_wpcore ] ) )
29
- || ( false == $this->is_notify_value( $_POST[ $opt_name_plugins ] ) )
30
- || ( false == $this->is_notify_value( $_POST[ $opt_name_themes ] ) ) ) {
31
- echo '<div class="error settings-error"><p><strong>';
32
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
33
- echo '</strong></p></div>';
34
- $error = true;
35
- }
36
- if ( '1' == $_POST[ $opt_name_enable ] ) {
37
- $ret = $updates_notify->check_requirements( );
38
- if ( is_wp_error( $ret ) ) {
39
- echo '<div class="error settings-error"><p><strong>' . $ret->get_error_message( ) . '</strong></p></div>';
40
- $error = true;
41
- $config->set( $opt_name_enable, '0' );
42
- $config->update( );
43
- }
44
- }
45
- if ( false == $error ) {
46
- $opt_val_enable = $_POST[ $opt_name_enable ];
47
- $opt_val_wpcore = $_POST[ $opt_name_wpcore ];
48
- $opt_val_plugins = $_POST[ $opt_name_plugins ];
49
- $opt_val_themes = $_POST[ $opt_name_themes ];
50
- $config->set( $opt_name_enable, $opt_val_enable );
51
- $config->set( $opt_name_wpcore, $opt_val_wpcore );
52
- $config->set( $opt_name_plugins, $opt_val_plugins );
53
- $config->set( $opt_name_themes, $opt_val_themes );
54
- $config->update( );
55
- if ( '1' == $opt_val_enable ) {
56
- SiteGuard_UpdatesNotify::feature_on( );
57
- } else {
58
- SiteGuard_UpdatesNotify::feature_off( );
59
- }
60
- ?>
61
- <div class="updated"><p><strong><?php esc_html_e( 'Options saved.', 'siteguard' ); ?></strong></p></div>
62
- <?php
63
- }
64
- }
65
-
66
- echo '<div class="wrap">';
67
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
68
- echo '<h2>' . esc_html__( 'Updates Notify', 'siteguard' ) . '</h2>';
69
- ?>
70
- <form name="form1" method="post" action="">
71
- <table class="form-table">
72
- <tr>
73
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
74
- <td>
75
- <ul class="siteguard-radios">
76
- <li>
77
- <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_on' ?>" value="1" <?php echo ( '1' == $opt_val_enable ? 'checked' : '') ?> >
78
- <label for="<?php echo $opt_name_enable.'_on' ?>"><?php esc_html_e( 'ON', 'siteguard' ) ?></label>
79
- </li><li>
80
- <input type="radio" name="<?php echo $opt_name_enable ?>" id="<?php echo $opt_name_enable.'_off' ?>" value="0" <?php echo ( '0' == $opt_val_enable ? 'checked' : '') ?> >
81
- <label for="<?php echo $opt_name_enable.'_off' ?>"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
82
- </li>
83
- </ul>
84
- <?php
85
- $error = $updates_notify->check_requirements( );
86
- if ( is_wp_error( $error ) ) {
87
- echo '<p class="description">';
88
- echo $error->get_error_message( );
89
- echo '</p>';
90
- }
91
- ?>
92
- </td>
93
- </tr><tr>
94
- <th scope="row"><?php esc_html_e( 'WordPress updates', 'siteguard' ); ?></th>
95
- <td>
96
- <input type="radio" name="<?php echo $opt_name_wpcore ?>" id="<?php echo $opt_name_wpcore.'_0' ?>" value="0" <?php echo ( '0' == $opt_val_wpcore ? 'checked' : '') ?> >
97
- <label for="<?php echo $opt_name_wpcore.'_0' ?>"><?php esc_html_e( 'Disable', 'siteguard' ) ?></label>
98
- <br />
99
- <input type="radio" name="<?php echo $opt_name_wpcore ?>" id="<?php echo $opt_name_wpcore.'_1' ?>" value="1" <?php echo ( '1' == $opt_val_wpcore ? 'checked' : '') ?> >
100
- <label for="<?php echo $opt_name_wpcore.'_1' ?>"><?php esc_html_e( 'Enable', 'siteguard' ) ?></label>
101
- </td>
102
- </tr><tr>
103
- <th scope="row"><?php esc_html_e( 'Plugins updates', 'siteguard' ); ?></th>
104
- <td>
105
- <input type="radio" name="<?php echo $opt_name_plugins ?>" id="<?php echo $opt_name_plugins.'_0' ?>" value="0" <?php echo ( '0' == $opt_val_plugins ? 'checked' : '') ?> >
106
- <label for="<?php echo $opt_name_plugins.'_0' ?>"><?php esc_html_e( 'Disable', 'siteguard' ) ?></label>
107
- <br />
108
- <input type="radio" name="<?php echo $opt_name_plugins ?>" id="<?php echo $opt_name_plugins.'_1' ?>" value="1" <?php echo ( '1' == $opt_val_plugins ? 'checked' : '') ?> >
109
- <label for="<?php echo $opt_name_plugins.'_1' ?>"><?php esc_html_e( 'All plugins', 'siteguard' ) ?></label>
110
- <br />
111
- <input type="radio" name="<?php echo $opt_name_plugins ?>" id="<?php echo $opt_name_plugins.'_2' ?>" value="2" <?php echo ( '2' == $opt_val_plugins ? 'checked' : '') ?> >
112
- <label for="<?php echo $opt_name_plugins.'_2' ?>"><?php esc_html_e( 'Active plugins only', 'siteguard' ) ?></label>
113
- </td>
114
- </tr><tr>
115
- <th scope="row"><?php esc_html_e( 'Themes updates', 'siteguard' ); ?></th>
116
- <td>
117
- <input type="radio" name="<?php echo $opt_name_themes ?>" id="<?php echo $opt_name_themes.'_0' ?>" value="0" <?php echo ( '0' == $opt_val_themes ? 'checked' : '') ?> >
118
- <label for="<?php echo $opt_name_themes.'_0' ?>"><?php esc_html_e( 'Disable', 'siteguard' ) ?></label>
119
- <br />
120
- <input type="radio" name="<?php echo $opt_name_themes ?>" id="<?php echo $opt_name_themes.'_1' ?>" value="1" <?php echo ( '1' == $opt_val_themes ? 'checked' : '') ?> >
121
- <label for="<?php echo $opt_name_themes.'_1' ?>"><?php esc_html_e( 'All themes', 'siteguard' ) ?></label>
122
- <br />
123
- <input type="radio" name="<?php echo $opt_name_themes ?>" id="<?php echo $opt_name_themes.'_2' ?>" value="2" <?php echo ( '2' == $opt_val_themes ? 'checked' : '') ?> >
124
- <label for="<?php echo $opt_name_themes.'_2' ?>"><?php esc_html_e( 'Active themes only', 'siteguard' ) ?></label>
125
- </td>
126
- </tr>
127
- </table>
128
- <div class="siteguard-description">
129
- <?php esc_html_e( 'Basic of security is that always you use the latest version. If WordPress core, plugins, and themes updates are needed , sends email to notify administrators. Check for updates will be run every 24 hours.', 'siteguard' ) ?>
130
- </div>
131
- <hr />
132
- <input type="hidden" name="update" value="Y">
133
-
134
- <?php
135
- wp_nonce_field( 'siteguard-menu-updates-notify-submit' );
136
- submit_button( );
137
- ?>
138
-
139
- </form>
140
- </div>
141
-
142
- <?php
143
- }
144
- }
145
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-menu-waf-tuning-support.php DELETED
@@ -1,303 +0,0 @@
1
- <?php
2
-
3
- require_once( 'siteguard-waf-exclude-rule-table.php' );
4
-
5
- class SiteGuard_Menu_WAF_Tuning_Support extends SiteGuard_Base {
6
- var $wp_list_table;
7
- function __construct( ) {
8
- $this->wp_list_table = new SiteGuard_WAF_Exclude_Rule_Table( );
9
- $this->wp_list_table->prepare_items( );
10
- $this->render_page( );
11
- }
12
- // convert from URL to PATH
13
- function set_filename( $filename ) {
14
- $base = basename( $filename );
15
- $idx = strpos( $base, '?' );
16
- if ( false !== $idx ) {
17
- return substr( $base, 0, $idx );
18
- } else {
19
- return $base;
20
- }
21
- }
22
- function render_page( ) {
23
- global $waf_exclude_rule;
24
- isset( $_GET['action'] ) ? $action = $_GET['action'] : $action = 'list';
25
- if ( 'list' == $action && isset( $_POST['action'] ) ) {
26
- $action = $_POST['action'];
27
- }
28
- if ( 'list' != $action && 'add' != $action && 'edit' != $action && 'delete' != $action ) {
29
- $action = 'list';
30
- }
31
-
32
- $waf_exclude_rule_enable = $waf_exclude_rule->get_enable( );
33
- if ( 'edit' == $action && isset( $_GET['rule'] ) ) {
34
- $offset = 0;
35
- $id = intval( $_GET['rule'] );
36
- $rule = $waf_exclude_rule->get_rule( $id, $offset );
37
- if ( false === $rule ) {
38
- $filename = '';
39
- $sig = '';
40
- $comment = '';
41
- } else {
42
- $filename = $rule['filename'];
43
- $sig = $rule['sig'];
44
- $comment = $rule['comment'];
45
- }
46
- } else if ( 'delete' == $action ) {
47
- if ( isset( $_GET['rule'] ) ) {
48
- $ids = array( $_GET['rule'] );
49
- } else if ( isset( $_POST['rule'] ) ) {
50
- $ids = $_POST['rule'];
51
- }
52
- } else {
53
- $filename = '';
54
- $sig = '';
55
- $comment = '';
56
- }
57
- if ( isset( $_POST['update'] ) ) {
58
- $update = $_POST['update'];
59
- switch ( $update ) {
60
- case 'add':
61
- if ( check_admin_referer( 'siteguard-menu-waf-tuning-support-add' ) ) {
62
- if ( ! isset( $_POST['filename'] ) || ! isset( $_POST['sig'] ) || ! isset( $_POST['comment'] ) ) {
63
- // error
64
- } else {
65
- $filename = $this->set_filename( stripslashes( $_POST['filename'] ) );
66
- $sig = stripslashes( $_POST['sig'] );
67
- $comment = stripslashes( $_POST['comment'] );
68
-
69
- $errors = $waf_exclude_rule->add_rule( $filename, $sig, $comment );
70
- if ( ! is_wp_error( $errors ) ) {
71
- if ( $waf_exclude_rule_enable ) {
72
- $waf_exclude_rule->feature_on( );
73
- }
74
- echo '<div class="updated"><p><strong>' . esc_html__( 'New rule created', 'siteguard' ) . '</strong></p></div>';
75
- $action = 'list';
76
- $this->wp_list_table->prepare_items( );
77
- } else {
78
- $action = 'add';
79
- }
80
- }
81
- }
82
- break;
83
- case 'edit':
84
- if ( check_admin_referer( 'siteguard-menu-waf-tuning-support-edit' ) ) {
85
- if ( ! isset( $_POST['rule'] ) || ! isset( $_POST['filename'] ) || ! isset( $_POST['sig'] ) || ! isset( $_POST['comment'] ) ) {
86
- // error
87
- } else {
88
- $id = $_POST['rule'];
89
- $filename = $this->set_filename( stripslashes( $_POST['filename'] ) );
90
- $sig = stripslashes( $_POST['sig'] );
91
- $comment = stripslashes( $_POST['comment'] );
92
- $errors = $waf_exclude_rule->set_rule( $id, $filename, $sig, $comment );
93
- if ( ! is_wp_error( $errors ) ) {
94
- if ( $waf_exclude_rule_enable ) {
95
- $waf_exclude_rule->feature_on( );
96
- }
97
-
98
- echo '<div class="updated"><p><strong>' . esc_html__( 'Rule updated', 'siteguard' ) . '</strong></p></div>';
99
- $action = 'list';
100
- $this->wp_list_table->prepare_items( );
101
- } else {
102
- $action = 'edit';
103
- }
104
- }
105
- }
106
- break;
107
- case 'delete':
108
- if ( check_admin_referer( 'siteguard-menu-waf-tuning-support-delete' ) ) {
109
- if ( ! isset( $_POST['rule'] ) ) {
110
- // error
111
- } else {
112
- $ids = $_POST['rule'];
113
- $waf_exclude_rule->delete_rule( $ids );
114
- if ( $waf_exclude_rule_enable ) {
115
- $waf_exclude_rule->feature_on( );
116
- }
117
- echo '<div class="updated"><p><strong>' . esc_html__( 'Rule deleted', 'siteguard' ) . '</strong></p></div>';
118
- $action = 'list';
119
- $this->wp_list_table->prepare_items( );
120
- }
121
- }
122
- break;
123
- case 'apply':
124
- if ( isset( $_POST['action'] ) && 'delete' == $_POST['action'] ) {
125
- break;
126
- }
127
- if ( check_admin_referer( 'siteguard-menu-waf-tuning-support-apply' ) ) {
128
- if ( ! isset( $_POST['waf_exclude_rule_enable'] ) ) {
129
- // error
130
- } else {
131
- $error = false;
132
- if ( '1' == $_POST['waf_exclude_rule_enable'] && false == $this->check_module( 'siteguard' ) ) {
133
- echo '<div class="error settings-error"><p><strong>';
134
- esc_html_e( 'To use the WAF exclude rule, WAF ( SiteGuard Lite ) should be installed on Apache.', 'siteguard' );
135
- echo '</strong></p></div>';
136
- $error = true;
137
- $waf_exclude_rule->set_enable( '0' );
138
- $waf_exclude_rule->feature_off( );
139
- $waf_exclude_rule_enable = '0';
140
- }
141
- if ( false == $this->is_switch_value( $_POST['waf_exclude_rule_enable'] ) ) {
142
- echo '<div class="error settings-error"><p><strong>';
143
- esc_html_e( 'ERROR: Invalid input value.', 'siteguard' );
144
- echo '</strong></p></div>';
145
- $error = true;
146
- }
147
- if ( false == $error ) {
148
- $waf_exclude_rule_enable = $_POST['waf_exclude_rule_enable'];
149
- $waf_exclude_rule->set_enable( $waf_exclude_rule_enable );
150
- if ( '1' == $waf_exclude_rule_enable ) {
151
- $waf_exclude_rule->feature_on( );
152
- echo '<div class="updated"><p><strong>' . esc_html__( 'Rules applied', 'siteguard' ) . '</strong></p></div>';
153
- } else {
154
- $waf_exclude_rule->feature_off( );
155
- echo '<div class="updated"><p><strong>' . esc_html__( 'Rules unapplied', 'siteguard' ) . '</strong></p></div>';
156
- }
157
- }
158
- }
159
- }
160
- break;
161
- default:
162
- }
163
- } else if ( 'delete' == $action ) {
164
- if ( isset( $_GET['rule'] ) ) {
165
- $ids = array( $_GET['rule'] );
166
- } else if ( isset( $_POST['rule'] ) ) {
167
- $ids = $_POST['rule'];
168
- }
169
- }
170
-
171
- if ( isset( $errors ) && is_wp_error( $errors ) ) {
172
- ?>
173
- <div class="error">
174
- <ul>
175
- <?php
176
- foreach ( $errors->get_error_messages( ) as $err ) {
177
- echo "<li>$err</li>\n";
178
- }
179
- ?>
180
- </ul>
181
- </div>
182
- <?php
183
- }
184
-
185
- echo '<div class="wrap">';
186
- echo '<img src="' . SITEGUARD_URL_PATH . 'images/sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
187
- switch ( $action ) {
188
- case 'list':
189
- echo '<h2>' . esc_html__( 'WAF Tuning Support', 'siteguard' ) . ' <a href="?page=siteguard_waf_tuning_support&action=add" class="add-new-h2">' . esc_html__( 'Add New', 'siteguard' ) . '</a></h2>';
190
- ?>
191
- <form name="form1" method="post" action="">
192
- <table class="form-table">
193
- <tr>
194
- <th scope="row"><?php esc_html_e( 'Enable/Disable', 'siteguard' ) ?></th>
195
- <td>
196
- <ul class="siteguard-radios">
197
- <li>
198
- <input type="radio" name="waf_exclude_rule_enable" id="waf_exclude_rule_enable_on" value="1" <?php echo ( '1' == $waf_exclude_rule_enable ? 'checked' : '' ) ?> >
199
- <label for="waf_exclude_rule_enable_on"><?php esc_html_e( 'ON', 'siteguard' ) ?></label>
200
- </li><li>
201
- <input type="radio" name="waf_exclude_rule_enable" id="waf_exclude_rule_enable_off" value="0" <?php echo ( '0' == $waf_exclude_rule_enable ? 'checked' : '' ) ?> >
202
- <label for="waf_exclude_rule_enable_off"><?php esc_html_e( 'OFF', 'siteguard' ) ?></label>
203
- </li>
204
- </ul>
205
- <?php
206
- echo '<p class="description">';
207
- esc_html_e( 'To use the WAF Tuning Support, WAF ( SiteGuard Lite ) should be installed on Apache.', 'siteguard' );
208
- echo '</p>';
209
- ?>
210
- </td>
211
- </table>
212
- <?php
213
- $this->wp_list_table->display( );
214
- ?>
215
- <div class="siteguard-description">
216
- <?php esc_html_e( 'It is the function to create the rule to avoid the false detection in WordPress (including 403 error occurrence with normal access,) if WAF ( SiteGuard Lite ) by JP-Secure is installed on a Web server. WAF prevents the attack from the outside against the Web server, but for some WordPress or plugin functions, WAF may detect the attack which is actually not attack and block the function.
217
- By creating the WAF exclude rule, the WAF protection function can be activated while the false detection for the specified function is prevented.', 'siteguard' ) ?>
218
- </div>
219
- <hr />
220
- <?php
221
- echo '<input type="hidden" name="update" id="update" value="apply">';
222
- wp_nonce_field( 'siteguard-menu-waf-tuning-support-apply' );
223
- submit_button( esc_attr__( 'Apply rules', 'siteguard' ) );
224
- ?>
225
- </form>
226
- <?php
227
- break;
228
- case 'add':
229
- case 'edit':
230
- if ( 'add' == $action ) {
231
- echo '<h2>' . esc_html__( 'WAF Exclude Rule Add', 'siteguard' ) . '</h2>';
232
- } else {
233
- echo '<h2>' . esc_html__( 'WAF Exclude Rule Edit', 'siteguard' ) . '</h2>';
234
- }
235
- ?>
236
- <form name="form1" method="post" action="<?php echo esc_url( menu_page_url( 'siteguard_waf_tuning_support', false ) ) ?>">
237
- <table class="form-table">
238
- <tr>
239
- <th scope="row"><label for="sig"><?php echo esc_html_e( 'Signature', 'siteguard' ) ?></label></th>
240
- <td>
241
- <textarea name="sig" id="sig" style="width:350px;" rows="5" ><?php echo esc_html( $sig ) ?></textarea>
242
- <p class="description"><?php esc_html_e( 'The detected signature name or signature ID is specified. To specify more than one, separate them with new line.', 'siteguard' ) ?></p>
243
- </td>
244
- </tr>
245
- <tr>
246
- <th scope="row"><label for="filename"><?php echo esc_html_e( 'Filename (optional)', 'siteguard' ) ?></label></th>
247
- <td>
248
- <input type="text" name="filename" id="filename" value="<?php echo esc_attr( $filename ) ?>" class="regular-text code" >
249
- <p class="description"><?php esc_html_e( 'The target file name is specified. URL ( the part before ? ) can also be pasted.', 'siteguard' ) ?></p>
250
- </td>
251
- </tr>
252
- <tr>
253
- <th scope="row"><label for="comment"><?php echo esc_html_e( 'Comment (optional)', 'siteguard' ) ?></label></th>
254
- <td>
255
- <input type="text" name="comment" id="comment" value="<?php echo esc_attr( $comment ) ?>" class="regular-text" >
256
- </td>
257
- </tr>
258
- </table>
259
-
260
- <hr />
261
- <?php
262
- if ( 'add' == $action ) {
263
- echo '<input type="hidden" name="update" id="update" value="add">';
264
- wp_nonce_field( 'siteguard-menu-waf-tuning-support-add' );
265
- submit_button( esc_attr__( 'Save', 'siteguard' ) );
266
- } else {
267
- echo '<input type="hidden" name="update" id="update" value="edit">';
268
- echo '<input type="hidden" name="rule" id="rule" value="' . esc_attr( $id ) . '">';
269
- wp_nonce_field( 'siteguard-menu-waf-tuning-support-edit' );
270
- submit_button( );
271
- }
272
- echo '</form>';
273
- break;
274
- case 'delete':
275
- echo '<h2>' . esc_html__( 'WAF Exclude Rule Delete', 'siteguard' ) . '</h2>';
276
- ?>
277
- <form name="form1" method="post" action="<?php echo esc_url( menu_page_url( 'siteguard_waf_tuning_support', false ) ) ?>">
278
- <?php
279
- echo '<p>' .esc_html( _n( 'You have specified this rule for deletion:', 'You have specified these rules for deletion:', count( $ids ), 'siteguard' ) ) . '</p>';
280
- $go_delete = 0;
281
- foreach ( $ids as $id ) {
282
- $offset = 0;
283
- $rule = $waf_exclude_rule->get_rule( $id, $offset );
284
- echo '<input type="hidden" name="rule[]" value="' . esc_attr( $id ) . '" />' . esc_html__( 'Signature', 'siteguard' ) . ' : ' . esc_html__( 'Filename', 'siteguard' ) . ' : ' . esc_html__( 'Comment', 'siteguard' ) . ' [' . esc_html( $rule['sig'] ) . ' : ' . esc_html( $rule['filename'] ) . ' : ' . esc_html( $rule['comment'] ) . "]<br />\n";
285
- $go_delete = 1;
286
- }
287
- if ( 1 == $go_delete ) {
288
- echo '<input type="hidden" name="update" id="update" value="delete">';
289
- wp_nonce_field( 'siteguard-menu-waf-tuning-support-delete' );
290
- submit_button( esc_attr__( 'Confirm Deletion', 'siteguard' ) );
291
- } else {
292
- echo '<p>' . esc_html__( 'There are no rules selected for deletion.' , 'siteguard' ) . '</p>';
293
- }
294
- echo '</form>';
295
- break;
296
- }
297
- ?>
298
- </div>
299
- <?php
300
- }
301
- }
302
-
303
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/siteguard-waf-exclude-rule-table.php DELETED
@@ -1,127 +0,0 @@
1
- <?php
2
-
3
- if ( ! class_exists( 'WP_List_Table' ) ) {
4
- require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
5
- }
6
-
7
- class SiteGuard_WAF_Exclude_Rule_Table extends WP_List_Table {
8
-
9
- function __construct(){
10
- global $status, $page;
11
-
12
- //Set parent defaults
13
- parent::__construct( array(
14
- 'singular' => 'rule', //singular name of the listed records
15
- 'plural' => 'rules', //plural name of the listed records
16
- 'ajax' => false, //does this table support ajax?
17
- ) );
18
-
19
- }
20
-
21
- function column_default( $item, $column_name ) {
22
- switch ( $column_name ) {
23
- case 'filename':
24
- case 'comment':
25
- return esc_html( $item[ $column_name ] );
26
- default:
27
- return print_r( $item, true ); //Show the whole array for troubleshooting purposes
28
- }
29
- }
30
-
31
- function column_sig( $item ) {
32
-
33
- //Build row actions
34
- $actions = array(
35
- 'edit' => sprintf( '<a href="?page=%s&action=%s&rule=%s">%s</a>', esc_html( $_REQUEST['page'] ), 'edit', esc_html( $item['ID'] ), esc_html__( 'Edit' ) ),
36
- 'delete' => sprintf( '<a href="?page=%s&action=%s&rule=%s">%s</a>', esc_html( $_REQUEST['page'] ), 'delete', esc_html( $item['ID'] ), esc_html__( 'Delete' ) ),
37
- );
38
-
39
- //Return the target contents
40
- return sprintf( '%1$s%2$s',
41
- /*$1%s*/ esc_html( $item['sig'] ),
42
- /*$2%s*/ $this->row_actions( $actions )
43
- );
44
- }
45
-
46
-
47
- function column_cb( $item ) {
48
- return sprintf(
49
- '<input type="checkbox" name="%1$s[]" value="%2$s" />',
50
- /*$1%s*/ esc_html( $this->_args['singular'] ), //Let's simply repurpose the table's singular label ("rule")
51
- /*$2%s*/ esc_html( $item['ID'] ) //The value of the checkbox should be the record's id
52
- );
53
- }
54
-
55
-
56
- function get_columns( ) {
57
- $columns = array(
58
- 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
59
- 'sig' => esc_html__( 'Signature', 'siteguard' ),
60
- 'filename' => esc_html__( 'Filename', 'siteguard' ),
61
- 'comment' => esc_html__( 'Comment', 'siteguard' ),
62
- );
63
- return $columns;
64
- }
65
-
66
- function get_sortable_columns( ) {
67
- $sortable_columns = array(
68
- 'sig' => array( 'sig', false ),
69
- 'filename' => array( 'filename', false ),
70
- 'comment' => array( 'comment', false ),
71
- );
72
- return $sortable_columns;
73
- }
74
-
75
- function get_bulk_actions( ) {
76
- $actions = array(
77
- 'delete' => esc_html__( 'Delete' ),
78
- );
79
- return $actions;
80
- }
81
-
82
-
83
- function process_bulk_action( ) {
84
-
85
- return;
86
- }
87
-
88
- function usort_reorder( $a, $b ){
89
- $orderby = ( ! empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'sig'; //If no sort, default to filename
90
- $order = ( ! empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc
91
- $result = strcmp( $a[ $orderby ], $b[ $orderby ] ); //Determine sort order
92
- return ( $order === 'asc' ) ? $result : -$result; //Send final sort direction to usort
93
- }
94
-
95
- function prepare_items( ) {
96
- global $waf_exclude_rule;
97
-
98
- $per_page = 5;
99
-
100
- $columns = $this->get_columns( );
101
- $hidden = array();
102
- $sortable = $this->get_sortable_columns( );
103
-
104
- $this->_column_headers = array( $columns, $hidden, $sortable );
105
-
106
- $this->process_bulk_action( );
107
-
108
- $data = $waf_exclude_rule->get_rules( );
109
-
110
- $total_items = count( $data );
111
- $current_page = $this->get_pagenum( );
112
-
113
- if ( $total_items > 0 ) {
114
- usort( $data, array( $this, 'usort_reorder' ) );
115
- $data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
116
- }
117
-
118
- $this->items = $data;
119
-
120
- $this->set_pagination_args( array(
121
- 'total_items' => $total_items, //WE have to calculate the total number of items
122
- 'per_page' => $per_page, //WE have to determine how many items to show on a page
123
- 'total_pages' => ceil( $total_items / $per_page ) //WE have to calculate the total number of pages
124
- ) );
125
- }
126
- }
127
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-admin-filter.php DELETED
@@ -1,109 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_AdminFilter extends SiteGuard_Base {
4
- public static $htaccess_mark = '#==== SITEGUARD_ADMIN_FILTER_SETTINGS';
5
-
6
- function __construct( ) {
7
- define( 'SITEGUARD_TABLE_LOGIN', 'siteguard_login' );
8
- add_action( 'wp_login', array( $this, 'handler_wp_login' ), 1, 2 );
9
- }
10
- static function get_mark( ) {
11
- return SiteGuard_AdminFilter::$htaccess_mark;
12
- }
13
- function init( ) {
14
- global $wpdb, $config;
15
- $table_name = $wpdb->prefix . SITEGUARD_TABLE_LOGIN;
16
- $sql = 'CREATE TABLE ' . $table_name . " (
17
- ip_address varchar(40) NOT NULL DEFAULT '',
18
- status INT NOT NULL DEFAULT 0,
19
- count INT NOT NULL DEFAULT 0,
20
- last_login_time datetime,
21
- UNIQUE KEY ip_address (ip_address)
22
- )
23
- CHARACTER SET 'utf8';";
24
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
25
- dbDelta( $sql );
26
- $config->set( 'admin_filter_exclude_path', 'css,images,admin-ajax.php' );
27
- $config->set( 'admin_filter_enable', '0' );
28
- $config->update( );
29
- }
30
- function handler_wp_login( $login, $current_user ) {
31
- global $htaccess, $config;
32
-
33
- if ( '' == $current_user->user_login ) {
34
- return;
35
- }
36
- if ( 1 == $config->get( 'admin_filter_enable' ) ) {
37
- $this->feature_on( $_SERVER['REMOTE_ADDR'] );
38
- }
39
- }
40
- function cvt_exclude( $exclude ) {
41
- return str_replace( ',', '|', $exclude );
42
- }
43
- function update_settings( $ip_address ) {
44
- global $wpdb, $config;
45
- $htaccess_str = '';
46
- $table_name = $wpdb->prefix . SITEGUARD_TABLE_LOGIN;
47
- $exclude_paths = preg_split( '/,/', $config->get( 'admin_filter_exclude_path' ) );
48
-
49
- $now_str = current_time( 'mysql' );
50
- $now_bin = strtotime( $now_str );
51
-
52
- $wpdb->query( 'START TRANSACTION' );
53
- $wpdb->query( "DELETE FROM $table_name WHERE status = 1 AND last_login_time < SYSDATE() - INTERVAL 1 DAY;" );
54
- $data = array(
55
- 'ip_address' => $ip_address,
56
- 'status' => 1,
57
- 'count' => 0,
58
- 'last_login_time' => $now_str,
59
- );
60
- $result = $wpdb->get_row( $wpdb->prepare( "SELECT status from $table_name WHERE ip_address = %s", $ip_address ) );
61
- if ( null == $result ) {
62
- $wpdb->insert( $table_name, $data );
63
- } else {
64
- $wpdb->update( $table_name, $data, array( 'ip_address' => $ip_address ) );
65
- }
66
- $parse_url = parse_url( site_url( ) );
67
- if ( false == $parse_url ) {
68
- $base = '/';
69
- } else {
70
- if ( isset( $parse_url['path'] ) ) {
71
- $base = $parse_url['path'] . '/';
72
- } else {
73
- $base = '/';
74
- }
75
- }
76
- $htaccess_str .= "<IfModule mod_rewrite.c>\n";
77
- $htaccess_str .= " RewriteEngine on\n";
78
- $htaccess_str .= " RewriteBase $base\n";
79
- $htaccess_str .= " RewriteRule ^404-siteguard - [L]\n";
80
- foreach ( $exclude_paths as $path ) {
81
- $htaccess_str .= ' RewriteRule ^wp-admin/' . trim( $path ) . " - [L]\n";
82
- }
83
- $htaccess_str .= ' RewriteCond %{REMOTE_ADDR} !(127.0.0.1|'. $_SERVER['SERVER_ADDR'] . ")\n";
84
- $results = $wpdb->get_col( "SELECT ip_address FROM $table_name;" );
85
- if ( $results ) {
86
- foreach ( $results as $ip ) {
87
- $htaccess_str .= ' RewriteCond %{REMOTE_ADDR} !' . $ip . "\n";
88
- }
89
- }
90
- $htaccess_str .= " RewriteRule ^wp-admin 404-siteguard [L]\n";
91
- $htaccess_str .= "</IfModule>\n";
92
-
93
- $wpdb->query( 'COMMIT' );
94
-
95
- return $htaccess_str;
96
- }
97
- function feature_on( $ip_addres ) {
98
- global $htaccess, $config;
99
- $mark = $this->get_mark( );
100
- $data = $this->update_settings( $ip_addres );
101
- return $htaccess->update_settings( $mark, $data );
102
- }
103
- static function feature_off( ) {
104
- $mark = SiteGuard_AdminFilter::get_mark( );
105
- SiteGuard_Htaccess::clear_settings( $mark );
106
- }
107
- }
108
-
109
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-base.php DELETED
@@ -1,61 +0,0 @@
1
- <?php
2
-
3
- function siteguard_error_log( $message ) {
4
- $logfile = SITEGUARD_PATH . 'error.log';
5
- $f = @fopen( $logfile, 'a+' );
6
- if ( false != $f ) {
7
- fwrite( $f, date_i18n( 'Y/m/d H:i:s:' ) . $message . "\n" );
8
- fclose( $f );
9
- }
10
- }
11
-
12
- function siteguard_error_dump( $title, $obj ) {
13
- ob_start();
14
- var_dump( $obj );
15
- $msg = ob_get_contents( );
16
- ob_end_clean( );
17
- siteguard_error_log( "$title: $msg" );
18
- }
19
-
20
- class SiteGuard_Base {
21
- function __construct() {
22
- }
23
- function is_switch_value( $value ) {
24
- if ( '0' == $value || '1' == $value ) {
25
- return true;
26
- }
27
- return false;
28
- }
29
- function check_module( $name, $default = false ) {
30
- if ( isset( $_SERVER['SERVER_SOFTWARE'] ) ) {
31
- return ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) !== false || strpos( $_SERVER['SERVER_SOFTWARE'], 'LiteSpeed' ) !== false);
32
- } else {
33
- return $default;
34
- }
35
-
36
- # It does not work in FastCGI well.
37
- #$module = 'mod_' . $name;
38
- #return apache_mod_loaded( $module, $default );
39
- #if ( function_exists('phpinfo') ) {
40
- # ob_start( );
41
- # phpinfo(8);
42
- # $phpinfo = ob_get_clean( );
43
- # if ( false !== strpos( $phpinfo, $module ) ) {
44
- # return true;
45
- # }
46
- #}
47
- #return $default;
48
- }
49
- function is_active_plugin( $plugin ) {
50
- if ( function_exists( 'is_plugin_active' ) ) {
51
- return is_plugin_active( $plugin );
52
- } else {
53
- return in_array(
54
- $plugin,
55
- get_option( 'active_plugins' )
56
- );
57
- }
58
- }
59
- }
60
-
61
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-captcha.php DELETED
@@ -1,219 +0,0 @@
1
- <?php
2
-
3
- include_once( SITEGUARD_PATH . 'really-simple-captcha/siteguard-really-simple-captcha.php' );
4
-
5
- class SiteGuard_CAPTCHA extends SiteGuard_Base {
6
- var $captcha;
7
- var $prefix;
8
- var $word;
9
-
10
- function __construct( ) {
11
- global $config;
12
- if ( '1' == $config->get( 'captcha_enable' ) && 'xmlrpc.php' != basename( $_SERVER['SCRIPT_NAME'] ) ) {
13
- $this->captcha = new SiteGuardReallySimpleCaptcha( );
14
- $this->captcha->bg = array( 255, 255, 255 );
15
-
16
- add_filter( 'shake_error_codes', array( $this, 'handler_shake_error_codes' ) );
17
-
18
- // for logiin
19
- if ( '0' != $config->get( 'captcha_login' ) ) {
20
- add_filter( 'login_form', array( $this, 'handler_login_form' ) );
21
- add_filter( 'wp_authenticate_user', array( $this, 'handler_wp_authenticate_user' ), 1, 2 );
22
- }
23
- // for lost password
24
- if ( '0' != $config->get( 'captcha_lostpasswd' ) ) {
25
- add_filter( 'lostpassword_form', array( $this, 'handler_lostpassword_form' ) );
26
- add_filter( 'lostpassword_post', array( $this, 'handler_lostpassword_post' ), 1 );
27
- }
28
- // for register user
29
- if ( '0' != $config->get( 'captcha_registuser' ) ) {
30
- add_filter( 'register_form', array( $this, 'handler_register_form' ) );
31
- add_action( 'registration_errors', array( $this, 'handler_registration_errors' ), 10, 3 );
32
- }
33
- // for comment
34
- if ( '0' != $config->get( 'captcha_comment' ) ) {
35
- add_action( 'comment_form_after_fields', array( $this, 'handler_comment_form' ), 1 );
36
- add_action( 'comment_form_logged_in_after', array( $this, 'handler_comment_form' ), 1 );
37
- add_action( 'comment_form', array( $this, 'handler_comment_form' ) );
38
- add_filter( 'preprocess_comment', array( $this, 'handler_process_comment_post' ) );
39
- }
40
- }
41
- if ( '1' == $config->get( 'same_login_error' ) ) {
42
- add_filter( 'login_errors', array( $this, 'handler_login_errors' ) );
43
- }
44
- }
45
- function check_requirements( ) {
46
- $error = $this->check_extensions( );
47
- if ( is_wp_error( $error ) ) {
48
- return $error;
49
- }
50
- $error = $this->check_image_access( );
51
- if ( is_wp_error( $error ) ) {
52
- return $error;
53
- }
54
- return true;
55
- }
56
- function check_extensions( ) {
57
- $error_extensions = array();
58
- $extensions = array(
59
- 'mbstring',
60
- 'gd',
61
- );
62
- foreach ( $extensions as $extension ) {
63
- if ( ! extension_loaded( $extension ) ) {
64
- $error_extensions[] = $extension;
65
- }
66
- }
67
- if ( empty( $error_extensions ) ) {
68
- return true;
69
- }
70
-
71
- $message = esc_html__( 'In order to enable this function, it is necessary to install expanded modules', 'siteguard' );
72
- $message .= ' ( ';
73
- $count = 0;
74
- foreach ( $error_extensions as $extension ) {
75
- if ( 0 != $count ) {
76
- $message .= ', ';
77
- }
78
- $message .= $extension;
79
- $count ++;
80
- }
81
- $message .= ' ) ';
82
- $message .= esc_html__( 'in the server.', 'siteguard' );
83
-
84
- $error = new WP_Error( 'siteguard_captcha', $message );
85
- return $error;
86
- }
87
- function check_image_access( ) {
88
- if ( is_object( $this->captcha ) ) {
89
- $this->captcha->make_tmp_dir( );
90
- } else {
91
- $captcha = new SiteGuardReallySimpleCaptcha( );
92
- $captcha->make_tmp_dir( );
93
- }
94
- $result = wp_remote_get( SITEGUARD_URL_PATH . 'really-simple-captcha/tmp/dummy.png' );
95
- if ( ! is_wp_error( $result ) && $result['response']['code'] === 200 ) {
96
- return true;
97
- }
98
- $message = esc_html__( 'In order to enable this function, it is necessary to specify Limit to AllowOverride in httpd.conf.', 'siteguard' );
99
- $error = new WP_Error( 'siteguard_captcha', $message );
100
- return $error;
101
- }
102
- function handler_login_errors( $error ) {
103
- if ( strlen( $error ) > 0 && false === strpos( $error, esc_html__( 'ERROR: LOGIN LOCKED', 'siteguard' ) ) && false === strpos( $error, esc_html__( 'ERROR: Please login entry again', 'siteguard' ) ) ) {
104
- $error = esc_html__( 'ERROR: Please check the input and resend.', 'siteguard' );
105
- }
106
- return $error;
107
- }
108
- function handler_shake_error_codes( $shake_error_codes ) {
109
- array_push( $shake_error_codes, 'siteguard-captcha-error' );
110
- return $shake_error_codes;
111
- }
112
-
113
- function init( ) {
114
- global $config;
115
- $errors = $this->check_requirements( );
116
- if ( ! is_wp_error( $errors ) ) {
117
- $switch = '1';
118
- } else {
119
- $switch = '0';
120
- }
121
- $config->set( 'captcha_enable', $switch );
122
- $language = get_bloginfo( 'language' );
123
- if ( 'ja' == $language ) {
124
- $mode = '1'; // hiragana
125
- } else {
126
- $mode = '2'; // alphanumeric
127
- }
128
- $config->set( 'captcha_login', $mode );
129
- $config->set( 'captcha_comment', $mode );
130
- $config->set( 'captcha_lostpasswd', $mode );
131
- $config->set( 'captcha_registuser', $mode );
132
- $config->set( 'same_login_error', '1' );
133
- $config->update( );
134
- }
135
- function get_captcha( ) {
136
- $result = '<p>';
137
- $result .= '<img src="'. SITEGUARD_URL_PATH . 'really-simple-captcha/tmp/' . $this->prefix . '.png" alt="CAPTCHA">';
138
- $result .= '</p><p>';
139
- $result .= '<label for="siteguard_captcha">' . esc_html__( 'Please input characters displayed above.', 'siteguard' ) . '</label><br />';
140
- $result .= '<input type="text" name="siteguard_captcha" id="siteguard_captcha" class="input" value="" size="10" aria-required="true" />';
141
- $result .= '<input type="hidden" name="siteguard_captcha_prefix" id="siteguard_captcha_prefix" value="'.$this->prefix.'" />';
142
- $result .= '</p>';
143
-
144
- return $result;
145
- }
146
- function put_captcha( ) {
147
- $this->word = $this->captcha->generate_random_word( );
148
- $this->prefix = mt_rand( );
149
- $this->captcha->generate_image( $this->prefix, $this->word );
150
- echo $this->get_captcha( );
151
- }
152
- function handler_login_form( ) {
153
- global $config;
154
- ( '2' == $config->get( 'captcha_login' ) ) ? $this->captcha->lang_mode = 'en' : $this->captcha->lang_mode = 'jp';
155
- $this->put_captcha( );
156
- }
157
- function handler_comment_form( $post_id ) {
158
- global $config;
159
- if ( defined( 'PUT_COMMENT_FORM' ) ) {
160
- return;
161
- }
162
- ( '2' == $config->get( 'captcha_comment' ) ) ? $this->captcha->lang_mode = 'en' : $this->captcha->lang_mode = 'jp';
163
- $this->put_captcha( );
164
- define( 'PUT_COMMENT_FORM', '1' );
165
- }
166
- function handler_lostpassword_form( ) {
167
- global $config;
168
- ( '2' == $config->get( 'captcha_lostpasswd' ) ) ? $this->captcha->lang_mode = 'en' : $this->captcha->lang_mode = 'jp';
169
- $this->put_captcha( );
170
- }
171
- function handler_register_form( ) {
172
- global $config;
173
- ( '2' == $config->get( 'captcha_registuser' ) ) ? $this->captcha->lang_mode = 'en' : $this->captcha->lang_mode = 'jp';
174
- $this->put_captcha( );
175
- }
176
- function handler_wp_authenticate_user( $user, $password ) {
177
- if ( array_key_exists( 'siteguard_captcha', $_POST ) && array_key_exists( 'siteguard_captcha_prefix', $_POST ) ) {
178
- if ( $this->captcha->check( $_POST['siteguard_captcha_prefix'], $_POST['siteguard_captcha'] ) ) {
179
- return $user;
180
- }
181
- }
182
- $error = new WP_Error( );
183
- $error->add( 'siteguard-captcha-error', esc_html__( 'ERROR: Invalid CAPTCHA.', 'siteguard' ) );
184
- return $error;
185
- }
186
- function add_captcha_error( ) {
187
- return new WP_Error( 'siteguard-captcha-error', esc_html__( 'ERROR: Invalid CAPTCHA.', 'siteguard' ) );
188
- }
189
- function handler_lostpassword_post( ) {
190
- if ( array_key_exists( 'siteguard_captcha', $_POST ) && array_key_exists( 'siteguard_captcha_prefix', $_POST ) ) {
191
- if ( $this->captcha->check( $_POST['siteguard_captcha_prefix'], $_POST['siteguard_captcha'] ) ) {
192
- return;
193
- }
194
- }
195
- add_filter( 'allow_password_reset', array( $this, 'add_captcha_error' ) );
196
- }
197
- function handler_registration_errors( $errors, $sanitized_user_login, $user_email ) {
198
- if ( array_key_exists( 'siteguard_captcha', $_POST ) && array_key_exists( 'siteguard_captcha_prefix', $_POST ) ) {
199
- if ( $this->captcha->check( $_POST['siteguard_captcha_prefix'], $_POST['siteguard_captcha'] ) ) {
200
- return $errors;
201
- }
202
- }
203
- $new_errors = new WP_Error( );
204
- $new_errors->add( 'siteguard-captcha-error', esc_html__( 'ERROR: Invalid CAPTCHA.', 'siteguard' ) );
205
- return $new_errors;
206
- }
207
- function handler_process_comment_post( $comment ) {
208
- if ( array_key_exists( 'siteguard_captcha', $_POST ) && array_key_exists( 'siteguard_captcha_prefix', $_POST ) ) {
209
- if ( ! empty( $_POST['siteguard_captcha'] ) ) {
210
- if ( $this->captcha->check( $_POST['siteguard_captcha_prefix'], $_POST['siteguard_captcha'] ) ) {
211
- return $comment;
212
- }
213
- }
214
- }
215
- wp_die( esc_html__( 'ERROR: Invalid CAPTCHA.', 'siteguard' ) );
216
- }
217
- }
218
-
219
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-config.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Config {
4
- var $config;
5
- function __construct() {
6
- $this->config = get_option( 'siteguard_config' );
7
- }
8
- function set( $key, $value ) {
9
- $this->config[ $key ] = $value;
10
- }
11
- function get( $key ) {
12
- $this->config = get_option( 'siteguard_config' );
13
- return isset( $this->config[ $key ] ) ? $this->config[ $key ] : '';
14
- }
15
- function update( ) {
16
- update_option( 'siteguard_config', $this->config );
17
- }
18
- }
19
-
20
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-disable-pingback.php DELETED
@@ -1,23 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Disable_Pingback extends SiteGuard_Base {
4
-
5
- function __construct( ) {
6
- global $config;
7
- if ( '1' == $config->get( 'disable_pingback_enable' ) ) {
8
- add_filter( 'xmlrpc_methods', array( $this, 'handler_xmlrpc_methods' ) );
9
- }
10
- }
11
- function init( ) {
12
- global $config;
13
- $config->set( 'disable_pingback_enable', '1' );
14
- $config->update( );
15
- }
16
- function handler_xmlrpc_methods( $methods ) {
17
- unset( $methods['pingback.ping'] );
18
- unset( $methods['pingback.extensions.getPingbacks'] );
19
- return $methods;
20
- }
21
- }
22
-
23
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-htaccess.php DELETED
@@ -1,192 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_Htaccess extends SiteGuard_Base {
4
- public static $htaccess_mark_start = '#SITEGUARD_PLUGIN_SETTINGS_START';
5
- public static $htaccess_mark_end = '#SITEGUARD_PLUGIN_SETTINGS_END';
6
-
7
- function __construct( ) {
8
- }
9
- static function get_htaccess_file( ) {
10
- return ABSPATH.'.htaccess';
11
- }
12
- static function get_tmp_dir( ) {
13
- return SITEGUARD_PATH . 'tmp/';
14
- }
15
- static function get_htaccess_new_file( ) {
16
- return tempnam( SiteGuard_Htaccess::get_tmp_dir( ), 'htaccess_' );
17
- }
18
- static function make_tmp_dir( ) {
19
- $dir = SiteGuard_Htaccess::get_tmp_dir( );
20
- if ( ! wp_mkdir_p( $dir ) ) {
21
- siteguard_error_log( "make tempdir failed: $dir" );
22
- return false;
23
- }
24
- $htaccess_file = $dir . '.htaccess';
25
-
26
- if ( file_exists( $htaccess_file ) ) {
27
- return true;
28
- }
29
-
30
- if ( $handle = @fopen( $htaccess_file, 'w' ) ) {
31
- fwrite( $handle, 'Order deny,allow' . "\n" );
32
- fwrite( $handle, 'Deny from all' . "\n" );
33
- fclose( $handle );
34
- }
35
-
36
- return true;
37
- }
38
- static function clear_settings( $mark ) {
39
- if ( ! SiteGuard_Htaccess::make_tmp_dir( ) ) {
40
- return false;
41
- }
42
- if ( '' == $mark ) {
43
- $mark_start = SiteGuard_Htaccess::$htaccess_mark_start;
44
- $mark_end = SiteGuard_Htaccess::$htaccess_mark_end;
45
- } else {
46
- $mark_start = $mark . '_START';
47
- $mark_end = $mark . '_END';
48
- }
49
- $flag_settings = false;
50
- $current_file = SiteGuard_Htaccess::get_htaccess_file( );
51
- if ( ! file_exists( $current_file ) ) {
52
- @touch( $current_file );
53
- @chmod( $current_file, 0604 );
54
- }
55
- $fr = @fopen( $current_file, 'r' );
56
- if ( null == $fr ) {
57
- siteguard_error_log( "fopen failed: $current_file" );
58
- return false;
59
- }
60
- $new_file = SiteGuard_Htaccess::get_htaccess_new_file( );
61
- $fw = @fopen( $new_file, 'w' );
62
- if ( null == $fw ) {
63
- siteguard_error_log( "fopen failed: $new_file" );
64
- return false;
65
- }
66
- while ( ! feof( $fr ) ) {
67
- $line = fgets( $fr, 4096 );
68
- if ( false !== strpos( $line, $mark_start ) ) {
69
- $flag_settings = true;
70
- }
71
- if ( false == $flag_settings ) {
72
- fputs( $fw, $line, 4096 );
73
- }
74
- if ( true == $flag_settings && false !== strpos( $line, $mark_end ) ) {
75
- $flag_settings = false;
76
- }
77
- }
78
- fclose( $fr );
79
- fclose( $fw );
80
- @chmod( $new_file, 0604 );
81
- if ( ! rename( $new_file, $current_file ) ) {
82
- siteguard_error_log( "rename failed: $new_file $current_file" );
83
- return false;
84
- }
85
- return true;
86
- }
87
- function update_settings( $mark, $data ) {
88
- if ( ! SiteGuard_Htaccess::make_tmp_dir( ) ) {
89
- return false;
90
- }
91
- $flag_write = false;
92
- $flag_through = true;
93
- $flag_wp = false;
94
- $flag_wp_set = false;
95
- $wp_settings = '';
96
- $mark_start = $mark . '_START';
97
- $mark_end = $mark . '_END';
98
- $mark_wp_start = '# BEGIN WordPress';
99
- $mark_wp_end = '# END WordPress';
100
- $current_file = SiteGuard_Htaccess::get_htaccess_file( );
101
- if ( ! file_exists( $current_file ) ) {
102
- @touch( $current_file );
103
- @chmod( $current_file, 0604 );
104
- }
105
- if ( ! is_readable( $current_file ) ) {
106
- siteguard_error_log( "file not readable: $current_file" );
107
- return false;
108
- }
109
- $fr = @fopen( $current_file, 'r' );
110
- if ( null == $fr ) {
111
- siteguard_error_log( "fopen failed: $current_file" );
112
- return false;
113
- }
114
- $new_file = SiteGuard_Htaccess::get_htaccess_new_file( );
115
- if ( ! is_writable( $new_file ) ) {
116
- siteguard_error_log( "file not writable: $new_file" );
117
- return false;
118
- }
119
- $fw = @fopen( $new_file, 'w' );
120
- if ( null == $fw ) {
121
- siteguard_error_log( "fopen failed: $new_file" );
122
- return false;
123
- }
124
- while ( ! feof( $fr ) ) {
125
- $line = fgets( $fr, 4096 );
126
-
127
- // Save WordPress settings.
128
- // WordPress settings has to be written after SiteGuard settings.
129
- if ( false == $flag_write && false == $flag_wp_set && false !== strpos( $line, $mark_wp_start ) ) {
130
- $flag_wp = true;
131
- $flag_wp_set = true;
132
- }
133
- if ( $flag_wp_set ) {
134
- $wp_settings .= $line;
135
- if ( false !== strpos( $line, $mark_wp_end ) ) {
136
- $flag_wp_set = false;
137
- }
138
- continue;
139
- }
140
-
141
- if ( false !== strpos( $line, $mark_start ) ) {
142
- fwrite( $fw, $line , strlen( $line ) );
143
- fwrite( $fw, $data, strlen( $data ) );
144
- $flag_write = true;
145
- $flag_through = false;
146
- continue;
147
- }
148
- if ( false == $flag_write && false !== strpos( $line, SiteGuard_Htaccess::$htaccess_mark_end ) ) {
149
- fwrite( $fw, $mark_start . "\n", strlen( $mark_start ) + 1 );
150
- fwrite( $fw, $data, strlen( $data ) );
151
- fwrite( $fw, $mark_end . "\n", strlen( $mark_end ) + 1 );
152
- $flag_write = true;
153
- }
154
- if ( false == $flag_through && false !== strpos( $line, $mark_end ) ) {
155
- $flag_through = true;
156
- }
157
- if ( $flag_through ) {
158
- fwrite( $fw, $line, strlen( $line ) );
159
- if ( false == $flag_wp && false !== strpos( $line, $mark_wp_start ) ) {
160
- $flag_wp = true;
161
- }
162
- }
163
- }
164
- if ( false == $flag_write ) {
165
- fwrite( $fw, "\n" . SiteGuard_Htaccess::$htaccess_mark_start . "\n", strlen( SiteGuard_Htaccess::$htaccess_mark_start ) + 2 );
166
- fwrite( $fw, $mark_start . "\n", strlen( $mark_start ) + 1 );
167
- fwrite( $fw, $data, strlen( $data ) );
168
- fwrite( $fw, $mark_end . "\n", strlen( $mark_end ) + 1 );
169
- fwrite( $fw, SiteGuard_Htaccess::$htaccess_mark_end . "\n", strlen( SiteGuard_Htaccess::$htaccess_mark_end ) + 1 );
170
- }
171
- if ( '' != $wp_settings ) { // Write saved WordPress Settings
172
- fwrite( $fw, "\n", 1 );
173
- fwrite( $fw, $wp_settings, strlen( $wp_settings ) );
174
- fwrite( $fw, "\n", 1 );
175
- } else if ( false == $flag_wp ) { // Write empty WordPress Settings
176
- fwrite( $fw, "\n", 1 );
177
- fwrite( $fw, $mark_wp_start . "\n", strlen( $mark_wp_start ) + 1 );
178
- fwrite( $fw, $mark_wp_end . "\n", strlen( $mark_wp_end ) + 1 );
179
- fwrite( $fw, "\n", 1 );
180
- }
181
- fclose( $fr );
182
- fclose( $fw );
183
- @chmod( $new_file, 0604 );
184
- if ( ! rename( $new_file, $current_file ) ) {
185
- siteguard_error_log( "rename failed: $new_file $current_file" );
186
- return false;
187
- }
188
- return true;
189
- }
190
- }
191
-
192
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-login-alert.php DELETED
@@ -1,52 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_LoginAlert extends SiteGuard_Base {
4
- function __construct( ) {
5
- global $config;
6
- if ( '1' == $config->get( 'loginalert_enable' ) ) {
7
- add_action( 'wp_login', array( $this, 'handler_wp_login' ), 10, 2 );
8
- }
9
- }
10
- function init( ) {
11
- global $config;
12
- $config->set( 'loginalert_enable', '1' );
13
- $config->set( 'loginalert_admin_only', '1' );
14
- $config->set( 'loginalert_subject', __( 'New login at %SITENAME%', 'siteguard' ) );
15
- $config->set( 'loginalert_body', __( "%USERNAME% logged in at %DATE% %TIME%\n\n== Login information ==\nIP Address: %IPADDRESS%\nReferer: %REFERER%\nUser-Agent: %USERAGENT%\n\n--\nSiteGuard WP Plugin", 'siteguard' ) );
16
- $config->update( );
17
- }
18
- function replace_valuable( $string, $username ) {
19
- $search = array( '%SITENAME%', '%USERNAME%', '%DATE%', '%TIME%', '%IPADDRESS%', '%USERAGENT%', '%REFERER%' );
20
- $replace = array(
21
- get_option( 'blogname' ),
22
- $username,
23
- date( 'Y-m-d', current_time( 'timestamp' ) ),
24
- date( 'H:i:s', current_time( 'timestamp' ) ),
25
- isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : '-',
26
- isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '-',
27
- isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '-'
28
- );
29
- return str_replace( $search, $replace, $string );
30
- }
31
- function handler_wp_login( $username, $user ) {
32
- global $config;
33
-
34
- if ( ( '1' == $config->get( 'loginalert_admin_only' ) ) && ( ! $user->has_cap( 'administrator' ) ) ) {
35
- return;
36
- }
37
-
38
- $user_email = $user->get( 'user_email' );
39
-
40
- $subject = $config->get( 'loginalert_subject' );
41
- $body = $config->get( 'loginalert_body' );
42
-
43
- $subject = $this->replace_valuable( $subject, $username );
44
- $body = $this->replace_valuable( $body, $username );
45
-
46
- @wp_mail( $user_email, esc_html( $subject ), esc_html( $body ) );
47
-
48
- return;
49
- }
50
- }
51
-
52
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-login-history.php DELETED
@@ -1,119 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_LoginHistory extends SiteGuard_Base {
4
-
5
- function __construct( ) {
6
- define( 'SITEGUARD_TABLE_HISTORY', 'siteguard_history' );
7
- add_action( 'wp_login', array( $this, 'handler_wp_login' ), 1, 2 );
8
- add_action( 'wp_login_failed', array( $this, 'handler_wp_login_failed' ), 30 );
9
- add_action( 'xmlrpc_call', array( $this, 'handler_xmlrpc_call' ), 10, 1 );
10
- }
11
- function init( ) {
12
- global $wpdb;
13
- # operation
14
- # 0: Login failure
15
- # 1: Login success
16
- # 2: Fail once
17
- # 3: Login lock
18
- $table_name = $wpdb->prefix . SITEGUARD_TABLE_HISTORY;
19
- $sql = "CREATE TABLE $table_name (
20
- id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
21
- login_name VARCHAR(40) NOT NULL DEFAULT '',
22
- ip_address VARCHAR(40) NOT NULL DEFAULT '',
23
- operation INT NOT NULL DEFAULT 0,
24
- time datetime,
25
- UNIQUE KEY id (id)
26
- )
27
- CHARACTER SET 'utf8';";
28
- require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
29
- dbDelta( $sql );
30
- }
31
- function handler_wp_login( $login, $current_user ) {
32
-
33
- if ( '' == $current_user->user_login ) {
34
- return;
35
- }
36
- $this->add_operation( SITEGUARD_LOGIN_SUCCESS, $current_user->user_login );
37
- }
38
- function handler_wp_login_failed( $username ) {
39
- global $loginlock;
40
- $this->add_operation( $loginlock->get_status( ), $username );
41
- }
42
- function handler_xmlrpc_call( $method ) {
43
- $current_user = wp_get_current_user( );
44
- $this->add_operation( SITEGUARD_LOGIN_SUCCESS, $current_user->user_login );
45
- }
46
- function is_exist( $user, $operation, $after_sec, $less_sec ) {
47
- global $wpdb;
48
-
49
- if ( $after_sec > $less_sec ) {
50
- return false;
51
- }
52
-
53
- $table_name = $wpdb->prefix . SITEGUARD_TABLE_HISTORY;
54
- $ip_address = $_SERVER['REMOTE_ADDR'];
55
- $now = current_time( 'mysql' );
56
- $id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $table_name WHERE ip_address = %s AND login_name = %s AND operation = %d AND time BETWEEN %s - INTERVAL %d SECOND AND %s - INTERVAL %d SECOND; ", $ip_address, $user, $operation, $now, $less_sec, $now, $after_sec ) );
57
- if ( null == $id ) {
58
- return false;
59
- }
60
- return true;
61
- }
62
- function add_operation( $operation, $user_login ) {
63
- global $current_user;
64
- global $wpdb;
65
-
66
- if ( $user_login != '' ) {
67
- $user = $user_login;
68
- } else {
69
- get_currentuserinfo();
70
- $user = $current_user->user_login;
71
- }
72
- $table_name = $wpdb->prefix . SITEGUARD_TABLE_HISTORY;
73
-
74
- $wpdb->query( 'START TRANSACTION' );
75
- // delete old event
76
- $id = $wpdb->get_var( "SELECT id FROM $table_name ORDER BY id DESC LIMIT 9999,1;", 0, 0 );
77
- if ( $id != null ) {
78
- $wpdb->query( "DELETE FROM $table_name WHERE id < $id;" );
79
- }
80
- $ip_address = $_SERVER['REMOTE_ADDR'];
81
- $data = array(
82
- 'operation' => $operation,
83
- 'login_name' => $user,
84
- 'ip_address' => $ip_address,
85
- 'time' => current_time( 'mysql' )
86
- );
87
- $wpdb->insert( $table_name, $data );
88
-
89
- $wpdb->query( 'COMMIT' );
90
- }
91
- static function convert_operation( $operation ) {
92
- $result = '';
93
- switch ( $operation ) {
94
- case SITEGUARD_LOGIN_FAILED:
95
- $result = esc_html__( 'Failed', 'siteguard' );
96
- break;
97
- case SITEGUARD_LOGIN_SUCCESS:
98
- $result = esc_html__( 'Success', 'siteguard' );
99
- break;
100
- case SITEGUARD_LOGIN_FAIL_ONCE:
101
- $result = esc_html__( 'Fail once', 'siteguard' );
102
- break;
103
- case SITEGUARD_LOGIN_LOCKED:
104
- $result = esc_html__( 'Locked', 'siteguard' );
105
- break;
106
- default:
107
- $result = esc_html__( 'Unknown', 'siteguard' );
108
- }
109
- return $result;
110
- }
111
- function get_history( ) {
112
- global $wpdb;
113
- $table_name = $wpdb->prefix . SITEGUARD_TABLE_HISTORY;
114
- $results = $wpdb->get_results( "SELECT id, operation, login_name, ip_address, time FROM $table_name;", ARRAY_A );
115
- return $results;
116
- }
117
- }
118
-
119
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-login-lock.php DELETED
@@ -1,132 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_LoginLock extends SiteGuard_Base {
4
- var $status = SITEGUARD_LOGIN_FAILED;
5
- function __construct( ) {
6
- global $config;
7
- if ( '1' == $config->get( 'loginlock_enable' ) ) {
8
- add_action( 'wp_login_failed', array( $this, 'handler_wp_login_failed' ) );
9
- add_filter( 'authenticate', array( $this, 'handler_authenticate' ), 20, 3 );
10
- }
11
- if ( '1' == $config->get( 'loginlock_fail_once' ) ) {
12
- add_filter( 'wp_authenticate_user', array( $this, 'handler_wp_authenticate_user' ), 99, 2 );
13
- }
14
- }
15
- function init( ) {
16
- global $config;
17
- $config->set( 'loginlock_enable', '1' );
18
- $config->set( 'loginlock_interval', '5' );
19
- $config->set( 'loginlock_threshold', '3' );
20
- $config->set( 'loginlock_locksec', '60' );
21
- $config->set( 'loginlock_fail_once', '0' );
22
- $config->set( 'fail_once_admin_only', '1' );
23
- $config->update( );
24
- }
25
- function get_status( ) {
26
- return $this->status;
27
- }
28
- function handler_wp_login_failed( $username ) {
29
- global $wpdb, $config, $login_history;
30
- $table_name = $wpdb->prefix . SITEGUARD_TABLE_LOGIN;
31
-
32
- $ip_address = $_SERVER['REMOTE_ADDR'];
33
-
34
- $wpdb->query( 'START TRANSACTION' );
35
- $wpdb->query( "DELETE FROM $table_name WHERE status <> 1 AND last_login_time < SYSDATE() - INTERVAL 1 HOUR;" );
36
- $result = $wpdb->get_row( $wpdb->prepare( "SELECT status, count, last_login_time from $table_name WHERE ip_address = %s", $ip_address ) );
37
- $data = array(
38
- 'ip_address' => $ip_address,
39
- 'status' => SITEGUARD_LOGIN_FAILED,
40
- 'count' => 1,
41
- 'last_login_time' => 0,
42
- );
43
- $now_str = current_time( 'mysql' );
44
- $now_bin = strtotime( $now_str );
45
- if ( null == $result ) {
46
- $data['last_login_time'] = $now_str;
47
- $wpdb->insert( $table_name, $data );
48
- } else {
49
- $data['last_login_time'] = $result->last_login_time;
50
- $interval = intval( $config->get( 'loginlock_interval' ) );
51
- $limit = strtotime( $result->last_login_time ) + $interval;
52
- if ( SITEGUARD_LOGIN_FAILED == $result->status ) {
53
- if ( $now_bin <= $limit ) {
54
- $data['count'] = $result->count + 1;
55
- } else {
56
- $data['count'] = 1;
57
- $data['last_login_time'] = $now_str;
58
- }
59
- if ( $data['count'] >= intval( $config->get( 'loginlock_threshold' ) ) ) {
60
- $data['status'] = SITEGUARD_LOGIN_LOCKED;
61
- $data['last_login_time'] = $now_str;
62
- $this->status = SITEGUARD_LOGIN_LOCKED;
63
- }
64
- $wpdb->update( $table_name, $data, array( 'ip_address' => $ip_address ) );
65
- } else if ( SITEGUARD_LOGIN_FAIL_ONCE == $result->status || ( SITEGUARD_LOGIN_LOCKED == $result->status && $now_bin > strtotime( $result->last_login_time ) + intval( $config->get( 'loginlock_locksec' ) ) ) ) {
66
- $data['status'] = SITEGUARD_LOGIN_FAILED;
67
- $data['count'] = 1;
68
- $data['last_login_time'] = $now_str;
69
- $wpdb->update( $table_name, $data, array( 'ip_address' => $ip_address ) );
70
- }
71
- }
72
-
73
- $wpdb->query( 'COMMIT' );
74
-
75
- return;
76
- }
77
- function is_locked( $ip_address ) {
78
- global $wpdb, $config;
79
-
80
- $now_bin = strtotime( current_time( 'mysql' ) );
81
- $table_name = $wpdb->prefix . SITEGUARD_TABLE_LOGIN;
82
- $result = $wpdb->get_row( $wpdb->prepare( "SELECT status, last_login_time from $table_name WHERE ip_address = %s", $ip_address ) );
83
- if ( null != $result ) {
84
- if ( SITEGUARD_LOGIN_LOCKED == $result->status && $now_bin <= strtotime( $result->last_login_time ) + intval( $config->get( 'loginlock_locksec' ) ) ) {
85
- return true;
86
- }
87
- }
88
- return false;
89
- }
90
- function handler_authenticate( $user, $username, $password ) {
91
- if ( $this->is_locked( $_SERVER['REMOTE_ADDR'] ) ) {
92
- $new_errors = new WP_Error( );
93
- $new_errors->add( 'siteguard-error', esc_html__( 'ERROR: LOGIN LOCKED', 'siteguard' ) );
94
- $this->status = SITEGUARD_LOGIN_LOCKED;
95
- return $new_errors;
96
- }
97
- return $user;
98
- }
99
- function handler_wp_authenticate_user( $user, $password ) {
100
- global $login_history, $config;
101
-
102
- if ( basename( $_SERVER['SCRIPT_NAME'] ) == 'xmlrpc.php' ) {
103
- return $user;
104
- }
105
-
106
- // Login failed
107
- if ( is_wp_error( $user ) ) {
108
- return $user;
109
- }
110
- if ( ! wp_check_password( $password, $user->user_pass, $user->ID ) ) {
111
- return $user;
112
- }
113
- if ( '1' == $config->get( 'fail_once_admin_only' ) ) {
114
- if ( ! $user->has_cap( 'administrator' ) ) {
115
- return $user;
116
- }
117
- }
118
-
119
- $user_login = $user->user_login;
120
-
121
- if ( ! $login_history->is_exist( $user_login, SITEGUARD_LOGIN_FAIL_ONCE, 5/* secs after */, 60/* secs less */ ) ) {
122
- $this->status = SITEGUARD_LOGIN_FAIL_ONCE;
123
-
124
- $new_error = new WP_Error( );
125
- $new_error->add( 'siteguard-error', esc_html__( 'ERROR: Please login entry again', 'siteguard' ) );
126
- return $new_error;
127
- }
128
- return $user;
129
- }
130
- }
131
-
132
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-rename-login.php DELETED
@@ -1,155 +0,0 @@
1
- <?php
2
-
3
- class SiteGuard_RenameLogin extends SiteGuard_Base {
4
- public static $htaccess_mark = '#==== SITEGUARD_RENAME_LOGIN_SETTINGS';
5
-
6
- function __construct( ) {
7
- global $config;
8
- if ( '1' == $config->get( 'renamelogin_enable' ) ) {
9
- if ( null != $this->get_active_incompatible_plugin( ) ) {
10
- $config->set( 'renamelogin_enable', '0' );
11
- $config->update( );
12
- $this->feature_off( );
13
- return;
14
- }
15
- $this->add_filter( );
16
- }
17
- }
18
- static function get_mark( ) {
19
- return SiteGuard_RenameLogin::$htaccess_mark;
20
- }
21
- function init( ) {
22
- global $config;
23
- $config->set( 'renamelogin_path', 'login_' . sprintf( '%05d', mt_rand( 1, 99999 ) ) );
24
- if ( $this->check_module( 'rewrite' ) && null == $this->get_active_incompatible_plugin( ) ) {
25
- $config->set( 'renamelogin_enable', '1' );
26
- $config->update( );
27
- $this->feature_on( );
28
- } else {
29
- $config->set( 'renamelogin_enable', '0' );
30
- $config->update( );
31
- }
32
- }
33
- function get_active_incompatible_plugin( ) {
34
- $incompatible_plugins = array(
35
- 'WordPress HTTPS (SSL)' => 'wordpress-https/wordpress-https.php',
36
- );
37
- foreach ( $incompatible_plugins as $name => $path ) {
38
- if ( $this->is_active_plugin( $path ) ) {
39
- return $name;
40
- }
41
- }
42
- return null;
43
- }
44
- function add_filter( ) {
45
- add_filter( 'login_init', array( $this, 'handler_login_init' ), 10, 2 );
46
- add_filter( 'site_url', array( $this, 'handler_site_url' ), 10, 2 );
47
- add_filter( 'network_site_url', array( $this, 'handler_site_url' ), 10, 2 );
48
- add_filter( 'wp_redirect', array( $this, 'handler_wp_redirect' ), 10, 2 );
49
- add_filter( 'register', array( $this, 'handler_register' ) );
50
- remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 );
51
- }
52
- function handler_login_init( ) {
53
- global $config;
54
- $new_login_page = $config->get( 'renamelogin_path' );
55
- if ( isset( $_SERVER['REQUEST_URI'] ) ) {
56
- $link = $_SERVER['REQUEST_URI'];
57
- } else {
58
- $link = '';
59
- }
60
- if ( false !== strpos( $link, 'wp-login.php' ) ) {
61
- $referer = wp_get_referer( );
62
- if ( false === strpos( $referer, $new_login_page ) ) {
63
- $this->set_404( );
64
- } else {
65
- $result = $this->convert_url( $link );
66
- wp_redirect( $result );
67
- }
68
- }
69
- }
70
- function convert_url( $link ) {
71
- global $config;
72
- $custom_login_url = $config->get( 'renamelogin_path' );
73
- if ( false !== strpos( $link, 'wp-login.php' ) ) {
74
- $result = str_replace( 'wp-login.php', $custom_login_url, $link );
75
- } else {
76
- $result = $link;
77
- }
78
- return $result;
79
- }
80
- function handler_site_url( $link ) {
81
- $result = $this->convert_url( $link );
82
- return $result;
83
- }
84
- function handler_register( $link ) {
85
- $result = $this->convert_url( $link );
86
- return $result;
87
- }
88
- function handler_wp_redirect( $link, $status_code ) {
89
- $result = $this->convert_url( $link );
90
- return $result;
91
- }
92
- function insert_rewrite_rules( $rules ) {
93
- global $config;
94
- $custom_login_url = $config->get( 'renamelogin_path' );
95
- $newrules = array();
96
- $newrules[ $custom_login_url.'(.*)$' ] = 'wp-login.php$1';
97
- return $newrules + $rules;
98
- }
99
- function update_settings( ) {
100
- global $config;
101
- $custom_login_url = $config->get( 'renamelogin_path' );
102
- $parse_url = parse_url( site_url( ) );
103
- if ( false == $parse_url ) {
104
- $base = '/';
105
- } else {
106
- if ( isset( $parse_url['path'] ) ) {
107
- $base = $parse_url['path'] . '/';
108
- } else {
109
- $base = '/';
110
- }
111
- }
112
-
113
- $htaccess_str = "<IfModule mod_rewrite.c>\n";
114
- $htaccess_str .= " RewriteEngine on\n";
115
- $htaccess_str .= " RewriteBase $base\n";
116
- $htaccess_str .= " RewriteRule ^$custom_login_url(.*)$ wp-login.php$1 [L]\n";
117
- $htaccess_str .= "</IfModule>\n";
118
-
119
- return $htaccess_str;
120
- }
121
- function feature_on( ) {
122
- global $htaccess;
123
- $data = $this->update_settings( );
124
- $mark = $this->get_mark( );
125
- return $htaccess->update_settings( $mark, $data );
126
- }
127
- static function feature_off( ) {
128
- $mark = SiteGuard_RenameLogin::get_mark( );
129
- return SiteGuard_Htaccess::clear_settings( $mark );
130
- }
131
- function set_404( ) {
132
- global $wp_query;
133
- status_header( 404 );
134
- $wp_query->set_404( );
135
- if ( ( ( $template = get_404_template( ) ) || ( $template = get_index_template( ) ) )
136
- && ( $template = apply_filters( 'template_include', $template ) ) ) {
137
- include( $template );
138
- }
139
- die;
140
- }
141
- function send_notify( ) {
142
- global $config;
143
- $subject = esc_html__( 'WordPress: Login page URL was changed', 'siteguard' );
144
- $body = sprintf( esc_html__( "Please bookmark following of the new login URL.\n\n%s\n\n--\nSiteGuard WP Plugin", 'siteguard' ), site_url( ) . '/' . $config->get( 'renamelogin_path' ) );
145
-
146
- $user_query = new WP_User_Query( array( 'role' => 'Administrator' ) );
147
- if ( ! empty( $user_query->results ) ) {
148
- foreach ( $user_query->results as $user ) {
149
- @wp_mail( $user->get( 'user_email' ), $subject, $body );
150
- }
151
- }
152
- }
153
- }
154
-
155
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-updates-notify.php DELETED
@@ -1,274 +0,0 @@
1
- <?php
2
- /*
3
- This function based on WP Updates Notifier 1.4.1 by Scott Cariss.
4
- */
5
- class SiteGuard_UpdatesNotify extends SiteGuard_Base {
6
- const CRON_NAME = 'siteguard_update_check';
7
-
8
- function __construct( ) {
9
- add_action( self::CRON_NAME, array( $this, 'do_update_check' ) ); // action to link cron task to actual task
10
- }
11
-
12
- public function init( ) {
13
- global $config;
14
- $config->set( 'notify_wpcore', '1' );
15
- $config->set( 'notify_plugins', '2' );
16
- $config->set( 'notify_themes', '2' );
17
- $config->set( 'notified', array( 'core' => '', 'plugin' => array(), 'theme' => array() ) );
18
- $config->set( 'last_check_time', false );
19
- // We need save the configuration before calling self::check_requirements.
20
- $config->update( );
21
- if ( true === self::check_requirements( ) ) {
22
- $config->set( 'updates_notify_enable', '1' );
23
- $config->update( );
24
- self::feature_on( );
25
- } else {
26
- $config->set( 'updates_notify_enable', '0' );
27
- $config->update( );
28
- }
29
- }
30
- public function check_requirements( ) {
31
- $error = self::check_disable_wp_cron( );
32
- if ( is_wp_error( $error ) ) {
33
- return $error;
34
- }
35
- $error = self::check_wp_cron_access( );
36
- if ( is_wp_error( $error ) ) {
37
- return $error;
38
- }
39
- return true;
40
- }
41
- static function check_disable_wp_cron( ) {
42
- if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
43
- $message = esc_html__( "DISABLE_WP_CRON is defined true. This function can't be used.", 'siteguard' );
44
- $error = new WP_Error( 'siteguard_updates_notify', $message );
45
- return $error;
46
- }
47
- return true;
48
- }
49
- static function check_wp_cron_access( ) {
50
- $result = wp_remote_post( site_url( '/wp-cron.php' ) );
51
- if ( ! is_wp_error( $result ) && $result['response']['code'] === 200 ) {
52
- return true;
53
- }
54
- $message = esc_html__( 'Please solve the problem that can not be accessed wp-cron.php. Might be access control.', 'siteguard' );
55
- $error = new WP_Error( 'siteguard_updates_notify', $message );
56
- return $error;
57
- }
58
- public function feature_on( ) {
59
- // Already scheduled
60
- if ( false !== wp_get_schedule( self::CRON_NAME ) ) {
61
- return;
62
- }
63
-
64
- // Schedule cron for this plugin.
65
- wp_schedule_event( time(), 'daily', self::CRON_NAME );
66
- }
67
-
68
- public function feature_off() {
69
- wp_clear_scheduled_hook( self::CRON_NAME ); // clear cron
70
- }
71
-
72
- public function do_update_check() {
73
- global $config;
74
- $message = ''; // start with a blank message
75
- if ( '0' != $config->get( 'notify_wpcore' ) ) { // are we to check for WordPress core?
76
- $core_updated = self::core_update_check( $message ); // check the WP core for updates
77
- }
78
- if ( '0' != $config->get( 'notify_plugins' ) ) { // are we to check for plugin updates?
79
- $plugins_updated = self::plugins_update_check( $message, $config->get( 'notify_plugins' ) ); // check for plugin updates
80
- }
81
- else {
82
- $plugins_updated = false; // no plugin updates
83
- }
84
- if ( '0' != $config->get( 'notify_themes' ) ) { // are we to check for theme updates?
85
- $themes_updated = self::themes_update_check( $message, $config->get( 'notify_themes' ) ); // check for theme updates
86
- }
87
- else {
88
- $themes_updated = false; // no theme updates
89
- }
90
- if ( $core_updated || $plugins_updated || $themes_updated ) { // Did anything come back as need updating?
91
- $message = esc_html__( 'There are updates available for your WordPress site:', 'siteguard' ) . "\n" . $message . "\n";
92
- $message .= sprintf( esc_html__( 'Please visit %s to update.', 'siteguard' ), admin_url( 'update-core.php' ) ) . "\n\n--\nSiteGuard WP Plugin";
93
- self::send_notify( $message ); // send our notification email.
94
- }
95
-
96
- self::log_last_check_time();
97
- }
98
-
99
- private static function core_update_check( &$message ) {
100
- global $config, $wp_version;
101
- do_action( 'wp_version_check' ); // force WP to check its core for updates
102
- $update_core = get_site_transient( 'update_core' ); // get information of updates
103
- $notified = $config->get( 'notified' );
104
- if ( 'upgrade' == $update_core->updates[0]->response ) { // is WP core update available?
105
- if ( $update_core->updates[0]->current != $notified['core'] ) { // have we already notified about this version?
106
- require_once( ABSPATH . WPINC . '/version.php' ); // Including this because some plugins can mess with the real version stored in the DB.
107
- $new_core_ver = $update_core->updates[0]->current; // The new WP core version
108
- $old_core_ver = $wp_version; // the old WP core version
109
- $message .= "\n" . sprintf( esc_html__( 'WP-Core: WordPress is out of date. Please update from version %s to %s', 'siteguard' ), $old_core_ver, $new_core_ver ) . "\n";
110
- $notified['core'] = $new_core_ver; // set core version we are notifying about
111
- $config->set( 'notified', $notified );
112
- $config->update( );
113
- return true; // we have updates so return true
114
- }
115
- else {
116
- return false; // There are updates but we have already notified in the past.
117
- }
118
- }
119
- $notified['core'] = ''; // no updates lets set this nothing
120
- $config->set( 'notified', $notified );
121
- $config->update( );
122
- return false; // no updates return false
123
- }
124
-
125
- private static function plugins_update_check( &$message, $allOrActive ) {
126
- global $config, $wp_version;
127
- $cur_wp_version = preg_replace( '/-.*$/', '', $wp_version );
128
- $notified = $config->get( 'notified' );
129
- do_action( 'wp_update_plugins' ); // force WP to check plugins for updates
130
- $update_plugins = get_site_transient( 'update_plugins' ); // get information of updates
131
- if ( ! empty( $update_plugins->response ) ) { // any plugin updates available?
132
- $plugins_need_update = $update_plugins->response; // plugins that need updating
133
- if ( 2 == $allOrActive ) { // are we to check just active plugins?
134
- $active_plugins = array_flip( get_option( 'active_plugins' ) ); // find which plugins are active
135
- $plugins_need_update = array_intersect_key( $plugins_need_update, $active_plugins ); // only keep plugins that are active
136
- }
137
- $plugins_need_update = self::check_plugins_against_notified( $plugins_need_update ); // additional filtering of plugins need update
138
- if ( is_array( $plugins_need_update ) && count( $plugins_need_update ) >= 1 ) { // any plugins need updating after all the filtering gone on above?
139
- require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); // Required for plugin API
140
- require_once( ABSPATH . WPINC . '/version.php' ); // Required for WP core version
141
- foreach ( $plugins_need_update as $key => $data ) { // loop through the plugins that need updating
142
- $plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $key ); // get local plugin info
143
- $info = plugins_api( 'plugin_information', array( 'slug' => $data->slug ) ); // get repository plugin info
144
- $message .= "\n" . sprintf( esc_html__( 'Plugin: %s is out of date. Please update from version %s to %s', 'siteguard' ), $plugin_info['Name'], $plugin_info['Version'], $data->new_version ) . "\n";
145
- $message .= "\t" . sprintf( esc_html__( 'Details: %s', 'siteguard' ), $data->url ) . "\n";
146
- $message .= "\t" . sprintf( esc_html__( 'Changelog: %s%s', 'siteguard' ), $data->url, 'changelog/' ) . "\n";
147
- if ( isset( $info->tested ) && version_compare( $info->tested, $wp_version, '>=' ) ) {
148
- $compat = sprintf( esc_html__( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $cur_wp_version );
149
- }
150
- elseif ( isset( $info->compatibility[$wp_version][$data->new_version] ) ) {
151
- $compat = $info->compatibility[$wp_version][$data->new_version];
152
- $compat = sprintf( esc_html__( 'Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)' ), $wp_version, $compat[0], $compat[2], $compat[1] );
153
- }
154
- else {
155
- $compat = sprintf( esc_html__( 'Compatibility with WordPress %1$s: Unknown' ), $wp_version );
156
- }
157
- $message .= "\t" . sprintf( esc_html__( 'Compatibility: %s', 'siteguard' ), $compat ) . "\n";
158
- $notified['plugin'][$key] = $data->new_version; // set plugin version we are notifying about
159
- }
160
- $config->set( 'notified', $notified );
161
- $config->update( );
162
- return true; // we have plugin updates return true
163
- }
164
- }
165
- else {
166
- if ( 0 != count( $notified['plugin'] ) ) { // is there any plugin notifications?
167
- $notified['plugin'] = array(); // set plugin notifications to empty as all plugins up-to-date
168
- $config->set( 'notified', $notified );
169
- $config->update( );
170
- }
171
- }
172
- return false; // No plugin updates so return false
173
- }
174
-
175
- private function themes_update_check( &$message, $allOrActive ) {
176
- global $config;
177
- $notified = $config->get( 'notified' );
178
- do_action( 'wp_update_themes' ); // force WP to check for theme updates
179
- $update_themes = get_site_transient( 'update_themes' ); // get information of updates
180
- if ( ! empty( $update_themes->response ) ) { // any theme updates available?
181
- $themes_need_update = $update_themes->response; // themes that need updating
182
- if ( 2 == $allOrActive ) { // are we to check just active themes?
183
- $active_theme = array( get_option( 'template' ) => array() ); // find current theme that is active
184
- $themes_need_update = array_intersect_key( $themes_need_update, $active_theme ); // only keep theme that is active
185
- }
186
- $themes_need_update = self::check_themes_against_notified( $themes_need_update ); // additional filtering of themes need update
187
- if ( is_array( $themes_need_update ) && count( $themes_need_update ) >= 1 ) { // any themes need updating after all the filtering gone on above?
188
- foreach ( $themes_need_update as $key => $data ) { // loop through the themes that need updating
189
- $theme_info = wp_get_theme( $key ); // get theme info
190
- $message .= "\n" . sprintf( esc_html__( 'Theme: %s is out of date. Please update from version %s to %s', 'siteguard' ), $theme_info['Name'], $theme_info['Version'], $data['new_version'] ) . "\n";
191
- $notified['theme'][$key] = $data['new_version']; // set theme version we are notifying about
192
- }
193
- $config->set( 'notified', $notified );
194
- $config->update( );
195
- return true; // we have theme updates return true
196
- }
197
- }
198
- else {
199
- if ( 0 != count( $notified['theme'] ) ) { // is there any theme notifications?
200
- $notified['theme'] = array(); // set theme notifications to empty as all themes up-to-date
201
- $config->set( 'notified', $notified );
202
- $config->update( );
203
- }
204
- }
205
- return false; // No theme updates so return false
206
- }
207
-
208
- public function check_plugins_against_notified( $plugins_need_update ) {
209
- global $config;
210
- $notified = $config->get( 'notified' );
211
- if ( is_array( $plugins_need_update ) ) {
212
- foreach ( $plugins_need_update as $key => $data ) { // loop through plugins that need update
213
- if ( isset( $notified['plugin'][$key] ) ) { // has this plugin been notified before?
214
- if ( $data->new_version == $notified['plugin'][$key] ) { // does this plugin version match that of the one that's been notified?
215
- unset( $plugins_need_update[$key] ); // don't notify this plugin as has already been notified
216
- }
217
- }
218
- }
219
- }
220
- return $plugins_need_update;
221
- }
222
-
223
- public function check_themes_against_notified( $themes_need_update ) {
224
- global $config;
225
- $notified = $config->get( 'notified' );
226
- if ( is_array( $themes_need_update ) ) {
227
- foreach ( $themes_need_update as $key => $data ) { // loop through themes that need update
228
- if ( isset( $notified['theme'][$key] ) ) { // has this theme been notified before?
229
- if ( $data['new_version'] == $notified['theme'][$key] ) { // does this theme version match that of the one that's been notified?
230
- unset( $themes_need_update[$key] ); // don't notify this theme as has already been notified
231
- }
232
- }
233
- }
234
- }
235
- return $themes_need_update;
236
- }
237
-
238
- public function send_notify( $message ) {
239
- global $config;
240
- $subject = sprintf( esc_html__( 'WordPress: Updates Available @ %s', 'siteguard' ), home_url() );
241
-
242
- $user_query = new WP_User_Query( array( 'role' => 'Administrator' ) );
243
- if ( is_array( $user_query->results ) ) {
244
- foreach ( $user_query->results as $user ) {
245
- @wp_mail( $user->get( 'user_email' ), $subject, $message );
246
- }
247
- }
248
- }
249
-
250
- private function log_last_check_time() {
251
- global $config;
252
- $config->set( 'last_check_time', current_time( 'timestamp' ) );
253
- $config->update( );
254
- }
255
-
256
- private static function get_schedules() {
257
- $schedules = wp_get_schedules();
258
- uasort( $schedules, array( __CLASS__, 'sort_by_interval' ) );
259
- return $schedules;
260
- }
261
-
262
-
263
- private static function get_intervals() {
264
- $intervals = array_keys( self::get_schedules() );
265
- return $intervals;
266
- }
267
-
268
-
269
- private static function sort_by_interval( $a, $b ) {
270
- return $a['interval'] - $b['interval'];
271
- }
272
- }
273
-
274
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/siteguard-waf-exclude-rule.php DELETED
@@ -1,233 +0,0 @@
1
- <?php
2
-
3
- define( 'SITEGUARD_WAF_EXCLUDE_RULE', 'waf_exclude_rule' );
4
-
5
- class SiteGuard_WAF_Exclude_Rule extends SiteGuard_Base {
6
- public static $htaccess_mark = '#==== SITEGUARD_SG_WHITE_LIST_SETTINGS';
7
-
8
- function __construct( ) {
9
- }
10
- static function get_mark( ) {
11
- return SiteGuard_WAF_Exclude_Rule::$htaccess_mark;
12
- }
13
- function init( ) {
14
- global $config;
15
- $config->set( 'waf_exclude_rule_enable', '0' );
16
- $this->clear_rules( );
17
- $config->update( );
18
- }
19
- function get_enable( ) {
20
- global $config;
21
- $enable = $config->get( 'waf_exclude_rule_enable' );
22
- return $enable;
23
- }
24
- function set_enable( $enable ) {
25
- global $config;
26
- if ( '0' != $enable && '1' != $enable ) {
27
- return false;
28
- }
29
- $config->set( 'waf_exclude_rule_enable', $enable );
30
- $config->update( );
31
- return true;
32
- }
33
- function cvt_exclude( $exclude ) {
34
- return str_replace( ',', '|', $exclude );
35
- }
36
- function get_max_id( $rules ) {
37
- $result = 0;
38
- foreach ( $rules as $rule ) {
39
- if ( isset( $rule['ID'] ) && $result < $rule['ID'] ) {
40
- $result = $rule['ID'];
41
- }
42
- }
43
- return $result;
44
- }
45
- function input_check( $id, $filename, &$sig, $comment ) {
46
- $errors = new WP_Error( );
47
- if ( ! is_numeric( $id ) ) {
48
- $errors->add( 'white_list_error', esc_html__( 'ERROR: Invalid input value.', 'siteguard' ) );
49
- }
50
- if ( empty( $sig ) ) {
51
- $errors->add( 'white_list_error', esc_html__( 'ERROR: Signature is required', 'siteguard' ) );
52
- } else {
53
- $tmp_sig = str_ireplace( 'SiteGuard_User_ExcludeSig ', '', $sig );
54
- $tmp_sig = str_replace( ' ', '', $tmp_sig );
55
- $tmp_sig = preg_replace( "/\r\n(\r\n)+/", "\r\n", $tmp_sig );
56
- $tmp_sig = preg_replace( "/\r\n$/", '', $tmp_sig );
57
- $tmp_sig = preg_replace( "/\n\n+/", "\n", $tmp_sig );
58
- $tmp_sig = preg_replace( "/\n$/", '', $tmp_sig );
59
- if ( 1 != preg_match( '/^[a-zA-Z0-9-\r\n]+$/', $tmp_sig ) ) {
60
- $errors->add( 'white_list_error', esc_html__( 'ERROR: Syntax Error in Signature', 'siteguard' ) );
61
- } else {
62
- $sig = $tmp_sig;
63
- }
64
- }
65
-
66
- if ( count( $errors->errors ) > 0 ) {
67
- return $errors;
68
- }
69
- return true;
70
- }
71
- function add_rule( $filename, $sig, $comment ) {
72
- global $config;
73
-
74
- // check
75
- $errors = $this->input_check( 1, $filename, $sig, $comment );
76
- if ( is_wp_error( $errors ) ) {
77
- return $errors;
78
- }
79
- $sig = str_ireplace( 'SiteGuard_User_ExcludeSig', '', $sig );
80
- $sig = str_replace( ' ', '', $sig );
81
- $rules = $config->get( SITEGUARD_WAF_EXCLUDE_RULE );
82
- $rule = array(
83
- 'ID' => $this->get_max_id( $rules ) + 1,
84
- 'filename' => $filename,
85
- 'sig' => $sig,
86
- 'comment' => $comment,
87
- );
88
- array_push( $rules, $rule );
89
- $config->set( SITEGUARD_WAF_EXCLUDE_RULE, $rules );
90
- $config->update( );
91
- return true;
92
- }
93
- function clear_rules( ) {
94
- global $config;
95
- $empty = array();
96
- $config->set( SITEGUARD_WAF_EXCLUDE_RULE, $empty );
97
- $config->update( );
98
- }
99
- function get_rules( ) {
100
- global $config;
101
- $rules = $config->get( SITEGUARD_WAF_EXCLUDE_RULE );
102
- return $rules;
103
- }
104
- function get_rule( $id, &$offset ) {
105
- global $config;
106
- $rules = $config->get( SITEGUARD_WAF_EXCLUDE_RULE );
107
- $idx = 0;
108
- foreach ( $rules as $rule ) {
109
- if ( isset( $rule['ID'] ) && $rule['ID'] == $id ) {
110
- $offset = $idx;
111
- return $rule;
112
- }
113
- $idx ++;
114
- }
115
- $offset = -1;
116
- return false;
117
- }
118
- function delete_rule( $ids ) {
119
- global $config;
120
- $rules = $config->get( SITEGUARD_WAF_EXCLUDE_RULE );
121
- foreach ( $ids as $id ) {
122
- $offset = 0;
123
- $rule = $this->get_rule( $id, $offset );
124
- if ( false === $rule ) {
125
- continue;
126
- }
127
- array_splice( $rules, $offset, 1 );
128
- $config->set( SITEGUARD_WAF_EXCLUDE_RULE, $rules );
129
- }
130
- $config->update( );
131
- return true;
132
- }
133
- function set_rule_itr( $new_rule ) {
134
- global $config;
135
- $errors = new WP_Error();
136
-
137
- $rules = $config->get( SITEGUARD_WAF_EXCLUDE_RULE );
138
- if ( isset( $new_rule['ID'] ) ) {
139
- $id = $new_rule['ID'];
140
- } else {
141
- $errors->add( 'white_list_error', esc_html__( 'ERROR: Invalid input value.', 'siteguard' ) );
142
- return $errors;
143
- }
144
- $offset = 0;
145
- $rule = $this->get_rule( $id, $offset );
146
- if ( false === $rule ) {
147
- $errors->add( 'white_list_error', esc_html__( 'ERROR: Invalid input value.', 'siteguard' ) );
148
- return $errors;
149
- }
150
- array_splice( $rules, $offset, 1, array( $new_rule ) );
151
- $config->set( SITEGUARD_WAF_EXCLUDE_RULE, $rules );
152
- $config->update( );
153
- return true;
154
- }
155
- function set_rule( $id, $filename, $sig, $comment ) {
156
- // check
157
- $errors = $this->input_check( $id, $filename, $sig, $comment );
158
- if ( is_wp_error( $errors ) ) {
159
- return $errors;
160
- }
161
-
162
- $new_rule = array(
163
- 'ID' => (int) $id,
164
- 'filename' => $filename,
165
- 'sig' => $sig,
166
- 'comment' => $comment,
167
- );
168
- return $this->set_rule_itr( $new_rule );
169
- }
170
- function cvt_csrf2comma( $signatures ) {
171
- $result = preg_replace( "/(\r\n)+/", "\r\n", $signatures );
172
- $result = str_replace( "\r\n", ',', $result );
173
- $result = str_replace( "\r\n", ',', $result );
174
- $result = str_replace( "\r", ',', $result );
175
- $result = str_replace( "\n", ',', $result );
176
- return $result;
177
- }
178
- // for SiteGuard Lite Ver1.x
179
- function output_exclude_sig_1( $sig_str ) {
180
- $result = '';
181
- $csv = $this->cvt_csrf2comma( $sig_str );
182
- $sigs = preg_split( '/,/', $csv );
183
- foreach ( $sigs as $sig ) {
184
- $sig = str_replace( ' ', '', $sig );
185
- if ( strlen( $sig ) > 0 ) {
186
- $result .= ' SiteGuard_User_ExcludeSig '. $sig . "\n";
187
- }
188
- }
189
- return $result;
190
- }
191
- // for SiteGuard Lite Ver2.x
192
- function output_exclude_sig_2( $sig_str ) {
193
- return ' SiteGuard_User_ExcludeSig '. $this->cvt_csrf2comma( $sig_str ) . "\n";
194
- }
195
- function update_settings( ) {
196
- global $config;
197
- $htaccess_str = '';
198
- $rules = $config->get( SITEGUARD_WAF_EXCLUDE_RULE );
199
- if ( '' == $rules ) {
200
- return;
201
- }
202
-
203
- $htaccess_str .= "<IfModule mod_siteguard.c>\n";
204
- foreach ( $rules as $rule ) {
205
- if ( isset( $rule['filename'] ) && isset( $rule['sig'] ) ) {
206
- $filename = $rule['filename'];
207
- $sig = $rule['sig'];
208
- if ( ! empty( $filename ) ) {
209
- $htaccess_str .= " <Files $filename >\n";
210
- $htaccess_str .= $this->output_exclude_sig_1( $sig );
211
- $htaccess_str .= " </Files>\n";
212
- } else {
213
- $htaccess_str .= $this->output_exclude_sig_1( $sig );
214
- }
215
- }
216
- }
217
- $htaccess_str .= "</IfModule>\n";
218
-
219
- return $htaccess_str;
220
- }
221
- function feature_on( ) {
222
- global $htaccess;
223
- $data = $this->update_settings( );
224
- $mark = $this->get_mark( );
225
- $htaccess->update_settings( $mark, $data );
226
- }
227
- static function feature_off( ) {
228
- $mark = SiteGuard_WAF_Exclude_Rule::get_mark( );
229
- SiteGuard_Htaccess::clear_settings( $mark );
230
- }
231
- }
232
-
233
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/css/siteguard-menu.css DELETED
@@ -1,149 +0,0 @@
1
- .siteguard-form-table {
2
- border-collapse: collapse;
3
- margin-top: 0.5em;
4
- width: 100%;
5
- clear: both;
6
- }
7
-
8
- .siteguard-form-table,
9
- .siteguard-form-table td,
10
- .siteguard-form-table th,
11
- .siteguard-form-table td p,
12
- .siteguard-form-wrap label {
13
- font-size: 14px;
14
- }
15
-
16
- .siteguard-form-table td {
17
- border:1px solid #cccccc;
18
- margin-bottom: 5px;
19
- padding: 5px 5px;
20
- line-height: 1.3;
21
- vertical-align: middle;
22
- background-color: #ffffff;
23
- }
24
-
25
- .siteguard-form-wrap label {
26
- color: #222;
27
- font-weight: normal;
28
- text-shadow: none;
29
- vertical-align: baseline;
30
- }
31
-
32
- .siteguard-form-table th {
33
- border:1px solid #cccccc;
34
- vertical-align: top;
35
- text-align: left;
36
- padding: 5px 5px 0px 5px;
37
- width: 300px;
38
- line-height: 1.3;
39
- font-weight: 600;
40
- background-color: #f9f9f9;
41
- }
42
-
43
- .siteguard-form-table th.th-full {
44
- width: auto;
45
- font-weight: 400;
46
- }
47
-
48
- .siteguard-form-table td p {
49
- margin-top: 4px;
50
- margin-bottom: 0;
51
- }
52
-
53
- .siteguard-form-table th img {
54
- vertical-align: middle;
55
- }
56
-
57
- .siteguard-form-table td fieldset label {
58
- margin: 0.25em 0 0.5em !important;
59
- display: inline-block;
60
- }
61
-
62
- .siteguard-form-table td fieldset label,
63
- .siteguard-form-table td fieldset p,
64
- .siteguard-form-table td fieldset li {
65
- line-height: 1.4em;
66
- }
67
-
68
- .siteguard-form-table input.tog,
69
- .siteguard-form-table input[type=radio] {
70
- margin-top: -4px;
71
- margin-right: 4px;
72
- float: none;
73
- }
74
-
75
- .siteguard-form-table .pre {
76
- padding: 8px;
77
- margin: 0;
78
- }
79
-
80
- table.siteguard-form-table td .updated {
81
- font-size: 13px;
82
- }
83
-
84
- .siteguard-radios {
85
- display:inline-block;
86
- margin:0;
87
- padding:0;
88
- clear:both;
89
- }
90
- .siteguard-radios li {
91
- display:inline-block;
92
- position:relative;
93
- float:left;
94
- list-style:none;
95
- border:solid 1px #ddd;
96
- border-right:none;
97
- overflow:hidden;
98
- }
99
- .siteguard-radios li:first-child {
100
- border-radius:5px 0 0 5px;
101
- }
102
- .siteguard-radios li:last-child {
103
- border-right:solid 1px #ddd;
104
- border-radius:0 5px 5px 0;
105
- }
106
- .siteguard-radios label {
107
- display:block;
108
- min-width:3em;
109
- text-align:center;
110
- background:#eee;
111
- background:-webkit-gradient(linear, left top, left bottom, from(#FFF),to(#EEE));
112
- background:-moz-linear-gradient(top, #fff, #eee);
113
- border:solid 1px rgba(255,255,255,0.2);
114
- padding:5px;
115
- text-shadow:0 1px 0 rgba(255,255,255,0.5);
116
- }
117
- .siteguard-radios li:first-child label {
118
- border-radius:3px 0 0 3px;
119
- }
120
- .siteguard-radios li:last-child label {
121
- border-radius:0 3px 3px 0;
122
- }
123
- .siteguard-radios input[type=radio] {
124
- position:absolute;
125
- opacity:0;
126
- width:100%;
127
- height:100%;
128
- margin:0;
129
- cursor:pointer;
130
- }
131
- .siteguard-radios input[type=radio]:checked {
132
- cursor:auto;
133
- }
134
- .siteguard-radios input[type=radio]:checked + label {
135
- color:#fff;
136
- text-shadow:0 -1px 0 rgba(0,0,0,0.2);
137
- border:solid 1px rgba(0,0,0,0.1);
138
- background:#666;
139
- background:-webkit-gradient(linear, left top, left bottom, from(#313131),to(#626262));
140
- background:-moz-linear-gradient(top, #333, #666);
141
- }
142
-
143
- div.siteguard-description {
144
- -moz-border-radius: 5px;
145
- -webkit-border-radius: 5px;
146
- border-radius: 5px;
147
- padding: 5px 5px 5px 5px;
148
- border:solid 1px #cccccc;
149
- background-color: #fdfdfd;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/images/dummy.png DELETED
Binary file
trunk/images/plugin-icon.png DELETED
Binary file
trunk/images/sg_wp_plugin_logo_40.png DELETED
Binary file
trunk/images/yes.png DELETED
Binary file
trunk/images/yes_glay.png DELETED
Binary file
trunk/languages/siteguard-ja.mo DELETED
Binary file
trunk/languages/siteguard-ja.po DELETED
@@ -1,760 +0,0 @@
1
- # Copyright (C) 2014 SiteGuard
2
- # This file is distributed under the same license as the SiteGuard package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: SiteGuard 1.0\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/siteguard\n"
7
- "POT-Creation-Date: 2014-08-15 07:12:01+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: Katsuki Naooka <naooka@jp-secure.com>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
-
15
- #: admin/siteguard-login-history-table.php:62
16
- msgid "Date Time"
17
- msgstr "日時"
18
-
19
- #: admin/siteguard-login-history-table.php:63
20
- msgid "Operation"
21
- msgstr "結果"
22
-
23
- #: admin/siteguard-login-history-table.php:64
24
- msgid "Login Name"
25
- msgstr "ログイン名"
26
-
27
- #: admin/siteguard-login-history-table.php:65
28
- msgid "IP Address"
29
- msgstr "IPアドレス"
30
-
31
- #: admin/siteguard-menu-admin-filter.php:32
32
- #: admin/siteguard-menu-admin-filter.php:81
33
- #: admin/siteguard-menu-rename-login.php:19
34
- #: admin/siteguard-menu-rename-login.php:65
35
- msgid "To use this function, “mod_rewrite” should be loaded on Apache."
36
- msgstr ""
37
- "この機能を使用するには、mod_rewriteがサーバーにロードされている必要があります。"
38
-
39
- msgid "This function and Plugin \""
40
- msgstr "この機能を、プラグイン \""
41
-
42
- msgid "\" cannot be used at the same time."
43
- msgstr "\" と同時に使用することはできません。"
44
-
45
- msgid "Login page URL was changed."
46
- msgstr ""
47
- "ログインページURLが変更されました。"
48
-
49
- msgid " Please bookmark "
50
- msgstr " "
51
-
52
- msgid "new login URL"
53
- msgstr "新しいログインページURL"
54
-
55
- msgid ". Setting change is "
56
- msgstr ""
57
- "をブックマークしてください. 設定変更は"
58
-
59
- msgid "here"
60
- msgstr "こちら"
61
-
62
- #: admin/siteguard-menu-admin-filter.php:42
63
- #: admin/siteguard-menu-captcha.php:38
64
- #: admin/siteguard-menu-disable-pingback.php:17
65
- #: admin/siteguard-menu-login-lock.php:34
66
- #: admin/siteguard-menu-rename-login.php:27
67
- msgid "Options saved."
68
- msgstr "設定を保存しました。"
69
-
70
- msgid "Save"
71
- msgstr "保存"
72
-
73
- #: admin/siteguard-menu-admin-filter.php:48
74
- msgid "Admin Page IP Filter"
75
- msgstr "管理ページアクセス制限"
76
-
77
- #: admin/siteguard-menu-admin-filter.php:53
78
- #: admin/siteguard-menu-captcha.php:53 admin/siteguard-menu-captcha.php:118
79
- #: admin/siteguard-menu-disable-pingback.php:29
80
- #: admin/siteguard-menu-login-lock.php:45
81
- #: admin/siteguard-menu-login-lock.php:102
82
- #: admin/siteguard-menu-rename-login.php:38
83
- #: admin/siteguard-menu-sg-whitelist.php:175
84
- msgid "Enable/Disable"
85
- msgstr "有効/無効"
86
-
87
- #: admin/siteguard-menu-admin-filter.php:58
88
- #: admin/siteguard-menu-captcha.php:58 admin/siteguard-menu-captcha.php:123
89
- #: admin/siteguard-menu-disable-pingback.php:34
90
- #: admin/siteguard-menu-login-lock.php:50
91
- #: admin/siteguard-menu-login-lock.php:107
92
- #: admin/siteguard-menu-rename-login.php:43
93
- #: admin/siteguard-menu-sg-whitelist.php:180
94
- msgid "ON"
95
- msgstr ""
96
-
97
- #: admin/siteguard-menu-admin-filter.php:62
98
- #: admin/siteguard-menu-captcha.php:61 admin/siteguard-menu-captcha.php:126
99
- #: admin/siteguard-menu-disable-pingback.php:37
100
- #: admin/siteguard-menu-login-lock.php:53
101
- #: admin/siteguard-menu-login-lock.php:110
102
- #: admin/siteguard-menu-rename-login.php:46
103
- #: admin/siteguard-menu-sg-whitelist.php:183
104
- msgid "OFF"
105
- msgstr ""
106
-
107
- #: admin/siteguard-menu-admin-filter.php:67
108
- msgid "Exclude Path"
109
- msgstr "除外パス"
110
-
111
- #: admin/siteguard-menu-admin-filter.php:69
112
- msgid ""
113
- "The path of /wp-admin/ henceforth is specified. To specify more than one, "
114
- "separate them with new line. "
115
- msgstr ""
116
- "/wp-admin/以降のパスを入力します。"
117
- "複数指定する場合は、改行で区切ってください。"
118
-
119
- #: admin/siteguard-menu-admin-filter.php:74
120
- msgid ""
121
- "It is the function for the protection against the attack to the management "
122
- "page (under /wp-admin/.) To the access from the connection source IP address "
123
- "which does not login to the management page, 404 (Not Found) is returned. At "
124
- "the login, the connection source IP address is recorded and the access to "
125
- "that page is allowed. The connection source IP address which does not login "
126
- "for more than 24 hours is sequentially deleted. The URL (under /wp-admin/) "
127
- "where this function is excluded can be specified."
128
- msgstr ""
129
- "管理ページ(/wp-admin/以降)に対する攻撃から防御するための機能です。"
130
- "ログインが行われていない接続元IPアドレスに対して、管理ページのアクセスを、404(Not Found)で返します。"
131
- "ログインすると、接続元IPアドレスが記録され、当該ページのアクセスを許可します。"
132
- "24時間以上ログインが行われない接続元IPアドレスは、順次削除されます。"
133
- "この機能を除外するURL(/wp-admin/以降)を指定することができます。"
134
-
135
- #: admin/siteguard-menu-dashboard.php:26
136
- msgid ""
137
- "You can find docs, FAQ and more detailed information about SiteGuard WP Plugin on "
138
- msgstr ""
139
- "ドキュメント、FAQ、その他の情報は "
140
-
141
- #: admin/siteguard-menu-dashboard.php:27
142
- msgid "."
143
- msgstr " にあります。"
144
-
145
- msgid "SiteGuard WP Plugin Page"
146
- msgstr ""
147
-
148
- #: admin/siteguard-menu-captcha.php:48 admin/siteguard-menu-dashboard.php:41
149
- #: admin/siteguard-menu-init.php:18
150
- msgid "CAPTCHA"
151
- msgstr "画像認証"
152
-
153
- #: admin/siteguard-menu-captcha.php:66
154
- msgid "Login page"
155
- msgstr "ログインページ"
156
-
157
- #: admin/siteguard-menu-captcha.php:69 admin/siteguard-menu-captcha.php:77
158
- #: admin/siteguard-menu-captcha.php:93 admin/siteguard-menu-captcha.php:101
159
- msgid "Hiragana (Japanese)"
160
- msgstr "ひらがな"
161
-
162
- #: admin/siteguard-menu-captcha.php:72 admin/siteguard-menu-captcha.php:80
163
- #: admin/siteguard-menu-captcha.php:96 admin/siteguard-menu-captcha.php:104
164
- msgid "Alphanumeric"
165
- msgstr "英数字"
166
-
167
- #: admin/siteguard-menu-captcha.php:75 admin/siteguard-menu-captcha.php:83
168
- #: admin/siteguard-menu-captcha.php:99 admin/siteguard-menu-captcha.php:107
169
- msgid "Disable"
170
- msgstr "無効"
171
-
172
- msgid "Enable"
173
- msgstr "有効"
174
-
175
- #: admin/siteguard-menu-captcha.php:74
176
- msgid "Comment page"
177
- msgstr "コメントページ"
178
-
179
- #: admin/siteguard-menu-captcha.php:86
180
- msgid "Lost password page"
181
- msgstr "パスワード確認ページ"
182
-
183
- #: admin/siteguard-menu-captcha.php:98
184
- msgid "Registration user page"
185
- msgstr "ユーザー登録ページ"
186
-
187
- #: admin/siteguard-menu-captcha.php:112
188
- msgid ""
189
- "It is the function to decrease the vulnerability against an illegal login "
190
- "attempt attack such as a brute force attack or a password list attack, or to "
191
- "receive less comment spam. For the character of CAPTCHA, hiragana and "
192
- "alphanumeric characters can be selected."
193
- msgstr ""
194
- "ブルートフォース攻撃、リスト攻撃等の、不正にログインを試みる攻撃や、コメントスパムを受けにくくするための機能です。"
195
- "画像認証の文字は、ひらがなと英数字が選択できます。"
196
-
197
- #: admin/siteguard-menu-captcha.php:115
198
- msgid "Same Login Error Message"
199
- msgstr "ログイン詳細エラーメッセージの無効化"
200
-
201
- #: admin/siteguard-menu-captcha.php:134
202
- msgid ""
203
- "It is the function to decrease the vulnerability against the attack to examine if a user name exists. "
204
- "All error messages about the login should be equalized. The single error message is displayed even if anyone of a username, password, or CAPTCHA is wrong."
205
- msgstr ""
206
- "ユーザー名の存在を調査する攻撃を受けにくくするための機能です。ログインに関するエラーメッセージがすべて同じ内容になります。"
207
- "ユーザー名、パスワード、画像認証のどれを間違えても同じエラーメッセージを表示します。"
208
-
209
- #: admin/siteguard-menu-dashboard.php:24 admin/siteguard-menu-init.php:15
210
- msgid "Dashboard"
211
- msgstr "ダッシュボード"
212
-
213
- #: admin/siteguard-menu-dashboard.php:25
214
- msgid "Setting status"
215
- msgstr "設定状況"
216
-
217
- #: admin/siteguard-menu-dashboard.php:36 admin/siteguard-menu-init.php:17
218
- #: admin/siteguard-menu-rename-login.php:33
219
- msgid "Rename Login"
220
- msgstr "ログインページ変更"
221
-
222
- #: admin/siteguard-menu-dashboard.php:46 admin/siteguard-menu-init.php:19
223
- #: admin/siteguard-menu-login-lock.php:40
224
- msgid "Login Lock"
225
- msgstr "ログインロック"
226
-
227
- msgid "Login Alert"
228
- msgstr "ログインアラート"
229
-
230
- #: admin/siteguard-menu-dashboard.php:51
231
- #: admin/siteguard-menu-disable-pingback.php:23
232
- #: admin/siteguard-menu-init.php:20
233
- msgid "Disable Pingback"
234
- msgstr "ピンバック無効化"
235
-
236
- #: admin/siteguard-menu-dashboard.php:56 admin/siteguard-menu-init.php:21
237
- #: admin/siteguard-menu-sg-whitelist.php:170
238
- msgid "WAF Tuning Support"
239
- msgstr "WAFチューニングサポート"
240
-
241
- #: admin/siteguard-menu-dashboard.php:62
242
- msgid "Login history"
243
- msgstr "ログイン履歴"
244
-
245
- #: admin/siteguard-menu-disable-pingback.php:45
246
- msgid "The pingback function is disabled and its abuse is prevented."
247
- msgstr "ピンバック機能を無効にし、悪用を防ぎます。"
248
-
249
- #. #-#-#-#-# siteguard.pot (SiteGuard 1.0) #-#-#-#-#
250
- #. Plugin Name of the plugin/theme
251
- #: admin/siteguard-menu-init.php:14
252
- msgid "SiteGuard"
253
- msgstr "SiteGuard"
254
-
255
- #: admin/siteguard-menu-login-lock.php:58
256
- msgid "Interval"
257
- msgstr "期間"
258
-
259
- #: admin/siteguard-menu-login-lock.php:61
260
- msgid "1 second"
261
- msgstr "1秒"
262
-
263
- #: admin/siteguard-menu-login-lock.php:64
264
- msgid "5 seconds"
265
- msgstr "5秒"
266
-
267
- #: admin/siteguard-menu-login-lock.php:67
268
- #: admin/siteguard-menu-login-lock.php:85
269
- msgid "30 seconds"
270
- msgstr "30秒"
271
-
272
- #: admin/siteguard-menu-login-lock.php:70
273
- msgid "Threshold"
274
- msgstr "回数"
275
-
276
- #: admin/siteguard-menu-login-lock.php:73
277
- msgid "3 times"
278
- msgstr "3回"
279
-
280
- #: admin/siteguard-menu-login-lock.php:76
281
- msgid "10 times"
282
- msgstr "10回"
283
-
284
- #: admin/siteguard-menu-login-lock.php:79
285
- msgid "100 times"
286
- msgstr "100回"
287
-
288
- #: admin/siteguard-menu-login-lock.php:82
289
- msgid "Lock Time"
290
- msgstr "ロック時間"
291
-
292
- #: admin/siteguard-menu-login-lock.php:88
293
- msgid "1 minute"
294
- msgstr "1分"
295
-
296
- #: admin/siteguard-menu-login-lock.php:91
297
- msgid "5 minutes"
298
- msgstr "5分"
299
-
300
- #: admin/siteguard-menu-login-lock.php:96
301
- msgid ""
302
- "It is the function to decrease the vulnerability against an illegal login attempt attack such as a brute force attack or a password list attack. "
303
- "Especially, it is the function to prevent an automated attack. The connection source IP address the number of login failure of which reaches "
304
- "the specified number within the specified period is blocked for the specified time. Each user account is not locked."
305
- msgstr ""
306
- "ブルートフォース攻撃、リスト攻撃等の、不正にログインを試みる攻撃を受けにくくするための機能です。"
307
- "特に、機械的な攻撃から防御するための機能です。"
308
- "ログインの失敗が指定期間中に指定回数に達した接続元IPアドレスを指定時間ブロックします。"
309
- "ユーザーアカウント毎のロックは行いません。"
310
-
311
- #: admin/siteguard-menu-login-lock.php:99
312
- msgid "Fail once"
313
- msgstr "フェールワンス"
314
-
315
- msgid "Target user"
316
- msgstr "対象ユーザー"
317
-
318
- msgid "Admin only"
319
- msgstr "管理者のみ"
320
-
321
- #: admin/siteguard-menu-login-lock.php:118
322
- msgid ""
323
- "It is the function to decrease the vulnerability against a password list attack. "
324
- "Even is the login input is correct, the first login must fail. After 5 seconds and later within 60 seconds, "
325
- "another correct login input make login succeed. At the first login failure, the following error message is displayed."
326
- msgstr ""
327
- "リスト攻撃を受けにくくするための機能です。正しいログイン情報を入力しても、"
328
- "1回だけログインが失敗します。"
329
- "5秒以降、60秒以内に再度正しいログイン情報を入力すると、ログインが成功します。"
330
-
331
- msgid "Subject"
332
- msgstr "サブジェクト"
333
-
334
- msgid "Body"
335
- msgstr "メール本文"
336
-
337
- msgid "Recipients"
338
- msgstr "受信者"
339
-
340
- msgid ""
341
- "It is the function to make it easier to notice unauthorized login. E-mail will be sent to a login user when logged in. If you receive an e-mail to there is no logged-in idea, please suspect unauthorized login. The subject and the mail body, the following variables can be used. (Site Name:%SITENAME%, User Name:%USERNAME%, DATE:%DATE%, Time:%TIME%, IP Address:%IPADDRESS%, User-Agent:%USERAGENT%, Referer:%REFERER%) Access by the XML-RPC will not be notified."
342
-
343
- msgstr ""
344
- "不正なログインに気づきやすくするための機能です。ログインすると、ログインユーザーにメールが送信されます。ログインした心当たりがないのにメールを受信した場合は、不正なログインを疑ってください。サブジェクトとメール本文には、次の変数が使用できます。(サイト名:%SITENAME%、ユーザ名:%USERNAME%、日付:%DATE%、時刻:%TIME%、IPアドレス:%IPADDRESS%、ユーザーエージェント:%USERAGENT%、リファラー:%REFERER%)XML-RPCによるアクセスは通知されません。"
345
-
346
- msgid "New login at %SITENAME%"
347
- msgstr "%SITENAME%にログインがありました"
348
-
349
- msgid "%USERNAME% logged in at %DATE% %TIME%\n\n== Login information ==\nIP Address: %IPADDRESS%\nReferer: %REFERER%\nUser-Agent: %USERAGENT%\n\n--\nSiteGuard WP Plugin"
350
- msgstr "%DATE% %TIME%に%USERNAME%がログインしました。\n\n== ログイン情報 ==\nIPアドレス:%IPADDRESS%\nリファラー:%REFERER%\nユーザーエージェント:%USERAGENT%\n\n--\nSiteGuard WP Plugin"
351
-
352
- #: admin/siteguard-menu-rename-login.php:51
353
- msgid "New Login Path"
354
- msgstr "変更後のログインページ名"
355
-
356
- msgid ""
357
- "It is only an alphanumeric character, a hyphen, and an underbar that can be used for New Login Path."
358
- msgstr ""
359
- "変更後のログインページ名に使用できるのは、英数字、ハイフン、アンダーバーのみです。"
360
-
361
- msgid ""
362
- "An alphanumeric character, a hyphen, and an underbar can be used."
363
- msgstr ""
364
- "英数字、ハイフン、アンダーバーが使用できます。"
365
-
366
- msgid " can not be used for New Login Path."
367
- msgstr ""
368
- "は、変更後のログインページ名に指定できません。"
369
-
370
- #: admin/siteguard-menu-rename-login.php:57
371
- msgid ""
372
- "It is the function to decrease the vulnerability against an illegal login "
373
- "attempt attack such as a brute force attack or a password list attack. The login "
374
- "page name (wp-login.php) is changed. The initial value is “login_&lt;5 "
375
- "random digits&gt;” but it can be changed to a favorite name."
376
- msgstr ""
377
- "ブルートフォース攻撃、リスト攻撃等の、不正にログインを試みる攻撃を受けにくくするための機能です。"
378
- "ログインページ(wp-login.php)の名前を変更します。"
379
- "初期値は、「login_&lt;5桁の乱数&gt;」ですが、お好みの名前に変更することができます。"
380
-
381
- msgid "WordPress: Login page URL was changed"
382
- msgstr "WordPress: ログインページURLが変更されました"
383
-
384
- msgid "Please bookmark following of the new login URL.\n\n%s\n\n--\nSiteGuard WP Plugin"
385
- msgstr "以下の新しいログインページURLを、ブックマークしてください。\n\n%s\n\n--\nSiteGuard WP Plugin"
386
-
387
- #: admin/siteguard-menu-sg-whitelist.php:80
388
- msgid "New rule created"
389
- msgstr "新しいルールを作成しました。"
390
-
391
- #: admin/siteguard-menu-sg-whitelist.php:102
392
- msgid "Rule updated"
393
- msgstr "ルールを更新しました。"
394
-
395
- #: admin/siteguard-menu-sg-whitelist.php:118
396
- msgid "Rule deleted"
397
- msgstr "ルールを削除しました。"
398
-
399
- #: admin/siteguard-menu-sg-whitelist.php:125
400
- #: admin/siteguard-menu-sg-whitelist.php:194
401
- msgid ""
402
- "To use the WAF Tuning Support, WAF ( SiteGuard Lite ) should be installed on Apache."
403
- msgstr ""
404
- "この機能を使用するには、WAF (SiteGuard Lite)が、サーバーにインストールされている必要があります。"
405
-
406
- #: admin/siteguard-menu-sg-whitelist.php:134
407
- msgid "Rules applied"
408
- msgstr "ルールを適用しました。"
409
-
410
- #: admin/siteguard-menu-sg-whitelist.php:137
411
- msgid "Rules unapplied"
412
- msgstr "ルールの適用を外しました。"
413
-
414
- #: admin/siteguard-menu-sg-whitelist.php:170
415
- msgid "Add New"
416
- msgstr "新しいルールを追加"
417
-
418
- #: admin/siteguard-menu-sg-whitelist.php:201
419
- msgid ""
420
- "It is the function to create the rule to avoid the false detection in "
421
- "WordPress (including 403 error occurrence with normal access,) if WAF "
422
- "( SiteGuard Lite ) by JP-Secure is installed on a Web server. WAF prevents "
423
- "the attack from the outside against the Web server, but for some WordPress "
424
- "or plugin functions, WAF may detect the attack which is actually not attack "
425
- "and block the function.\n"
426
- "By creating the "
427
- "WAF exclude rule, the WAF protection function can be activated while the false "
428
- "detection for the specified function is prevented."
429
- msgstr ""
430
- "WebサーバーにJP-Secure製のWAF ( SiteGuard Lite ) が導入されている場合に、WordPress内での誤検知(正常なアクセスなのに、403エラーが発生する等)を回避するためのルールを作成する機能です。"
431
- "WAFは、Webサーバーに対する外部からの攻撃を防ぎますが、WordPressの機能や、プラグインの機能によっては、WAFが攻撃でないのに攻撃と判断して、その機能をブロックする場合があります。"
432
- "除外ルールを作成することで、特定の機能での誤検知を防ぎつつ、全体としてのWAFの防御機能を活かすことができます。"
433
-
434
- #: admin/siteguard-menu-sg-whitelist.php:199
435
- msgid "Apply rules"
436
- msgstr "ルールを適用"
437
-
438
- #: admin/siteguard-menu-sg-whitelist.php:207
439
- msgid "WAF Exclude Rule Add"
440
- msgstr "WAF除外ルール 追加"
441
-
442
- #: admin/siteguard-menu-sg-whitelist.php:209
443
- msgid "WAF Exclude Rule Edit"
444
- msgstr "WAF除外ルール 編集"
445
-
446
- #: admin/siteguard-menu-sg-whitelist.php:226
447
- #: admin/siteguard-menu-sg-whitelist.php:268
448
- #: admin/siteguard-sg-whitelist-table.php:59
449
- msgid "Filename"
450
- msgstr "ファイル名"
451
-
452
- msgid "Filename (optional)"
453
- msgstr "ファイル名(任意)"
454
-
455
- msgid "Comment (optional)"
456
- msgstr "コメント(任意)"
457
-
458
- #: admin/siteguard-menu-sg-whitelist.php:215
459
- msgid "Directive Type"
460
- msgstr "ディレクティブ"
461
-
462
- #: admin/siteguard-menu-sg-whitelist.php:223
463
- msgid ""
464
- "Please specify Directory, if Target Path is a file name and it is Files and "
465
- "a directory name. Please specify FilesMatch and DirectoryMatch, when you "
466
- "specify a regular expression."
467
- msgstr ""
468
- "対象パスがディレクトリの場合は、Directoryを、ファイルの場合はFilesを選択してください。"
469
- "正規表現を使用する場合は、FilesMatch, DirectoryMatchを使用してください。"
470
-
471
- #: admin/siteguard-menu-sg-whitelist.php:226
472
- #: admin/siteguard-menu-sg-whitelist.php:268
473
- #: admin/siteguard-sg-whitelist-table.php:60
474
- msgid "Target Path"
475
- msgstr "対象パス"
476
-
477
- #: admin/siteguard-menu-sg-whitelist.php:229
478
- msgid ""
479
- "The target file name is specified. URL ( the part before ? ) can also be "
480
- "pasted."
481
- msgstr ""
482
- "対象のファイル名を指定してください。URL('?'より前の部分)をペーストすることも出来ます。"
483
-
484
- #: admin/siteguard-menu-sg-whitelist.php:232
485
- #: admin/siteguard-sg-whitelist-table.php:62
486
- msgid "Signature"
487
- msgstr "シグネチャ"
488
-
489
- #: admin/siteguard-menu-sg-whitelist.php:235
490
- msgid ""
491
- "The detected signature name or signature ID is specified. To specify more than one, separate them with new line."
492
- msgstr ""
493
- " 検出したシグネチャ名、または、シグネチャIDを指定してください。複数指定する場合は、改行で区切ってください。"
494
-
495
- #: admin/siteguard-menu-sg-whitelist.php:238
496
- #: admin/siteguard-sg-whitelist-table.php:63
497
- msgid "Comment"
498
- msgstr "コメント"
499
-
500
- #: admin/siteguard-menu-sg-whitelist.php:259
501
- msgid "WAF Exclude Rule Delete"
502
- msgstr "WAF除外ルール 削除"
503
-
504
- #: admin/siteguard-menu-sg-whitelist.php:263
505
- msgid "You have specified this rule for deletion:"
506
- msgid_plural "You have specified these rules for deletion:"
507
- msgstr[0] "以下のルールを削除しようとしています。"
508
- msgstr[1] "以下のルールを削除しようとしています。"
509
-
510
- #: admin/siteguard-menu-sg-whitelist.php:274
511
- msgid "Confirm Deletion"
512
- msgstr "削除の確認"
513
-
514
- #: admin/siteguard-menu-sg-whitelist.php:276
515
- msgid "There are no rules selected for deletion."
516
- msgstr "削除するルールが指定されていません。"
517
-
518
- #: admin/siteguard-sg-whitelist-table.php:36
519
- msgid "Edit"
520
- msgstr "編集"
521
-
522
- #: admin/siteguard-sg-whitelist-table.php:37
523
- #: admin/siteguard-sg-whitelist-table.php:80
524
- msgid "Delete"
525
- msgstr "削除"
526
-
527
- #: classes/siteguard-captcha.php:60
528
- msgid ""
529
- "In order to enable this function, it is necessary to install expanded modules"
530
- msgstr ""
531
- "この機能を使用するには、次の拡張モジュールがサーバーにインストールされている必要があります。"
532
-
533
- #: classes/siteguard-captcha.php:71
534
- msgid "in the server."
535
- msgstr ""
536
- " "
537
-
538
- msgid ""
539
- "In order to enable this function, it is necessary to specify Limit to AllowOverride in httpd.conf."
540
- msgstr ""
541
- "この機能を使用するには、httpd.confのAllowOverrideにLimitを指定する必要があります。"
542
-
543
-
544
- #: admin/siteguard-sg-whitelist-table.php:61
545
- msgid "Directive"
546
- msgstr "ディレクティブ"
547
-
548
- #: admin/siteguard-menu-dashboard.php:32
549
- msgid "The management directory (/wp-admin/) is protected against the connection source which does not login."
550
- msgstr "ログインしていない接続元から管理ディレクトリ(/wp-admin/)を守ります。"
551
-
552
- #: admin/siteguard-menu-dashboard.php:37
553
- msgid "The login page name is changed."
554
- msgstr "ログインページ名を変更します。"
555
-
556
- #: admin/siteguard-menu-dashboard.php:42
557
- msgid "CAPTCHA is added to the login page or comment post."
558
- msgstr "ログインページ、コメント投稿に画像認証を追加します。"
559
-
560
- msgid "Instead of the detailed error message at the login error, the single message is returned."
561
- msgstr"ログインエラー時の詳細なエラーメッセージに変えて、単一のメッセージを返します。"
562
-
563
- msgid "The first login must fail even if the input is correct."
564
- msgstr "正しい入力を行っても、ログインを一回失敗します。"
565
-
566
- #: admin/siteguard-menu-dashboard.php:47
567
- msgid "The connection source which repeats login failure is being locked within a certain period."
568
- msgstr "ログイン失敗を繰り返す接続元を一定期間ロックします。"
569
-
570
- msgid "E-mail notifies that there was login."
571
- msgstr "ログインがあったことを、メールで通知します。"
572
-
573
- #: admin/siteguard-menu-dashboard.php:52
574
- msgid "The abuse of pingback is prevented."
575
- msgstr "ピンバックの悪用を防ぎます。"
576
-
577
- #: admin/siteguard-menu-dashboard.php:57
578
- msgid "The exclude rule for WAF (SiteGuard Lite) is created."
579
- msgstr "WAF (SiteGuard Lite)の除外ルールを作成します。"
580
-
581
- #: classes/siteguard-captcha.php:47
582
- msgid "ERROR: Please check the input and resend."
583
- msgstr "エラー: 入力内容を確認の上、もう一度送信してください。"
584
-
585
- #: classes/siteguard-captcha.php:70
586
- msgid "Please input characters displayed above."
587
- msgstr "上に表示された文字を入力してください。"
588
-
589
- #: classes/siteguard-captcha.php:116 classes/siteguard-captcha.php:122
590
- #: classes/siteguard-captcha.php:145
591
- #: classes/siteguard-captcha.php:160
592
- msgid "ERROR: Invalid CAPTCHA."
593
- msgstr "エラー: 画像認証が間違っています。"
594
-
595
- msgid "ERROR: Invalid input value."
596
- msgstr "エラー: 入力値が不正です。"
597
-
598
- #: classes/siteguard-login-history.php:95
599
- msgid "Failed"
600
- msgstr "失敗"
601
-
602
- #: classes/siteguard-login-history.php:96
603
- msgid "Success"
604
- msgstr "成功"
605
-
606
- #: classes/siteguard-login-history.php:97
607
- msgid "1度失敗"
608
- msgstr ""
609
-
610
- #: classes/siteguard-login-history.php:98
611
- msgid "Locked"
612
- msgstr "ロック"
613
-
614
- #: classes/siteguard-login-history.php:99
615
- msgid "Unknown"
616
- msgstr "未定義"
617
-
618
- #: classes/siteguard-captcha.php:46 classes/siteguard-login-lock.php:88
619
- msgid "ERROR: LOGIN LOCKED"
620
- msgstr "エラー: ログインはロックされています。"
621
-
622
- #: classes/siteguard-captcha.php:46 classes/siteguard-login-lock.php:105
623
- msgid "ERROR: Please login entry again"
624
- msgstr "エラー: もう一度ログインしてください。"
625
-
626
- #: classes/siteguard-sg-white-list.php:49
627
- msgid "ERROR: Directive is required"
628
- msgstr "エラー: ディレクティブが未入力です。"
629
-
630
- #: classes/siteguard-sg-white-list.php:58
631
- msgid "ERROR: Unknown Directive"
632
- msgstr "エラー: 未定義のディレクティブ"
633
-
634
- #: classes/siteguard-sg-white-list.php:62
635
- msgid "ERROR: Target Path is required"
636
- msgstr "エラー: 対象パスが未入力です。"
637
-
638
- #: classes/siteguard-sg-white-list.php:65
639
- msgid "ERROR: Signature is required"
640
- msgstr "エラー: シグネチャが未入力です。"
641
-
642
- #: classes/siteguard-sg-white-list.php:68
643
- msgid "ERROR: Syntax Error in Signature"
644
- msgstr "エラー: シグネチャの指定が正しくありません。"
645
-
646
- #: admin/siteguard-menu-init.php:24 admin/siteguard-menu-updates-notify.php:49
647
- msgid "Updates Notify"
648
- msgstr "更新通知"
649
-
650
- #: admin/siteguard-menu-updates-notify.php:67
651
- msgid "Plugins updates"
652
- msgstr "プラグインの更新"
653
-
654
- #: admin/siteguard-menu-updates-notify.php:73
655
- msgid "All plugins"
656
- msgstr "すべてのプラグイン"
657
-
658
- #: admin/siteguard-menu-updates-notify.php:76
659
- msgid "Active plugins only"
660
- msgstr "アクティブなプラグインのみ"
661
-
662
- #: admin/siteguard-menu-updates-notify.php:79
663
- msgid "Themes updates"
664
- msgstr "テーマの更新"
665
-
666
- #: admin/siteguard-menu-updates-notify.php:85
667
- msgid "All themes"
668
- msgstr "すべてのテーマ"
669
-
670
- #: admin/siteguard-menu-updates-notify.php:88
671
- msgid "Active themes only"
672
- msgstr "アクティブなテーマのみ"
673
-
674
- #: admin/siteguard-menu-updates-notify.php:93
675
- msgid ""
676
- "If WordPress core, plugins, and themes updates are needed , sends email to "
677
- "notify administrators."
678
- msgstr ""
679
- "WordPress、プラグイン、テーマの更新が必要になった場合に、管理者にメールで通知します。"
680
-
681
- msgid ""
682
- "Basic of security is that always you use the latest version. If WordPress "
683
- "core, plugins, and themes updates are needed , sends email to notify "
684
- "administrators. Check for updates will be run every 24 hours."
685
- msgstr ""
686
- "セキュリティの基本は、常に最新のバージョンを使用することです。"
687
- "WordPress、プラグイン、テーマの更新が必要になった場合に、管理者にメールで通知します。"
688
- "更新の確認は、24時間毎に実行されます。"
689
-
690
- #: classes/siteguard-updates-notify.php:57
691
- msgid "There are updates available for your WordPress site:"
692
- msgstr "あなたのWordPressサイトで、実行可能な更新があります。"
693
-
694
- #: classes/siteguard-updates-notify.php:58
695
- msgid "Please visit %s to update."
696
- msgstr "次のページで、更新を行なって下さい。: %s"
697
-
698
- #: classes/siteguard-updates-notify.php:75
699
- msgid "WP-Core: WordPress is out of date. Please update from version %s to %s"
700
- msgstr "WordPressの新しいバージョンがあります。%sから%sへ更新してください。"
701
-
702
- #: classes/siteguard-updates-notify.php:110
703
- msgid "Plugin: %s is out of date. Please update from version %s to %s"
704
- msgstr "プラグイン:%s は、新しいバージョンがあります。%sから%sへ更新してください。"
705
-
706
- #: classes/siteguard-updates-notify.php:111
707
- msgid "Details: %s"
708
- msgstr "詳細:%s"
709
-
710
- #: classes/siteguard-updates-notify.php:112
711
- msgid "Changelog: %s%s"
712
- msgstr "更新ログ:%s%s"
713
-
714
- #: classes/siteguard-updates-notify.php:123
715
- msgid "Compatibility: %s"
716
- msgstr "互換性: %s"
717
-
718
- #: classes/siteguard-updates-notify.php:156
719
- msgid "Theme: %s is out of date. Please update from version %s to %s"
720
- msgstr "テーマ:%s は、新しいバージョンが有ります。%sから%sへ更新してください。"
721
-
722
- #: classes/siteguard-updates-notify.php:201
723
- msgid "WordPress: Updates Available @ %s"
724
- msgstr "WordPress: 更新通知 @ %s"
725
-
726
- msgid "WordPress updates"
727
- msgstr "WordPressの更新"
728
-
729
- msgid ""
730
- "DISABLE_WP_CRON is defined true. This function can't be used."
731
- msgstr ""
732
- "DISABLE_WP_CRONがtrueと定義されています。この機能は使用できません。"
733
-
734
- msgid ""
735
- "Please solve the problem that can not be accessed wp-cron.php. Might be access control."
736
- msgstr ""
737
- "wp-cron.phpにアクセスできない問題を解決してください。アクセス制御が関係している可能性があります。"
738
-
739
- #. Plugin URI of the plugin/theme
740
- #: admin/siteguard-menu-dashboard.php
741
- msgid "http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index_en.html"
742
- msgstr "http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index.html"
743
-
744
- #. Description of the plugin/theme
745
- msgid ""
746
- "Only installing SiteGuard WP Plugin on WordPress, its security can be improved. "
747
- "SiteGurad WP Plugin is the plugin specialized for the protection against the attack to the management page and login. "
748
- "It also have the function to create the exclude rule for WAF (SiteGuard Lite, to use it, WAF should be installed on the Web server.)"
749
- msgstr ""
750
- "SiteGuard WP Pluginは、WordPressにインストールするだけで、セキュリティを向上させることができます。"
751
- "SiteGurad WP Pluginは、管理ページとログインに関する攻撃からの防御に特化したセキュリティプラグインです。"
752
- "WAF ( SiteGuard Lite )の除外ルールを作成する機能もあります。( 使用するにはWAFがWebサーバーにインストールされている必要があります )"
753
-
754
- #. Author of the plugin/theme
755
- msgid "JP-Secure"
756
- msgstr "ジェイピー・セキュア"
757
-
758
- #. Author URI of the plugin/theme
759
- msgid "http://www.jp-secure.com/eng/"
760
- msgstr "http://www.jp-secure.com/"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/siteguard.pot DELETED
@@ -1,802 +0,0 @@
1
- # Copyright (C) 2015 SiteGuard WP Plugin
2
- # This file is distributed under the same license as the SiteGuard WP Plugin package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: SiteGuard WP Plugin 1.2.0\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/siteguard\n"
7
- "POT-Creation-Date: 2015-01-23 07:41:14+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
12
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
- "Language-Team: LANGUAGE <LL@li.org>\n"
14
-
15
- #: admin/siteguard-login-history-table.php:35
16
- msgid "Date Time"
17
- msgstr ""
18
-
19
- #: admin/siteguard-login-history-table.php:36
20
- msgid "Operation"
21
- msgstr ""
22
-
23
- #: admin/siteguard-login-history-table.php:37
24
- msgid "Login Name"
25
- msgstr ""
26
-
27
- #: admin/siteguard-login-history-table.php:38
28
- msgid "IP Address"
29
- msgstr ""
30
-
31
- #: admin/siteguard-menu-admin-filter.php:32
32
- #: admin/siteguard-menu-admin-filter.php:86
33
- #: admin/siteguard-menu-rename-login.php:19
34
- #: admin/siteguard-menu-rename-login.php:99
35
- msgid "To use this function, “mod_rewrite” should be loaded on Apache."
36
- msgstr ""
37
-
38
- #: admin/siteguard-menu-admin-filter.php:42
39
- #: admin/siteguard-menu-captcha.php:44
40
- #: admin/siteguard-menu-disable-pingback.php:16
41
- #: admin/siteguard-menu-fail-once.php:19
42
- #: admin/siteguard-menu-login-alert.php:23
43
- #: admin/siteguard-menu-login-lock.php:44
44
- #: admin/siteguard-menu-rename-login.php:29
45
- #: admin/siteguard-menu-same-error.php:26
46
- #: admin/siteguard-menu-updates-notify.php:32
47
- #: admin/siteguard-menu-waf-tuning-support.php:143
48
- #: classes/siteguard-waf-exclude-rule.php:48
49
- #: classes/siteguard-waf-exclude-rule.php:141
50
- #: classes/siteguard-waf-exclude-rule.php:147
51
- msgid "ERROR: Invalid input value."
52
- msgstr ""
53
-
54
- #: admin/siteguard-menu-admin-filter.php:60
55
- #: admin/siteguard-menu-captcha.php:61
56
- #: admin/siteguard-menu-disable-pingback.php:25
57
- #: admin/siteguard-menu-fail-once.php:34
58
- #: admin/siteguard-menu-login-alert.php:42
59
- #: admin/siteguard-menu-login-lock.php:59
60
- #: admin/siteguard-menu-rename-login.php:74
61
- #: admin/siteguard-menu-same-error.php:35
62
- #: admin/siteguard-menu-updates-notify.php:61
63
- msgid "Options saved."
64
- msgstr ""
65
-
66
- #: admin/siteguard-menu-admin-filter.php:67
67
- #: admin/siteguard-menu-dashboard.php:37 admin/siteguard-menu-init.php:16
68
- msgid "Admin Page IP Filter"
69
- msgstr ""
70
-
71
- #: admin/siteguard-menu-admin-filter.php:72
72
- #: admin/siteguard-menu-captcha.php:73
73
- #: admin/siteguard-menu-disable-pingback.php:38
74
- #: admin/siteguard-menu-fail-once.php:46
75
- #: admin/siteguard-menu-login-alert.php:54
76
- #: admin/siteguard-menu-login-lock.php:71
77
- #: admin/siteguard-menu-rename-login.php:86
78
- #: admin/siteguard-menu-same-error.php:47
79
- #: admin/siteguard-menu-updates-notify.php:73
80
- #: admin/siteguard-menu-waf-tuning-support.php:194
81
- msgid "Enable/Disable"
82
- msgstr ""
83
-
84
- #: admin/siteguard-menu-admin-filter.php:77
85
- #: admin/siteguard-menu-captcha.php:78
86
- #: admin/siteguard-menu-disable-pingback.php:43
87
- #: admin/siteguard-menu-fail-once.php:51
88
- #: admin/siteguard-menu-login-alert.php:59
89
- #: admin/siteguard-menu-login-lock.php:76
90
- #: admin/siteguard-menu-rename-login.php:91
91
- #: admin/siteguard-menu-same-error.php:52
92
- #: admin/siteguard-menu-updates-notify.php:78
93
- #: admin/siteguard-menu-waf-tuning-support.php:199
94
- msgid "ON"
95
- msgstr ""
96
-
97
- #: admin/siteguard-menu-admin-filter.php:81
98
- #: admin/siteguard-menu-captcha.php:81
99
- #: admin/siteguard-menu-disable-pingback.php:46
100
- #: admin/siteguard-menu-fail-once.php:54
101
- #: admin/siteguard-menu-login-alert.php:62
102
- #: admin/siteguard-menu-login-lock.php:79
103
- #: admin/siteguard-menu-rename-login.php:94
104
- #: admin/siteguard-menu-same-error.php:55
105
- #: admin/siteguard-menu-updates-notify.php:81
106
- #: admin/siteguard-menu-waf-tuning-support.php:202
107
- msgid "OFF"
108
- msgstr ""
109
-
110
- #: admin/siteguard-menu-admin-filter.php:91
111
- msgid "Exclude Path"
112
- msgstr ""
113
-
114
- #: admin/siteguard-menu-admin-filter.php:93
115
- msgid ""
116
- "The path of /wp-admin/ henceforth is specified. To specify more than one, "
117
- "separate them with new line. "
118
- msgstr ""
119
-
120
- #: admin/siteguard-menu-admin-filter.php:98
121
- msgid ""
122
- "It is the function for the protection against the attack to the management "
123
- "page (under /wp-admin/.) To the access from the connection source IP address "
124
- "which does not login to the management page, 404 (Not Found) is returned. At "
125
- "the login, the connection source IP address is recorded and the access to "
126
- "that page is allowed. The connection source IP address which does not login "
127
- "for more than 24 hours is sequentially deleted. The URL (under /wp-admin/) "
128
- "where this function is excluded can be specified."
129
- msgstr ""
130
-
131
- #: admin/siteguard-menu-captcha.php:68 admin/siteguard-menu-dashboard.php:47
132
- #: admin/siteguard-menu-init.php:18
133
- msgid "CAPTCHA"
134
- msgstr ""
135
-
136
- #: admin/siteguard-menu-captcha.php:94
137
- msgid "Login page"
138
- msgstr ""
139
-
140
- #: admin/siteguard-menu-captcha.php:97 admin/siteguard-menu-captcha.php:109
141
- #: admin/siteguard-menu-captcha.php:121 admin/siteguard-menu-captcha.php:133
142
- msgid "Hiragana (Japanese)"
143
- msgstr ""
144
-
145
- #: admin/siteguard-menu-captcha.php:100 admin/siteguard-menu-captcha.php:112
146
- #: admin/siteguard-menu-captcha.php:124 admin/siteguard-menu-captcha.php:136
147
- msgid "Alphanumeric"
148
- msgstr ""
149
-
150
- #: admin/siteguard-menu-captcha.php:103 admin/siteguard-menu-captcha.php:115
151
- #: admin/siteguard-menu-captcha.php:127 admin/siteguard-menu-captcha.php:139
152
- #: admin/siteguard-menu-updates-notify.php:97
153
- #: admin/siteguard-menu-updates-notify.php:106
154
- #: admin/siteguard-menu-updates-notify.php:118
155
- msgid "Disable"
156
- msgstr ""
157
-
158
- #: admin/siteguard-menu-captcha.php:106
159
- msgid "Comment page"
160
- msgstr ""
161
-
162
- #: admin/siteguard-menu-captcha.php:118
163
- msgid "Lost password page"
164
- msgstr ""
165
-
166
- #: admin/siteguard-menu-captcha.php:130
167
- msgid "Registration user page"
168
- msgstr ""
169
-
170
- #: admin/siteguard-menu-captcha.php:144
171
- msgid ""
172
- "It is the function to decrease the vulnerability against an illegal login "
173
- "attempt attack such as a brute force attack or a password list attack, or to "
174
- "receive less comment spam. For the character of CAPTCHA, hiragana and "
175
- "alphanumeric characters can be selected."
176
- msgstr ""
177
-
178
- #: admin/siteguard-menu-dashboard.php:27 admin/siteguard-menu-init.php:15
179
- msgid "Dashboard"
180
- msgstr ""
181
-
182
- #: admin/siteguard-menu-dashboard.php:29
183
- msgid ""
184
- "You can find docs, FAQ and more detailed information about SiteGuard WP "
185
- "Plugin on "
186
- msgstr ""
187
-
188
- #. #-#-#-#-# siteguard.pot (SiteGuard WP Plugin 1.2.0) #-#-#-#-#
189
- #. Plugin URI of the plugin/theme
190
- #: admin/siteguard-menu-dashboard.php:30
191
- msgid ""
192
- "http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index_en.html"
193
- msgstr ""
194
-
195
- #: admin/siteguard-menu-dashboard.php:30
196
- msgid "SiteGuard WP Plugin Page"
197
- msgstr ""
198
-
199
- #: admin/siteguard-menu-dashboard.php:30
200
- msgid "."
201
- msgstr ""
202
-
203
- #: admin/siteguard-menu-dashboard.php:31
204
- msgid "Setting status"
205
- msgstr ""
206
-
207
- #: admin/siteguard-menu-dashboard.php:38
208
- msgid ""
209
- "The management directory (/wp-admin/) is protected against the connection "
210
- "source which does not login."
211
- msgstr ""
212
-
213
- #: admin/siteguard-menu-dashboard.php:42 admin/siteguard-menu-init.php:17
214
- #: admin/siteguard-menu-rename-login.php:81
215
- msgid "Rename Login"
216
- msgstr ""
217
-
218
- #: admin/siteguard-menu-dashboard.php:43
219
- msgid "The login page name is changed."
220
- msgstr ""
221
-
222
- #: admin/siteguard-menu-dashboard.php:48
223
- msgid "CAPTCHA is added to the login page or comment post."
224
- msgstr ""
225
-
226
- #: admin/siteguard-menu-dashboard.php:52 admin/siteguard-menu-init.php:19
227
- #: admin/siteguard-menu-same-error.php:42
228
- msgid "Same Login Error Message"
229
- msgstr ""
230
-
231
- #: admin/siteguard-menu-dashboard.php:53
232
- msgid ""
233
- "Instead of the detailed error message at the login error, the single message "
234
- "is returned."
235
- msgstr ""
236
-
237
- #: admin/siteguard-menu-dashboard.php:57 admin/siteguard-menu-init.php:20
238
- #: admin/siteguard-menu-login-lock.php:66
239
- msgid "Login Lock"
240
- msgstr ""
241
-
242
- #: admin/siteguard-menu-dashboard.php:58
243
- msgid ""
244
- "The connection source which repeats login failure is being locked within a "
245
- "certain period."
246
- msgstr ""
247
-
248
- #: admin/siteguard-menu-dashboard.php:62 admin/siteguard-menu-init.php:21
249
- #: admin/siteguard-menu-login-alert.php:49
250
- msgid "Login Alert"
251
- msgstr ""
252
-
253
- #: admin/siteguard-menu-dashboard.php:63
254
- msgid "E-mail notifies that there was login."
255
- msgstr ""
256
-
257
- #: admin/siteguard-menu-dashboard.php:67 admin/siteguard-menu-fail-once.php:41
258
- #: admin/siteguard-menu-init.php:22 classes/siteguard-login-history.php:100
259
- msgid "Fail once"
260
- msgstr ""
261
-
262
- #: admin/siteguard-menu-dashboard.php:68
263
- msgid "The first login must fail even if the input is correct."
264
- msgstr ""
265
-
266
- #: admin/siteguard-menu-dashboard.php:72
267
- #: admin/siteguard-menu-disable-pingback.php:32
268
- #: admin/siteguard-menu-init.php:23
269
- msgid "Disable Pingback"
270
- msgstr ""
271
-
272
- #: admin/siteguard-menu-dashboard.php:73
273
- msgid "The abuse of pingback is prevented."
274
- msgstr ""
275
-
276
- #: admin/siteguard-menu-dashboard.php:77 admin/siteguard-menu-init.php:24
277
- #: admin/siteguard-menu-updates-notify.php:68
278
- msgid "Updates Notify"
279
- msgstr ""
280
-
281
- #: admin/siteguard-menu-dashboard.php:78
282
- msgid ""
283
- "If WordPress core, plugins, and themes updates are needed , sends email to "
284
- "notify administrators."
285
- msgstr ""
286
-
287
- #: admin/siteguard-menu-dashboard.php:82 admin/siteguard-menu-init.php:25
288
- #: admin/siteguard-menu-waf-tuning-support.php:189
289
- msgid "WAF Tuning Support"
290
- msgstr ""
291
-
292
- #: admin/siteguard-menu-dashboard.php:83
293
- msgid "The exclude rule for WAF (SiteGuard Lite) is created."
294
- msgstr ""
295
-
296
- #: admin/siteguard-menu-dashboard.php:88
297
- msgid "Login history"
298
- msgstr ""
299
-
300
- #: admin/siteguard-menu-disable-pingback.php:54
301
- msgid "The pingback function is disabled and its abuse is prevented."
302
- msgstr ""
303
-
304
- #: admin/siteguard-menu-fail-once.php:60
305
- msgid "Target user"
306
- msgstr ""
307
-
308
- #: admin/siteguard-menu-fail-once.php:63
309
- #: admin/siteguard-menu-login-alert.php:80
310
- msgid "Admin only"
311
- msgstr ""
312
-
313
- #: admin/siteguard-menu-fail-once.php:69
314
- msgid ""
315
- "It is the function to decrease the vulnerability against a password list "
316
- "attack. Even is the login input is correct, the first login must fail. After "
317
- "5 seconds and later within 60 seconds, another correct login input make "
318
- "login succeed. At the first login failure, the following error message is "
319
- "displayed."
320
- msgstr ""
321
-
322
- #: admin/siteguard-menu-init.php:14
323
- msgid "SiteGuard"
324
- msgstr ""
325
-
326
- #: admin/siteguard-menu-login-alert.php:67
327
- msgid "Subject"
328
- msgstr ""
329
-
330
- #: admin/siteguard-menu-login-alert.php:72
331
- msgid "Body"
332
- msgstr ""
333
-
334
- #: admin/siteguard-menu-login-alert.php:77
335
- msgid "Recipients"
336
- msgstr ""
337
-
338
- #: admin/siteguard-menu-login-alert.php:86
339
- msgid ""
340
- "It is the function to make it easier to notice unauthorized login. E-mail "
341
- "will be sent to a login user when logged in. If you receive an e-mail to "
342
- "there is no logged-in idea, please suspect unauthorized login. The subject "
343
- "and the mail body, the following variables can be used. (Site Name:%SITENAME"
344
- "%, User Name:%USERNAME%, DATE:%DATE%, Time:%TIME%, IP Address:%IPADDRESS%, "
345
- "User-Agent:%USERAGENT%, Referer:%REFERER%) Access by the XML-RPC will not be "
346
- "notified."
347
- msgstr ""
348
-
349
- #: admin/siteguard-menu-login-lock.php:84
350
- msgid "Interval"
351
- msgstr ""
352
-
353
- #: admin/siteguard-menu-login-lock.php:87
354
- msgid "1 second"
355
- msgstr ""
356
-
357
- #: admin/siteguard-menu-login-lock.php:90
358
- msgid "5 seconds"
359
- msgstr ""
360
-
361
- #: admin/siteguard-menu-login-lock.php:93
362
- #: admin/siteguard-menu-login-lock.php:111
363
- msgid "30 seconds"
364
- msgstr ""
365
-
366
- #: admin/siteguard-menu-login-lock.php:96
367
- msgid "Threshold"
368
- msgstr ""
369
-
370
- #: admin/siteguard-menu-login-lock.php:99
371
- msgid "3 times"
372
- msgstr ""
373
-
374
- #: admin/siteguard-menu-login-lock.php:102
375
- msgid "10 times"
376
- msgstr ""
377
-
378
- #: admin/siteguard-menu-login-lock.php:105
379
- msgid "100 times"
380
- msgstr ""
381
-
382
- #: admin/siteguard-menu-login-lock.php:108
383
- msgid "Lock Time"
384
- msgstr ""
385
-
386
- #: admin/siteguard-menu-login-lock.php:114
387
- msgid "1 minute"
388
- msgstr ""
389
-
390
- #: admin/siteguard-menu-login-lock.php:117
391
- msgid "5 minutes"
392
- msgstr ""
393
-
394
- #: admin/siteguard-menu-login-lock.php:122
395
- msgid ""
396
- "It is the function to decrease the vulnerability against an illegal login "
397
- "attempt attack such as a brute force attack or a password list attack. "
398
- "Especially, it is the function to prevent an automated attack. The "
399
- "connection source IP address the number of login failure of which reaches "
400
- "the specified number within the specified period is blocked for the "
401
- "specified time. Each user account is not locked."
402
- msgstr ""
403
-
404
- #: admin/siteguard-menu-rename-login.php:37
405
- msgid "This function and Plugin \""
406
- msgstr ""
407
-
408
- #: admin/siteguard-menu-rename-login.php:37
409
- msgid "\" cannot be used at the same time."
410
- msgstr ""
411
-
412
- #: admin/siteguard-menu-rename-login.php:49
413
- msgid ""
414
- "It is only an alphanumeric character, a hyphen, and an underbar that can be "
415
- "used for New Login Path."
416
- msgstr ""
417
-
418
- #: admin/siteguard-menu-rename-login.php:56
419
- msgid " can not be used for New Login Path."
420
- msgstr ""
421
-
422
- #: admin/siteguard-menu-rename-login.php:104
423
- msgid "New Login Path"
424
- msgstr ""
425
-
426
- #: admin/siteguard-menu-rename-login.php:109
427
- msgid "An alphanumeric character, a hyphen, and an underbar can be used."
428
- msgstr ""
429
-
430
- #: admin/siteguard-menu-rename-login.php:117
431
- msgid ""
432
- "It is the function to decrease the vulnerability against an illegal login "
433
- "attempt attack such as a brute force attack or a password list attack. The "
434
- "login page name (wp-login.php) is changed. The initial value is “login_&lt;5 "
435
- "random digits&gt;” but it can be changed to a favorite name."
436
- msgstr ""
437
-
438
- #: admin/siteguard-menu-same-error.php:63
439
- msgid ""
440
- "It is the function to decrease the vulnerability against the attack to "
441
- "examine if a user name exists. All error messages about the login should be "
442
- "equalized. The single error message is displayed even if anyone of a "
443
- "username, password, or CAPTCHA is wrong."
444
- msgstr ""
445
-
446
- #: admin/siteguard-menu-updates-notify.php:94
447
- msgid "WordPress updates"
448
- msgstr ""
449
-
450
- #: admin/siteguard-menu-updates-notify.php:100
451
- msgid "Enable"
452
- msgstr ""
453
-
454
- #: admin/siteguard-menu-updates-notify.php:103
455
- msgid "Plugins updates"
456
- msgstr ""
457
-
458
- #: admin/siteguard-menu-updates-notify.php:109
459
- msgid "All plugins"
460
- msgstr ""
461
-
462
- #: admin/siteguard-menu-updates-notify.php:112
463
- msgid "Active plugins only"
464
- msgstr ""
465
-
466
- #: admin/siteguard-menu-updates-notify.php:115
467
- msgid "Themes updates"
468
- msgstr ""
469
-
470
- #: admin/siteguard-menu-updates-notify.php:121
471
- msgid "All themes"
472
- msgstr ""
473
-
474
- #: admin/siteguard-menu-updates-notify.php:124
475
- msgid "Active themes only"
476
- msgstr ""
477
-
478
- #: admin/siteguard-menu-updates-notify.php:129
479
- msgid ""
480
- "Basic of security is that always you use the latest version. If WordPress "
481
- "core, plugins, and themes updates are needed , sends email to notify "
482
- "administrators. Check for updates will be run every 24 hours."
483
- msgstr ""
484
-
485
- #: admin/siteguard-menu-waf-tuning-support.php:74
486
- msgid "New rule created"
487
- msgstr ""
488
-
489
- #: admin/siteguard-menu-waf-tuning-support.php:98
490
- msgid "Rule updated"
491
- msgstr ""
492
-
493
- #: admin/siteguard-menu-waf-tuning-support.php:117
494
- msgid "Rule deleted"
495
- msgstr ""
496
-
497
- #: admin/siteguard-menu-waf-tuning-support.php:134
498
- msgid ""
499
- "To use the WAF exclude rule, WAF ( SiteGuard Lite ) should be installed on "
500
- "Apache."
501
- msgstr ""
502
-
503
- #: admin/siteguard-menu-waf-tuning-support.php:152
504
- msgid "Rules applied"
505
- msgstr ""
506
-
507
- #: admin/siteguard-menu-waf-tuning-support.php:155
508
- msgid "Rules unapplied"
509
- msgstr ""
510
-
511
- #: admin/siteguard-menu-waf-tuning-support.php:189
512
- msgid "Add New"
513
- msgstr ""
514
-
515
- #: admin/siteguard-menu-waf-tuning-support.php:207
516
- msgid ""
517
- "To use the WAF Tuning Support, WAF ( SiteGuard Lite ) should be installed on "
518
- "Apache."
519
- msgstr ""
520
-
521
- #: admin/siteguard-menu-waf-tuning-support.php:216
522
- msgid ""
523
- "It is the function to create the rule to avoid the false detection in "
524
- "WordPress (including 403 error occurrence with normal access,) if WAF "
525
- "( SiteGuard Lite ) by JP-Secure is installed on a Web server. WAF prevents "
526
- "the attack from the outside against the Web server, but for some WordPress "
527
- "or plugin functions, WAF may detect the attack which is actually not attack "
528
- "and block the function.\n"
529
- "By creating the WAF exclude rule, the WAF protection function can be "
530
- "activated while the false detection for the specified function is prevented."
531
- msgstr ""
532
-
533
- #: admin/siteguard-menu-waf-tuning-support.php:223
534
- msgid "Apply rules"
535
- msgstr ""
536
-
537
- #: admin/siteguard-menu-waf-tuning-support.php:231
538
- msgid "WAF Exclude Rule Add"
539
- msgstr ""
540
-
541
- #: admin/siteguard-menu-waf-tuning-support.php:233
542
- msgid "WAF Exclude Rule Edit"
543
- msgstr ""
544
-
545
- #: admin/siteguard-menu-waf-tuning-support.php:239
546
- #: admin/siteguard-menu-waf-tuning-support.php:284
547
- #: admin/siteguard-waf-exclude-rule-table.php:59
548
- msgid "Signature"
549
- msgstr ""
550
-
551
- #: admin/siteguard-menu-waf-tuning-support.php:242
552
- msgid ""
553
- "The detected signature name or signature ID is specified. To specify more "
554
- "than one, separate them with new line."
555
- msgstr ""
556
-
557
- #: admin/siteguard-menu-waf-tuning-support.php:246
558
- msgid "Filename (optional)"
559
- msgstr ""
560
-
561
- #: admin/siteguard-menu-waf-tuning-support.php:249
562
- msgid ""
563
- "The target file name is specified. URL ( the part before ? ) can also be "
564
- "pasted."
565
- msgstr ""
566
-
567
- #: admin/siteguard-menu-waf-tuning-support.php:253
568
- msgid "Comment (optional)"
569
- msgstr ""
570
-
571
- #: admin/siteguard-menu-waf-tuning-support.php:265
572
- msgid "Save"
573
- msgstr ""
574
-
575
- #: admin/siteguard-menu-waf-tuning-support.php:275
576
- msgid "WAF Exclude Rule Delete"
577
- msgstr ""
578
-
579
- #: admin/siteguard-menu-waf-tuning-support.php:279
580
- msgid "You have specified this rule for deletion:"
581
- msgid_plural "You have specified these rules for deletion:"
582
- msgstr[0] ""
583
- msgstr[1] ""
584
-
585
- #: admin/siteguard-menu-waf-tuning-support.php:284
586
- #: admin/siteguard-waf-exclude-rule-table.php:60
587
- msgid "Filename"
588
- msgstr ""
589
-
590
- #: admin/siteguard-menu-waf-tuning-support.php:284
591
- #: admin/siteguard-waf-exclude-rule-table.php:61
592
- msgid "Comment"
593
- msgstr ""
594
-
595
- #: admin/siteguard-menu-waf-tuning-support.php:290
596
- msgid "Confirm Deletion"
597
- msgstr ""
598
-
599
- #: admin/siteguard-menu-waf-tuning-support.php:292
600
- msgid "There are no rules selected for deletion."
601
- msgstr ""
602
-
603
- #: admin/siteguard-waf-exclude-rule-table.php:35
604
- msgid "Edit"
605
- msgstr ""
606
-
607
- #: admin/siteguard-waf-exclude-rule-table.php:36
608
- #: admin/siteguard-waf-exclude-rule-table.php:77
609
- msgid "Delete"
610
- msgstr ""
611
-
612
- #: classes/siteguard-captcha.php:71
613
- msgid ""
614
- "In order to enable this function, it is necessary to install expanded modules"
615
- msgstr ""
616
-
617
- #: classes/siteguard-captcha.php:82
618
- msgid "in the server."
619
- msgstr ""
620
-
621
- #: classes/siteguard-captcha.php:98
622
- msgid ""
623
- "In order to enable this function, it is necessary to specify Limit to "
624
- "AllowOverride in httpd.conf."
625
- msgstr ""
626
-
627
- #: classes/siteguard-captcha.php:103 classes/siteguard-login-lock.php:93
628
- msgid "ERROR: LOGIN LOCKED"
629
- msgstr ""
630
-
631
- #: classes/siteguard-captcha.php:103 classes/siteguard-login-lock.php:125
632
- msgid "ERROR: Please login entry again"
633
- msgstr ""
634
-
635
- #: classes/siteguard-captcha.php:104
636
- msgid "ERROR: Please check the input and resend."
637
- msgstr ""
638
-
639
- #: classes/siteguard-captcha.php:139
640
- msgid "Please input characters displayed above."
641
- msgstr ""
642
-
643
- #: classes/siteguard-captcha.php:183 classes/siteguard-captcha.php:187
644
- #: classes/siteguard-captcha.php:204 classes/siteguard-captcha.php:215
645
- msgid "ERROR: Invalid CAPTCHA."
646
- msgstr ""
647
-
648
- #: classes/siteguard-login-alert.php:14
649
- msgid "New login at %SITENAME%"
650
- msgstr ""
651
-
652
- #: classes/siteguard-login-alert.php:15
653
- msgid ""
654
- "%USERNAME% logged in at %DATE% %TIME%\n"
655
- "\n"
656
- "== Login information ==\n"
657
- "IP Address: %IPADDRESS%\n"
658
- "Referer: %REFERER%\n"
659
- "User-Agent: %USERAGENT%\n"
660
- "\n"
661
- "--\n"
662
- "SiteGuard WP Plugin"
663
- msgstr ""
664
-
665
- #: classes/siteguard-login-history.php:94
666
- msgid "Failed"
667
- msgstr ""
668
-
669
- #: classes/siteguard-login-history.php:97
670
- msgid "Success"
671
- msgstr ""
672
-
673
- #: classes/siteguard-login-history.php:103
674
- msgid "Locked"
675
- msgstr ""
676
-
677
- #: classes/siteguard-login-history.php:106
678
- msgid "Unknown"
679
- msgstr ""
680
-
681
- #: classes/siteguard-rename-login.php:143
682
- msgid "WordPress: Login page URL was changed"
683
- msgstr ""
684
-
685
- #: classes/siteguard-rename-login.php:144
686
- msgid ""
687
- "Please bookmark following of the new login URL.\n"
688
- "\n"
689
- "%s\n"
690
- "\n"
691
- "--\n"
692
- "SiteGuard WP Plugin"
693
- msgstr ""
694
-
695
- #: classes/siteguard-updates-notify.php:43
696
- msgid "DISABLE_WP_CRON is defined true. This function can't be used."
697
- msgstr ""
698
-
699
- #: classes/siteguard-updates-notify.php:54
700
- msgid ""
701
- "Please solve the problem that can not be accessed wp-cron.php. Might be "
702
- "access control."
703
- msgstr ""
704
-
705
- #: classes/siteguard-updates-notify.php:91
706
- msgid "There are updates available for your WordPress site:"
707
- msgstr ""
708
-
709
- #: classes/siteguard-updates-notify.php:92
710
- msgid "Please visit %s to update."
711
- msgstr ""
712
-
713
- #: classes/siteguard-updates-notify.php:109
714
- msgid "WP-Core: WordPress is out of date. Please update from version %s to %s"
715
- msgstr ""
716
-
717
- #: classes/siteguard-updates-notify.php:144
718
- msgid "Plugin: %s is out of date. Please update from version %s to %s"
719
- msgstr ""
720
-
721
- #: classes/siteguard-updates-notify.php:145
722
- msgid "Details: %s"
723
- msgstr ""
724
-
725
- #: classes/siteguard-updates-notify.php:146
726
- msgid "Changelog: %s%s"
727
- msgstr ""
728
-
729
- #: classes/siteguard-updates-notify.php:148
730
- msgid "Compatibility with WordPress %1$s: 100%% (according to its author)"
731
- msgstr ""
732
-
733
- #: classes/siteguard-updates-notify.php:152
734
- msgid ""
735
- "Compatibility with WordPress %1$s: %2$d%% (%3$d \"works\" votes out of %4$d "
736
- "total)"
737
- msgstr ""
738
-
739
- #: classes/siteguard-updates-notify.php:155
740
- msgid "Compatibility with WordPress %1$s: Unknown"
741
- msgstr ""
742
-
743
- #: classes/siteguard-updates-notify.php:157
744
- msgid "Compatibility: %s"
745
- msgstr ""
746
-
747
- #: classes/siteguard-updates-notify.php:190
748
- msgid "Theme: %s is out of date. Please update from version %s to %s"
749
- msgstr ""
750
-
751
- #: classes/siteguard-updates-notify.php:240
752
- msgid "WordPress: Updates Available @ %s"
753
- msgstr ""
754
-
755
- #: classes/siteguard-waf-exclude-rule.php:51
756
- msgid "ERROR: Signature is required"
757
- msgstr ""
758
-
759
- #: classes/siteguard-waf-exclude-rule.php:60
760
- msgid "ERROR: Syntax Error in Signature"
761
- msgstr ""
762
-
763
- #: siteguard.php:141
764
- msgid "Login page URL was changed."
765
- msgstr ""
766
-
767
- #: siteguard.php:143
768
- msgid " Please bookmark "
769
- msgstr ""
770
-
771
- #: siteguard.php:144
772
- msgid "new login URL"
773
- msgstr ""
774
-
775
- #: siteguard.php:145
776
- msgid ". Setting change is "
777
- msgstr ""
778
-
779
- #: siteguard.php:146
780
- msgid "here"
781
- msgstr ""
782
-
783
- #. Plugin Name of the plugin/theme
784
- msgid "SiteGuard WP Plugin"
785
- msgstr ""
786
-
787
- #. Description of the plugin/theme
788
- msgid ""
789
- "Only installing SiteGuard WP Plugin on WordPress, its security can be "
790
- "improved. SiteGurad WP Plugin is the plugin specialized for the protection "
791
- "against the attack to the management page and login. It also have the "
792
- "function to create the exclude rule for WAF (SiteGuard Lite, to use it, WAF "
793
- "should be installed on the Web server.)"
794
- msgstr ""
795
-
796
- #. Author of the plugin/theme
797
- msgid "JP-Secure"
798
- msgstr ""
799
-
800
- #. Author URI of the plugin/theme
801
- msgid "http://www.jp-secure.com/eng/"
802
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/license.txt DELETED
@@ -1,674 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
- Preamble
9
-
10
- The GNU General Public License is a free, copyleft license for
11
- software and other kinds of works.
12
-
13
- The licenses for most software and other practical works are designed
14
- to take away your freedom to share and change the works. By contrast,
15
- the GNU General Public License is intended to guarantee your freedom to
16
- share and change all versions of a program--to make sure it remains free
17
- software for all its users. We, the Free Software Foundation, use the
18
- GNU General Public License for most of our software; it applies also to
19
- any other work released this way by its authors. You can apply it to
20
- your programs, too.
21
-
22
- When we speak of free software, we are referring to freedom, not
23
- price. Our General Public Licenses are designed to make sure that you
24
- have the freedom to distribute copies of free software (and charge for
25
- them if you wish), that you receive source code or can get it if you
26
- want it, that you can change the software or use pieces of it in new
27
- free programs, and that you know you can do these things.
28
-
29
- To protect your rights, we need to prevent others from denying you
30
- these rights or asking you to surrender the rights. Therefore, you have
31
- certain responsibilities if you distribute copies of the software, or if
32
- you modify it: responsibilities to respect the freedom of others.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must pass on to the recipients the same
36
- freedoms that you received. You must make sure that they, too, receive
37
- or can get the source code. And you must show them these terms so they
38
- know their rights.
39
-
40
- Developers that use the GNU GPL protect your rights with two steps:
41
- (1) assert copyright on the software, and (2) offer you this License
42
- giving you legal permission to copy, distribute and/or modify it.
43
-
44
- For the developers' and authors' protection, the GPL clearly explains
45
- that there is no warranty for this free software. For both users' and
46
- authors' sake, the GPL requires that modified versions be marked as
47
- changed, so that their problems will not be attributed erroneously to
48
- authors of previous versions.
49
-
50
- Some devices are designed to deny users access to install or run
51
- modified versions of the software inside them, although the manufacturer
52
- can do so. This is fundamentally incompatible with the aim of
53
- protecting users' freedom to change the software. The systematic
54
- pattern of such abuse occurs in the area of products for individuals to
55
- use, which is precisely where it is most unacceptable. Therefore, we
56
- have designed this version of the GPL to prohibit the practice for those
57
- products. If such problems arise substantially in other domains, we
58
- stand ready to extend this provision to those domains in future versions
59
- of the GPL, as needed to protect the freedom of users.
60
-
61
- Finally, every program is threatened constantly by software patents.
62
- States should not allow patents to restrict development and use of
63
- software on general-purpose computers, but in those that do, we wish to
64
- avoid the special danger that patents applied to a free program could
65
- make it effectively proprietary. To prevent this, the GPL assures that
66
- patents cannot be used to render the program non-free.
67
-
68
- The precise terms and conditions for copying, distribution and
69
- modification follow.
70
-
71
- TERMS AND CONDITIONS
72
-
73
- 0. Definitions.
74
-
75
- "This License" refers to version 3 of the GNU General Public License.
76
-
77
- "Copyright" also means copyright-like laws that apply to other kinds of
78
- works, such as semiconductor masks.
79
-
80
- "The Program" refers to any copyrightable work licensed under this
81
- License. Each licensee is addressed as "you". "Licensees" and
82
- "recipients" may be individuals or organizations.
83
-
84
- To "modify" a work means to copy from or adapt all or part of the work
85
- in a fashion requiring copyright permission, other than the making of an
86
- exact copy. The resulting work is called a "modified version" of the
87
- earlier work or a work "based on" the earlier work.
88
-
89
- A "covered work" means either the unmodified Program or a work based
90
- on the Program.
91
-
92
- To "propagate" a work means to do anything with it that, without
93
- permission, would make you directly or secondarily liable for
94
- infringement under applicable copyright law, except executing it on a
95
- computer or modifying a private copy. Propagation includes copying,
96
- distribution (with or without modification), making available to the
97
- public, and in some countries other activities as well.
98
-
99
- To "convey" a work means any kind of propagation that enables other
100
- parties to make or receive copies. Mere interaction with a user through
101
- a computer network, with no transfer of a copy, is not conveying.
102
-
103
- An interactive user interface displays "Appropriate Legal Notices"
104
- to the extent that it includes a convenient and prominently visible
105
- feature that (1) displays an appropriate copyright notice, and (2)
106
- tells the user that there is no warranty for the work (except to the
107
- extent that warranties are provided), that licensees may convey the
108
- work under this License, and how to view a copy of this License. If
109
- the interface presents a list of user commands or options, such as a
110
- menu, a prominent item in the list meets this criterion.
111
-
112
- 1. Source Code.
113
-
114
- The "source code" for a work means the preferred form of the work
115
- for making modifications to it. "Object code" means any non-source
116
- form of a work.
117
-
118
- A "Standard Interface" means an interface that either is an official
119
- standard defined by a recognized standards body, or, in the case of
120
- interfaces specified for a particular programming language, one that
121
- is widely used among developers working in that language.
122
-
123
- The "System Libraries" of an executable work include anything, other
124
- than the work as a whole, that (a) is included in the normal form of
125
- packaging a Major Component, but which is not part of that Major
126
- Component, and (b) serves only to enable use of the work with that
127
- Major Component, or to implement a Standard Interface for which an
128
- implementation is available to the public in source code form. A
129
- "Major Component", in this context, means a major essential component
130
- (kernel, window system, and so on) of the specific operating system
131
- (if any) on which the executable work runs, or a compiler used to
132
- produce the work, or an object code interpreter used to run it.
133
-
134
- The "Corresponding Source" for a work in object code form means all
135
- the source code needed to generate, install, and (for an executable
136
- work) run the object code and to modify the work, including scripts to
137
- control those activities. However, it does not include the work's
138
- System Libraries, or general-purpose tools or generally available free
139
- programs which are used unmodified in performing those activities but
140
- which are not part of the work. For example, Corresponding Source
141
- includes interface definition files associated with source files for
142
- the work, and the source code for shared libraries and dynamically
143
- linked subprograms that the work is specifically designed to require,
144
- such as by intimate data communication or control flow between those
145
- subprograms and other parts of the work.
146
-
147
- The Corresponding Source need not include anything that users
148
- can regenerate automatically from other parts of the Corresponding
149
- Source.
150
-
151
- The Corresponding Source for a work in source code form is that
152
- same work.
153
-
154
- 2. Basic Permissions.
155
-
156
- All rights granted under this License are granted for the term of
157
- copyright on the Program, and are irrevocable provided the stated
158
- conditions are met. This License explicitly affirms your unlimited
159
- permission to run the unmodified Program. The output from running a
160
- covered work is covered by this License only if the output, given its
161
- content, constitutes a covered work. This License acknowledges your
162
- rights of fair use or other equivalent, as provided by copyright law.
163
-
164
- You may make, run and propagate covered works that you do not
165
- convey, without conditions so long as your license otherwise remains
166
- in force. You may convey covered works to others for the sole purpose
167
- of having them make modifications exclusively for you, or provide you
168
- with facilities for running those works, provided that you comply with
169
- the terms of this License in conveying all material for which you do
170
- not control copyright. Those thus making or running the covered works
171
- for you must do so exclusively on your behalf, under your direction
172
- and control, on terms that prohibit them from making any copies of
173
- your copyrighted material outside their relationship with you.
174
-
175
- Conveying under any other circumstances is permitted solely under
176
- the conditions stated below. Sublicensing is not allowed; section 10
177
- makes it unnecessary.
178
-
179
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
-
181
- No covered work shall be deemed part of an effective technological
182
- measure under any applicable law fulfilling obligations under article
183
- 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
- similar laws prohibiting or restricting circumvention of such
185
- measures.
186
-
187
- When you convey a covered work, you waive any legal power to forbid
188
- circumvention of technological measures to the extent such circumvention
189
- is effected by exercising rights under this License with respect to
190
- the covered work, and you disclaim any intention to limit operation or
191
- modification of the work as a means of enforcing, against the work's
192
- users, your or third parties' legal rights to forbid circumvention of
193
- technological measures.
194
-
195
- 4. Conveying Verbatim Copies.
196
-
197
- You may convey verbatim copies of the Program's source code as you
198
- receive it, in any medium, provided that you conspicuously and
199
- appropriately publish on each copy an appropriate copyright notice;
200
- keep intact all notices stating that this License and any
201
- non-permissive terms added in accord with section 7 apply to the code;
202
- keep intact all notices of the absence of any warranty; and give all
203
- recipients a copy of this License along with the Program.
204
-
205
- You may charge any price or no price for each copy that you convey,
206
- and you may offer support or warranty protection for a fee.
207
-
208
- 5. Conveying Modified Source Versions.
209
-
210
- You may convey a work based on the Program, or the modifications to
211
- produce it from the Program, in the form of source code under the
212
- terms of section 4, provided that you also meet all of these conditions:
213
-
214
- a) The work must carry prominent notices stating that you modified
215
- it, and giving a relevant date.
216
-
217
- b) The work must carry prominent notices stating that it is
218
- released under this License and any conditions added under section
219
- 7. This requirement modifies the requirement in section 4 to
220
- "keep intact all notices".
221
-
222
- c) You must license the entire work, as a whole, under this
223
- License to anyone who comes into possession of a copy. This
224
- License will therefore apply, along with any applicable section 7
225
- additional terms, to the whole of the work, and all its parts,
226
- regardless of how they are packaged. This License gives no
227
- permission to license the work in any other way, but it does not
228
- invalidate such permission if you have separately received it.
229
-
230
- d) If the work has interactive user interfaces, each must display
231
- Appropriate Legal Notices; however, if the Program has interactive
232
- interfaces that do not display Appropriate Legal Notices, your
233
- work need not make them do so.
234
-
235
- A compilation of a covered work with other separate and independent
236
- works, which are not by their nature extensions of the covered work,
237
- and which are not combined with it such as to form a larger program,
238
- in or on a volume of a storage or distribution medium, is called an
239
- "aggregate" if the compilation and its resulting copyright are not
240
- used to limit the access or legal rights of the compilation's users
241
- beyond what the individual works permit. Inclusion of a covered work
242
- in an aggregate does not cause this License to apply to the other
243
- parts of the aggregate.
244
-
245
- 6. Conveying Non-Source Forms.
246
-
247
- You may convey a covered work in object code form under the terms
248
- of sections 4 and 5, provided that you also convey the
249
- machine-readable Corresponding Source under the terms of this License,
250
- in one of these ways:
251
-
252
- a) Convey the object code in, or embodied in, a physical product
253
- (including a physical distribution medium), accompanied by the
254
- Corresponding Source fixed on a durable physical medium
255
- customarily used for software interchange.
256
-
257
- b) Convey the object code in, or embodied in, a physical product
258
- (including a physical distribution medium), accompanied by a
259
- written offer, valid for at least three years and valid for as
260
- long as you offer spare parts or customer support for that product
261
- model, to give anyone who possesses the object code either (1) a
262
- copy of the Corresponding Source for all the software in the
263
- product that is covered by this License, on a durable physical
264
- medium customarily used for software interchange, for a price no
265
- more than your reasonable cost of physically performing this
266
- conveying of source, or (2) access to copy the
267
- Corresponding Source from a network server at no charge.
268
-
269
- c) Convey individual copies of the object code with a copy of the
270
- written offer to provide the Corresponding Source. This
271
- alternative is allowed only occasionally and noncommercially, and
272
- only if you received the object code with such an offer, in accord
273
- with subsection 6b.
274
-
275
- d) Convey the object code by offering access from a designated
276
- place (gratis or for a charge), and offer equivalent access to the
277
- Corresponding Source in the same way through the same place at no
278
- further charge. You need not require recipients to copy the
279
- Corresponding Source along with the object code. If the place to
280
- copy the object code is a network server, the Corresponding Source
281
- may be on a different server (operated by you or a third party)
282
- that supports equivalent copying facilities, provided you maintain
283
- clear directions next to the object code saying where to find the
284
- Corresponding Source. Regardless of what server hosts the
285
- Corresponding Source, you remain obligated to ensure that it is
286
- available for as long as needed to satisfy these requirements.
287
-
288
- e) Convey the object code using peer-to-peer transmission, provided
289
- you inform other peers where the object code and Corresponding
290
- Source of the work are being offered to the general public at no
291
- charge under subsection 6d.
292
-
293
- A separable portion of the object code, whose source code is excluded
294
- from the Corresponding Source as a System Library, need not be
295
- included in conveying the object code work.
296
-
297
- A "User Product" is either (1) a "consumer product", which means any
298
- tangible personal property which is normally used for personal, family,
299
- or household purposes, or (2) anything designed or sold for incorporation
300
- into a dwelling. In determining whether a product is a consumer product,
301
- doubtful cases shall be resolved in favor of coverage. For a particular
302
- product received by a particular user, "normally used" refers to a
303
- typical or common use of that class of product, regardless of the status
304
- of the particular user or of the way in which the particular user
305
- actually uses, or expects or is expected to use, the product. A product
306
- is a consumer product regardless of whether the product has substantial
307
- commercial, industrial or non-consumer uses, unless such uses represent
308
- the only significant mode of use of the product.
309
-
310
- "Installation Information" for a User Product means any methods,
311
- procedures, authorization keys, or other information required to install
312
- and execute modified versions of a covered work in that User Product from
313
- a modified version of its Corresponding Source. The information must
314
- suffice to ensure that the continued functioning of the modified object
315
- code is in no case prevented or interfered with solely because
316
- modification has been made.
317
-
318
- If you convey an object code work under this section in, or with, or
319
- specifically for use in, a User Product, and the conveying occurs as
320
- part of a transaction in which the right of possession and use of the
321
- User Product is transferred to the recipient in perpetuity or for a
322
- fixed term (regardless of how the transaction is characterized), the
323
- Corresponding Source conveyed under this section must be accompanied
324
- by the Installation Information. But this requirement does not apply
325
- if neither you nor any third party retains the ability to install
326
- modified object code on the User Product (for example, the work has
327
- been installed in ROM).
328
-
329
- The requirement to provide Installation Information does not include a
330
- requirement to continue to provide support service, warranty, or updates
331
- for a work that has been modified or installed by the recipient, or for
332
- the User Product in which it has been modified or installed. Access to a
333
- network may be denied when the modification itself materially and
334
- adversely affects the operation of the network or violates the rules and
335
- protocols for communication across the network.
336
-
337
- Corresponding Source conveyed, and Installation Information provided,
338
- in accord with this section must be in a format that is publicly
339
- documented (and with an implementation available to the public in
340
- source code form), and must require no special password or key for
341
- unpacking, reading or copying.
342
-
343
- 7. Additional Terms.
344
-
345
- "Additional permissions" are terms that supplement the terms of this
346
- License by making exceptions from one or more of its conditions.
347
- Additional permissions that are applicable to the entire Program shall
348
- be treated as though they were included in this License, to the extent
349
- that they are valid under applicable law. If additional permissions
350
- apply only to part of the Program, that part may be used separately
351
- under those permissions, but the entire Program remains governed by
352
- this License without regard to the additional permissions.
353
-
354
- When you convey a copy of a covered work, you may at your option
355
- remove any additional permissions from that copy, or from any part of
356
- it. (Additional permissions may be written to require their own
357
- removal in certain cases when you modify the work.) You may place
358
- additional permissions on material, added by you to a covered work,
359
- for which you have or can give appropriate copyright permission.
360
-
361
- Notwithstanding any other provision of this License, for material you
362
- add to a covered work, you may (if authorized by the copyright holders of
363
- that material) supplement the terms of this License with terms:
364
-
365
- a) Disclaiming warranty or limiting liability differently from the
366
- terms of sections 15 and 16 of this License; or
367
-
368
- b) Requiring preservation of specified reasonable legal notices or
369
- author attributions in that material or in the Appropriate Legal
370
- Notices displayed by works containing it; or
371
-
372
- c) Prohibiting misrepresentation of the origin of that material, or
373
- requiring that modified versions of such material be marked in
374
- reasonable ways as different from the original version; or
375
-
376
- d) Limiting the use for publicity purposes of names of licensors or
377
- authors of the material; or
378
-
379
- e) Declining to grant rights under trademark law for use of some
380
- trade names, trademarks, or service marks; or
381
-
382
- f) Requiring indemnification of licensors and authors of that
383
- material by anyone who conveys the material (or modified versions of
384
- it) with contractual assumptions of liability to the recipient, for
385
- any liability that these contractual assumptions directly impose on
386
- those licensors and authors.
387
-
388
- All other non-permissive additional terms are considered "further
389
- restrictions" within the meaning of section 10. If the Program as you
390
- received it, or any part of it, contains a notice stating that it is
391
- governed by this License along with a term that is a further
392
- restriction, you may remove that term. If a license document contains
393
- a further restriction but permits relicensing or conveying under this
394
- License, you may add to a covered work material governed by the terms
395
- of that license document, provided that the further restriction does
396
- not survive such relicensing or conveying.
397
-
398
- If you add terms to a covered work in accord with this section, you
399
- must place, in the relevant source files, a statement of the
400
- additional terms that apply to those files, or a notice indicating
401
- where to find the applicable terms.
402
-
403
- Additional terms, permissive or non-permissive, may be stated in the
404
- form of a separately written license, or stated as exceptions;
405
- the above requirements apply either way.
406
-
407
- 8. Termination.
408
-
409
- You may not propagate or modify a covered work except as expressly
410
- provided under this License. Any attempt otherwise to propagate or
411
- modify it is void, and will automatically terminate your rights under
412
- this License (including any patent licenses granted under the third
413
- paragraph of section 11).
414
-
415
- However, if you cease all violation of this License, then your
416
- license from a particular copyright holder is reinstated (a)
417
- provisionally, unless and until the copyright holder explicitly and
418
- finally terminates your license, and (b) permanently, if the copyright
419
- holder fails to notify you of the violation by some reasonable means
420
- prior to 60 days after the cessation.
421
-
422
- Moreover, your license from a particular copyright holder is
423
- reinstated permanently if the copyright holder notifies you of the
424
- violation by some reasonable means, this is the first time you have
425
- received notice of violation of this License (for any work) from that
426
- copyright holder, and you cure the violation prior to 30 days after
427
- your receipt of the notice.
428
-
429
- Termination of your rights under this section does not terminate the
430
- licenses of parties who have received copies or rights from you under
431
- this License. If your rights have been terminated and not permanently
432
- reinstated, you do not qualify to receive new licenses for the same
433
- material under section 10.
434
-
435
- 9. Acceptance Not Required for Having Copies.
436
-
437
- You are not required to accept this License in order to receive or
438
- run a copy of the Program. Ancillary propagation of a covered work
439
- occurring solely as a consequence of using peer-to-peer transmission
440
- to receive a copy likewise does not require acceptance. However,
441
- nothing other than this License grants you permission to propagate or
442
- modify any covered work. These actions infringe copyright if you do
443
- not accept this License. Therefore, by modifying or propagating a
444
- covered work, you indicate your acceptance of this License to do so.
445
-
446
- 10. Automatic Licensing of Downstream Recipients.
447
-
448
- Each time you convey a covered work, the recipient automatically
449
- receives a license from the original licensors, to run, modify and
450
- propagate that work, subject to this License. You are not responsible
451
- for enforcing compliance by third parties with this License.
452
-
453
- An "entity transaction" is a transaction transferring control of an
454
- organization, or substantially all assets of one, or subdividing an
455
- organization, or merging organizations. If propagation of a covered
456
- work results from an entity transaction, each party to that
457
- transaction who receives a copy of the work also receives whatever
458
- licenses to the work the party's predecessor in interest had or could
459
- give under the previous paragraph, plus a right to possession of the
460
- Corresponding Source of the work from the predecessor in interest, if
461
- the predecessor has it or can get it with reasonable efforts.
462
-
463
- You may not impose any further restrictions on the exercise of the
464
- rights granted or affirmed under this License. For example, you may
465
- not impose a license fee, royalty, or other charge for exercise of
466
- rights granted under this License, and you may not initiate litigation
467
- (including a cross-claim or counterclaim in a lawsuit) alleging that
468
- any patent claim is infringed by making, using, selling, offering for
469
- sale, or importing the Program or any portion of it.
470
-
471
- 11. Patents.
472
-
473
- A "contributor" is a copyright holder who authorizes use under this
474
- License of the Program or a work on which the Program is based. The
475
- work thus licensed is called the contributor's "contributor version".
476
-
477
- A contributor's "essential patent claims" are all patent claims
478
- owned or controlled by the contributor, whether already acquired or
479
- hereafter acquired, that would be infringed by some manner, permitted
480
- by this License, of making, using, or selling its contributor version,
481
- but do not include claims that would be infringed only as a
482
- consequence of further modification of the contributor version. For
483
- purposes of this definition, "control" includes the right to grant
484
- patent sublicenses in a manner consistent with the requirements of
485
- this License.
486
-
487
- Each contributor grants you a non-exclusive, worldwide, royalty-free
488
- patent license under the contributor's essential patent claims, to
489
- make, use, sell, offer for sale, import and otherwise run, modify and
490
- propagate the contents of its contributor version.
491
-
492
- In the following three paragraphs, a "patent license" is any express
493
- agreement or commitment, however denominated, not to enforce a patent
494
- (such as an express permission to practice a patent or covenant not to
495
- sue for patent infringement). To "grant" such a patent license to a
496
- party means to make such an agreement or commitment not to enforce a
497
- patent against the party.
498
-
499
- If you convey a covered work, knowingly relying on a patent license,
500
- and the Corresponding Source of the work is not available for anyone
501
- to copy, free of charge and under the terms of this License, through a
502
- publicly available network server or other readily accessible means,
503
- then you must either (1) cause the Corresponding Source to be so
504
- available, or (2) arrange to deprive yourself of the benefit of the
505
- patent license for this particular work, or (3) arrange, in a manner
506
- consistent with the requirements of this License, to extend the patent
507
- license to downstream recipients. "Knowingly relying" means you have
508
- actual knowledge that, but for the patent license, your conveying the
509
- covered work in a country, or your recipient's use of the covered work
510
- in a country, would infringe one or more identifiable patents in that
511
- country that you have reason to believe are valid.
512
-
513
- If, pursuant to or in connection with a single transaction or
514
- arrangement, you convey, or propagate by procuring conveyance of, a
515
- covered work, and grant a patent license to some of the parties
516
- receiving the covered work authorizing them to use, propagate, modify
517
- or convey a specific copy of the covered work, then the patent license
518
- you grant is automatically extended to all recipients of the covered
519
- work and works based on it.
520
-
521
- A patent license is "discriminatory" if it does not include within
522
- the scope of its coverage, prohibits the exercise of, or is
523
- conditioned on the non-exercise of one or more of the rights that are
524
- specifically granted under this License. You may not convey a covered
525
- work if you are a party to an arrangement with a third party that is
526
- in the business of distributing software, under which you make payment
527
- to the third party based on the extent of your activity of conveying
528
- the work, and under which the third party grants, to any of the
529
- parties who would receive the covered work from you, a discriminatory
530
- patent license (a) in connection with copies of the covered work
531
- conveyed by you (or copies made from those copies), or (b) primarily
532
- for and in connection with specific products or compilations that
533
- contain the covered work, unless you entered into that arrangement,
534
- or that patent license was granted, prior to 28 March 2007.
535
-
536
- Nothing in this License shall be construed as excluding or limiting
537
- any implied license or other defenses to infringement that may
538
- otherwise be available to you under applicable patent law.
539
-
540
- 12. No Surrender of Others' Freedom.
541
-
542
- If conditions are imposed on you (whether by court order, agreement or
543
- otherwise) that contradict the conditions of this License, they do not
544
- excuse you from the conditions of this License. If you cannot convey a
545
- covered work so as to satisfy simultaneously your obligations under this
546
- License and any other pertinent obligations, then as a consequence you may
547
- not convey it at all. For example, if you agree to terms that obligate you
548
- to collect a royalty for further conveying from those to whom you convey
549
- the Program, the only way you could satisfy both those terms and this
550
- License would be to refrain entirely from conveying the Program.
551
-
552
- 13. Use with the GNU Affero General Public License.
553
-
554
- Notwithstanding any other provision of this License, you have
555
- permission to link or combine any covered work with a work licensed
556
- under version 3 of the GNU Affero General Public License into a single
557
- combined work, and to convey the resulting work. The terms of this
558
- License will continue to apply to the part which is the covered work,
559
- but the special requirements of the GNU Affero General Public License,
560
- section 13, concerning interaction through a network will apply to the
561
- combination as such.
562
-
563
- 14. Revised Versions of this License.
564
-
565
- The Free Software Foundation may publish revised and/or new versions of
566
- the GNU General Public License from time to time. Such new versions will
567
- be similar in spirit to the present version, but may differ in detail to
568
- address new problems or concerns.
569
-
570
- Each version is given a distinguishing version number. If the
571
- Program specifies that a certain numbered version of the GNU General
572
- Public License "or any later version" applies to it, you have the
573
- option of following the terms and conditions either of that numbered
574
- version or of any later version published by the Free Software
575
- Foundation. If the Program does not specify a version number of the
576
- GNU General Public License, you may choose any version ever published
577
- by the Free Software Foundation.
578
-
579
- If the Program specifies that a proxy can decide which future
580
- versions of the GNU General Public License can be used, that proxy's
581
- public statement of acceptance of a version permanently authorizes you
582
- to choose that version for the Program.
583
-
584
- Later license versions may give you additional or different
585
- permissions. However, no additional obligations are imposed on any
586
- author or copyright holder as a result of your choosing to follow a
587
- later version.
588
-
589
- 15. Disclaimer of Warranty.
590
-
591
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
- APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
- HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
- OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
- PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
- IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
- ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
-
600
- 16. Limitation of Liability.
601
-
602
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
- THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
- GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
- USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
- DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
- PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
- EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
- SUCH DAMAGES.
611
-
612
- 17. Interpretation of Sections 15 and 16.
613
-
614
- If the disclaimer of warranty and limitation of liability provided
615
- above cannot be given local legal effect according to their terms,
616
- reviewing courts shall apply local law that most closely approximates
617
- an absolute waiver of all civil liability in connection with the
618
- Program, unless a warranty or assumption of liability accompanies a
619
- copy of the Program in return for a fee.
620
-
621
- END OF TERMS AND CONDITIONS
622
-
623
- How to Apply These Terms to Your New Programs
624
-
625
- If you develop a new program, and you want it to be of the greatest
626
- possible use to the public, the best way to achieve this is to make it
627
- free software which everyone can redistribute and change under these terms.
628
-
629
- To do so, attach the following notices to the program. It is safest
630
- to attach them to the start of each source file to most effectively
631
- state the exclusion of warranty; and each file should have at least
632
- the "copyright" line and a pointer to where the full notice is found.
633
-
634
- <one line to give the program's name and a brief idea of what it does.>
635
- Copyright © <year> <name of author>
636
-
637
- This program is free software: you can redistribute it and/or modify
638
- it under the terms of the GNU General Public License as published by
639
- the Free Software Foundation, either version 3 of the License, or
640
- (at your option) any later version.
641
-
642
- This program is distributed in the hope that it will be useful,
643
- but WITHOUT ANY WARRANTY; without even the implied warranty of
644
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
- GNU General Public License for more details.
646
-
647
- You should have received a copy of the GNU General Public License
648
- along with this program. If not, see <http://www.gnu.org/licenses/>.
649
-
650
- Also add information on how to contact you by electronic and paper mail.
651
-
652
- If the program does terminal interaction, make it output a short
653
- notice like this when it starts in an interactive mode:
654
-
655
- <program> Copyright © <year> <name of author>
656
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
- This is free software, and you are welcome to redistribute it
658
- under certain conditions; type `show c' for details.
659
-
660
- The hypothetical commands `show w' and `show c' should show the appropriate
661
- parts of the General Public License. Of course, your program's commands
662
- might be different; for a GUI interface, you would use an "about box".
663
-
664
- You should also get your employer (if you work as a programmer) or school,
665
- if any, to sign a "copyright disclaimer" for the program, if necessary.
666
- For more information on this, and how to apply and follow the GNU GPL, see
667
- <http://www.gnu.org/licenses/>.
668
-
669
- The GNU General Public License does not permit incorporating your program
670
- into proprietary programs. If your program is a subroutine library, you
671
- may consider it more useful to permit linking proprietary applications with
672
- the library. If this is what you want to do, use the GNU Lesser General
673
- Public License instead of this License. But first, please read
674
- <http://www.gnu.org/philosophy/why-not-lgpl.html>.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/readme.txt DELETED
@@ -1,138 +0,0 @@
1
- === SiteGuard WP Plugin ===
2
- Contributors: jp-secure
3
- Donate link: -
4
- Tags: security, waf, brute force, password list, login lock, login alert, captcha, pingback, fail once
5
- Requires at least: 3.9
6
- Tested up to: 4.2
7
- Stable tag: 1.2.0
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- SiteGurad WP Plugin is the plugin specialized for the protection against the attack to the management page and login.
12
-
13
- == Description ==
14
-
15
- You can find docs, FAQ and more detailed information on [English Page](http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index_en.html) [Japanese Page](http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index.html).
16
-
17
- Simply install the SiteGuard WP Plugin, WordPress security is improved.
18
- This plugin is a security plugin that specializes in the login attack of brute force, such as protection and management capabilities.
19
-
20
- Notes
21
-
22
- * It does not support the multisite function of WordPress.
23
- * It only supports Apache 1.3, 2.x for Web servers.
24
- * To use the CAPTCHA function, the expansion library “mbstring” and “gd” should be installed on php.
25
- * To use the management page filter function and login page change function, “mod_rewrite” should be loaded on Apache.
26
- * To use the WAF Tuning Support, WAF ( SiteGuard Lite ) should be installed on Apache.
27
-
28
- There are the following functions.
29
-
30
- * Admin Page IP Filter
31
-
32
- It is the function for the protection against the attack to the management page (under wp-admin.)
33
- To the access from the connection source IP address which does not login to the management page, 404 (Not Found) is returned.
34
- At the login, the connection source IP address is recorded and the access to that page is allowed.
35
- The connection source IP address which does not login for more than 24 hours is sequentially deleted.
36
- The URL (under wp-admin) where this function is excluded can be specified.
37
-
38
- * Rename Login
39
-
40
- It is the function to decrease the vulnerability against an illegal login attempt attack such as a brute force attack or a password list attack.
41
- The login page name (wp-login.php) is changed. The initial value is “login_<5 random digits>” but it can be changed to a favorite name.
42
-
43
- * CAPTCHA
44
-
45
- It is the function to decrease the vulnerability against an illegal login attempt attack such as a brute force attack or a password list attack,
46
- or to receive less comment spam. For the character of CAPTCHA, hiragana and alphanumeric characters can be selected.
47
-
48
- * Login Lock
49
-
50
- It is the function to decrease the vulnerability against an illegal login attempt attack such as a brute force attack or a password list attack.
51
- Especially, it is the function to prevent an automated attack. The connection source IP address the number of login failure of which reaches
52
- the specified number within the specified period is blocked for the specified time.
53
- Each user account is not locked.
54
-
55
- * Login Alert
56
-
57
- It is the function to make it easier to notice unauthorized login. E-mail will be sent to a login user when logged in.
58
- If you receive an e-mail to there is no logged-in idea, please suspect unauthorized login.
59
-
60
- * Fail Once
61
-
62
- It is the function to decrease the vulnerability against a password list attack. Even is the login input is correct, the first login must fail.
63
- After 5 seconds and later within 60 seconds, another correct login input make login succeed. At the first login failure, the following error message is displayed.
64
-
65
- * Disable Pingback
66
-
67
- The pingback function is disabled and its abuse is prevented.
68
-
69
- * Updates Notify
70
-
71
- Basic of security is that always you use the latest version. If WordPress core, plugins, and themes updates are needed , sends email to notify administrators.
72
-
73
- * WAF Tuning Support
74
-
75
- It is the function to create the rule to avoid the false detection in WordPress (including 403 error occurrence with normal access,)
76
- if WAF ( SiteGuard Lite ) by JP-Secure is installed on a Web server. WAF prevents the attack from the outside against the Web server,
77
- but for some WordPress or plugin functions, WAF may detect the attack which is actually not attack and block the function.
78
- By creating the WAF exclude rule, the WAF protection function can be activated while the false detection for the specified function is prevented.
79
-
80
- = Translate =
81
-
82
- If you have created your own language pack, or have an update of an existing one, you can send [gettext PO and MO files](http://codex.wordpress.org/Translating_WordPress) to sgdev@jp-secure.com so that We can bundle it into SiteGuard WP Plugin. You can download the latest [POT file](http://plugins.svn.wordpress.org/siteguard/trunk/languages/siteguard.pot), and [PO files in each language](http://plugins.svn.wordpress.org/siteguard/branches/languages/).
83
-
84
- == Installation ==
85
-
86
- * WordPress dashboard
87
- 1. Please search and install "SiteGuard WP Plugin" from 'Plugins' menu of WordPress dashboard
88
- 2. Activate the plugin through the 'Plugins' menu of WordPress dashboard
89
-
90
- * WordPress.org plugin directory
91
- 1. Please search and download "SiteGuard WP Plugin"
92
- 2. Please upload and install a ZIP file that you downloaded through 'Plugins' menu of WordPress dashboard
93
- 3. Activate the plugin through the 'Plugins' menu of WordPress dashboard
94
-
95
- == Screenshots ==
96
-
97
- * SiteGuard WP Plugin - Dashboard -
98
-
99
- == Frequently Asked Questions ==
100
-
101
- [English Page](http://www.jp-secure.com/cont/products/siteguard_wp_plugin/faq_en.html)
102
- [Japanese Page](http://www.jp-secure.com/cont/products/siteguard_wp_plugin/faq.html)
103
-
104
- == Changelog ==
105
- = 1.2.0 =
106
- * Add the "Updates Notify" feature
107
- * Fix bug that login via XML-RPC to fail, if the CAPTCHA is enabled
108
- * Fix bug that sometimes can't login when you enable the Fail once
109
- = 1.1.2 =
110
- * Supported with WP 4.1
111
- * Disabling the Admin IP Filter function by default
112
- = 1.1.1 =
113
- * Fix bug that can not save "Login Alert" settings
114
- * Add the "Login Alert" notification variables, IP Address, User-Agent and Referer
115
- = 1.1.0 =
116
- * Add the "Login Alert" feature
117
- * Add the function of inform the new Login page URL by e-mail
118
- * Fix bug that work "Fail Once" even when the password is a mistake
119
- * Fix bug that even if the "Rename Login" has been enabled, and have specified a permanent link to the non-standard, jump to the new login page in /login
120
- = 1.0.6 =
121
- * Supported with Apache 1.3
122
- * Fix garbling of CAPTCHA by environment
123
- * Fix input check of Rename login path
124
- * Fix some other bugs
125
- = 1.0.5 =
126
- * Add display a warning about changing the login page URL, when activate the plugin
127
- = 1.0.4 =
128
- * Fix bug that fails to update .htaccess, if there is no WordPress settings in .htaccess
129
- = 1.0.3 =
130
- * Fix a problem that "Rename Login" does not work, if you change Permalink settings
131
- * Fix the collision of class name of Really Simple CAPTCHA
132
- = 1.0.2 =
133
- * Fix a minor html escape leakage
134
- * Reduced the problem of affinity with other plugin [WordPress HTTPS (SSL)]
135
- = 1.0.1 =
136
- * Supported with WP 4.0
137
- = 1.0.0 =
138
- * First release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/gentium/FONTLOG.txt DELETED
@@ -1,153 +0,0 @@
1
- FONTLOG
2
- Gentium Basic and Gentium Book Basic v1.1
3
- ==========================================================
4
-
5
-
6
- This file provides detailed information on the Gentium Basic and Gentium Book Basic font families. This information should be distributed along with the Gentium Basic and Gentium Book Basic fonts and any derivative works.
7
-
8
-
9
- Basic Font Information
10
- ----------------------
11
-
12
- Gentium ("belonging to the nations" in Latin) is a Unicode typeface family designed to enable the many diverse ethnic groups around the world who use the Latin script to produce readable, high-quality publications. The design is intended to be highly readable, reasonably compact, and visually attractive. Gentium has won a "Certificate of Excellence in Typeface Design" in two major international typeface design competitions: bukva:raz! (2001), TDC2003 (2003).
13
-
14
- The Gentium Basic and Gentium Book Basic font famililes are based on the original design, but with additional weights. The "Book" family is slightly heavier. Both families come with a complete regular, bold, italic and bold italic set of fonts.
15
-
16
- The supported character set, however, is much smaller than for the main Gentium fonts. These "Basic" fonts support only the Basic Latin and Latin-1 Supplement Unicode ranges, plus a selection of the more commonly used extended Latin characters, with miscellaneous diacritical marks, symbols and punctuation. For a complete list of supported characters see the list at the end of this document.
17
-
18
- In particular, these fonts do not support:
19
-
20
- - Full extended Latin IPA
21
- - Complete support for Central European languages
22
- - Greek
23
- - Cyrillic
24
-
25
- A much more complete character set will be supported in a future version of the complete Gentium fonts. These "Basic" fonts are intended as a way to provide additional weights for basic font users without waiting until the complete Gentium character set is finished. So please don't request additional glyphs or characters to be supported in the Basic fonts - such support will become available in the main Gentium family in the future.
26
-
27
- There are also some other limitations of the Basic fonts:
28
-
29
- - They are not completely metric-compatible with the full Gentium family
30
- (some glyphs may have different widths, although changes have been minimal)
31
- - There is no kerning
32
- - There are no "Alt" versions, or ones with low-profile diacritics
33
- - The default stacking style for some diacritic combinations does not match Vietnamese-style conventions (although this is available through a OpenType/Graphite feature)
34
- - No support for TypeTuner
35
-
36
- There are, however, some wonderful new features that are still missing from the main Gentium family:
37
-
38
- - Bold!
39
- - Bold Italic!
40
- - The slightly-heavier Book family!
41
- - OpenType and Graphite smart code for diacritic placement!
42
- - A few useful OpenType and Graphite features
43
- - Support for a few more recent additions to Unicode and the SIL PUA (http://scripts.sil.org/UnicodePUA)
44
- - Character assignments are updated to conform to Unicode 5.1
45
-
46
- In particular, the Basic fonts support a subset of the smart font features that the Doulos SIL font supports. Those features are:
47
-
48
- - Capital Eng alternates
49
- - Literacy alternates
50
- - Capital Y-hook alternate
51
- - Capital N-left-hook alternate
52
- - Modifier apostrophe alternate
53
- - Modifier colon alternate
54
- - Open o alternate
55
- - Vietnamese-style diacritics
56
-
57
- More detail on the features can be seen in the Doulos SIL Technical Documentation (http://scripts.sil.org/DoulosSIL_Technical).
58
-
59
-
60
- Known Problems
61
- --------------
62
-
63
- We know of the following problems. Please report any other problems you encounter.
64
-
65
- - logicalnot (U+00AC) appears distorted in Bold Italic and Book Italic.
66
- - Opening the fonts with FontLab 5.0.x, then closing them, crashes FontLab. We are working to get this bug fixed in the next version of FontLab. A workaround is to open the font, save as a .vfb file, close (which still causes a crash). Then restart FontLab and open the .vfb file.
67
-
68
-
69
- ChangeLog
70
- ---------
71
- (This should list both major and minor changes, most recent first.)
72
-
73
- 4 Apr 2008 (Victor Gaultney) Gentium Basic/Gentium Book Basic version 1.1
74
- - Final release
75
-
76
- 12 Nov 2007 (Victor Gaultney) Gentium Basic/Gentium Book Basic version 1.1b1
77
- - trimmed character set down to Basic
78
- - added additional weights
79
- - no FontLab source files
80
-
81
- 28 Nov 2005 (Victor Gaultney) Gentium version 1.02
82
- - Changed licensing to the SIL Open Font License
83
- - Included FontLab source files
84
- - Fixed some duplicate PostScript glyphs names
85
- - Fixed italic angle
86
-
87
- 19 Sep 2003 (Victor Gaultney) Gentium version 1.01
88
- - Maintenance release focused on changing internal font
89
- - Information to reflect the changeover to an SIL project
90
- - There is only one bug fix - the Greek mu PS name was changed to try and fix a display/printing problem. There is still no manual hinting
91
-
92
- 16 Sep 2002 (Victor Gaultney) Gentium version 1.00
93
- - First public release
94
- - No manual hinting is included in this version. Some has been done - with good results - but is not yet complete enough.
95
-
96
-
97
- Information for Developers/Contributors
98
- ---------------------------------------
99
-
100
- The source release contains FontLab source files for the eight fonts, but those files do not include the OpenType and Graphite code, as those are inserted after the fonts are generated from FontLab. The files are included as a source for the PostScript-style cubic curves. You are welcome, however, to open the font files themselves to gain access to the smart font code, although most editors will not let you edit that code directly. We will provide a richer set of sources for the full Gentium fonts at a later time.
101
-
102
- SIL will remain as maintainers of this font project, but we do not intend any further major releases. Our primary efforts will be going into the full Gentium package. Any contributions should be directed toward that project.
103
-
104
-
105
- Acknowledgements
106
- ----------------
107
- (Here is where contributors can be acknowledged. If you make modifications be sure to add your name (N), email (E), web-address (W) and description (D). This list is sorted by last name in alphabetical order.)
108
-
109
- N: Victor Gaultney
110
- E: victor_gaultney@sil.org
111
- W: http://www.sil.org/~gaultney/
112
- D: Original Designer
113
-
114
- N: Annie Olsen
115
- E: nrsi@sil.org
116
- W: http://scripts.sil.org/
117
- D: Contributed some extended Latin glyphs
118
-
119
- N: SIL font engineers
120
- E: nrsi@sil.org
121
- W: http://scripts.sil.org/
122
- D: OpenType code and build support
123
-
124
- The Gentium project, and the Gentium Basic and Gentium Book Basic fonts, are maintained by SIL International.
125
-
126
- For more information please visit the Gentium page on SIL International's Computers and Writing systems website:
127
- http://scripts.sil.org/gentium
128
-
129
- Or send an email to <gentium AT sil DOT org>
130
-
131
-
132
- Character Range Coverage
133
- ------------------------
134
-
135
- C0 Controls and Basic Latin (U+0020..U+007E)
136
- C1 Controls and Latin-1 Supplement (U+00A0..U+00FF)
137
- Latin Extended-A (U+0100..U+0103, U+0106..U+010E, U+011A..U+0121, U+0124..U+0125, U+0128..U+012D, U+0130..U+0133, U+0139..U+013A, U+0141..U+0144, U+0147..U+0148, U+014A..U+0155, U+0158..U+015D, U+0160..U+0161, U+0164, U+0168..U+0171, U+00174..U+017E)
138
- Latin Extended-B (U+0181, U+0186, U+0189..U+018A, U+018E, U+0190, U+0192, U+0197..U+019A, U+019D, U+019F..U+01A1, U+01A9..U+01AA, U+01AF..U+01B0, U+01B3..U+01B4, U+01B7, U+01CD..U+01E3, U+01E6..U+01E9, U+01EE..U+01EF, U+01F4..U+01F5, U+01F8..U+01FF, U+021E..U+021F, U+0226..U+0233, U+0237, U+023D, U+0241..U+0242, U+0244..U+0245, U+024A..U+024B)
139
- IPA Extensions (U+0251, U+0253..U+0254, U+0256..U+0257, U+0259, U+025B, U+0263, U+0268..U+0269, U+026B, U+0272, U+0275, U+0283, U+0289..U+028A, U+028C, U+0292, U+0294, U+02A0)
140
- Spacing Modifier Letters (U+02BC, U+02C0, U+02C6..U+02C7, U+02C9..U+02CB, U+02CD, U+02D7..U+02DD)
141
- Combining Diacritical Marks (U+0300..U+0304,U+0306..U+030C, U+031B, U+0323, U+0327..U+0328, U+0331, U+033F, U+035F)
142
- Greek and Coptic (U+03A0, U+03A9, U+03C0)
143
- Latin Extended Additional (U+1E02..U+1E0F, U+1E14..U+1E17, U+1E1C..U+1E27, U+1E2E..U+1E3B, U+1E3E..U+1E49, U+1E4C..U+1E6F, U+1E78..U+1E99, U+1EA0..U+1EF9)
144
- General Punctuation (U+2011, U+2013..U+2014, U+2018..U+201A, U+201C..U+201E, U+2020..U+2022, U+2026, U+2030, U+2039..U+203A, U+2044)
145
- Currency Symbols (U+20AC)
146
- Letterlike Symbols (U+2122..U+2123, U+2126)
147
- Mathematical Operators (U+2202, U+2205..U+2206, U+220F, U+2211..U+2212, U+2219..U+221A, U+221E, U+222B, U+2248, U+2260, U+2264..U+2265)
148
- Geometric Shapes (U+25CA, U+25CC)
149
- Latin Extended-C (U+2C60..U+2C62)
150
- Modifier Tone Letters (U+A700..U+A71A)
151
- Latin Extended-D (U+A789..U+A78C)
152
- Alphabetic Presentation Forms (U+FB01..U+FB02)
153
- SIL PUA (U+F130..U+F131, U+F195, U+F197, U+F1C8, U+F1E9..U+F1EA, U+F20E..U+F20F, U+F211..U+F212, U+F218..U+F219, U+F21D..U+F21F, U+F242, U+F26A)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/gentium/GENTIUM-FAQ.txt DELETED
@@ -1,249 +0,0 @@
1
- GENTIUM-FAQ
2
- Gentium Basic Release 1.1
3
- 4 April 2008
4
- ========================
5
-
6
- Here are some answers to frequently asked questions about the Gentium fonts:
7
-
8
-
9
- General
10
- ========
11
-
12
- How do you pronounce Gentium?
13
-
14
- The preferred pronunciation is with a soft G as in 'general', not a
15
- hard one as in 'gold': JEN-tee-oom.
16
-
17
- What is GentiumAlt?
18
-
19
- It is a version of the font with redesigned diacritics (flatter
20
- ones) to make it more suitable for use with stacking diacritics, and
21
- for languages such as Vietnamese. The Greek glyphs also use the
22
- Porsonic (single-curve) design for the circumflex. Since the main
23
- Gentium fonts do not currently include any 'smart' rendering routines,
24
- there is no easy way to access these alternate diacritic shapes from
25
- within the regular Gentium font. The encoding of the fonts are the same,
26
- so the same text can be viewed with either one. There is also no
27
- problem with having both font families installed at the same time.
28
-
29
-
30
- Licensing
31
- =========
32
-
33
- I want to use Gentium in my publication - can I?
34
-
35
- Gentium is released under the SIL Open Font License, which permits use
36
- for any publication, whether electronic or printed. For more answers
37
- to use questions see the OFL-FAQ. The license, alongside information
38
- specific to Gentium, is in the release package.
39
-
40
- I would like to bundle Gentium with my application - can I?
41
-
42
- This is our most common question. The SIL Open Font License allows
43
- bundling with applications, even commercial ones, with some restrictions.
44
- See the OFL file.
45
-
46
- Can I use the font on my web site?
47
-
48
- You can certainly create web pages that request that Gentium be used to
49
- display them (if that font is available on the user's system). According
50
- to the license, you are even allowed to place the font on your site for
51
- people to download it. We would strongly recommend, however, that you
52
- direct users to our site to download the font. This ensures that they
53
- are always using the most recent version with bug fixes, etc. To make
54
- this easier, we've simplified the URL for Gentium:
55
- http://scripts.sil.org/gentium
56
-
57
- Is Gentium going to stay free?
58
-
59
- There is no intention to ever charge users for using Gentium. The
60
- current version is licensed under a free/open license and future
61
- versions will be similar.
62
-
63
-
64
- Modification
65
- ============
66
-
67
- I would like to modify Gentium to add a couple of characters I need. Can I?
68
-
69
- Yes - that is allowed as long as you abide by the conditions of the
70
- SIL Open Font License.
71
-
72
- So will you add glyphs upon request?
73
-
74
- If you have a special symbol that you need (say, for a particular
75
- transcription system), the best means of doing so will be to ensure
76
- that the symbol makes it into the Unicode Standard. It is impossible
77
- for us to add every glyph that every person desires, but we do place
78
- a high priority on adding pretty much anything that falls in certain
79
- Unicode ranges (extended Latin, Greek, Cyrillic). You can send us your
80
- requests, but please understand that we are unlikely to add symbols
81
- where the user base is very small, unless they have been accepted
82
- into Unicode.
83
-
84
- Can I send you work I've done to be incorporated into Gentium?
85
-
86
- Yes! See the FONTLOG for information on becoming a contributor.
87
-
88
-
89
- Technical
90
- =========
91
-
92
- Can you help me get Gentium working on my system?
93
-
94
- We cannot afford to offer individual technical support. The best
95
- resource is this website, where we hope to offer some limited help.
96
- However, we do want to hear of any problems you encounter, so that
97
- we can add them to the list of bugs to fix in later releases.
98
-
99
- Our contact address is <gentium AT sil DOT org>. Please understand
100
- that we cannot guarantee a personal response.
101
-
102
- I can't find all the extended Latin letters in the font. How do I type them?
103
-
104
- Gentium is Unicode-encoded, which means that the computer stores a
105
- special, unique code for each letter in your document. Since most
106
- keyboards do not have hundreds of keys, special software is needed
107
- in order to type the hundreds of special characters supported by the
108
- font.
109
-
110
- I can't find the 'o with right hook' in the font. Where is it?
111
-
112
- Combinations of base letters with diacritics are often called
113
- composite, or pre-composed glyphs. Gentium has hundreds of these
114
- (the ones that are included in Unicode). There are, however, many
115
- common combinations that are not represented by a single composite.
116
- It is possible to enter these into a document, but only as
117
- individual components. So 'o with right hook' would be entered as
118
- 'o', then 'right hook'. Although this may not look very good in some
119
- cases, we're not able to anticipate every possible combination.
120
- Future versions of Gentium will include 'smart font' support for
121
- technologies such as OpenType and SIL's Graphite. This will make
122
- diacritic positioning much better. The Gentium Basic fonts do,
123
- however, include limited support for both OpenType and Graphite,
124
- and demonstrate the type of support that will eventually be provided.
125
-
126
- Some diacritics are not aligning well with base glyphs, and if I type more
127
- than one diacritic, they run into each other. Why is that?
128
-
129
- Gentium currently has no 'smart font' code for automatic diacritic
130
- positioning, but the Gentium Basic fonts do, and similar support will
131
- appear in the main fonts in the near future.
132
-
133
- How do I type the Greek letters?
134
-
135
- You need a Unicode-compatible keyboarding system, which is not
136
- included in the distribution package.
137
-
138
- I'm having problems making PDFs -- why won't my document distill?
139
-
140
- Gentium is a large font, with lots of glyphs. As a result, some
141
- printers can balk at PDFs that have the complete font embedded. The
142
- easiest way to avoid this is to have Acrobat/Distiller subset the
143
- font. This is generally a good idea anyway (with any font) and can
144
- reduce the size of your files.
145
-
146
-
147
- Basic
148
- =====
149
-
150
- How are the Basic fonts (Gentium Basic, Gentium Book Basic) different
151
- from Gentium?
152
-
153
- These font families are based on the original Gentium design, but with
154
- additional weights. Both families come with a complete regular, bold,
155
- italic and bold italic set of fonts. The supported character set,
156
- however, is much smaller than for the main Gentium fonts. These
157
- 'Basic' fonts support only the Basic Latin and Latin-1 Supplement
158
- Unicode ranges, plus a selection of the more commonly used extended
159
- Latin characters, with miscellaneous diacritical marks, symbols and
160
- punctuation. In particular, these fonts do not support full extended
161
- Latin IPA, complete support for Central European languages, Greek and
162
- Cyrillic.
163
-
164
- What is the Book weight?
165
-
166
- It is a complete second font family that is slightly heavier overall,
167
- and more useful for some purposes. The main Gentium family will
168
- eventually have a complete matching Book weight, along with matching
169
- italics.
170
-
171
- Why is the line spacing greater for the Basic fonts?
172
-
173
- In some environments, stacked diacritics in Gentium could display as
174
- 'chopped-off'. Gentium Basic has slightly wider default line spacing
175
- in order to avoid this problem. Most applications do, however, let you
176
- set the line spacing explicitly, so you can have the lines spaced
177
- precisely as you wish.
178
-
179
- Will you be accepting requests for additions to the Basic character set?
180
-
181
- No. We are now focusing our development efforts on the main Gentium
182
- fonts, which already provide richer character set support.
183
-
184
- Is there an Alt version of the Basic fonts?
185
-
186
- No, although you may notice that capitals and some tall lowercase
187
- letters do use 'low-profile' versions.
188
-
189
-
190
- Future
191
- ======
192
-
193
- Now that SIL International has taken over Gentium, who will be the next
194
- designer?
195
-
196
- Victor Gaultney will remain as primary designer, but Annie Olsen, a
197
- fellow type designer from the SIL Non-Roman Script Initiative, has
198
- joined the project team. She is a former calligraphy teacher, and is
199
- well suited for the task. Other members of the NRSI team will also
200
- add their expertise in technical matters.
201
-
202
- Do you plan to include other typographic enhancements (small caps, old style
203
- figures, etc.)?
204
-
205
- Those would be nice, wouldn't they? From a design point of view,
206
- it would be great to have these refinements, and we haven't ruled
207
- them out. But there are other needs that are much higher priority
208
- (Bold, Cyrillic, etc.). If you think you could contribute some of
209
- your time and effort to these enhancements, see the FONTLOG file for
210
- information on becoming a contributor.
211
-
212
- What about bold?
213
-
214
- The Gentium Basic fonts include Bold and Bold Italic versions. The
215
- main Gentium fonts will also include them in the future.
216
-
217
- Sans-serif?
218
-
219
- There is a definite need for a sans-serif font that shares some of
220
- Gentium�s strengths -- high readability, economy of space, etc. It
221
- would also be great if that font also harmonized well with Gentium.
222
- We don't currently have any plans for a companion face, although one
223
- of our other projects - Andika - may be useful. Andika is a sans-serif
224
- font designed specifically for use in literacy programs around the
225
- world, and is available from our web site.
226
-
227
- Will you be extending Gentium to cover other scripts, and Hebrew in
228
- particular?
229
-
230
- It is very unlikely that we would do this, as there are so many
231
- pressing needs in Latin, Greek and Cyrillic scripts. But you could
232
- contribute to the project.
233
-
234
- When will Cyrillic be completed?
235
-
236
- As soon as we can get it done, but it is still a few months away.
237
-
238
- I need a couple of ancient Greek glyphs, such as the digamma. When will
239
- those be ready?
240
-
241
- These have already been designed and will be in the next main release.
242
-
243
- Will there be a Type 1 version? What about OpenType?
244
-
245
- The next generation of Gentium will have OpenType, Graphite and AAT
246
- support. We do not plan to produce Type 1 versions at this time, but
247
- please write us if this is important (and tell us why). We are, however,
248
- considering releasing a version in OT-CFF format, but it will not go
249
- through the same careful testing as the standard OT/Graphite/AAT version.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/gentium/GenBasB.ttf DELETED
Binary file
trunk/really-simple-captcha/gentium/GenBasBI.ttf DELETED
Binary file
trunk/really-simple-captcha/gentium/GenBasI.ttf DELETED
Binary file
trunk/really-simple-captcha/gentium/GenBasR.ttf DELETED
Binary file
trunk/really-simple-captcha/gentium/GenBkBasB.ttf DELETED
Binary file
trunk/really-simple-captcha/gentium/GenBkBasBI.ttf DELETED
Binary file
trunk/really-simple-captcha/gentium/GenBkBasI.ttf DELETED
Binary file
trunk/really-simple-captcha/gentium/GenBkBasR.ttf DELETED
Binary file
trunk/really-simple-captcha/gentium/OFL-FAQ.txt DELETED
@@ -1,216 +0,0 @@
1
- OFL FAQ - Frequently Asked Questions about the SIL Open Font License (OFL)
2
- Version 1.1 - 1 February 2007
3
- (See http://scripts.sil.org/OFL for updates)
4
-
5
-
6
- 1 ABOUT USING AND DISTRIBUTING FONTS LICENSED UNDER THE OFL
7
-
8
- 1.1 Can I use the fonts in any publication, even embedded in the file?
9
- Yes. You may use them like most other fonts, but unlike some fonts you may include an embedded subset of the fonts in your document. Such use does not require you to include this license or other files (listed in OFL condition 2), nor does it require any type of acknowledgement within the publication. Some mention of the font name within the publication information (such as in a colophon) is usually appreciated. If you wish to include the complete font as a separate file, you should distribute the full font package, including all existing acknowledgements, and comply with the OFL conditions. Of course, referencing or embedding an OFL font in any document does not change the license of the document itself. The requirement for fonts to remain under the OFL does not apply to any document created using the fonts and their derivatives. Similarly, creating any kind of graphic using a font under OFL does not make the resulting artwork subject to the OFL.
10
-
11
- 1.2 Can I make web pages using these fonts?
12
- Yes! Go ahead! Using CSS (Cascading Style Sheets) is recommended.
13
-
14
- 1.3 Can I make the fonts available to others from my web site?
15
- Yes, as long as you meet the conditions of the license (do not sell by itself, include the necessary files, rename Modified Versions, do not abuse the Author(s)' name(s) and do not sublicense).
16
-
17
- 1.4 Can the fonts be included with Free/Libre and Open Source Software collections such as GNU/Linux and BSD distributions?
18
- Yes! Fonts licensed under the OFL can be freely agreggated with software under FLOSS (Free/Libre and Open Source Software) licenses. Since fonts are much more useful aggregated to than merged with existing software, possible incompatibility with existing software licenses is not a problem. You can also repackage the fonts and the accompanying components in a .rpm or .deb package and include them in distro CD/DVDs and online repositories.
19
-
20
- 1.5 I want to distribute the fonts with my program. Does this mean my program also has to be free and open source software?
21
- No. Only the portions based on the font software are required to be released under the OFL. The intent of the license is to allow aggregation or bundling with software under restricted licensing as well.
22
-
23
- 1.6 Can I include the fonts on a CD of freeware or commercial fonts?
24
- Yes, as long some other font or software is also on the disk, so the OFL font is not sold by itself.
25
-
26
- 1.7 Can I sell a software package that includes these fonts?
27
- Yes, you can do this with both the Original Version and a Modified Version. Examples of bundling made possible by the OFL would include: word processors, design and publishing applications, training and educational software, edutainment software, etc.
28
-
29
- 1.8 Why won't the OFL let me sell the fonts alone?
30
- The intent is to keep people from making money by simply redistributing the fonts. The only people who ought to profit directly from the fonts should be the original authors, and those authors have kindly given up potential direct income to distribute their fonts under the OFL. Please honor and respect their contribution!
31
-
32
- 1.9 I've come across a font released under the OFL. How can I easily get more information about the Original Version? How can I know where it stands compared to the Original Version or other Modified Versions?
33
- Consult the copyright statement in the license for ways to contact the original authors. Consult the FONTLOG for information on how the font differs from the Original Version, and get in touch with the various contributors via the information in the acknowledgment section. Please consider using the Original Versions of the fonts whenever possible.
34
-
35
- 1.10 What do you mean in condition 4? Can you provide examples of abusive promotion / endorsement / advertisement vs. normal acknowledgement?
36
- The intent is that the goodwill and reputation of the author(s) should not be used in a way that makes it sound like the original author(s) endorse or approve of a specific Modified Version or software bundle. For example, it would not be right to advertise a word processor by naming the author(s) in a listing of software features, or to promote a Modified Version on a web site by saying "designed by ...". However, it would be appropriate to acknowledge the author(s) if your software package has a list of people who deserve thanks. We realize that this can seem to be a gray area, but the standard used to judge an acknowledgement is that if the acknowledgement benefits the author(s) it is allowed, but if it primarily benefits other parties, or could reflect poorly on the author(s), then it is not.
37
-
38
-
39
- 2 ABOUT MODIFYING OFL LICENSED FONTS
40
-
41
- 2.1 Can I change the fonts? Are there any limitations to what things I can and cannot change?
42
- You are allowed to change anything, as long as such changes do not violate the terms of the license. In other words, you are not allowed to remove the copyright statement(s) from the font, but you could add additional information into it that covers your contribution.
43
-
44
- 2.2 I have a font that needs a few extra glyphs - can I take them from an OFL licensed font and copy them into mine?
45
- Yes, but if you distribute that font to others it must be under the OFL, and include the information mentioned in condition 2 of the license.
46
-
47
- 2.3 Can I charge people for my additional work? In other words, if I add a bunch of special glyphs and/or OpenType/Graphite code, can I sell the enhanced font?
48
- Not by itself. Derivative fonts must be released under the OFL and cannot be sold by themselves. It is permitted, however, to include them in a larger software package (such as text editors, office suites or operating systems), even if the larger package is sold. In that case, you are strongly encouraged, but not required, to also make that derived font easily and freely available outside of the larger package.
49
-
50
- 2.4 Can I pay someone to enhance the fonts for my use and distribution?
51
- Yes. This is a good way to fund the further development of the fonts. Keep in mind, however, that if the font is distributed to others it must be under the OFL. You won't be able to recover your investment by exclusively selling the font, but you will be making a valuable contribution to the community. Please remember how you have benefitted from the contributions of others.
52
-
53
- 2.5 I need to make substantial revisions to the font to make it work with my program. It will be a lot of work, and a big investment, and I want to be sure that it can only be distributed with my program. Can I restrict its use?
54
- No. If you redistribute a Modified Version of the font it must be under the OFL. You may not restrict it in any way. This is intended to ensure that all released improvements to the fonts become available to everyone. But you will likely get an edge over competitors by being the first to distribute a bundle with the enhancements. Again, please remember how you have benefitted from the contributions of others.
55
-
56
- 2.6 Do I have to make any derivative fonts (including source files, build scripts, documentation, etc.) publicly available?
57
- No, but please do share your improvements with others. You may find that you receive more than what you gave in return.
58
-
59
- 2.7 Why can't I use the Reserved Font Name(s) in my derivative font names? I'd like people to know where the design came from.
60
- The best way to acknowledge the source of the design is to thank the original authors and any other contributors in the files that are distributed with your revised font (although no acknowledgement is required). The FONTLOG is a natural place to do this. Reserved Font Name(s) ensure that the only fonts that have the original names are the unmodified Original Versions. This allows designers to maintain artistic integrity while allowing collaboration to happen. It eliminates potential confusion and name conflicts. When choosing a name be creative and avoid names that reuse almost all the same letters in the same order or sound like the original. Keep in mind that the Copyright Holder(s) can allow a specific trusted partner to use Reserved Font Name(s) through a separate written agreement.
61
-
62
- 2.8 What do you mean by "primary name as presented to the user"? Are you are referring to the font menu name?
63
- Yes, the requirement to change the visible name used to differentiate the font from others applies to the font menu name and other mechanisms to specify a font in a document. It would be fine, for example, to keep a text reference to the original fonts in the description field, in your modified source file or in documentation provided alongside your derivative as long as no one could be confused that your modified source is the original. But you cannot use the Reserved Font Names in any way to identify the font to the user (unless the Copyright Holder(s) allow(s) it through a separate agreement, see section 2.7). Users who install derivatives ("Modified Versions") on their systems should not see any of the original names ("Reserved Font Names") in their font menus, for example. Again, this is to ensure that users are not confused and do not mistake a font for another and so expect features only another derivative or the Original Version can actually offer. Ultimately, creating name conflicts will cause many problems for the users as well as for the designer of both the Original and Modified versions, so please think ahead and find a good name for your own derivative. Font substitution systems like fontconfig, or application-level font fallback configuration within OpenOffice.org or Scribus, will also get very confused if the name of the font they are configured to substitute to actually refers to another physical font on the user's hard drive. It will help everyone if Original Versions and Modified Versions can easily be distinguished from one another and from other derivatives. The substitution mechanism itself is outside the scope of the license. Users can always manually change a font reference in a document or set up some kind of substitution at a higher level but at the lower level the fonts themselves have to respect the Reserved Font Name(s) requirement to prevent ambiguity. If a substitution is currently active the user should be aware of it.
64
-
65
- 2.9 Am I not allowed to use any part of the Reserved Font Names?
66
- You may not use the words of the font names, but you would be allowed to use parts of words, as long as you do not use any word from the Reserved Font Names entirely. We do not recommend using parts of words because of potential confusion, but it is allowed. For example, if "Foobar" was a Reserved Font Name, you would be allowed to use "Foo" or "bar", although we would not recommend it. Such an unfortunate choice would confuse the users of your fonts as well as make it harder for other designers to contribute.
67
-
68
- 2.10 So what should I, as an author, identify as Reserved Font Names?
69
- Original authors are encouraged to name their fonts using clear, distinct names, and only declare the unique parts of the name as Reserved Font Names. For example, the author of a font called "Foobar Sans" would declare "Foobar" as a Reserved Font Name, but not "Sans", as that is a common typographical term, and may be a useful word to use in a derivative font name. Reserved Font Names should also be single words. A font called "Flowing River" should have Reserved Font Names "Flowing" and "River", not "Flowing River".
70
-
71
- 2.11 Do I, as an author, have to identify and Reserved Font Names?
72
- No, but we strongly encourage you to do so. This is to avoid confusion between your work and Modified versions. You may, however, give certain trusted parties the right to use any of your Reserved Font Names through separate written agreements. For example, even if "Foobar" is a RFN, you could write up an agreement to give company "XYZ" the right to distribute a modified version with a name that includes "Foobar". This allows for freedom without confusion.
73
-
74
- 2.12 Are any names (such as the main font name) reserved by default?
75
- No. That is a change to the license as of version 1.1. If you want any names to be Reserved Font Names, they must be specified after the copyright statement.
76
-
77
- 2.13 What is this FONTLOG thing exactly?
78
- It has three purposes: 1) to provide basic information on the font to users and other developers, 2) to document changes that have been made to the font or accompanying files, either by the original authors or others, and 3) to provide a place to acknowledge the authors and other contributors. Please use it! See below for details on how changes should be noted.
79
-
80
- 2.14 Am I required to update the FONTLOG?
81
- No, but users, designers and other developers might get very frustrated at you if you don't! People need to know how derivative fonts differ from the originals, and how to take advantage of the changes, or build on them.
82
-
83
-
84
- 3 ABOUT THE FONTLOG
85
-
86
- The FONTLOG can take a variety of formats, but should include these four sections:
87
-
88
- 3.1 FONTLOG for <FontFamilyName>
89
- This file provides detailed information on the <FontFamilyName> font software. This information should be distributed along with the <FontFamilyName> fonts and any derivative works.
90
-
91
- 3.2 Basic Font Information
92
- (Here is where you would describe the purpose and brief specifications for the font project, and where users can find more detailed documentation. It can also include references to how changes can be contributed back to the Original Version. You may also wish to include a short guide to the design, or a reference to such a document.)
93
-
94
- 3.3 ChangeLog
95
- (This should list both major and minor changes, most recent first. Here are some examples:)
96
-
97
- 1 Feb 2005 (Jane Doe) <NewFontFamilyName> Version 1.1
98
- - Improved build script performance and verbosity
99
- - Extended the smart code documentation
100
- - Corrected minor typos in the documentation
101
- - Fixed position of combining inverted breve below (U+032F)
102
- - Added OpenType/Graphite smart code for Armenian
103
- - Added Armenian glyphs (U+0531 -> U+0587)
104
- - Released as "<NewFontFamilyName>"
105
-
106
- 1 Jan 2005 (Joe Smith) <FontFamilyName> Version 1.0
107
- - Initial release of font "<FontFamilyName>"
108
-
109
- 3.4 Acknowledgements
110
- (Here is where contributors can be acknowledged.
111
-
112
- If you make modifications be sure to add your name (N), email (E), web-address (W) and description (D). This list is sorted by last name in alphabetical order.)
113
-
114
- N: Jane Doe
115
- E: jane@university.edu
116
- W: http://art.university.edu/projects/fonts
117
- D: Contributor - Armenian glyphs and code
118
-
119
- N: Fred Foobar
120
- E: fred@foobar.org
121
- W: http://foobar.org
122
- D: Contributor - misc Graphite fixes
123
-
124
- N: Pat Johnson
125
- E: pat@fontstudio.org
126
- W: http://pat.fontstudio.org
127
- D: Designer - Greek & Cyrillic glyphs based on Roman design
128
-
129
- N: Tom Parker
130
- E: tom@company.com
131
- W: http://www.company.com/tom/projects/fonts
132
- D: Engineer - original smart font code
133
-
134
- N: Joe Smith
135
- E: joe@fontstudio.org
136
- W: http://joe.fontstudio.org
137
- D: Designer - original Roman glyphs
138
-
139
- (Original authors can also include information here about their organization.)
140
-
141
-
142
- 4 ABOUT MAKING CONTRIBUTIONS
143
-
144
- 4.1 Why should I contribute my changes back to the original authors?
145
- It would benefit many people if you contributed back to what you've received. Providing your contributions and improvements to the fonts and other components (data files, source code, build scripts, documentation, etc.) could be a tremendous help and would encourage others to contribute as well and 'give back', which means you will have an opportunity to benefit from other people's contributions as well. Sometimes maintaining your own separate version takes more effort than merging back with the original. Be aware that any contributions, however, must be either your own original creation or work that you own, and you may be asked to affirm that clearly when you contribute.
146
-
147
- 4.2 I've made some very nice improvements to the font, will you consider adopting them and putting them into future Original Versions?
148
- Most authors would be very happy to receive such contributions. Keep in mind that it is unlikely that they would want to incorporate major changes that would require additional work on their end. Any contributions would likely need to be made for all the fonts in a family and match the overall design and style. Authors are encouraged to include a guide to the design with the fonts. It would also help to have contributions submitted as patches or clearly marked changes (the use of smart source revision control systems like subversion, svk or bzr is a good idea). Examples of useful contributions are bug fixes, additional glyphs, stylistic alternates (and the smart font code to access them) or improved hinting.
149
-
150
- 4.3 How can I financially support the development of OFL fonts?
151
- It is likely that most authors of OFL fonts would accept financial contributions - contact them for instructions on how to do this. Such contributions would support future development. You can also pay for others to enhance the fonts and contribute the results back to the original authors for inclusion in the Original Version.
152
-
153
-
154
- 5 ABOUT THE LICENSE
155
-
156
- 5.1 I see that this is version 1.1 of the license. Will there be later changes?
157
- Version 1.1 is the first minor revision of the OFL. We are confident that version 1.1 will meet most needs, but are open to future improvements. Any revisions would be for future font releases, and previously existing licenses would remain in effect. No retroactive changes are possible, although the Copyright Holder(s) can re-release the font under a revised OFL. All versions will be available on our web site: http://scripts.sil.org/OFL.
158
-
159
- 5.2 Can I use the SIL Open Font License for my own fonts?
160
- Yes! We heartily encourage anyone to use the OFL to distribute their own original fonts. It is a carefully constructed license that allows great freedom along with enough artistic integrity protection for the work of the authors as well as clear rules for other contributors and those who redistribute the fonts. Some additional information about using the OFL is included at the end of this FAQ.
161
-
162
- 5.3 Does this license restrict the rights of the Copyright Holder(s)?
163
- No. The Copyright Holder(s) still retains all the rights to their creation; they are only releasing a portion of it for use in a specific way. For example, the Copyright Holder(s) may choose to release a 'basic' version of their font under the OFL, but sell a restricted 'enhanced' version. Only the Copyright Holder(s) can do this.
164
-
165
- 5.4 Is the OFL a contract or a license?
166
- The OFL is a license and not a contract and so does not require you to sign it to have legal validity. By using, modifying and redistributing components under the OFL you indicate that you accept the license.
167
-
168
- 5.5 How about translating the license and the FAQ into other languages?
169
- SIL certainly recognises the need for people who are not familiar with English to be able to understand the OFL and this FAQ better in their own language. Making the license very clear and readable is a key goal of the OFL.
170
-
171
- If you are an experienced translator, you are very welcome to help translating the OFL and its FAQ so that designers and users in your language community can understand the license better. But only the original English version of the license has legal value and has been approved by the community. Translations do not count as legal substitutes and should only serve as a way to explain the original license. SIL - as the author and steward of the license for the community at large - does not approve any translation of the OFL as legally valid because even small translations ambiguities could be abused and create problems.
172
-
173
- We give permission to publish unofficial translations into other languages provided that they comply with the following guidelines:
174
-
175
- - put the following disclaimer in both English and the target language stating clearly that the translation is unofficial:
176
-
177
- "This is an unofficial translation of the SIL Open Font License into $language. It was not published by SIL International, and does not legally state the distribution terms for fonts that use the OFL. A release under the OFL is only valid when using the original English text.
178
-
179
- However, we recognize that this unofficial translation will help users and designers not familiar with English to understand the SIL OFL better and make it easier to use and release font families under this collaborative font design model. We encourage designers who consider releasing their creation under the OFL to read the FAQ in their own language if it is available.
180
-
181
- Please go to http://scripts.sil.org/OFL for the official version of the license and the accompanying FAQ."
182
- "
183
-
184
- - keep your unofficial translation current and update it at our request if needed, for example if there is any ambiguity which could lead to confusion.
185
-
186
- If you start such a unofficial translation effort of the OFL and its accompanying FAQ please let us know, thank you.
187
-
188
-
189
- 6 ABOUT SIL INTERNATIONAL
190
-
191
- 6.1 Who is SIL International and what does it do?
192
- SIL International is a worldwide faith-based education and development organization (NGO) that studies, documents, and assists in developing the world's lesser-known languages through literacy, linguistics, translation, and other academic disciplines. SIL makes its services available to all without regard to religious belief, political ideology, gender, race, or ethnic background. SIL's members and volunteers share a Christian commitment.
193
-
194
- 6.2 What does this have to do with font licensing?
195
- The ability to read, write, type and publish in one's own language is one of the most critical needs for millions of people around the world. This requires fonts that are widely available and support lesser-known languages. SIL develops - and encourages others to develop - a complete stack of writing systems implementation components available under open licenses. This open stack includes input methods, smart fonts, smart rendering libraries and smart applications. There has been a need for a common open license that is specifically applicable to fonts and related software (a crucial component of this stack) so SIL developed the SIL Open Font License with the help of the FLOSS community.
196
-
197
- 6.3 How can I contact SIL?
198
- Our main web site is: http://www.sil.org/
199
- Our site about complex scripts is: http://scripts.sil.org/
200
- Information about this license (including contact email information) is at: http://scripts.sil.org/OFL
201
-
202
-
203
- 7 ABOUT USING THE OFL FOR YOUR ORIGINAL FONTS
204
-
205
- If you want to release your fonts under the OFL, you only need to do the following:
206
-
207
- 7.1 Put your copyright and reserved font names information in the beginning of the main OFL file.
208
- 7.2 Put your copyright and the OFL references in your various font files (such as in the copyright, license and description fields) and in your other components (build scripts, glyph databases, documentation, rendering samples, etc).
209
- 7.3 Write an initial FONTLOG for your font and include it in the release package.
210
- 7.4 Include the OFL in your release package.
211
- 7.5 We also highly recommend you include the relevant practical documentation on the license by putting the OFL-FAQ in your package.
212
-
213
-
214
- That's all. If you have any more questions please get in touch with us.
215
-
216
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/gentium/OFL.txt DELETED
@@ -1,94 +0,0 @@
1
- Copyright (c) 2003-2008 SIL International (http://www.sil.org/),
2
- with Reserved Font Names "Gentium" and "SIL".
3
-
4
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
- This license is copied below, and is also available with a FAQ at:
6
- http://scripts.sil.org/OFL
7
-
8
-
9
- -----------------------------------------------------------
10
- SIL OPEN FONT LICENSE Version 1.1 - 1 February 2007
11
- -----------------------------------------------------------
12
-
13
- PREAMBLE
14
- The goals of the Open Font License (OFL) are to stimulate worldwide
15
- development of collaborative font projects, to support the font creation
16
- efforts of academic and linguistic communities, and to provide a free and
17
- open framework in which fonts may be shared and improved in partnership
18
- with others.
19
-
20
- The OFL allows the licensed fonts to be used, studied, modified and
21
- redistributed freely as long as they are not sold by themselves. The
22
- fonts, including any derivative works, can be bundled, embedded,
23
- redistributed and/or sold with any software provided that the font
24
- names of derivative works are changed. The fonts and derivatives,
25
- however, cannot be released under any other type of license. The
26
- requirement for fonts to remain under this license does not apply
27
- to any document created using the fonts or their derivatives.
28
-
29
- DEFINITIONS
30
- "Font Software" refers to the set of files released by the Copyright
31
- Holder(s) under this license and clearly marked as such. This may
32
- include source files, build scripts and documentation.
33
-
34
- "Reserved Font Name" refers to any names specified as such after the
35
- copyright statement(s).
36
-
37
- "Original Version" refers to the collection of Font Software components as
38
- distributed by the Copyright Holder(s).
39
-
40
- "Modified Version" refers to any derivative made by adding to, deleting,
41
- or substituting -- in part or in whole -- any of the components of the
42
- Original Version, by changing formats or by porting the Font Software to a
43
- new environment.
44
-
45
- "Author" refers to any designer, engineer, programmer, technical
46
- writer or other person who contributed to the Font Software.
47
-
48
- PERMISSION & CONDITIONS
49
- Permission is hereby granted, free of charge, to any person obtaining
50
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
- redistribute, and sell modified and unmodified copies of the Font
52
- Software, subject to the following conditions:
53
-
54
- 1) Neither the Font Software nor any of its individual components,
55
- in Original or Modified Versions, may be sold by itself.
56
-
57
- 2) Original or Modified Versions of the Font Software may be bundled,
58
- redistributed and/or sold with any software, provided that each copy
59
- contains the above copyright notice and this license. These can be
60
- included either as stand-alone text files, human-readable headers or
61
- in the appropriate machine-readable metadata fields within text or
62
- binary files as long as those fields can be easily viewed by the user.
63
-
64
- 3) No Modified Version of the Font Software may use the Reserved Font
65
- Name(s) unless explicit written permission is granted by the corresponding
66
- Copyright Holder. This restriction only applies to the primary font name as
67
- presented to the users.
68
-
69
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
- Software shall not be used to promote, endorse or advertise any
71
- Modified Version, except to acknowledge the contribution(s) of the
72
- Copyright Holder(s) and the Author(s) or with their explicit written
73
- permission.
74
-
75
- 5) The Font Software, modified or unmodified, in part or in whole,
76
- must be distributed entirely under this license, and must not be
77
- distributed under any other license. The requirement for fonts to
78
- remain under this license does not apply to any document created
79
- using the Font Software.
80
-
81
- TERMINATION
82
- This license becomes null and void if any of the above conditions are
83
- not met.
84
-
85
- DISCLAIMER
86
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
- OTHER DEALINGS IN THE FONT SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/LICENSE_E DELETED
@@ -1,16 +0,0 @@
1
- M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT
2
-
3
- -
4
-
5
- LICENSE_E
6
-
7
-
8
-
9
-
10
- These fonts are free software.
11
- Unlimited permission is granted to use, copy, and distribute them, with
12
- or without modification, either commercially or noncommercially.
13
- THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY.
14
-
15
-
16
- http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/LICENSE_J DELETED
@@ -1,15 +0,0 @@
1
- M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT
2
-
3
- -
4
-
5
- LICENSE_J
6
-
7
-
8
-
9
-
10
- これらのフォントはフリー(自由な)ソフトウエアです。
11
- あらゆる改変の有無に関わらず、また商業的な利用であっても、自由にご利用、
12
- 複製、再配布することができますが、全て無保証とさせていただきます。
13
-
14
-
15
- http://mplus-fonts.sourceforge.jp/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/README_E DELETED
@@ -1,82 +0,0 @@
1
- M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT
2
-
3
- -
4
-
5
- README_E
6
-
7
-
8
-
9
-
10
- M+ TESTFLIGHT
11
-
12
- The M+ OUTLINE FONTS are distributed with proportional Latin (4 variations), fixed-halfwidth Latin (3 variations) and fixed-fullwidth Japanese (2 Kana variations) character set. 7 weights from Thin to Black are included, but fixed-halfwidth Latin with 5 weights from Thin to Bold.
13
-
14
-
15
- PROPORTIONAL FONTS (proportional Latin and fixed-fullwidth Japanese)
16
-
17
- M+ 1P mplus-1p-thin.ttf
18
- mplus-1p-light.ttf
19
- mplus-1p-regular.ttf
20
- mplus-1p-medium.ttf
21
- mplus-1p-bold.ttf
22
- mplus-1p-heavy.ttf
23
- mplus-1p-black.ttf
24
-
25
- M+ 2P mplus-2p-thin.ttf
26
- mplus-2p-light.ttf
27
- mplus-2p-regular.ttf
28
- mplus-2p-medium.ttf
29
- mplus-2p-bold.ttf
30
- mplus-2p-heavy.ttf
31
- mplus-2p-black.ttf
32
-
33
- M+ 1C mplus-1c-thin.ttf
34
- mplus-1c-light.ttf
35
- mplus-1c-regular.ttf
36
- mplus-1c-medium.ttf
37
- mplus-1c-bold.ttf
38
- mplus-1c-heavy.ttf
39
- mplus-1c-black.ttf
40
-
41
- M+ 2C mplus-2c-thin.ttf
42
- mplus-2c-light.ttf
43
- mplus-2c-regular.ttf
44
- mplus-2c-medium.ttf
45
- mplus-2c-bold.ttf
46
- mplus-2c-heavy.ttf
47
- mplus-2c-black.ttf
48
-
49
-
50
- FIXED-WIDTH FONTS (fixed-halfwidth Latin and fixed-fullwidth Japanese)
51
-
52
- M+ 1M mplus-1m-thin.ttf
53
- mplus-1m-light.ttf
54
- mplus-1m-regular.ttf
55
- mplus-1m-medium.ttf
56
- mplus-1m-bold.ttf
57
-
58
- M+ 2M mplus-2m-thin.ttf
59
- mplus-2m-light.ttf
60
- mplus-2m-regular.ttf
61
- mplus-2m-medium.ttf
62
- mplus-2m-bold.ttf
63
-
64
- M+ 1MN mplus-1mn-thin.ttf
65
- mplus-1mn-light.ttf
66
- mplus-1mn-regular.ttf
67
- mplus-1mn-medium.ttf
68
- mplus-1mn-bold.ttf
69
-
70
-
71
-
72
-
73
- -
74
-
75
- M+ OUTLINE FONTS
76
- http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/
77
-
78
- mplus-fonts-dev ML
79
- http://lists.sourceforge.jp/mailman/listinfo/mplus-fonts-dev
80
-
81
- M+ FONTS open forum
82
- http://sourceforge.jp/forum/forum.php?forum_id=3403
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/README_J DELETED
@@ -1,90 +0,0 @@
1
- M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT
2
-
3
- -
4
-
5
- README_J
6
-
7
-
8
-
9
-
10
- M+ TESTFLIGHT
11
-
12
- M+ OUTLINE FONTS は 2 種類のかな文字を持つ固定幅和文フォントと 4 種類の
13
- プロポーショナル欧文フォント、3 種類の半角固定幅欧文フォントの組み合わせから
14
- 構成され、それぞれ Thin から Black まで 7 種類(半角固定幅フォントは Bold
15
- まで 5 種類)のウエイトバリエーションがあります。
16
-
17
-
18
- プロポーショナルフォント(和文は全角固定幅、欧文・数字はプロポーショナル)
19
-
20
- M+ 1P mplus-1p-thin.ttf
21
- mplus-1p-light.ttf
22
- mplus-1p-regular.ttf
23
- mplus-1p-medium.ttf
24
- mplus-1p-bold.ttf
25
- mplus-1p-heavy.ttf
26
- mplus-1p-black.ttf
27
-
28
- M+ 2P mplus-2p-thin.ttf
29
- mplus-2p-light.ttf
30
- mplus-2p-regular.ttf
31
- mplus-2p-medium.ttf
32
- mplus-2p-bold.ttf
33
- mplus-2p-heavy.ttf
34
- mplus-2p-black.ttf
35
-
36
- M+ 1C mplus-1c-thin.ttf
37
- mplus-1c-light.ttf
38
- mplus-1c-regular.ttf
39
- mplus-1c-medium.ttf
40
- mplus-1c-bold.ttf
41
- mplus-1c-heavy.ttf
42
- mplus-1c-black.ttf
43
-
44
- M+ 2C mplus-2c-thin.ttf
45
- mplus-2c-light.ttf
46
- mplus-2c-regular.ttf
47
- mplus-2c-medium.ttf
48
- mplus-2c-bold.ttf
49
- mplus-2c-heavy.ttf
50
- mplus-2c-black.ttf
51
-
52
-
53
- 固定幅フォント(和文は全角、欧文・数字は半角の固定幅)
54
-
55
- M+ 1M mplus-1m-thin.ttf
56
- mplus-1m-light.ttf
57
- mplus-1m-regular.ttf
58
- mplus-1m-medium.ttf
59
- mplus-1m-bold.ttf
60
-
61
- M+ 2M mplus-2m-thin.ttf
62
- mplus-2m-light.ttf
63
- mplus-2m-regular.ttf
64
- mplus-2m-medium.ttf
65
- mplus-2m-bold.ttf
66
-
67
- M+ 1MN mplus-1mn-thin.ttf
68
- mplus-1mn-light.ttf
69
- mplus-1mn-regular.ttf
70
- mplus-1mn-medium.ttf
71
- mplus-1mn-bold.ttf
72
-
73
-
74
-
75
-
76
- かな文字と常用漢字、基本的な欧文グリフが揃い、一般的な文章の大半の文字を表示
77
- できるようになりました。不足している文字は他のフォントからの自動補完、
78
- IPAG フォントとの合成などで補うことができます。
79
- M+ OUTLINE FONTS の詳細、お問い合わせなどは以下の URL からお願いします。
80
-
81
- -
82
-
83
- M+ OUTLINE FONTS
84
- http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/
85
-
86
- mplus-fonts-dev ML
87
- http://lists.sourceforge.jp/mailman/listinfo/mplus-fonts-dev
88
-
89
- M+ FONTS open forum
90
- http://sourceforge.jp/forum/forum.php?forum_id=3403
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/m++ipa.pe DELETED
@@ -1,120 +0,0 @@
1
- #!/usr/bin/env fontforge -script
2
-
3
- Mplus1p = "mplus-1p-regular.ttf"
4
- Mplus2p = "mplus-2p-regular.ttf"
5
- Mplus1c = "mplus-1c-regular.ttf"
6
- Mplus2c = "mplus-2c-regular.ttf"
7
- Mplus1m = "mplus-1m-regular.ttf"
8
- Mplus2m = "mplus-2m-regular.ttf"
9
- Mplus1mn = "mplus-1mn-regular.ttf"
10
-
11
- KanjiFont = "ipag.ttf"
12
-
13
- Mplus1p_kanji = "M+1P+IPAG"
14
- Mplus2p_kanji = "M+2P+IPAG"
15
- Mplus1c_kanji = "M+1C+IPAG"
16
- Mplus2c_kanji = "M+2C+IPAG"
17
- Mplus1m_kanji = "M+1M+IPAG"
18
- Mplus2m_kanji = "M+2M+IPAG"
19
- Mplus1mn_kanji = "M+1MN+IPAG"
20
-
21
- panose_mono = Array(10);
22
- panose_mono[0] = 2
23
- panose_mono[1] = 5
24
- panose_mono[2] = 3
25
- panose_mono[3] = 9
26
- panose_mono[4] = 0
27
- panose_mono[5] = 0
28
- panose_mono[6] = 0
29
- panose_mono[7] = 0
30
- panose_mono[8] = 0
31
- panose_mono[9] = 0
32
-
33
- if (FileAccess(Mplus1p)<0 || FileAccess(Mplus2p)<0 || FileAccess(KanjiFont)<0)
34
- Print(" ATTENTION: ")
35
- Print(" this script require IPAFont Ver.003.02 or later. ")
36
- Print(" ")
37
- Print(" USAGE: ")
38
- Print(" ")
39
- Print(" 1) put these eight files on current directory. ")
40
- Print(" mplus-1p-regular.ttf ")
41
- Print(" mplus-2p-regular.ttf ")
42
- Print(" mplus-1c-regular.ttf ")
43
- Print(" mplus-2c-regular.ttf ")
44
- Print(" mplus-1m-regular.ttf ")
45
- Print(" mplus-2m-regular.ttf ")
46
- Print(" mplus-1mn-regular.ttf ")
47
- Print(" ipag.ttf ")
48
- Print(" 2) run this script by fontforge. ")
49
- Print(" /usr/local/bin/fontforge -script m++ipa.pe ")
50
- Print(" 3) seven new files will be created. ")
51
- Print(" M+1P+IPAG.ttf ")
52
- Print(" M+2P+IPAG.ttf ")
53
- Print(" M+1C+IPAG.ttf ")
54
- Print(" M+2C+IPAG.ttf ")
55
- Print(" M+1M+IPAG.ttf ")
56
- Print(" M+2M+IPAG.ttf ")
57
- Print(" M+1MN+IPAG.ttf ")
58
- Print(" ")
59
- Quit()
60
- endif
61
-
62
- family = Mplus1p_kanji
63
- Open(Mplus1p);
64
- ScaleToEm(2048);
65
- MergeFonts(KanjiFont);
66
- SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
67
- Generate(family + ".ttf", "", 4)
68
- Close()
69
-
70
- family = Mplus2p_kanji
71
- Open(Mplus2p);
72
- ScaleToEm(2048);
73
- MergeFonts(KanjiFont);
74
- SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
75
- Generate(family + ".ttf", "", 4)
76
- Close()
77
-
78
- family = Mplus1c_kanji
79
- Open(Mplus1c);
80
- ScaleToEm(2048);
81
- MergeFonts(KanjiFont);
82
- SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
83
- Generate(family + ".ttf", "", 4)
84
- Close()
85
-
86
- family = Mplus2c_kanji
87
- Open(Mplus2c);
88
- ScaleToEm(2048);
89
- MergeFonts(KanjiFont);
90
- SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
91
- Generate(family + ".ttf", "", 4)
92
- Close()
93
-
94
- family = Mplus1m_kanji
95
- Open(Mplus1m);
96
- ScaleToEm(2048);
97
- MergeFonts(KanjiFont);
98
- SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
99
- SetPanose(panose_mono)
100
- Generate(family + ".ttf", "", 4)
101
- Close()
102
-
103
- family = Mplus2m_kanji
104
- Open(Mplus2m);
105
- ScaleToEm(2048);
106
- MergeFonts(KanjiFont);
107
- SetPanose(panose_mono)
108
- SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
109
- Generate(family + ".ttf", "", 4)
110
- Close()
111
-
112
- family = Mplus1mn_kanji
113
- Open(Mplus1mn);
114
- ScaleToEm(2048);
115
- MergeFonts(KanjiFont);
116
- SetFontNames(family + "-Regular", family, family + " Regular", "Regular", "")
117
- SetPanose(panose_mono)
118
- Generate(family + ".ttf", "", 4)
119
- Close()
120
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-black.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-bold.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-heavy.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-light.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-medium.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-regular.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1c-hiragana-thin.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-bold.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-light.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-medium.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-regular.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1m-hiragana-thin.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-bold.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-light.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-medium.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-regular.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-thin.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-black.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-bold.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-heavy.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-light.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-medium.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-regular.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-1p-hiragana-thin.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-black.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-bold.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-heavy.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-light.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-medium.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-regular.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2c-hiragana-thin.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-bold.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-light.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-medium.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-regular.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2m-hiragana-thin.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-black.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-bold.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-heavy.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-light.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-medium.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-regular.ttf DELETED
Binary file
trunk/really-simple-captcha/mplus-TESTFLIGHT-058/mplus-2p-hiragana-thin.ttf DELETED
Binary file
trunk/really-simple-captcha/siteguard-really-simple-captcha.php DELETED
@@ -1,403 +0,0 @@
1
- <?php
2
- /*
3
- This function based on Really Simple CAPTCHA 1.8.
4
- modify matters
5
- * add Hiragana ( Japanese ) CAPTCHA
6
- * add randam line
7
-
8
- Base-Plugin Name: Really Simple CAPTCHA
9
- Base-Plugin URI: http://contactform7.com/captcha/
10
- Base-Description: Really Simple CAPTCHA is a CAPTCHA module intended to be called from other plugins. It is originally created for my Contact Form 7 plugin.
11
- Base-Author: Takayuki Miyoshi
12
- Base-Version: 1.8
13
- Base-Author URI: http://ideasilo.wordpress.com/
14
- */
15
-
16
- /* Copyright 2007-2014 Takayuki Miyoshi (email: takayukister at gmail.com)
17
-
18
- This program is free software; you can redistribute it and/or modify
19
- it under the terms of the GNU General Public License as published by
20
- the Free Software Foundation; either version 2 of the License, or
21
- (at your option) any later version.
22
-
23
- This program is distributed in the hope that it will be useful,
24
- but WITHOUT ANY WARRANTY; without even the implied warranty of
25
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
- GNU General Public License for more details.
27
-
28
- You should have received a copy of the GNU General Public License
29
- along with this program; if not, write to the Free Software
30
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31
- */
32
-
33
- class SiteGuardReallySimpleCaptcha extends SiteGuard_Base {
34
-
35
- public function __construct() {
36
-
37
- /* Mode of character set alphabet(en) or hiragana(jp) */
38
- $this->lang_mode = 'jp';
39
-
40
- /* Length of a word in an image */
41
- $this->char_length = 4;
42
-
43
- /* Directory temporary keeping CAPTCHA images and corresponding text files */
44
- $this->tmp_dir = path_join( dirname( __FILE__ ), 'tmp' );
45
-
46
- /* Array of CAPTCHA image size. Width and height */
47
- $this->img_size = array( 72, 24 );
48
-
49
- /* Background color of CAPTCHA image. RGB color 0-255 */
50
- $this->bg = array( 255, 255, 255 );
51
-
52
- /* Foreground (character) color of CAPTCHA image. RGB color 0-255 */
53
- $this->fg = array( 0, 0, 0 );
54
-
55
- /* Coordinates for a text in an image. I don't know the meaning. Just adjust. */
56
- $this->base = array( 6, 18 );
57
-
58
- /* Font size */
59
- $this->font_size = 14;
60
-
61
- /* Width of a character */
62
- $this->font_char_width = 15;
63
-
64
- /* Image type. 'png', 'gif' or 'jpeg' */
65
- $this->img_type = 'png';
66
-
67
- /* Mode of temporary image files */
68
- $this->file_mode = 0444;
69
-
70
- /* Mode of temporary answer text files */
71
- $this->answer_file_mode = 0440;
72
-
73
- }
74
-
75
- /**
76
- * Generate and return a random word.
77
- *
78
- * @return string Random word with $chars characters x $char_length length
79
- */
80
- public function generate_random_word() {
81
-
82
- /* Characters available in images */
83
- $chars_en = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
84
- $chars_jp = 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよん';
85
-
86
- $word = '';
87
-
88
- if ( 'jp' == $this->lang_mode ) {
89
- $this->chars = $chars_jp;
90
- } else {
91
- $this->chars = $chars_en;
92
- }
93
-
94
- for ( $i = 0; $i < $this->char_length; $i++ ) {
95
- $pos = mt_rand( 0, mb_strlen( $this->chars ) - 1 );
96
- $char = mb_substr( $this->chars, $pos, 1 );
97
- $word .= $char;
98
- }
99
-
100
- return $word;
101
- }
102
-
103
- /**
104
- * Generate CAPTCHA image and corresponding answer file.
105
- *
106
- * @param string $prefix File prefix used for both files
107
- * @param string $word Random word generated by generate_random_word()
108
- * @return string|bool The file name of the CAPTCHA image. Return false if temp directory is not available.
109
- */
110
- public function generate_image( $prefix, $word ) {
111
- if ( ! $this->make_tmp_dir() )
112
- return false;
113
-
114
- $this->cleanup();
115
-
116
- /* Array of fonts. Randomly picked up per character */
117
- if ( 'jp' == $this->lang_mode ) {
118
- $this->fonts = array(
119
- dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-black.ttf',
120
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-bold.ttf',
121
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-heavy.ttf',
122
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-light.ttf',
123
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-medium.ttf',
124
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-regular.ttf',
125
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1c-hiragana-thin.ttf',
126
- dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1m-hiragana-bold.ttf',
127
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1m-hiragana-light.ttf',
128
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1m-hiragana-medium.ttf',
129
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1m-hiragana-regular.ttf',
130
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1m-hiragana-thin.ttf',
131
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-bold.ttf',
132
- dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-light.ttf',
133
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-medium.ttf',
134
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-regular.ttf',
135
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1mn-hiragana-thin.ttf',
136
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1p-hiragana-black.ttf',
137
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1p-hiragana-bold.ttf',
138
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1p-hiragana-heavy.ttf',
139
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1p-hiragana-light.ttf',
140
- dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1p-hiragana-medium.ttf',
141
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1p-hiragana-regular.ttf',
142
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-1p-hiragana-thin.ttf',
143
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2c-hiragana-black.ttf',
144
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2c-hiragana-bold.ttf',
145
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2c-hiragana-heavy.ttf',
146
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2c-hiragana-light.ttf',
147
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2c-hiragana-medium.ttf',
148
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2c-hiragana-regular.ttf',
149
- dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2c-hiragana-thin.ttf',
150
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2m-hiragana-bold.ttf',
151
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2m-hiragana-light.ttf',
152
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2m-hiragana-medium.ttf',
153
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2m-hiragana-regular.ttf',
154
- dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2m-hiragana-thin.ttf',
155
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2p-hiragana-black.ttf',
156
- dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2p-hiragana-bold.ttf',
157
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2p-hiragana-heavy.ttf',
158
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2p-hiragana-light.ttf',
159
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2p-hiragana-medium.ttf',
160
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2p-hiragana-regular.ttf',
161
- //dirname( __FILE__ ) . '/mplus-TESTFLIGHT-058/mplus-2p-hiragana-thin.ttf',
162
- );
163
- } else {
164
- $this->fonts = array(
165
- dirname( __FILE__ ) . '/gentium/GenBkBasR.ttf',
166
- dirname( __FILE__ ) . '/gentium/GenBkBasI.ttf',
167
- dirname( __FILE__ ) . '/gentium/GenBkBasBI.ttf',
168
- dirname( __FILE__ ) . '/gentium/GenBkBasB.ttf',
169
- );
170
- }
171
-
172
- $dir = trailingslashit( $this->tmp_dir );
173
- $filename = null;
174
-
175
- if ( $im = imagecreatetruecolor( $this->img_size[0], $this->img_size[1] ) ) {
176
- $bg = imagecolorallocate( $im, $this->bg[0], $this->bg[1], $this->bg[2] );
177
- $fg = imagecolorallocate( $im, $this->fg[0], $this->fg[1], $this->fg[2] );
178
-
179
- imagefill( $im, 0, 0, $bg );
180
-
181
- // randam lines
182
- for ( $i = 0; $i < 5; $i++ ) {
183
- $color = imagecolorallocate( $im, 196, 196, 196 );
184
- imageline( $im, mt_rand( 0, $this->img_size[0] - 1 ), mt_rand( 0, $this->img_size[1] - 1 ), mt_rand( 0, $this->img_size[0] - 1 ), mt_rand( 0, $this->img_size[1] - 1 ), $color );
185
- }
186
-
187
- $x = $this->base[0] + mt_rand( -2, 2 );
188
-
189
- $gd_info = gd_info( );
190
- for ( $i = 0; $i < mb_strlen( $word ); $i++ ) {
191
- $font = $this->fonts[array_rand( $this->fonts )];
192
- $font = $this->normalize_path( $font );
193
- if ( $gd_info['JIS-mapped Japanese Font Support'] ) {
194
- $char = mb_convert_encoding( mb_substr( $word, $i, 1 ), 'SJIS', 'UTF-8' );
195
- } else {
196
- $char = mb_substr( $word, $i, 1 );
197
- }
198
- imagettftext( $im, $this->font_size, mt_rand( -12, 12 ), $x, $this->base[1] + mt_rand( -2, 2 ), $fg, $font, $char );
199
- $x += $this->font_char_width;
200
- }
201
-
202
- switch ( $this->img_type ) {
203
- case 'jpeg':
204
- $filename = sanitize_file_name( $prefix . '.jpeg' );
205
- $file = $this->normalize_path( $dir . $filename );
206
- imagejpeg( $im, $file );
207
- break;
208
- case 'gif':
209
- $filename = sanitize_file_name( $prefix . '.gif' );
210
- $file = $this->normalize_path( $dir . $filename );
211
- imagegif( $im, $file );
212
- break;
213
- case 'png':
214
- default:
215
- $filename = sanitize_file_name( $prefix . '.png' );
216
- $file = $this->normalize_path( $dir . $filename );
217
- imagepng( $im, $file );
218
- }
219
-
220
- imagedestroy( $im );
221
- @chmod( $file, $this->file_mode );
222
- }
223
-
224
- $this->generate_answer_file( $prefix, $word );
225
-
226
- return $filename;
227
- }
228
-
229
- /**
230
- * Generate answer file corresponding to CAPTCHA image.
231
- *
232
- * @param string $prefix File prefix used for answer file
233
- * @param string $word Random word generated by generate_random_word()
234
- */
235
- public function generate_answer_file( $prefix, $word ) {
236
- $dir = trailingslashit( $this->tmp_dir );
237
- $answer_file = $dir . sanitize_file_name( $prefix . '.txt' );
238
- $answer_file = $this->normalize_path( $answer_file );
239
-
240
- if ( $fh = @fopen( $answer_file, 'w' ) ) {
241
- $word = strtoupper( $word );
242
- $salt = wp_generate_password( 64 );
243
- $hash = hash_hmac( 'md5', $word, $salt );
244
-
245
- $code = $salt . '|' . $hash;
246
-
247
- fwrite( $fh, $code );
248
- fclose( $fh );
249
- }
250
-
251
- @chmod( $answer_file, $this->answer_file_mode );
252
- }
253
-
254
- /**
255
- * Check a response against the code kept in the temporary file.
256
- *
257
- * @param string $prefix File prefix used for both files
258
- * @param string $response CAPTCHA response
259
- * @return bool Return true if the two match, otherwise return false.
260
- */
261
- public function check( $prefix, $response ) {
262
- if ( 0 == strlen( $prefix ) ) {
263
- return false;
264
- }
265
-
266
- $response = str_replace( array( ' ', "\t" ), '', $response );
267
- $response = strtoupper( $response );
268
-
269
- $dir = trailingslashit( $this->tmp_dir );
270
- $filename = sanitize_file_name( $prefix . '.txt' );
271
- $file = $this->normalize_path( $dir . $filename );
272
-
273
- if ( @is_readable( $file ) && ( $code = file_get_contents( $file ) ) ) {
274
- $code = explode( '|', $code, 2 );
275
-
276
- $salt = $code[0];
277
- $hash = $code[1];
278
- if ( hash_hmac( 'md5', $response, $salt ) == $hash )
279
- return true;
280
- }
281
-
282
- return false;
283
- }
284
-
285
- /**
286
- * Remove temporary files with given prefix.
287
- *
288
- * @param string $prefix File prefix
289
- */
290
- public function remove( $prefix ) {
291
- $suffixes = array( '.jpeg', '.gif', '.png', '.php', '.txt' );
292
-
293
- foreach ( $suffixes as $suffix ) {
294
- $dir = trailingslashit( $this->tmp_dir );
295
- $filename = sanitize_file_name( $prefix . $suffix );
296
- $file = $this->normalize_path( $dir . $filename );
297
-
298
- if ( @is_file( $file ) ) {
299
- unlink( $file );
300
- }
301
- }
302
- }
303
-
304
- /**
305
- * Clean up dead files older than given length of time.
306
- *
307
- * @param int $minutes Consider older files than this time as dead files
308
- * @return int|bool The number of removed files. Return false if error occurred.
309
- */
310
- public function cleanup( $minutes = 60 ) {
311
- $dir = trailingslashit( $this->tmp_dir );
312
- $dir = $this->normalize_path( $dir );
313
-
314
- if ( ! @is_dir( $dir ) || ! @is_readable( $dir ) )
315
- return false;
316
-
317
- $is_win = ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) );
318
-
319
- if ( ! ( $is_win ? win_is_writable( $dir ) : @is_writable( $dir ) ) )
320
- return false;
321
-
322
- $count = 0;
323
-
324
- if ( $handle = @opendir( $dir ) ) {
325
- while ( false !== ( $filename = readdir( $handle ) ) ) {
326
- if ( ! preg_match( '/^[0-9]+\.(php|txt|png|gif|jpeg)$/', $filename ) )
327
- continue;
328
-
329
- $file = $this->normalize_path( $dir . $filename );
330
-
331
- $stat = @stat( $file );
332
- if ( ( $stat['mtime'] + $minutes * 60 ) < time() ) {
333
- @unlink( $file );
334
- $count += 1;
335
- }
336
- }
337
-
338
- closedir( $handle );
339
- }
340
-
341
- return $count;
342
- }
343
-
344
- /**
345
- * Make a temporary directory and generate .htaccess file in it.
346
- *
347
- * @return bool True on successful create, false on failure.
348
- */
349
- public function make_tmp_dir() {
350
- global $config;
351
-
352
- $dir = trailingslashit( $this->tmp_dir );
353
- $dir = $this->normalize_path( $dir );
354
-
355
- if ( ! wp_mkdir_p( $dir ) )
356
- return false;
357
-
358
- $htaccess_file = $this->normalize_path( $dir . '.htaccess' );
359
-
360
- // add 'Satisfy Any' in .htaccess from version 1.2.0
361
- if ( version_compare( $config->get( 'version' ), '1.2.0' ) < 0 ) {
362
- @unlink( $htaccess_file );
363
- }
364
-
365
- if ( ! file_exists( $htaccess_file ) ) {
366
- if ( $handle = @fopen( $htaccess_file, 'w' ) ) {
367
- fwrite( $handle, 'Order deny,allow' . "\n" );
368
- fwrite( $handle, 'Deny from all' . "\n" );
369
- fwrite( $handle, '<Files ~ "^[0-9A-Za-z]+\\.(jpeg|gif|png)$">' . "\n" );
370
- fwrite( $handle, ' Allow from all' . "\n" );
371
- fwrite( $handle, ' Satisfy Any' . "\n" );
372
- fwrite( $handle, '</Files>' . "\n" );
373
- fclose( $handle );
374
- }
375
- }
376
-
377
- $dmy_src_file = SITEGUARD_PATH . 'images/dummy.png';
378
- $dmy_dst_file = $dir . 'dummy.png';
379
-
380
- if ( ! file_exists( $dmy_dst_file ) ) {
381
- copy( $dmy_src_file, $dmy_dst_file );
382
- }
383
-
384
- return true;
385
- }
386
-
387
- /**
388
- * Normalize a filesystem path.
389
- *
390
- * This should be replaced by wp_normalize_path when the plugin's
391
- * minimum requirement becomes WordPress 3.9 or higher.
392
- *
393
- * @param string $path Path to normalize.
394
- * @return string Normalized path.
395
- */
396
- private function normalize_path( $path ) {
397
- $path = str_replace( '\\', '/', $path );
398
- $path = preg_replace( '|/+|', '/', $path );
399
- return $path;
400
- }
401
- }
402
-
403
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/siteguard.php DELETED
@@ -1,184 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: SiteGuard WP Plugin
4
- Plugin URI: http://www.jp-secure.com/cont/products/siteguard_wp_plugin/index_en.html
5
- Description: Only installing SiteGuard WP Plugin on WordPress, its security can be improved. SiteGurad WP Plugin is the plugin specialized for the protection against the attack to the management page and login. It also have the function to create the exclude rule for WAF (SiteGuard Lite, to use it, WAF should be installed on the Web server.)
6
- Author: JP-Secure
7
- Author URI: http://www.jp-secure.com/eng/
8
- Text Domain: siteguard
9
- Domain Path: /languages/
10
- Version: 1.2.0
11
- */
12
-
13
- /* Copyright 2014 JP-Secure Inc
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License, version 2, as
17
- published by the Free Software Foundation.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
23
-
24
- You should have received a copy of the GNU General Public License
25
- along with this program; if not, write to the Free Software
26
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
- */
28
-
29
- if ( ! defined( 'ABSPATH' ) ) {
30
- exit;
31
- }
32
-
33
- define( 'SITEGUARD_VERSION', '1.2.0' );
34
-
35
- define( 'SITEGUARD_PATH', plugin_dir_path( __FILE__ ) );
36
- define( 'SITEGUARD_URL_PATH', plugin_dir_url( __FILE__ ) );
37
-
38
- define( 'SITEGUARD_LOGIN_SUCCESS', 0 );
39
- define( 'SITEGUARD_LOGIN_FAILED', 1 );
40
- define( 'SITEGUARD_LOGIN_FAIL_ONCE', 2 );
41
- define( 'SITEGUARD_LOGIN_LOCKED', 3 );
42
-
43
- require_once( 'classes/siteguard-base.php' );
44
- require_once( 'classes/siteguard-config.php' );
45
- require_once( 'classes/siteguard-htaccess.php' );
46
- require_once( 'classes/siteguard-admin-filter.php' );
47
- require_once( 'classes/siteguard-rename-login.php' );
48
- require_once( 'classes/siteguard-login-history.php' );
49
- require_once( 'classes/siteguard-login-lock.php' );
50
- require_once( 'classes/siteguard-login-alert.php' );
51
- require_once( 'classes/siteguard-captcha.php' );
52
- require_once( 'classes/siteguard-disable-pingback.php' );
53
- require_once( 'classes/siteguard-waf-exclude-rule.php' );
54
- require_once( 'classes/siteguard-updates-notify.php' );
55
- require_once( 'admin/siteguard-menu-init.php' );
56
-
57
- global $htaccess;
58
- global $config;
59
- global $admin_filter;
60
- global $rename_login;
61
- global $loginlock;
62
- global $loginalert;
63
- global $captcha;
64
- global $login_history;
65
- global $pingback;
66
- global $waf_exclude_rule;
67
- global $updates_notify;
68
-
69
- $htaccess = new SiteGuard_Htaccess( );
70
- $config = new SiteGuard_Config( );
71
- $admin_filter = new SiteGuard_AdminFilter( );
72
- $rename_login = new SiteGuard_RenameLogin( );
73
- $loginlock = new SiteGuard_LoginLock( );
74
- $loginalert = new SiteGuard_LoginAlert( );
75
- $login_history = new SiteGuard_LoginHistory( );
76
- $captcha = new SiteGuard_CAPTCHA( );
77
- $pingback = new SiteGuard_Disable_Pingback( );
78
- $waf_exclude_rule = new SiteGuard_WAF_Exclude_Rule( );
79
- $updates_notify = new SiteGuard_UpdatesNotify( );
80
-
81
- function siteguard_activate( ) {
82
- global $config, $admin_filter, $rename_login, $login_history, $captcha, $loginlock, $loginalert, $pingback, $waf_exclude_rule, $updates_notify;
83
-
84
- load_plugin_textdomain(
85
- 'siteguard',
86
- false,
87
- dirname( plugin_basename( __FILE__ ) ) . '/languages'
88
- );
89
-
90
- $config->set( 'show_admin_notices', '0' );
91
- $config->update( );
92
- $admin_filter->init();
93
- $rename_login->init();
94
- $login_history->init();
95
- $captcha->init();
96
- $loginlock->init();
97
- $loginalert->init();
98
- $pingback->init();
99
- $waf_exclude_rule->init();
100
- $updates_notify->init();
101
- }
102
- register_activation_hook( __FILE__, 'siteguard_activate' );
103
-
104
- function siteguard_deactivate( ) {
105
- global $config;
106
- $config->set( 'show_admin_notices', '0' );
107
- $config->update( );
108
- SiteGuard_RenameLogin::feature_off( );
109
- SiteGuard_AdminFilter::feature_off( );
110
- SiteGuard_WAF_Exclude_Rule::feature_off( );
111
- SiteGuard_UpdatesNotify::feature_off( );
112
- }
113
- register_deactivation_hook( __FILE__, 'siteguard_deactivate' );
114
-
115
-
116
- class SiteGuard extends SiteGuard_Base {
117
- var $menu_init;
118
- function __construct( ) {
119
- global $config;
120
- add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
121
- if ( is_admin( ) ) {
122
- $this->menu_init = new SiteGuard_Menu_Init( );
123
- add_action( 'admin_init', array( $this, 'upgrade' ) );
124
- if ( '0' === $config->get( 'show_admin_notices' ) && '1' == $config->get( 'renamelogin_enable' ) ) {
125
- add_action( 'admin_notices', array( $this, 'admin_notices' ) );
126
- $config->set( 'show_admin_notices', '1' );
127
- $config->update( );
128
- }
129
- }
130
- }
131
- function plugins_loaded( ) {
132
- load_plugin_textdomain(
133
- 'siteguard',
134
- false,
135
- dirname( plugin_basename( __FILE__ ) ) . '/languages'
136
- );
137
- }
138
- function admin_notices( ) {
139
- global $rename_login;
140
- echo '<div class="updated" style="background-color:#719f1d;"><p><span style="border: 4px solid #def1b8;padding: 4px 4px;color:#fff;font-weight:bold;background-color:#038bc3;">';
141
- echo esc_html__( 'Login page URL was changed.', 'siteguard' ) . '</span>';
142
- echo '<span style="color:#eee;">';
143
- echo esc_html__( ' Please bookmark ', 'siteguard' ) . '<a style="color:#fff;text-decoration:underline;" href="' . esc_url( wp_login_url( ) ) . '">';
144
- echo esc_html__( 'new login URL', 'siteguard' ) . '</a>';
145
- echo esc_html__( '. Setting change is ', 'siteguard' ) . '<a style="color:#fff;text-decoration:underline;" href="' . esc_url( menu_page_url( 'siteguard_rename_login', false ) ) . '">';
146
- echo esc_html__( 'here', 'siteguard' ) . '</a>';
147
- echo '.</span></p></div>';
148
- $rename_login->send_notify( );
149
- }
150
- function upgrade( ) {
151
- global $config, $rename_login, $admin_filter, $loginalert, $updates_notify;
152
- $upgrade_ok = true;
153
- $old_version = $config->get( 'version' );
154
- if ( '' == $old_version ) {
155
- $old_version = '0.0.0';
156
- }
157
- if ( version_compare( $old_version, '1.0.3' ) < 0 ) {
158
- if ( '1' == $config->get( 'renamelogin_enable' ) ) {
159
- if ( true != $rename_login->feature_on( ) ) {
160
- $upgrade_ok = false;
161
- }
162
- }
163
- }
164
- if ( version_compare( $old_version, '1.0.6' ) < 0 ) {
165
- if ( '1' == $config->get( 'admin_filter_enable' ) ) {
166
- if ( true != $admin_filter->feature_on( $_SERVER['REMOTE_ADDR'] ) ) {
167
- $upgrade_ok = false;
168
- }
169
- }
170
- }
171
- if ( version_compare( $old_version, '1.1.1' ) < 0 ) {
172
- $loginalert->init();
173
- }
174
- if ( version_compare( $old_version, '1.2.0' ) < 0 ) {
175
- $updates_notify->init();
176
- }
177
- if ( $upgrade_ok && $old_version != SITEGUARD_VERSION ) {
178
- $config->set( 'version', SITEGUARD_VERSION );
179
- $config->update( );
180
- }
181
- }
182
- }
183
- $siteguard = new SiteGuard;
184
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/uninstall.php DELETED
@@ -1,21 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
4
- exit ();
5
- }
6
-
7
- function delete_siteguard_plugin( ) {
8
- global $wpdb;
9
-
10
- delete_option( 'siteguard_config' );
11
-
12
- $table_name = $wpdb->prefix . 'siteguard_login';
13
- $wpdb->query( "DROP TABLE IF EXISTS $table_name;" );
14
-
15
- $table_name = $wpdb->prefix . 'siteguard_history';
16
- $wpdb->query( "DROP TABLE IF EXISTS $table_name;" );
17
- }
18
-
19
- delete_siteguard_plugin( );
20
-
21
- ?>