-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuninstall.php
More file actions
108 lines (101 loc) · 3 KB
/
uninstall.php
File metadata and controls
108 lines (101 loc) · 3 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
/**
* Uninstallation instructions.
*
* @package Sucuri Security
* @author Yorman Arias <yorman.arias@sucuri.net>
* @author Daniel Cid <dcid@sucuri.net>
* @copyright Since 2010-2015 Sucuri Inc.
* @license Released under the GPL - see LICENSE file for details.
* @link https://wordpress.sucuri.net/
* @since File available since Release 0.1
*/
if (
! defined( 'WP_UNINSTALL_PLUGIN' )
|| WP_UNINSTALL_PLUGIN != 'sucuri-scanner/sucuri.php'
) {
exit(0);
}
$sucuriscan_option_names = array(
'account',
'ads_visibility',
'api_key',
'audit_report',
'cloudproxy_apikey',
'collect_wrong_passwords',
'datastore_path',
'email_subject',
'emails_per_hour',
'emails_sent',
'errorlogs_limit',
'fs_scanner',
'heartbeat',
'heartbeat_autostart',
'heartbeat_interval',
'heartbeat_pulse',
'ignore_scanning',
'ignored_events',
'last_email_at',
'lastlogin_redirection',
'logs4report',
'maximum_failed_logins',
'notify_bruteforce_attack',
'notify_failed_login',
'notify_plugin_activated',
'notify_plugin_change',
'notify_plugin_deactivated',
'notify_plugin_deleted',
'notify_plugin_installed',
'notify_plugin_updated',
'notify_post_publication',
'notify_settings_updated',
'notify_success_login',
'notify_theme_activated',
'notify_theme_deleted',
'notify_theme_editor',
'notify_theme_installed',
'notify_theme_updated',
'notify_to',
'notify_user_registration',
'notify_website_updated',
'notify_widget_added',
'notify_widget_deleted',
'parse_errorlogs',
'prettify_mails',
'request_timeout',
'revproxy',
'runtime',
'scan_checksums',
'scan_errorlogs',
'scan_frequency',
'scan_interface',
'scan_modfiles',
'site_version',
'sitecheck_counter',
'sitecheck_scanner',
'verify_ssl_cert',
);
$sucuriscan_storage_path = get_option( 'sucuriscan_datastore_path' );
if (
$sucuriscan_storage_path !== false
&& file_exists( $sucuriscan_storage_path )
&& is_writable( $sucuriscan_storage_path )
&& is_dir( $sucuriscan_storage_path )
) {
@unlink( $sucuriscan_storage_path . '/.htaccess' );
@unlink( $sucuriscan_storage_path . '/index.html' );
@unlink( $sucuriscan_storage_path . '/sucuri-failedlogins.php' );
@unlink( $sucuriscan_storage_path . '/sucuri-ignorescanning.php' );
@unlink( $sucuriscan_storage_path . '/sucuri-integrity.php' );
@unlink( $sucuriscan_storage_path . '/sucuri-lastlogins.php' );
@unlink( $sucuriscan_storage_path . '/sucuri-oldfailedlogins.php' );
@unlink( $sucuriscan_storage_path . '/sucuri-plugindata.php' );
@unlink( $sucuriscan_storage_path . '/sucuri-sitecheck.php' );
@unlink( $sucuriscan_storage_path . '/sucuri-trustip.php' );
@rmdir( $sucuriscan_storage_path );
}
foreach ( $sucuriscan_option_names as $option_name ) {
delete_option( 'sucuriscan_' . $option_name );
delete_site_option( 'sucuriscan_' . $option_name );
}
// EOF