PluginProbe ʕ •ᴥ•ʔ
SiteGuard WP Plugin / 1.0.2
SiteGuard WP Plugin v1.0.2
1.8.7 1.8.6 1.8.6-beta1 1.8.6-beta2 1.8.4 1.8.5 1.8.3 1.8.2 1.8.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.4.3 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.7.0 1.7.1 1.7.10 1.7.11 1.7.12 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.0-beta1 1.8.0-beta2 1.8.0-beta3 1.8.0-beta4
siteguard / siteguard.php
siteguard Last commit date
admin 11 years ago classes 11 years ago css 11 years ago images 11 years ago languages 11 years ago really-simple-captcha 11 years ago license.txt 11 years ago readme.txt 11 years ago siteguard.php 11 years ago uninstall.php 11 years ago
siteguard.php
116 lines
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.0.2
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_PATH', plugin_dir_path( __FILE__ ) );
34 define( 'SITEGUARD_URL_PATH', plugin_dir_url( __FILE__ ) );
35
36 define( 'SITEGUARD_LOGIN_SUCCESS', 0 );
37 define( 'SITEGUARD_LOGIN_FAILED', 1 );
38 define( 'SITEGUARD_LOGIN_FAIL_ONCE', 2 );
39 define( 'SITEGUARD_LOGIN_LOCKED', 3 );
40
41 require_once( 'classes/siteguard-base.php' );
42 require_once( 'classes/siteguard-config.php' );
43 require_once( 'classes/siteguard-htaccess.php' );
44 require_once( 'classes/siteguard-admin-filter.php' );
45 require_once( 'classes/siteguard-rename-login.php' );
46 require_once( 'classes/siteguard-login-history.php' );
47 require_once( 'classes/siteguard-login-lock.php' );
48 require_once( 'classes/siteguard-captcha.php' );
49 require_once( 'classes/siteguard-disable-pingback.php' );
50 require_once( 'classes/siteguard-waf-exclude-rule.php' );
51 require_once( 'admin/siteguard-menu-init.php' );
52
53 global $htaccess;
54 global $config;
55 global $admin_filter;
56 global $rename_login;
57 global $loginlock;
58 global $captcha;
59 global $login_history;
60 global $pingback;
61 global $waf_exclude_rule;
62
63 $htaccess = new SiteGuard_Htaccess( );
64 $config = new SiteGuard_Config( );
65 $admin_filter = new SiteGuard_AdminFilter( );
66 $rename_login = new SiteGuard_RenameLogin( );
67 $loginlock = new SiteGuard_LoginLock( );
68 $login_history = new SiteGuard_LoginHistory( );
69 $captcha = new SiteGuard_CAPTCHA( );
70 $pingback = new SiteGuard_Disable_Pingback( );
71 $waf_exclude_rule = new SiteGuard_WAF_Exclude_Rule( );
72
73 function siteguard_activate( ) {
74 global $admin_filter, $rename_login, $login_history, $captcha, $loginlock, $pingback, $waf_exclude_rule;
75
76 flush_rewrite_rules();
77 $admin_filter->init();
78 $rename_login->init();
79 $login_history->init();
80 $captcha->init();
81 $loginlock->init();
82 $pingback->init();
83 $waf_exclude_rule->init();
84 }
85 register_activation_hook( __FILE__, 'siteguard_activate' );
86
87 function siteguard_deactivate( ) {
88 global $config;
89 flush_rewrite_rules();
90 $config->set( 'siteguard_meta_version', '0.0' );
91 $config->update( );
92 SiteGuard_RenameLogin::feature_off( );
93 SiteGuard_AdminFilter::feature_off( );
94 SiteGuard_WAF_Exclude_Rule::feature_off( );
95 }
96 register_deactivation_hook( __FILE__, 'siteguard_deactivate' );
97
98 class SiteGuard extends SiteGuard_Base {
99 var $menu_init;
100 function __construct( ) {
101 if ( is_admin( ) ) {
102 $this->menu_init = new SiteGuard_Menu_Init( );
103 }
104 add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
105 }
106 function plugins_loaded( ) {
107 load_plugin_textdomain(
108 'siteguard',
109 false,
110 dirname( plugin_basename( __FILE__ ) ) . '/languages'
111 );
112 }
113 }
114 $siteguard = new SiteGuard;
115 ?>
116