X7ROOT File Manager
Current Path:
/home/notabjze/digitalcontentmentors.com/wp-content/plugins/wordfence/lib
home
/
notabjze
/
digitalcontentmentors.com
/
wp-content
/
plugins
/
wordfence
/
lib
/
ðŸ“
..
📄
.htaccess
(354 B)
ðŸ“
Diff
📄
Diff.php
(5.63 KB)
📄
GeoLite2-Country.mmdb
(7.46 MB)
📄
IPTraf.php
(1.17 KB)
📄
IPTrafList.php
(2.98 KB)
📄
WFLSPHP52Compatability.php
(1.27 KB)
ðŸ“
audit-log
📄
compat.php
(425 B)
ðŸ“
dashboard
📄
diffResult.php
(2.81 KB)
📄
email_genericAlert.php
(1.39 KB)
📄
email_newIssues.php
(8.82 KB)
📄
email_unlockRequest.php
(2.34 KB)
📄
email_unsubscribeRequest.php
(1.05 KB)
📄
flags.php
(6.62 KB)
📄
live_activity.php
(580 B)
📄
menu_dashboard.php
(28 KB)
📄
menu_dashboard_options.php
(15.21 KB)
📄
menu_firewall.php
(2.12 KB)
📄
menu_firewall_blocking.php
(10.25 KB)
📄
menu_firewall_blocking_options.php
(4.63 KB)
📄
menu_firewall_waf.php
(19.96 KB)
📄
menu_firewall_waf_options.php
(11.09 KB)
📄
menu_install.php
(1.73 KB)
📄
menu_options.php
(24.7 KB)
📄
menu_scanner.php
(21.53 KB)
📄
menu_scanner_credentials.php
(2.77 KB)
📄
menu_scanner_options.php
(8.41 KB)
📄
menu_support.php
(17.82 KB)
📄
menu_tools.php
(1.49 KB)
📄
menu_tools_auditlog.php
(16.43 KB)
📄
menu_tools_diagnostic.php
(49.35 KB)
📄
menu_tools_importExport.php
(1.28 KB)
📄
menu_tools_livetraffic.php
(39.43 KB)
📄
menu_tools_twoFactor.php
(19.6 KB)
📄
menu_tools_whois.php
(4.61 KB)
📄
menu_wordfence_central.php
(9.66 KB)
📄
noc1.key
(1.64 KB)
ðŸ“
rest-api
📄
sodium_compat_fast.php
(185 B)
📄
sysinfo.php
(1.47 KB)
📄
viewFullActivityLog.php
(1.47 KB)
📄
wf503.php
(9.63 KB)
📄
wfAPI.php
(10.1 KB)
📄
wfActivityReport.php
(20.45 KB)
📄
wfAdminNoticeQueue.php
(5.2 KB)
📄
wfAlerts.php
(7.37 KB)
📄
wfArray.php
(1.77 KB)
📄
wfAuditLog.php
(47.13 KB)
📄
wfBrowscap.php
(3.9 KB)
📄
wfBrowscapCache.php
(256.83 KB)
📄
wfBulkCountries.php
(9.77 KB)
📄
wfCache.php
(6.02 KB)
📄
wfCentralAPI.php
(25.8 KB)
📄
wfConfig.php
(122.49 KB)
📄
wfCrawl.php
(6.56 KB)
📄
wfCredentialsController.php
(5.16 KB)
📄
wfCrypt.php
(4.05 KB)
📄
wfCurlInterceptor.php
(1.02 KB)
📄
wfDB.php
(11.49 KB)
📄
wfDashboard.php
(8.2 KB)
📄
wfDateLocalization.php
(352.13 KB)
📄
wfDeactivationOption.php
(2.13 KB)
📄
wfDiagnostic.php
(66.87 KB)
📄
wfDict.php
(738 B)
📄
wfDirectoryIterator.php
(1.89 KB)
📄
wfFileUtils.php
(2.72 KB)
📄
wfHelperBin.php
(1.97 KB)
📄
wfHelperString.php
(2.13 KB)
📄
wfIPWhitelist.php
(1.56 KB)
📄
wfImportExportController.php
(3.23 KB)
📄
wfInaccessibleDirectoryException.php
(303 B)
📄
wfInvalidPathException.php
(266 B)
📄
wfIpLocation.php
(1.73 KB)
📄
wfIpLocator.php
(2.74 KB)
📄
wfIssues.php
(27.91 KB)
📄
wfJWT.php
(5.33 KB)
📄
wfLicense.php
(10.43 KB)
📄
wfLockedOut.php
(9.73 KB)
📄
wfLog.php
(57.11 KB)
📄
wfMD5BloomFilter.php
(5.2 KB)
📄
wfModuleController.php
(754 B)
📄
wfNotification.php
(6.41 KB)
📄
wfOnboardingController.php
(9.22 KB)
📄
wfPersistenceController.php
(819 B)
📄
wfRESTAPI.php
(377 B)
📄
wfScan.php
(15.92 KB)
📄
wfScanEngine.php
(133.6 KB)
📄
wfScanEntrypoint.php
(1.04 KB)
📄
wfScanFile.php
(1.01 KB)
📄
wfScanFileLink.php
(403 B)
📄
wfScanFileListItem.php
(408 B)
📄
wfScanFileProperties.php
(1.07 KB)
📄
wfScanMonitor.php
(4.05 KB)
📄
wfScanPath.php
(1.77 KB)
📄
wfSchema.php
(10.91 KB)
📄
wfStyle.php
(1.21 KB)
📄
wfSupportController.php
(24.18 KB)
📄
wfUnlockMsg.php
(1.14 KB)
📄
wfUpdateCheck.php
(27.23 KB)
📄
wfUtils.php
(124.11 KB)
📄
wfVersionCheckController.php
(19.27 KB)
📄
wfVersionSupport.php
(535 B)
📄
wfView.php
(2.22 KB)
📄
wfViewResult.php
(1.42 KB)
📄
wfWebsite.php
(1.75 KB)
📄
wordfenceClass.php
(436.65 KB)
📄
wordfenceConstants.php
(3.56 KB)
📄
wordfenceHash.php
(42.7 KB)
📄
wordfenceScanner.php
(30.47 KB)
📄
wordfenceURLHoover.php
(18.36 KB)
Editing: wfCrawl.php
<?php require_once(dirname(__FILE__) . '/wfUtils.php'); class wfCrawl { const GOOGLE_BOT_VERIFIED = 'verified'; const GOOGLE_BOT_FAKE = 'fakeBot'; const GOOGLE_BOT_UNDETERMINED = 'undetermined'; public static function isCrawler($UA){ $browscap = new wfBrowscap(); $b = $browscap->getBrowser($UA); if (!$b || $b['Parent'] == 'DefaultProperties') { $IP = wfUtils::getIP(); return !wfLog::isHumanRequest($IP, $UA); } else if (isset($b['Crawler']) && $b['Crawler']) { return true; } return false; } public static function verifyCrawlerPTR($hostPattern, $IP){ $table = wfDB::networkTable('wfCrawlers'); $db = new wfDB(); $IPn = wfUtils::inet_pton($IP); $ipHex = wfDB::binaryValueToSQLHex(wfUtils::inet_pton($IPn)); $status = $db->querySingle("select status from $table where IP={$ipHex} and patternSig=UNHEX(MD5('%s')) and lastUpdate > unix_timestamp() - %d", $hostPattern, WORDFENCE_CRAWLER_VERIFY_CACHE_TIME); if($status){ if($status == 'verified'){ return true; } else { return false; } } $host = wfUtils::reverseLookup($IP); if(! $host){ $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate, PTR) values ({$ipHex}, UNHEX(MD5('%s')), '%s', unix_timestamp(), '%s') ON DUPLICATE KEY UPDATE status='%s', lastUpdate=unix_timestamp(), PTR='%s'", $hostPattern, 'noPTR', '', 'noPTR', ''); return false; } if(preg_match($hostPattern, $host)){ $resultIPs = wfUtils::resolveDomainName($host); $addrsMatch = false; foreach($resultIPs as $resultIP){ if($resultIP == $IP){ $addrsMatch = true; break; } } if($addrsMatch){ $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate, PTR) values ({$ipHex}, UNHEX(MD5('%s')), '%s', unix_timestamp(), '%s') ON DUPLICATE KEY UPDATE status='%s', lastUpdate=unix_timestamp(), PTR='%s'", $hostPattern, 'verified', $host, 'verified', $host); return true; } else { $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate, PTR) values ({$ipHex}, UNHEX(MD5('%s')), '%s', unix_timestamp(), '%s') ON DUPLICATE KEY UPDATE status='%s', lastUpdate=unix_timestamp(), PTR='%s'", $hostPattern, 'fwdFail', $host, 'fwdFail', $host); return false; } } else { $db->queryWrite("insert into $table (IP, patternSig, status, lastUpdate, PTR) values ({$ipHex}, UNHEX(MD5('%s')), '%s', unix_timestamp(), '%s') ON DUPLICATE KEY UPDATE status='%s', lastUpdate=unix_timestamp(), PTR='%s'", $hostPattern, 'badPTR', $host, 'badPTR', $host); return false; } } public static function isGooglebot($userAgent = null){ if ($userAgent === null) { $userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; } return (bool) preg_match('/Googlebot\/\d\.\d/', $userAgent); } public static function isGoogleCrawler($userAgent = null){ if ($userAgent === null) { $userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; } foreach (self::$googPat as $pat) { if (preg_match($pat . 'i', $userAgent)) { return true; } } return false; } private static $googPat = array( '@^Mozilla/5\\.0 \\(.*Google Keyword Tool.*\\)$@', '@^Mozilla/5\\.0 \\(.*Feedfetcher\\-Google.*\\)$@', '@^Feedfetcher\\-Google\\-iGoogleGadgets.*$@', '@^searchbot admin\\@google\\.com$@', '@^Google\\-Site\\-Verification.*$@', '@^Google OpenSocial agent.*$@', '@^.*Googlebot\\-Mobile/2\\..*$@', '@^AdsBot\\-Google\\-Mobile.*$@', '@^google \\(.*Enterprise.*\\)$@', '@^Mediapartners\\-Google.*$@', '@^GoogleFriendConnect.*$@', '@^googlebot\\-urlconsole$@', '@^.*Google Web Preview.*$@', '@^Feedfetcher\\-Google.*$@', '@^AppEngine\\-Google.*$@', '@^Googlebot\\-Video.*$@', '@^Googlebot\\-Image.*$@', '@^Google\\-Sitemaps.*$@', '@^Googlebot/Test.*$@', '@^Googlebot\\-News.*$@', '@^.*Googlebot/2\\.1.*$@', '@^AdsBot\\-Google.*$@', '@^Google$@' ); /** * Has correct user agent and PTR record points to .googlebot.com domain. * * @param string|null $ip * @param string|null $ua * @return bool */ public static function isVerifiedGoogleCrawler($ip = null, $ua = null) { static $verified; if (!isset($verified)) { $verified = array(); } if ($ip === null) { $ip = wfUtils::getIP(); } if ($ip === null || $ip === false) { //Likely a CLI execution return false; } if (array_key_exists($ip, $verified)) { return $verified[$ip]; } if (self::isGoogleCrawler($ua)) { if (self::verifyCrawlerPTR(wordfence::getLog()->getGooglePattern(), $ip)) { $verified[$ip] = true; return $verified[$ip]; } $noc1Status = self::verifyGooglebotViaNOC1($ip); if ($noc1Status == self::GOOGLE_BOT_VERIFIED) { $verified[$ip] = true; return $verified[$ip]; } else if ($noc1Status == self::GOOGLE_BOT_FAKE) { $verified[$ip] = false; return $verified[$ip]; } return true; //We were unable to successfully validate Googlebot status so default to being permissive } $verified[$ip] = false; return $verified[$ip]; } /** * Attempts to verify whether an IP claiming to be Googlebot is actually Googlebot. * * @param string|null $ip * @return string */ public static function verifyGooglebotViaNOC1($ip = null) { $table = wfDB::networkTable('wfCrawlers'); if ($ip === null) { $ip = wfUtils::getIP(); } $db = new wfDB(); $IPn = wfUtils::inet_pton($ip); $ipHex = wfDB::binaryValueToSQLHex($IPn); $patternSig = 'googlenoc1'; $status = $db->querySingle("select status from $table where IP={$ipHex} and patternSig=UNHEX(MD5('%s')) and lastUpdate > unix_timestamp() - %d", $patternSig, WORDFENCE_CRAWLER_VERIFY_CACHE_TIME); if ($status === 'verified') { return self::GOOGLE_BOT_VERIFIED; } else if ($status === 'fakeBot') { return self::GOOGLE_BOT_FAKE; } $api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion()); try { $data = $api->call('verify_googlebot', array( 'ip' => $ip, )); if (is_array($data) && !empty($data['verified'])) { // Cache results $db->queryWrite("INSERT INTO {$table} (IP, patternSig, status, lastUpdate) VALUES ({$ipHex}, UNHEX(MD5('%s')), '%s', unix_timestamp()) ON DUPLICATE KEY UPDATE status = VALUES(status), lastUpdate = VALUES(lastUpdate)", $patternSig, 'verified'); return self::GOOGLE_BOT_VERIFIED; } else { $db->queryWrite("INSERT INTO {$table} (IP, patternSig, status, lastUpdate) VALUES ({$ipHex}, UNHEX(MD5('%s')), '%s', unix_timestamp()) ON DUPLICATE KEY UPDATE status = VALUES(status), lastUpdate = VALUES(lastUpdate)", $patternSig, 'fakeBot'); self::GOOGLE_BOT_FAKE; } } catch (Exception $e) { // Do nothing, bail } return self::GOOGLE_BOT_UNDETERMINED; } }
Upload File
Create Folder