PluginProbe ʕ •ᴥ•ʔ
Wordfence Security – Firewall, Malware Scan, and Login Security / 8.0.3
Wordfence Security – Firewall, Malware Scan, and Login Security v8.0.3
8.2.2 8.2.1 8.2.0 3.7.1 3.7.2 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.9.1 4.0.1 4.0.2 4.0.3 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.1 5.1.2 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.1 5.3.10 5.3.11 5.3.12 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 5.3.9 6.0.1 6.0.10 6.0.11 6.0.12 6.0.14 6.0.15 6.0.16 6.0.17 6.0.18 6.0.19 6.0.2 6.0.20 6.0.21 6.0.22 6.0.23 6.0.24 6.0.25 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.1 6.1.10 6.1.11 6.1.12 6.1.14 6.1.15 6.1.16 6.1.17 6.1.2 6.1.3 6.1.4 6.1.5 6.1.6 6.1.7 6.1.8 6.1.9 6.2.0 6.2.1 6.2.10 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.3.0 6.3.1 6.3.10 6.3.11 6.3.12 6.3.14 6.3.15 6.3.16 6.3.17 6.3.18 6.3.19 6.3.2 6.3.20 6.3.21 6.3.22 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.3.8 6.3.9 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.1.0 7.1.1 7.1.10 7.1.11 7.1.12 7.1.14 7.1.15 7.1.16 7.1.17 7.1.18 7.1.19 7.1.2 7.1.20 7.1.3 7.1.4 7.1.5 7.1.6 7.1.7 7.1.8 7.1.9 7.10.0 7.10.1 7.10.2 7.10.3 7.10.4 7.10.5 7.10.6 7.10.7 7.11.0 7.11.1 7.11.2 7.11.3 7.11.4 7.11.5 7.11.6 7.11.7 7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.3.1 7.3.2 7.3.3 7.3.4 7.3.5 7.3.6 7.4.0 7.4.1 7.4.10 7.4.11 7.4.12 7.4.14 7.4.2 7.4.3 trunk 7.4.4 1.1 7.4.5 1.2 7.4.6 1.3 7.4.7 1.3.1 7.4.8 1.3.2 7.4.9 1.3.3 7.5.0 1.4.2 7.5.1 1.4.3 7.5.10 1.4.4 7.5.11 1.4.5 7.5.2 1.4.6 7.5.3 1.4.7 7.5.4 1.4.8 7.5.5 1.5.1 7.5.6 1.5.2 7.5.7 1.5.3 7.5.8 1.5.4 7.5.9 1.5.5 7.6.0 1.5.6 7.6.1 2.0.1 7.6.2 2.0.2 7.7.0 2.0.3 7.7.1 2.0.5 7.8.0 2.0.6 7.8.1 2.0.7 7.8.2 2.1.0 7.9.0 2.1.1 7.9.1 2.1.2 7.9.2 2.1.3 7.9.3 2.1.4 8.0.0 2.1.5 8.0.1 3.0.2 8.0.2 3.0.3 8.0.3 3.0.4 8.0.4 3.0.5 8.0.5 3.0.6 8.1.0 3.0.7 8.1.1 3.0.8 8.1.2 3.0.9 8.1.3 3.1.0 8.1.4 3.1.1 v1.4.1 3.1.2 3.1.4 3.1.6 3.2.1 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.1 3.4.4 3.4.5 3.5.1 3.5.2 3.6.1 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9
wordfence / lib / wfAlerts.php
wordfence / lib Last commit date
Diff 1 year ago audit-log 1 year ago dashboard 1 year ago rest-api 1 year ago .htaccess 7 years ago Diff.php 6 years ago GeoLite2-Country.mmdb 1 year ago IPTraf.php 1 year ago IPTrafList.php 1 year ago WFLSPHP52Compatability.php 6 years ago compat.php 8 years ago diffResult.php 1 year ago email_genericAlert.php 5 years ago email_newIssues.php 3 years ago email_unlockRequest.php 5 years ago email_unsubscribeRequest.php 4 years ago flags.php 7 years ago live_activity.php 4 years ago menu_dashboard.php 3 years ago menu_dashboard_options.php 3 years ago menu_firewall.php 3 years ago menu_firewall_blocking.php 4 years ago menu_firewall_blocking_options.php 3 years ago menu_firewall_waf.php 4 years ago menu_firewall_waf_options.php 3 years ago menu_install.php 3 years ago menu_options.php 1 year ago menu_scanner.php 2 years ago menu_scanner_credentials.php 1 year ago menu_scanner_options.php 3 years ago menu_support.php 1 year ago menu_tools.php 1 year ago menu_tools_auditlog.php 1 year ago menu_tools_diagnostic.php 1 year ago menu_tools_importExport.php 4 years ago menu_tools_livetraffic.php 2 years ago menu_tools_twoFactor.php 4 years ago menu_tools_whois.php 3 years ago menu_wordfence_central.php 3 years ago noc1.key 7 years ago sodium_compat_fast.php 2 years ago sysinfo.php 1 year ago viewFullActivityLog.php 4 years ago wf503.php 2 years ago wfAPI.php 1 year ago wfActivityReport.php 1 year ago wfAdminNoticeQueue.php 4 years ago wfAlerts.php 5 years ago wfArray.php 3 years ago wfAuditLog.php 1 year ago wfBrowscap.php 3 years ago wfBrowscapCache.php 7 years ago wfBulkCountries.php 2 years ago wfCache.php 3 years ago wfCentralAPI.php 1 year ago wfConfig.php 1 year ago wfCrawl.php 1 year ago wfCredentialsController.php 1 year ago wfCrypt.php 6 years ago wfCurlInterceptor.php 3 years ago wfDB.php 1 year ago wfDashboard.php 1 year ago wfDateLocalization.php 2 years ago wfDeactivationOption.php 3 years ago wfDiagnostic.php 1 year ago wfDict.php 8 years ago wfDirectoryIterator.php 7 years ago wfFileUtils.php 2 years ago wfHelperBin.php 11 years ago wfHelperString.php 1 year ago wfIPWhitelist.php 5 years ago wfImportExportController.php 5 years ago wfInaccessibleDirectoryException.php 2 years ago wfInvalidPathException.php 3 years ago wfIpLocation.php 3 years ago wfIpLocator.php 3 years ago wfIssues.php 1 year ago wfJWT.php 7 years ago wfLicense.php 3 years ago wfLockedOut.php 2 years ago wfLog.php 1 year ago wfMD5BloomFilter.php 8 years ago wfModuleController.php 7 years ago wfNotification.php 8 years ago wfOnboardingController.php 1 year ago wfPersistenceController.php 1 year ago wfRESTAPI.php 7 years ago wfScan.php 2 years ago wfScanEngine.php 1 year ago wfScanEntrypoint.php 3 years ago wfScanFile.php 1 year ago wfScanFileLink.php 3 years ago wfScanFileListItem.php 1 year ago wfScanFileProperties.php 1 year ago wfScanMonitor.php 2 years ago wfScanPath.php 3 years ago wfSchema.php 1 year ago wfStyle.php 1 year ago wfSupportController.php 1 year ago wfUnlockMsg.php 5 years ago wfUpdateCheck.php 1 year ago wfUtils.php 1 year ago wfVersionCheckController.php 3 years ago wfVersionSupport.php 1 year ago wfView.php 5 years ago wfViewResult.php 1 year ago wfWebsite.php 3 years ago wordfenceClass.php 1 year ago wordfenceConstants.php 1 year ago wordfenceHash.php 1 year ago wordfenceScanner.php 1 year ago wordfenceURLHoover.php 2 years ago
wfAlerts.php
263 lines
1 <?php
2
3 abstract class wfBaseAlert {
4
5 public abstract function send();
6 }
7
8 class wfBlockAlert extends wfBaseAlert {
9
10 private $IP;
11 private $reason;
12 private $secsToGo;
13
14
15 /**
16 * wfBlockAlert constructor.
17 * @param $IP
18 * @param $reason
19 * @param $secsToGo
20 */
21 public function __construct($IP, $reason, $secsToGo) {
22 $this->IP = $IP;
23 $this->reason = $reason;
24 $this->secsToGo = $secsToGo;
25 }
26
27 public function send() {
28 if (wfConfig::get('alertOn_block')) {
29 $message = sprintf(/* translators: IP address. */ __('Wordfence has blocked IP address %s.', 'wordfence'), $this->IP) . "\n";
30 $message .= sprintf(/* translators: Description of firewall action. */ __('The reason is: "%s".', 'wordfence'), $this->reason);
31 if ($this->secsToGo > 0) {
32 $message .= "\n" . sprintf(/* translators: Time until. */ __('The duration of the block is %s.', 'wordfence'), wfUtils::makeDuration($this->secsToGo, true));
33 }
34 wordfence::alert(sprintf(/* translators: IP address. */__('Blocking IP %s', 'wordfence'), $this->IP), $message, $this->IP);
35 }
36 }
37
38 }
39
40 class wfAutoUpdatedAlert extends wfBaseAlert {
41
42 private $version;
43
44 /**
45 * @param $version
46 */
47 public function __construct($version) {
48 $this->version = $version;
49 }
50
51 public function send() {
52 if (wfConfig::get('alertOn_update') == '1' && $this->version) {
53 wordfence::alert(sprintf(/* translators: Software version. */ __("Wordfence Upgraded to version %s", 'wordfence'), $this->version), sprintf(/* translators: Software version. */ __("Your Wordfence installation has been upgraded to version %s", 'wordfence'), $this->version), false);
54 }
55 }
56
57 }
58
59 class wfWafDeactivatedAlert extends wfBaseAlert {
60
61 private $username;
62 private $IP;
63
64 /**
65 * @param $username
66 * @param $IP
67 */
68 public function __construct($username, $IP) {
69 $this->username = $username;
70 $this->IP = $IP;
71 }
72
73 public function send() {
74 if (wfConfig::get('alertOn_wafDeactivated')) {
75 wordfence::alert(__('Wordfence WAF Deactivated', 'wordfence'), sprintf(/* translators: WP username. */__('A user with username "%s" deactivated the Wordfence Web Application Firewall on your WordPress site.', 'wordfence'), $this->username), $this->IP);
76 }
77 }
78
79 }
80
81 class wfWordfenceDeactivatedAlert extends wfBaseAlert {
82 private $username;
83 private $IP;
84
85 /**
86 * @param $username
87 * @param $IP
88 */
89 public function __construct($username, $IP) {
90 $this->username = $username;
91 $this->IP = $IP;
92 }
93
94 public function send() {
95 if (wfConfig::get('alertOn_wordfenceDeactivated')) {
96 wordfence::alert(__("Wordfence Deactivated", 'wordfence'), sprintf(/* translators: WP username. */ __("A user with username \"%s\" deactivated Wordfence on your WordPress site.", 'wordfence'), $this->username), $this->IP);
97 }
98 }
99
100 }
101
102 class wfLostPasswdFormAlert extends wfBaseAlert {
103
104 private $user;
105 private $IP;
106
107 /**
108 * @param $user
109 * @param $IP
110 */
111 public function __construct($user, $IP) {
112 $this->user = $user;
113 $this->IP = $IP;
114 }
115
116 public function send() {
117 if (wfConfig::get('alertOn_lostPasswdForm')) {
118 wordfence::alert(__("Password recovery attempted", 'wordfence'), sprintf(/* translators: Email address. */__("Someone tried to recover the password for user with email address: %s", 'wordfence'), wp_kses($this->user->user_email, array())), $this->IP);
119 }
120 }
121
122 }
123
124 class wfLoginLockoutAlert extends wfBaseAlert {
125
126 private $IP;
127 private $reason;
128
129 /**
130 * @param $IP
131 * @param $reason
132 */
133 public function __construct($IP, $reason) {
134 $this->IP = $IP;
135 $this->reason = $reason;
136 }
137
138 public function send() {
139 if (wfConfig::get('alertOn_loginLockout')) {
140 $message = sprintf(
141 /* translators: 1. IP address. 2. Description of firewall action. */
142 __('A user with IP address %1$s has been locked out from signing in or using the password recovery form for the following reason: %2$s.', 'wordfence'), $this->IP, $this->reason);
143 if (wfBlock::lockoutDuration() > 0) {
144 $message .= "\n" . sprintf(/* translators: Time until. */ __('The duration of the lockout is %s.', 'wordfence'), wfUtils::makeDuration(wfBlock::lockoutDuration(), true));
145 }
146 wordfence::alert(__('User locked out from signing in', 'wordfence'), $message, $this->IP);
147 }
148 }
149 }
150
151 class wfAdminLoginAlert extends wfBaseAlert {
152
153 private $cookieName;
154 private $username;
155 private $IP;
156 private $cookieValue;
157
158 /**
159 * @param $cookieName
160 * @param $cookieValue
161 * @param $username
162 * @param $IP
163 */
164 public function __construct($cookieName, $cookieValue, $username, $IP) {
165 $this->cookieName = $cookieName;
166 $this->cookieValue = $cookieValue;
167 $this->username = $username;
168 $this->IP = $IP;
169 }
170
171 public function send() {
172 if (wfConfig::get('alertOn_adminLogin')) {
173 $shouldAlert = true;
174 if (wfConfig::get('alertOn_firstAdminLoginOnly') && isset($_COOKIE[$this->cookieName])) {
175 $shouldAlert = !hash_equals($this->cookieValue, $_COOKIE[$this->cookieName]);
176 }
177
178 if ($shouldAlert) {
179 wordfence::alert(__("Admin Login", 'wordfence'), sprintf(/* translators: WP username. */ __("A user with username \"%s\" who has administrator access signed in to your WordPress site.", 'wordfence'), $this->username), $this->IP);
180 }
181 }
182 }
183 }
184
185 class wfNonAdminLoginAlert extends wfBaseAlert {
186
187 private $cookieName;
188 private $username;
189 private $IP;
190 private $cookieValue;
191
192 /**
193 * @param $cookieName
194 * @param $cookieValue
195 * @param $username
196 * @param $IP
197 */
198 public function __construct($cookieName, $cookieValue, $username, $IP) {
199 $this->cookieName = $cookieName;
200 $this->cookieValue = $cookieValue;
201 $this->username = $username;
202 $this->IP = $IP;
203 }
204
205 public function send() {
206 if (wfConfig::get('alertOn_nonAdminLogin')) {
207 $shouldAlert = true;
208 if (wfConfig::get('alertOn_firstNonAdminLoginOnly') && isset($_COOKIE[$this->cookieName])) {
209 $shouldAlert = !hash_equals($this->cookieValue, $_COOKIE[$this->cookieName]);
210 }
211
212 if ($shouldAlert) {
213 wordfence::alert(__("User login", 'wordfence'), sprintf(/* translators: WP username. */ __("A non-admin user with username \"%s\" signed in to your WordPress site.", 'wordfence'), $this->username), $this->IP);
214 }
215 }
216 }
217 }
218
219 class wfBreachLoginAlert extends wfBaseAlert {
220
221 private $username;
222 private $lostPasswordUrl;
223 private $supportUrl;
224 private $IP;
225
226 /**
227 * @param $username
228 * @param $lostPasswordUrl
229 * @param $supportUrl
230 * @param $IP
231 */
232 public function __construct($username, $lostPasswordUrl, $supportUrl, $IP) {
233 $this->username = $username;
234 $this->lostPasswordUrl = $lostPasswordUrl;
235 $this->supportUrl = $supportUrl;
236 $this->IP = $IP;
237 }
238
239 public function send() {
240 if (wfConfig::get('alertOn_breachLogin')) {
241 wordfence::alert(__('User login blocked for insecure password', 'wordfence'), sprintf(
242 /* translators: 1. WP username. 2. Reset password URL. 3. Support URL. */
243 __('A user with username "%1$s" tried to sign in to your WordPress site. Access was denied because the password being used exists on lists of passwords leaked in data breaches. Attackers use such lists to break into sites and install malicious code. Please change or reset the password (%2$s) to reactivate this account. Learn More: %3$s', 'wordfence'), $this->username, $this->lostPasswordUrl, $this->supportUrl), $this->IP);
244 }
245 }
246 }
247
248 class wfIncreasedAttackRateAlert extends wfBaseAlert {
249
250 private $message;
251
252 /**
253 * @param $message
254 */
255 public function __construct($message) {
256 $this->message = $message;
257 }
258
259 public function send() {
260 wordfence::alert(__('Increased Attack Rate', 'wordfence'), $this->message, false);
261 }
262 }
263