Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordfenc.../models/firewall
File: wfFirewall.php
*/
[500] Fix | Delete
public function bruteForceStatus() {
[501] Fix | Delete
$networkBruteForceEnabled = !!wfConfig::get('other_WFNet');
[502] Fix | Delete
$localBruteForceEnabled = !!wfConfig::get('loginSecurityEnabled');
[503] Fix | Delete
[504] Fix | Delete
$percentage = 0.0;
[505] Fix | Delete
[506] Fix | Delete
if ($localBruteForceEnabled) {
[507] Fix | Delete
$percentage += 0.1;
[508] Fix | Delete
[509] Fix | Delete
if ($networkBruteForceEnabled) {
[510] Fix | Delete
$percentage += 0.5;
[511] Fix | Delete
}
[512] Fix | Delete
if (wfConfig::get('loginSec_strongPasswds_enabled') && (wfConfig::get('loginSec_strongPasswds') == 'pubs' || wfConfig::get('loginSec_strongPasswds') == 'all')) {
[513] Fix | Delete
$percentage += 0.1;
[514] Fix | Delete
}
[515] Fix | Delete
if (wfConfig::get('loginSec_maskLoginErrors')) {
[516] Fix | Delete
$percentage += 0.1;
[517] Fix | Delete
}
[518] Fix | Delete
if (wfConfig::get('loginSec_blockAdminReg')) {
[519] Fix | Delete
$percentage += 0.1;
[520] Fix | Delete
}
[521] Fix | Delete
if (wfConfig::get('loginSec_disableAuthorScan')) {
[522] Fix | Delete
$percentage += 0.1;
[523] Fix | Delete
}
[524] Fix | Delete
}
[525] Fix | Delete
[526] Fix | Delete
return round($percentage, 2);
[527] Fix | Delete
}
[528] Fix | Delete
[529] Fix | Delete
/**
[530] Fix | Delete
* Returns the status of the WAF's learning mode.
[531] Fix | Delete
*
[532] Fix | Delete
* @return bool|int Returns true if enabled without an automatic switchover, a timestamp if enabled with one, and false if not in learning mode.
[533] Fix | Delete
*/
[534] Fix | Delete
public function learningModeStatus() {
[535] Fix | Delete
if ($this->firewallMode() != self::FIREWALL_MODE_LEARNING) {
[536] Fix | Delete
return false;
[537] Fix | Delete
}
[538] Fix | Delete
[539] Fix | Delete
try {
[540] Fix | Delete
$config = wfWAF::getInstance()->getStorageEngine();
[541] Fix | Delete
if ($config->getConfig('learningModeGracePeriodEnabled')) {
[542] Fix | Delete
return (int) $config->getConfig('learningModeGracePeriod');
[543] Fix | Delete
}
[544] Fix | Delete
[545] Fix | Delete
return true;
[546] Fix | Delete
}
[547] Fix | Delete
catch (Exception $e) {
[548] Fix | Delete
//Ignore, return false
[549] Fix | Delete
}
[550] Fix | Delete
[551] Fix | Delete
return false;
[552] Fix | Delete
}
[553] Fix | Delete
[554] Fix | Delete
/**
[555] Fix | Delete
* @return array
[556] Fix | Delete
*/
[557] Fix | Delete
public function bruteForceStatusList() {
[558] Fix | Delete
$networkBruteForceEnabled = !!wfConfig::get('other_WFNet');
[559] Fix | Delete
$localBruteForceEnabled = !!wfConfig::get('loginSecurityEnabled');
[560] Fix | Delete
[561] Fix | Delete
$status = array();
[562] Fix | Delete
[563] Fix | Delete
if ($localBruteForceEnabled) {
[564] Fix | Delete
if (!$networkBruteForceEnabled) {
[565] Fix | Delete
$status[] = array(
[566] Fix | Delete
'percentage' => 0.5,
[567] Fix | Delete
'title' => __('Enable Real-Time Wordfence Security Network.', 'wordfence'),
[568] Fix | Delete
);
[569] Fix | Delete
}
[570] Fix | Delete
if (!wfConfig::get('loginSec_strongPasswds_enabled')) {
[571] Fix | Delete
$status[] = array(
[572] Fix | Delete
'percentage' => 0.1,
[573] Fix | Delete
'title' => __('Enforce Strong Passwords.', 'wordfence'),
[574] Fix | Delete
);
[575] Fix | Delete
}
[576] Fix | Delete
if (!wfConfig::get('loginSec_maskLoginErrors')) {
[577] Fix | Delete
$status[] = array(
[578] Fix | Delete
'percentage' => 0.1,
[579] Fix | Delete
'title' => __('Enable Mask Login Errors.', 'wordfence'),
[580] Fix | Delete
);
[581] Fix | Delete
}
[582] Fix | Delete
if (!wfConfig::get('loginSec_blockAdminReg')) {
[583] Fix | Delete
$status[] = array(
[584] Fix | Delete
'percentage' => 0.1,
[585] Fix | Delete
'title' => __('Enable Block Admin Registration.', 'wordfence'),
[586] Fix | Delete
);
[587] Fix | Delete
}
[588] Fix | Delete
if (!wfConfig::get('loginSec_disableAuthorScan')) {
[589] Fix | Delete
$status[] = array(
[590] Fix | Delete
'percentage' => 0.1,
[591] Fix | Delete
'title' => __('Disable Author Scanning.', 'wordfence'),
[592] Fix | Delete
);
[593] Fix | Delete
}
[594] Fix | Delete
} else {
[595] Fix | Delete
$status[] = array(
[596] Fix | Delete
'percentage' => 1.0,
[597] Fix | Delete
'title' => __('Enable Brute Force Protection.', 'wordfence'),
[598] Fix | Delete
);
[599] Fix | Delete
}
[600] Fix | Delete
[601] Fix | Delete
return array_filter($status);
[602] Fix | Delete
}
[603] Fix | Delete
}
[604] Fix | Delete
[605] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function