PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
plugins
/
wordfence
/
lib
<?php class wfBrowscap { protected $_cacheLoaded = false; protected $_userAgents = array(); protected $_browsers = array(); protected $_patterns = array(); protected $_properties = array(); protected $resultCache = array(); const COMPRESSION_PATTERN_START = '@'; const COMPRESSION_PATTERN_DELIMITER = '|'; const REGEX_DELIMITER = '@'; public static function shared() { static $_browscap = null; if ($_browscap === null) { $_browscap = new wfBrowscap(); } return $_browscap; } public function getBrowser($user_agent){ if (!$this->_cacheLoaded) { if (!$this->_loadCache(dirname(__FILE__) . '/wfBrowscapCache.php')) { throw new Exception('Cannot load this cache version - the cache format is not compatible.'); } } $browser = array(); foreach ($this->_patterns as $pattern => $pattern_data) { if (preg_match($pattern . 'i', $user_agent, $matches)) { if (1 == count($matches)) { $key = $pattern_data; $simple_match = true; } else { $pattern_data = unserialize($pattern_data); array_shift($matches); $match_string = self::COMPRESSION_PATTERN_START . implode(self::COMPRESSION_PATTERN_DELIMITER, $matches); if (!isset($pattern_data[$match_string])) { continue; } $key = $pattern_data[$match_string]; $simple_match = false; } $browser = array( $user_agent, trim(strtolower($pattern), self::REGEX_DELIMITER), $this->_pregUnQuote($pattern, $simple_match ? false : $matches) ); $browser = $value = $browser + unserialize($this->_browsers[$key]); while (array_key_exists(3, $value)) { $value = unserialize($this->_browsers[$value[3]]); $browser += $value; } if (!empty($browser[3])) { $browser[3] = $this->_userAgents[$browser[3]]; } break; } } $array = array(); foreach ($browser as $key => $value) { if ($value === 'true') { $value = true; } elseif ($value === 'false') { $value = false; } $array[$this->_properties[$key]] = $value; } return $array; } protected function _loadCache($cache_file){ $cache_version = null; $browsers = array(); $userAgents = array(); $patterns = array(); $properties = array(); $this->_cacheLoaded = false; require $cache_file; $this->_browsers = $browsers; $this->_userAgents = $userAgents; $this->_patterns = $patterns; $this->_properties = $properties; $this->_cacheLoaded = true; return true; } protected function _pregUnQuote($pattern, $matches){ $search = array( '\\' . self::REGEX_DELIMITER, '\\.', '\\\\', '\\+', '\\[', '\\^', '\\]', '\\$', '\\(', '\\)', '\\{', '\\}', '\\=', '\\!', '\\<', '\\>', '\\|', '\\:', '\\-', '.*', '.', '\\?' ); $replace = array( self::REGEX_DELIMITER, '\\?', '\\', '+', '[', '^', ']', '$', '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', '-', '*', '?', '.' ); $result = substr(str_replace($search, $replace, $pattern), 2, -2); if ($matches) { foreach ($matches as $one_match) { $num_pos = strpos($result, '(\d)'); $result = substr_replace($result, $one_match, $num_pos, 4); } } return $result; } }
[-] menu_support.php
[edit]
[-] wfBinaryList.php
[edit]
[-] sysinfo.php
[edit]
[-] menu_scanner.php
[edit]
[-] wfViewResult.php
[edit]
[-] wfScanMonitor.php
[edit]
[-] wfScanEngine.php
[edit]
[-] WFLSPHP52Compatability.php
[edit]
[-] .htaccess
[edit]
[-] wfSupportController.php
[edit]
[-] wfConfig.php
[edit]
[-] menu_firewall_waf.php
[edit]
[-] menu_dashboard_options.php
[edit]
[-] wfScan.php
[edit]
[-] wfUtils.php
[edit]
[-] wfDashboard.php
[edit]
[-] wordfenceScanner.php
[edit]
[+]
Diff
[-] menu_tools_whois.php
[edit]
[-] wfIpLocator.php
[edit]
[-] wfUnlockMsg.php
[edit]
[-] menu_wordfence_central.php
[edit]
[-] wfDirectoryIterator.php
[edit]
[-] wfHelperString.php
[edit]
[-] wfDB.php
[edit]
[-] live_activity.php
[edit]
[-] wfCrawl.php
[edit]
[-] email_genericAlert.php
[edit]
[-] IPTrafList.php
[edit]
[-] wfBrowscap.php
[edit]
[-] geoip.mmdb
[edit]
[-] wfAlerts.php
[edit]
[-] wfWebsite.php
[edit]
[-] noc1.key
[edit]
[-] wfCurlInterceptor.php
[edit]
[-] wordfenceHash.php
[edit]
[-] wfDateLocalization.php
[edit]
[-] menu_tools_importExport.php
[edit]
[-] wfScanEntrypoint.php
[edit]
[-] wfView.php
[edit]
[-] menu_tools.php
[edit]
[-] wfJWT.php
[edit]
[-] wfCache.php
[edit]
[-] menu_tools_livetraffic.php
[edit]
[-] wfCrypt.php
[edit]
[-] wfScanFile.php
[edit]
[-] wfAdminNoticeQueue.php
[edit]
[-] wfInaccessibleDirectoryException.php
[edit]
[-] wfVersionCheckController.php
[edit]
[-] wfRESTAPI.php
[edit]
[-] wfDeactivationOption.php
[edit]
[-] menu_tools_diagnostic.php
[edit]
[-] flags.php
[edit]
[-] email_newIssues.php
[edit]
[-] wfBrowscapCache.php
[edit]
[-] wfModuleController.php
[edit]
[-] wfLicense.php
[edit]
[-] wfIpLocation.php
[edit]
[-] wfCredentialsController.php
[edit]
[+]
rest-api
[-] wordfenceClass.php
[edit]
[-] wf503.php
[edit]
[+]
audit-log
[-] wfNotification.php
[edit]
[-] wfLog.php
[edit]
[-] wfActivityReport.php
[edit]
[-] wfScanFileProperties.php
[edit]
[-] wfHelperBin.php
[edit]
[-] wfAPI.php
[edit]
[-] viewFullActivityLog.php
[edit]
[-] wfLockedOut.php
[edit]
[-] wfScanPath.php
[edit]
[-] sodium_compat_fast.php
[edit]
[-] wfIssues.php
[edit]
[-] wordfenceConstants.php
[edit]
[-] menu_firewall_waf_options.php
[edit]
[-] wfI18n.php
[edit]
[-] menu_scanner_options.php
[edit]
[-] IPTraf.php
[edit]
[-] wfAuditLog.php
[edit]
[-] wfCommonPasswords.php
[edit]
[-] wfOnboardingController.php
[edit]
[-] wfInvalidPathException.php
[edit]
[-] email_unsubscribeRequest.php
[edit]
[-] wordfenceURLHoover.php
[edit]
[-] diffResult.php
[edit]
[-] menu_firewall_blocking_options.php
[edit]
[-] menu_scanner_credentials.php
[edit]
[-] wfFileUtils.php
[edit]
[-] wfPersistenceController.php
[edit]
[-] wfVersionSupport.php
[edit]
[-] Diff.php
[edit]
[+]
..
[-] wfMD5BloomFilter.php
[edit]
[-] wfUpdateCheck.php
[edit]
[-] wfDiagnostic.php
[edit]
[-] menu_install.php
[edit]
[-] wfCentralAPI.php
[edit]
[-] menu_options.php
[edit]
[-] wfSchema.php
[edit]
[-] menu_dashboard.php
[edit]
[-] compat.php
[edit]
[-] menu_firewall_blocking.php
[edit]
[-] wfIPWhitelist.php
[edit]
[-] wfBulkCountries.php
[edit]
[-] menu_tools_auditlog.php
[edit]
[-] email_unlockRequest.php
[edit]
[-] menu_firewall.php
[edit]
[-] wfScanFileListItem.php
[edit]
[-] wfImportExportController.php
[edit]
[-] menu_tools_twoFactor.php
[edit]
[+]
dashboard
[-] wfScanFileLink.php
[edit]
[-] wfStyle.php
[edit]