Current Path: > home > transcarter > public_html > > > > wp-content > plugins > wordfence > > > lib >
Operation : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 Software : Apache Server IP : 198.54.126.42 | Your IP: 216.73.216.135 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
Diff | Directory | - | - | |
audit-log | Directory | - | - | |
dashboard | Directory | - | - | |
rest-api | Directory | - | - | |
.htaccess | File | 354 bytes | July 17 2025 21:05:48. | |
Diff.php | File | 5762 bytes | July 17 2025 21:05:47. | |
GeoLite2-Country.mmdb | File | 7825225 bytes | July 17 2025 21:05:48. | |
IPTraf.php | File | 1195 bytes | July 17 2025 21:05:48. | |
IPTrafList.php | File | 3054 bytes | July 17 2025 21:05:48. | |
WFLSPHP52Compatability.php | File | 1303 bytes | July 17 2025 21:05:48. | |
compat.php | File | 425 bytes | July 17 2025 21:05:47. | |
diffResult.php | File | 2874 bytes | July 17 2025 21:05:47. | |
email_genericAlert.php | File | 1422 bytes | July 17 2025 21:05:47. | |
email_newIssues.php | File | 9035 bytes | July 17 2025 21:05:47. | |
email_unlockRequest.php | File | 2397 bytes | July 17 2025 21:05:47. | |
email_unsubscribeRequest.php | File | 1077 bytes | July 17 2025 21:05:47. | |
flags.php | File | 6779 bytes | July 17 2025 21:05:47. | |
live_activity.php | File | 580 bytes | July 17 2025 21:05:48. | |
menu_dashboard.php | File | 28671 bytes | July 17 2025 21:05:48. | |
menu_dashboard_options.php | File | 15577 bytes | July 17 2025 21:05:48. | |
menu_firewall.php | File | 2167 bytes | July 17 2025 21:05:48. | |
menu_firewall_blocking.php | File | 10495 bytes | July 17 2025 21:05:48. | |
menu_firewall_blocking_options.php | File | 4737 bytes | July 17 2025 21:05:48. | |
menu_firewall_waf.php | File | 20443 bytes | July 17 2025 21:05:48. | |
menu_firewall_waf_options.php | File | 11357 bytes | July 17 2025 21:05:48. | |
menu_install.php | File | 1767 bytes | July 17 2025 21:05:48. | |
menu_options.php | File | 25291 bytes | July 17 2025 21:05:48. | |
menu_scanner.php | File | 22047 bytes | July 17 2025 21:05:48. | |
menu_scanner_credentials.php | File | 2838 bytes | July 17 2025 21:05:48. | |
menu_scanner_options.php | File | 8615 bytes | July 17 2025 21:05:48. | |
menu_support.php | File | 18243 bytes | July 17 2025 21:05:48. | |
menu_tools.php | File | 1528 bytes | July 17 2025 21:05:48. | |
menu_tools_auditlog.php | File | 16829 bytes | July 17 2025 21:05:48. | |
menu_tools_diagnostic.php | File | 50536 bytes | July 17 2025 21:05:48. | |
menu_tools_importExport.php | File | 1310 bytes | July 17 2025 21:05:48. | |
menu_tools_livetraffic.php | File | 40381 bytes | July 17 2025 21:05:48. | |
menu_tools_twoFactor.php | File | 20070 bytes | July 17 2025 21:05:48. | |
menu_tools_whois.php | File | 4722 bytes | July 17 2025 21:05:48. | |
menu_wordfence_central.php | File | 9889 bytes | July 17 2025 21:05:48. | |
noc1.key | File | 1683 bytes | July 17 2025 21:05:48. | |
sodium_compat_fast.php | File | 185 bytes | July 17 2025 21:05:48. | |
sysinfo.php | File | 1501 bytes | July 17 2025 21:05:48. | |
viewFullActivityLog.php | File | 1501 bytes | July 17 2025 21:05:48. | |
wf503.php | File | 9860 bytes | July 17 2025 21:05:48. | |
wfAPI.php | File | 10338 bytes | July 17 2025 21:05:48. | |
wfActivityReport.php | File | 20945 bytes | July 17 2025 21:05:48. | |
wfAdminNoticeQueue.php | File | 5323 bytes | July 17 2025 21:05:48. | |
wfAlerts.php | File | 7549 bytes | July 17 2025 21:05:48. | |
wfArray.php | File | 1816 bytes | July 17 2025 21:05:48. | |
wfAuditLog.php | File | 48265 bytes | July 17 2025 21:05:48. | |
wfBrowscap.php | File | 3996 bytes | July 17 2025 21:05:48. | |
wfBrowscapCache.php | File | 262994 bytes | July 17 2025 21:05:48. | |
wfBulkCountries.php | File | 10002 bytes | July 17 2025 21:05:48. | |
wfCache.php | File | 6166 bytes | July 17 2025 21:05:48. | |
wfCentralAPI.php | File | 26419 bytes | July 17 2025 21:05:48. | |
wfConfig.php | File | 125427 bytes | July 17 2025 21:05:48. | |
wfCrawl.php | File | 6722 bytes | July 17 2025 21:05:48. | |
wfCredentialsController.php | File | 5284 bytes | July 17 2025 21:05:48. | |
wfCrypt.php | File | 4146 bytes | July 17 2025 21:05:48. | |
wfCurlInterceptor.php | File | 1047 bytes | July 17 2025 21:05:48. | |
wfDB.php | File | 11764 bytes | July 17 2025 21:05:48. | |
wfDashboard.php | File | 8399 bytes | July 17 2025 21:05:48. | |
wfDateLocalization.php | File | 360582 bytes | July 17 2025 21:05:48. | |
wfDeactivationOption.php | File | 2184 bytes | July 17 2025 21:05:48. | |
wfDiagnostic.php | File | 68476 bytes | July 17 2025 21:05:48. | |
wfDict.php | File | 738 bytes | July 17 2025 21:05:48. | |
wfDirectoryIterator.php | File | 1937 bytes | July 17 2025 21:05:48. | |
wfFileUtils.php | File | 2784 bytes | July 17 2025 21:05:48. | |
wfHelperBin.php | File | 2015 bytes | July 17 2025 21:05:48. | |
wfHelperString.php | File | 2180 bytes | July 17 2025 21:05:48. | |
wfIPWhitelist.php | File | 1596 bytes | July 17 2025 21:05:48. | |
wfImportExportController.php | File | 3306 bytes | July 17 2025 21:05:48. | |
wfInaccessibleDirectoryException.php | File | 303 bytes | July 17 2025 21:05:48. | |
wfInvalidPathException.php | File | 266 bytes | July 17 2025 21:05:48. | |
wfIpLocation.php | File | 1768 bytes | July 17 2025 21:05:48. | |
wfIpLocator.php | File | 2810 bytes | July 17 2025 21:05:48. | |
wfIssues.php | File | 28582 bytes | July 17 2025 21:05:48. | |
wfJWT.php | File | 5455 bytes | July 17 2025 21:05:48. | |
wfLicense.php | File | 10682 bytes | July 17 2025 21:05:48. | |
wfLockedOut.php | File | 9959 bytes | July 17 2025 21:05:48. | |
wfLog.php | File | 58480 bytes | July 17 2025 21:05:48. | |
wfMD5BloomFilter.php | File | 5327 bytes | July 17 2025 21:05:48. | |
wfModuleController.php | File | 754 bytes | July 17 2025 21:05:48. | |
wfNotification.php | File | 6564 bytes | July 17 2025 21:05:48. | |
wfOnboardingController.php | File | 9443 bytes | July 17 2025 21:05:48. | |
wfPersistenceController.php | File | 819 bytes | July 17 2025 21:05:48. | |
wfRESTAPI.php | File | 377 bytes | July 17 2025 21:05:48. | |
wfScan.php | File | 16300 bytes | July 17 2025 21:05:48. | |
wfScanEngine.php | File | 136810 bytes | July 17 2025 21:05:48. | |
wfScanEntrypoint.php | File | 1070 bytes | July 17 2025 21:05:48. | |
wfScanFile.php | File | 1037 bytes | July 17 2025 21:05:48. | |
wfScanFileLink.php | File | 403 bytes | July 17 2025 21:05:48. | |
wfScanFileListItem.php | File | 408 bytes | July 17 2025 21:05:48. | |
wfScanFileProperties.php | File | 1095 bytes | July 17 2025 21:05:48. | |
wfScanMonitor.php | File | 4152 bytes | July 17 2025 21:05:48. | |
wfScanPath.php | File | 1817 bytes | July 17 2025 21:05:48. | |
wfSchema.php | File | 11175 bytes | July 17 2025 21:05:48. | |
wfStyle.php | File | 1244 bytes | July 17 2025 21:05:48. | |
wfSupportController.php | File | 24758 bytes | July 17 2025 21:05:48. | |
wfUnlockMsg.php | File | 1163 bytes | July 17 2025 21:05:48. | |
wfUpdateCheck.php | File | 27888 bytes | July 17 2025 21:05:48. | |
wfUtils.php | File | 127089 bytes | July 17 2025 21:05:48. | |
wfVersionCheckController.php | File | 19729 bytes | July 17 2025 21:05:48. | |
wfVersionSupport.php | File | 535 bytes | July 17 2025 21:05:48. | |
wfView.php | File | 2269 bytes | July 17 2025 21:05:48. | |
wfViewResult.php | File | 1455 bytes | July 17 2025 21:05:48. | |
wfWebsite.php | File | 1792 bytes | July 17 2025 21:05:48. | |
wordfenceClass.php | File | 447131 bytes | July 17 2025 21:05:48. | |
wordfenceConstants.php | File | 3650 bytes | July 17 2025 21:05:48. | |
wordfenceHash.php | File | 43726 bytes | July 17 2025 21:05:48. | |
wordfenceScanner.php | File | 31200 bytes | July 17 2025 21:05:48. | |
wordfenceURLHoover.php | File | 18804 bytes | July 17 2025 21:05:48. |
<?php require_once __DIR__ . '/wfWebsite.php'; class wfLicense { const TYPE_FREE = 'free'; const TYPE_PREMIUM = 'premium'; const TYPE_CARE = 'care'; const TYPE_RESPONSE = 'response'; const KEY_TYPE_FREE = 'free'; const KEY_TYPE_PAID_CURRENT = 'paid-current'; const KEY_TYPE_PAID_EXPIRED = 'paid-expired'; const KEY_TYPE_PAID_DELETED = 'paid-deleted'; const CONFIG_API_KEY = 'apiKey'; const CONFIG_REMAINING_DAYS = 'keyExpDays'; const CONFIG_PAID = 'isPaid'; const CONFIG_KEY_TYPE = 'keyType'; const CONFIG_HAS_KEY_CONFLICT = 'hasKeyConflict'; const CONFIG_TYPE = 'licenseType'; const REGISTRATION_PAYLOAD_VERSION = 1; private static $TYPES = array( self::TYPE_FREE, self::TYPE_PREMIUM, self::TYPE_CARE, self::TYPE_RESPONSE ); private static $reflectionClass = null; private static $current = null; private $apiKey; private $paid; private $type; private $remainingDays; private $conflicting; private $deleted; private $keyType; /** * @param string $apiKey * @param bool $paid whether or not this is a paid license * @param ?string $type the license type (@see self::$TYPES) * @param int $remainingDays the number of days remaining before the license expires * (may be negative if already expired) * @param bool $conflicting whether or not there is a conflict with this license * @param bool $deleted whether or not the key was deleted */ private function __construct($apiKey = null, $paid = null, $type = null, $remainingDays = null, $conflicting = false, $deleted = false, $keyType = null) { $this->apiKey = $apiKey; $this->paid = $paid; $this->setType($type); $this->remainingDays = $remainingDays; $this->conflicting = $conflicting; $this->deleted = $deleted; $this->keyType = $keyType; } public function setApiKey($apiKey) { $this->apiKey = $apiKey; return $this; } public function getApiKey() { return $this->apiKey; } public function setPaid($paid) { $this->paid = $paid; return $this; } public function isPaid() { return $this->paid; } public function setType($type) { $this->type = $type !== null && self::isValidType($type) ? (string) $type : ($this->isPaid() ? self::TYPE_PREMIUM : self::TYPE_FREE); return $this; } public function getType() { return $this->type === null ? self::TYPE_FREE : $this->type; } public function is($type, $orGreater = false) { return $this->type === $type || ($orGreater && $this->isAtLeast($type)); } public function setRemainingDays($days) { $this->remainingDays = (int) $days; return $this; } public function getRemainingDays() { return $this->remainingDays; } public function setConflicting($conflicting = true) { $this->conflicting = $conflicting; return $this; } public function hasConflict() { return $this->conflicting; } public function setDeleted($deleted = true) { $this->deleted = $deleted; return $this; } public function isExpired() { return $this->getKeyType() === self::KEY_TYPE_PAID_EXPIRED; } public function isValid() { return !$this->isExpired(); } public function isPaidAndCurrent() { return $this->getKeyType() === self::KEY_TYPE_PAID_CURRENT; } private function resolveKeyType() { if ($this->deleted) return self::KEY_TYPE_PAID_DELETED; if ($this->paid) { if ($this->remainingDays >= 0) return self::KEY_TYPE_PAID_CURRENT; else return self::KEY_TYPE_PAID_EXPIRED; } return self::KEY_TYPE_FREE; } public function getKeyType() { if (!$this->keyType) $this->keyType = $this->resolveKeyType(); return $this->keyType; } private function clearCache() { $this->keyType = null; } private function compareTiers($a, $b, $inclusive = true) { if ($a === $b) return $inclusive; foreach (self::$TYPES as $tier) { if ($tier === $a) return true; if ($tier === $b) return false; } return false; } /** * Check if the license type is at or above the given tier */ public function isAtLeast($type) { if ($type !== self::TYPE_FREE && !$this->isValid()) return false; return $this->compareTiers($type, $this->getType()); } public function isBelow($type) { if ($type !== self::TYPE_FREE && !$this->isValid()) return true; return $this->compareTiers($this->getType(), $type, false); } public function isPremium($orGreater = false) { return $this->is(self::TYPE_PREMIUM, $orGreater); } public function isAtLeastPremium() { return $this->isPremium(true); } public function isBelowPremium() { return $this->isBelow(self::TYPE_PREMIUM); } public function isCare($orGreater = false) { return $this->is(self::TYPE_CARE, $orGreater); } public function isAtLeastCare() { return $this->isCare(true); } public function isBelowCare() { return $this->isBelow(self::TYPE_CARE); } public function isResponse($orGreater = false) { return $this->is(self::TYPE_RESPONSE, $orGreater); } public function isAtLeastResponse() { return $this->isResponse(true); } public function isBelowResponse() { return $this->isBelow(self::TYPE_RESPONSE); } public function getShieldLogo() { $type = $this->getType(); return wfUtils::getBaseURL() . "images/logos/shield-{$type}.svg"; } public function getStylesheet($global = false) { $type = $this->getType(); $suffix = $global ? '-global' : ''; return wfUtils::getBaseURL() . wfUtils::versionedAsset("css/license/{$type}{$suffix}.css", '', WORDFENCE_VERSION); } public function getGlobalStylesheet() { return $this->getStylesheet(true); } public function getTypeLabel($requireCurrent = true, $includePrefix = null) { $paidKeyTypes = array(self::KEY_TYPE_PAID_CURRENT); if (!$requireCurrent) { $paidKeyTypes[] = self::KEY_TYPE_PAID_EXPIRED; $paidKeyTypes[] = self::KEY_TYPE_PAID_DELETED; } if (in_array($this->getKeyType(), $paidKeyTypes)) { switch ($this->type) { case self::TYPE_CARE: return $includePrefix || $includePrefix === null ? __('Wordfence Care', 'wordfence') : __('Care', 'wordfence'); case self::TYPE_RESPONSE: return $includePrefix || $includePrefix === null ? __('Wordfence Response', 'wordfence') : __('Response', 'wordfence'); case self::TYPE_PREMIUM: default: return $includePrefix ? __('Wordfence Premium', 'wordfence') : __('Premium', 'wordfence'); } } return $includePrefix ? __('Wordfence Free', 'wordfence') : __('Free', 'wordfence'); } public function getPrefixedTypeLabel($requireCurrent = true) { return $this->getTypeLabel($requireCurrent, true); } private function generateLicenseUrl($path, $query = array(), $campaign = null) { if ($campaign !== null) $campaign = "gnl1{$campaign}"; $url = implode( '/', array_filter(array( 'https://www.wordfence.com', $campaign, $path )) ); return $url . (empty($query) ? '' : ('?' . http_build_query($query))); } public function getSupportUrl($campaign = null) { return $this->generateLicenseUrl( 'get-help', array( 'license' => $this->apiKey ), $campaign ); } public function getUpgradeUrl($campaign = null) { if ($this->isAtLeastPremium()) { return $this->generateLicenseUrl( 'licenses', array( 'upgrade' => $this->apiKey ), $campaign ); } else { return $this->generateLicenseUrl( 'products/pricing/', array(), $campaign ); } } private function writeConfig($hasError = false) { $this->clearCache(); $keyType = $this->getKeyType(); wfConfig::set(self::CONFIG_API_KEY, $this->apiKey); wfConfig::set(self::CONFIG_TYPE, $this->type); wfConfig::set(self::CONFIG_REMAINING_DAYS, $this->remainingDays); wfConfig::set(self::CONFIG_PAID, $keyType === self::KEY_TYPE_PAID_CURRENT); wfConfig::setOrRemove(self::CONFIG_HAS_KEY_CONFLICT, $this->conflicting ? 1 : null); if (!$hasError) { //Only save a limited subset of the config if an API error occurred wfConfig::set(self::CONFIG_KEY_TYPE, $keyType); } } /** * @param bool $hasError whether or not an error occurred while retrieving the current license data */ public function save($hasError = false) { $this->writeConfig($hasError); } public function downgradeToFree($apiKey) { $this->apiKey = $apiKey; $this->type = self::TYPE_FREE; $this->paid = false; $this->keyType = self::KEY_TYPE_FREE; $this->conflicting = false; $this->deleted = false; $this->remainingDays = -1; return $this; } public static function isValidType($type) { return in_array($type, self::$TYPES); } private static function fromConfig() { $remainingDays = wfConfig::get(self::CONFIG_REMAINING_DAYS, null); if ($remainingDays !== null) $remainingDays = (int) $remainingDays; $keyType = wfConfig::get(self::CONFIG_KEY_TYPE, null); return new self( (string) wfConfig::get(self::CONFIG_API_KEY), (bool) wfConfig::get(self::CONFIG_PAID), (string) wfConfig::get(self::CONFIG_TYPE, self::TYPE_FREE), $remainingDays, (bool) wfConfig::get(self::CONFIG_HAS_KEY_CONFLICT, false), $keyType === self::KEY_TYPE_PAID_DELETED, $keyType ); } public static function current() { if (self::$current === null) { self::$current = self::fromConfig(); } return self::$current; } const REGISTRATION_TOKEN_TTL = 86400; //24 hours const REGISTRATION_TOKEN_KEY = 'wfRegistrationToken'; const REGISTRATION_TOKEN_LENGTH = 32; public static function getRegistrationToken($refreshTtl = false) { $token = get_transient(self::REGISTRATION_TOKEN_KEY); if ($token === false) { $token = openssl_random_pseudo_bytes(self::REGISTRATION_TOKEN_LENGTH); if ($token === false) throw new Exception('Unable to generate registration token'); $token = wfUtils::base64url_encode($token); $refreshTtl = true; } if ($refreshTtl) set_transient(self::REGISTRATION_TOKEN_KEY, $token, self::REGISTRATION_TOKEN_TTL); return $token; } public static function validateRegistrationToken($token) { $expected = self::getRegistrationToken(); //Note that the length of $expected is publicly known since it's in the plugin source, so differening lengths immediately triggering a false return is not a cause for concern return hash_equals($expected, $token); } public static function generateRegistrationLink() { $wfWebsite = wfWebsite::getInstance(); $stats = wfAPI::generateSiteStats(); $token = self::getRegistrationToken(true); $returnUrl = network_admin_url('admin.php?page=WordfenceInstall'); $payload = array( self::REGISTRATION_PAYLOAD_VERSION, $stats, $token, $returnUrl, ); $payload = implode(';', $payload); $payload = wfUtils::base64url_encode($payload); return $wfWebsite->getUrl("plugin/registration/{$payload}"); } }
SILENT KILLER Tool