PATH:
home
/
lab2454c
/
archfort.com
/
wp-content
/
plugins
/
wordfence
/
lib
<?php class wfArray { private $data = ""; private $size = 0; private $shiftPtr = 0; private $keys; public function __construct($keys){ $this->keys = $keys; } public function push($val){ //associative array with keys that match those given to constructor foreach($this->keys as $key){ $this->data .= pack('N', wfUtils::strlen($val[$key])) . $val[$key]; } $this->size++; } public function shift(){ //If you alternately call push and shift you must periodically call collectGarbage() or ->data will keep growing $arr = array(); if(wfUtils::strlen($this->data) < 1){ return null; } if($this->shiftPtr == wfUtils::strlen($this->data)){ return null; } foreach($this->keys as $key){ $len = unpack('N', wfUtils::substr($this->data, $this->shiftPtr, 4)); $len = $len[1]; $arr[$key] = wfUtils::substr($this->data, $this->shiftPtr + 4, $len); $this->shiftPtr += 4 + $len; } if($this->shiftPtr == wfUtils::strlen($this->data)){ //garbage collection $this->data = ""; //we don't shorten with substr() because the assignment doubles peak mem $this->shiftPtr = 0; } $this->size--; return $arr; } public function collectGarbage(){ //only call collectGarbage if you're alternating between pushes and shifts and never emptying the array. //If you don't collect garbage then the data that is shifted is never freed $this->data = wfUtils::substr($this->data, $this->shiftPtr); //at this point memory usage doubles because of the = assignment (string copy is made), so try not to call collect garbage unless you have to. $this->shiftPtr = 0; } public function zero(){ //Rather call this instead of collect garbage because it's way more mem efficient. $this->data = ""; $this->shiftPtr = 0; $this->size = 0; } public function size(){ return $this->size; } }
[-] menu_firewall.php
[edit]
[-] menu_dashboard_options.php
[edit]
[-] wfScanFileProperties.php
[edit]
[-] sodium_compat_fast.php
[edit]
[-] email_unlockRequest.php
[edit]
[-] menu_scanner.php
[edit]
[+]
audit-log
[-] wfModuleController.php
[edit]
[-] wfIssues.php
[edit]
[-] wfScanMonitor.php
[edit]
[-] menu_scanner_credentials.php
[edit]
[-] wfStyle.php
[edit]
[-] live_activity.php
[edit]
[-] wfIPWhitelist.php
[edit]
[-] wfInvalidPathException.php
[edit]
[-] wfWebsite.php
[edit]
[-] IPTraf.php
[edit]
[-] flags.php
[edit]
[-] wfConfig.php
[edit]
[-] wfUnlockMsg.php
[edit]
[-] GeoLite2-Country.mmdb
[edit]
[-] wfArray.php
[edit]
[-] wfView.php
[edit]
[-] wfHelperBin.php
[edit]
[+]
..
[-] email_unsubscribeRequest.php
[edit]
[-] wfBulkCountries.php
[edit]
[-] viewFullActivityLog.php
[edit]
[-] wfScanFileListItem.php
[edit]
[-] wfVersionCheckController.php
[edit]
[-] wfHelperString.php
[edit]
[-] wordfenceScanner.php
[edit]
[-] wfScanEntrypoint.php
[edit]
[-] wfScanEngine.php
[edit]
[-] wfBrowscap.php
[edit]
[-] menu_install.php
[edit]
[-] wfSupportController.php
[edit]
[-] menu_support.php
[edit]
[-] menu_tools.php
[edit]
[-] wfJWT.php
[edit]
[-] wfCurlInterceptor.php
[edit]
[-] menu_tools_twoFactor.php
[edit]
[-] menu_firewall_waf_options.php
[edit]
[-] wfOnboardingController.php
[edit]
[-] wf503.php
[edit]
[-] wfCrawl.php
[edit]
[-] menu_firewall_blocking_options.php
[edit]
[-] wfScanFile.php
[edit]
[-] wfSchema.php
[edit]
[-] menu_tools_diagnostic.php
[edit]
[-] wfFileUtils.php
[edit]
[-] wfDict.php
[edit]
[-] wfScanFileLink.php
[edit]
[-] compat.php
[edit]
[-] menu_tools_livetraffic.php
[edit]
[-] wfAPI.php
[edit]
[-] wfActivityReport.php
[edit]
[-] wfDateLocalization.php
[edit]
[-] wfIpLocation.php
[edit]
[-] wfCredentialsController.php
[edit]
[-] sysinfo.php
[edit]
[-] wordfenceClass.php
[edit]
[-] wfLog.php
[edit]
[-] Diff.php
[edit]
[-] menu_firewall_waf.php
[edit]
[+]
rest-api
[-] WFLSPHP52Compatability.php
[edit]
[-] wfImportExportController.php
[edit]
[-] wordfenceConstants.php
[edit]
[-] wfCrypt.php
[edit]
[-] wordfenceHash.php
[edit]
[-] wfIpLocator.php
[edit]
[-] wfVersionSupport.php
[edit]
[-] wfDashboard.php
[edit]
[-] menu_dashboard.php
[edit]
[-] email_genericAlert.php
[edit]
[-] wfUtils.php
[edit]
[-] wfCache.php
[edit]
[-] menu_tools_whois.php
[edit]
[-] wfBrowscapCache.php
[edit]
[-] menu_tools_importExport.php
[edit]
[-] .htaccess
[edit]
[-] wfUpdateCheck.php
[edit]
[-] wfViewResult.php
[edit]
[-] wfDiagnostic.php
[edit]
[-] wfNotification.php
[edit]
[-] wfMD5BloomFilter.php
[edit]
[-] noc1.key
[edit]
[+]
Diff
[-] wfScan.php
[edit]
[-] wfAdminNoticeQueue.php
[edit]
[-] menu_tools_auditlog.php
[edit]
[-] wfPersistenceController.php
[edit]
[-] menu_wordfence_central.php
[edit]
[-] email_newIssues.php
[edit]
[-] wfAlerts.php
[edit]
[-] wfRESTAPI.php
[edit]
[-] wfCentralAPI.php
[edit]
[-] wfAuditLog.php
[edit]
[-] menu_options.php
[edit]
[-] diffResult.php
[edit]
[-] wfLicense.php
[edit]
[-] wfDeactivationOption.php
[edit]
[-] menu_firewall_blocking.php
[edit]
[-] wfLockedOut.php
[edit]
[-] wfDB.php
[edit]
[-] wordfenceURLHoover.php
[edit]
[-] wfDirectoryIterator.php
[edit]
[-] IPTrafList.php
[edit]
[-] wfScanPath.php
[edit]
[-] menu_scanner_options.php
[edit]
[-] wfInaccessibleDirectoryException.php
[edit]
[+]
dashboard