forked from Taipo/pareto_security
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pareto_security.php
67 lines (60 loc) · 2.45 KB
/
pareto_security.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/*
Plugin Name: Pareto Security
Plugin URI: https://hokioisecurity.com/?p=17
Description: Core Security - Protection from a range of attacks against Content Management Systems (CMS)
Author: Te_Taipo
Version: 2.9.7.1
Requirements: Requires at least PHP version 5.2.0
Author URI: https://hokioisecurity.com
Donations via: https://hokioisecurity.com/donations/
*/
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See: See http://www.gnu.org/licenses/gpl-3.0.txt
*/
if ( defined( 'WP_PLUGIN_DIR' ) && false !== function_exists( 'is_admin' ) ) {
add_action( 'plugins_loaded','pareto_security_init' );
} else pareto_security_init();
function pareto_security_init() {
require_once( 'pareto_functions.php' );
$ParetoSecurity = new pareto_functions();
if ( false !== $ParetoSecurity->is_wp() ) {
register_activation_hook( __FILE__, array(
$ParetoSecurity,
'_activate'
) );
register_deactivation_hook( __FILE__, array(
$ParetoSecurity,
'_deactivate'
) );
require_once( 'pareto_settings.php' );
$ParetoSecurity = new pareto_settings();
$ParetoSecurity->_time_offset = ( int ) get_option( 'gmt_offset' );
}
# set ip address
$ParetoSecurity->_client_ip = $ParetoSecurity->get_ip();
# set mode
$ParetoSecurity->advanced_mode( $ParetoSecurity->_adv_mode );
# load data from XML
$ParetoSecurity->load_lists( true, true );
# Shields Up
$ParetoSecurity->_TOR_SHIELD();
$ParetoSecurity->_REQUEST_SHIELD();
$ParetoSecurity->_QUERYSTRING_SHIELD();
$ParetoSecurity->_POST_SHIELD();
$ParetoSecurity->_LOGIN_SHIELD();
$ParetoSecurity->_HTTPHOST_SHIELD();
$ParetoSecurity->_COOKIE_SHIELD();
$ParetoSecurity->_SPIDER_SHIELD();
}