PluginProbe
WebTotem Security / 2.4.14
WebTotem Security v2.4.14
3.0.2 3.0.1 3.0.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.1 2.2.2 2.2.3 All 110 releases
← All changes | wt-security.php +159 -160 trunk2.4.14 View file →
@@ -1,160 +1,159 @@
1 -<?php
2 -/**
3 - * Plugin Name: WebTotem Security
4 - * Description: The <a href="https://wtotem.com/" target="_blank">WebTotem</a> Security plugin monitors websites and prevents website attacks with the help of special internal and external utilities.
5 - * Author URI: https://wtotem.com/
6 - * Author: WebTotem Team
7 - * Text Domain: wtotem
8 - * Domain Path: /lang
9 - * Version: 3.0.2
10 - * License: GPL v2 or later
11 - * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
12 - * PHP version 7.1
13 - *
14 - * @copyright 2021 WebTotem
15 - * @license GPL-2.0-or-later
16 - * @link https://wordpress.org/plugins/wt-security
17 - */
18 -
19 -/**
20 - * Main file to control the plugin.
21 - */
22 -define('WEBTOTEM_INIT', true);
23 -
24 -/**
25 - * Plugin dependencies.
26 - *
27 - * list of required WordPress functions for the plugin to work.
28 - */
29 -$wtotem_dependencies = array(
30 - 'wp',
31 - 'wp_die',
32 - 'add_action',
33 - 'remove_action',
34 - 'wp_remote_get',
35 - 'wp_remote_post',
36 -);
37 -
38 -// Stopping execution if dependencies are not met.
39 -foreach ($wtotem_dependencies as $dependency) {
40 - if (!function_exists($dependency)) {
41 - // Report invalid access.
42 - header('HTTP/1.1 403 Forbidden');
43 - die("Protected By WebTotem!");
44 - }
45 -}
46 -
47 -// Stopping execution if the ABSPATH constant is not available
48 -if (!defined('ABSPATH')) {
49 - // Report invalid access.
50 - header('HTTP/1.1 403 Forbidden');
51 - die("Protected By WebTotem!");
52 -}
53 -
54 -/**
55 - * Current version of the plugin's code.
56 - */
57 -define('WEBTOTEM_VERSION', '3.0.2');
58 -
59 -/**
60 - * The name of the folder where the plugin's files will be located.
61 - */
62 -define("WEBTOTEM_PLUGIN_FOLDER", basename(dirname(__FILE__)));
63 -
64 -/**
65 - * The fullpath where the plugin's files will be located.
66 - */
67 -define('WEBTOTEM_PLUGIN_PATH', WP_PLUGIN_DIR . '/' . WEBTOTEM_PLUGIN_FOLDER);
68 -
69 -/**
70 - * The local URL where the plugin's files and assets are served.
71 - */
72 -define('WEBTOTEM_URL', rtrim(plugin_dir_url(__FILE__), '/'));
73 -
74 -/**
75 - * The domain name of the current site, without protocol and www.
76 - */
77 -define("WEBTOTEM_SITE_DOMAIN", str_replace(['http://', 'https://', '//', '://', 'www.'], '', get_site_url()));
78 -
79 -/**
80 - * Unique name of the plugin through out all the code.
81 - */
82 -define("WEBTOTEM", 'wtotem');
83 -
84 -/* Load plugin translations */
85 -function wtotem_load_plugin_textdomain() {
86 - load_plugin_textdomain('wtotem', false, basename(dirname(__FILE__)) . '/lang/');
87 -}
88 -add_action('plugins_loaded', 'wtotem_load_plugin_textdomain');
89 -
90 -
91 -/* Load all classes before anything else. */
92 -require_once 'lib/Helper.php';
93 -require_once 'lib/API.php';
94 -require_once 'lib/DB.php';
95 -require_once 'lib/Cache.php';
96 -require_once 'lib/modules/login/Login.php';
97 -require_once 'lib/modules/logs/EventListener.php';
98 -require_once 'lib/modules/logs/Scan.php';
99 -require_once 'lib/modules/logs/Crawler.php';
100 -require_once 'lib/Request.php';
101 -require_once 'lib/Interface.php';
102 -require_once 'lib/AgentManager.php';
103 -require_once 'lib/Option.php';
104 -require_once 'lib/Template.php';
105 -require_once 'lib/Country.php';
106 -require_once 'lib/Ajax.php';
107 -
108 -/* Load page and ajax handlers */
109 -require_once 'src/PageHandler.php';
110 -
111 -/* Load common variables and triggers */
112 -require_once 'src/Common.php';
113 -
114 -/**
115 - * Uninstalled the plugin
116 - *
117 - * @return void
118 - */
119 -function wtotemUninstall() {
120 -
121 - if (WebTotemOption::getPluginSettings('hide_wp_version')) {
122 - WebTotemOption::restoreReadme();
123 - }
124 -
125 - if(WebTotem::isMultiSite()){
126 - WebTotemOption::clearAllHosts();
127 - }
128 -
129 - /* Delete settings from the database */
130 - WebTotemDB::uninstall();
131 -
132 -}
133 -
134 -register_uninstall_hook(__FILE__, 'wtotemUninstall');
135 -
136 -/**
137 - * Deactivation plugin
138 - *
139 - * @return void
140 - */
141 -function wtotemDeactivation() {
142 - if (WebTotemOption::getPluginSettings('hide_wp_version')) {
143 - WebTotemOption::restoreReadme();
144 - }
145 -}
146 -register_deactivation_hook( __FILE__, 'wtotemDeactivation' );
147 -
148 -/**
149 - * Deactivation plugin
150 - *
151 - * @return void
152 - */
153 -function wtotemActivation() {
154 - WebTotemDB::install();
155 - if (WebTotemOption::getPluginSettings('hide_wp_version')) {
156 - WebTotemOption::hideReadme();
157 - }
158 -}
159 -
160 -register_activation_hook( __FILE__, 'wtotemActivation' );
1 +<?php
2 +/**
3 + * Plugin Name: WebTotem Security
4 + * Description: The <a href="https://wtotem.com/" target="_blank">WebTotem</a> Security plugin monitors websites and prevents website attacks with the help of special internal and external utilities.
5 + * Author URI: https://wtotem.com/
6 + * Author: WebTotem
7 + * Text Domain: wtotem
8 + * Domain Path: /lang
9 + * Version: 2.4.14
10 + *
11 + * PHP version 7.1
12 + *
13 + * @copyright 2021-2022 WebTotem
14 + * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL2
15 + * @link https://wordpress.org/plugins/wt-security
16 + */
17 +
18 +/**
19 + * Main file to control the plugin.
20 + */
21 +define('WEBTOTEM_INIT', true);
22 +
23 +/**
24 + * Plugin dependencies.
25 + *
26 + * list of required WordPress functions for the plugin to work.
27 + */
28 +$wtotem_dependencies = array(
29 + 'wp',
30 + 'wp_die',
31 + 'add_action',
32 + 'remove_action',
33 + 'wp_remote_get',
34 + 'wp_remote_post',
35 +);
36 +
37 +// Stopping execution if dependencies are not met.
38 +foreach ($wtotem_dependencies as $dependency) {
39 + if (!function_exists($dependency)) {
40 + // Report invalid access.
41 + header('HTTP/1.1 403 Forbidden');
42 + die("Protected By WebTotem!");
43 + }
44 +}
45 +
46 +// Stopping execution if the ABSPATH constant is not available
47 +if (!defined('ABSPATH')) {
48 + // Report invalid access.
49 + header('HTTP/1.1 403 Forbidden');
50 + die("Protected By WebTotem!");
51 +}
52 +
53 +/**
54 + * Current version of the plugin's code.
55 + */
56 +define('WEBTOTEM_VERSION', '2.4.14');
57 +
58 +/**
59 + * The name of the folder where the plugin's files will be located.
60 + */
61 +define("WEBTOTEM_PLUGIN_FOLDER", basename(dirname(__FILE__)));
62 +
63 +/**
64 + * The fullpath where the plugin's files will be located.
65 + */
66 +define('WEBTOTEM_PLUGIN_PATH', WP_PLUGIN_DIR . '/' . WEBTOTEM_PLUGIN_FOLDER);
67 +
68 +/**
69 + * The local URL where the plugin's files and assets are served.
70 + */
71 +define('WEBTOTEM_URL', rtrim(plugin_dir_url(__FILE__), '/'));
72 +
73 +/**
74 + * The domain name of the current site, without protocol and www.
75 + */
76 +define("WEBTOTEM_SITE_DOMAIN", str_replace(['http://', 'https://', '//', '://', 'www.'], '', get_site_url()));
77 +
78 +/**
79 + * Unique name of the plugin through out all the code.
80 + */
81 +define("WEBTOTEM", 'wtotem');
82 +
83 +/* Load plugin translations */
84 +function wtotem_load_plugin_textdomain() {
85 + load_plugin_textdomain('wtotem', false, basename(dirname(__FILE__)) . '/lang/');
86 +}
87 +add_action('plugins_loaded', 'wtotem_load_plugin_textdomain');
88 +
89 +
90 +/* Load all classes before anything else. */
91 +require_once 'lib/Helper.php';
92 +require_once 'lib/API.php';
93 +require_once 'lib/DB.php';
94 +require_once 'lib/Cache.php';
95 +require_once 'lib/login/Login.php';
96 +require_once 'lib/Request.php';
97 +require_once 'lib/Interface.php';
98 +require_once 'lib/AgentManager.php';
99 +require_once 'lib/Option.php';
100 +require_once 'lib/Template.php';
101 +require_once 'lib/Country.php';
102 +require_once 'lib/Ajax.php';
103 +
104 +/* Load page and ajax handlers */
105 +require_once 'src/PageHandler.php';
106 +
107 +/* Load common variables and triggers */
108 +require_once 'src/Common.php';
109 +
110 +/**
111 + * Uninstalled the plugin
112 + *
113 + * @return void
114 + */
115 +function wtotemUninstall() {
116 +
117 + if (WebTotemOption::getPluginSettings('hide_wp_version')) {
118 + WebTotemOption::restoreReadme();
119 + }
120 +
121 + if(WebTotem::isMultiSite()){
122 + WebTotemOption::clearAllHosts();
123 + }
124 +
125 + /* Delete all agents files and directories */
126 + WebTotemAgentManager::removeAgents();
127 +
128 + /* Delete settings from the database */
129 + WebTotemDB::uninstall();
130 +
131 +}
132 +
133 +register_uninstall_hook(__FILE__, 'wtotemUninstall');
134 +
135 +/**
136 + * Deactivation plugin
137 + *
138 + * @return void
139 + */
140 +function wtotemDeactivation() {
141 + if (WebTotemOption::getPluginSettings('hide_wp_version')) {
142 + WebTotemOption::restoreReadme();
143 + }
144 +}
145 +register_deactivation_hook( __FILE__, 'wtotemDeactivation' );
146 +
147 +/**
148 + * Deactivation plugin
149 + *
150 + * @return void
151 + */
152 +function wtotemActivation() {
153 + WebTotemDB::install();
154 + if (WebTotemOption::getPluginSettings('hide_wp_version')) {
155 + WebTotemOption::hideReadme();
156 + }
157 +}
158 +
159 +register_activation_hook( __FILE__, 'wtotemActivation' );