/
home
/
vianto5
/
.trash
/
cititower.mx
/
wp-content
/
plugins
/
wordfence
/
lib
/
/home/vianto5/.trash/cititower.mx/wp-content/plugins/wordfence/lib
mkdir
upload
Name
Size
Mode
Actions
dashboard/
-
0755
rm
Diff/
-
0755
rm
rest-api/
-
0755
rm
.htaccess
354
0644
edit
dl
rm
compat.php
425
0644
edit
dl
rm
Diff.php
5762
0644
edit
dl
rm
diffResult.php
2869
0644
edit
dl
rm
email_genericAlert.php
1422
0644
edit
dl
rm
email_newIssues.php
9035
0644
edit
dl
rm
email_unlockRequest.php
2397
0644
edit
dl
rm
email_unsubscribeRequest.php
1077
0644
edit
dl
rm
flags.php
6779
0644
edit
dl
rm
GeoLite2-Country.mmdb
6511625
0644
edit
dl
rm
IPTraf.php
1190
0644
edit
dl
rm
IPTrafList.php
3054
0644
edit
dl
rm
live_activity.php
580
0644
edit
dl
rm
menu_dashboard.php
28671
0644
edit
dl
rm
menu_dashboard_options.php
15577
0644
edit
dl
rm
menu_firewall.php
2167
0644
edit
dl
rm
menu_firewall_blocking.php
10495
0644
edit
dl
rm
menu_firewall_blocking_options.php
4737
0644
edit
dl
rm
menu_firewall_waf.php
20443
0644
edit
dl
rm
menu_firewall_waf_options.php
11357
0644
edit
dl
rm
menu_install.php
1767
0644
edit
dl
rm
menu_options.php
24631
0644
edit
dl
rm
menu_scanner.php
22047
0644
edit
dl
rm
menu_scanner_credentials.php
2774
0644
edit
dl
rm
menu_scanner_options.php
8615
0644
edit
dl
rm
menu_support.php
18194
0644
edit
dl
rm
menu_tools.php
1438
0644
edit
dl
rm
menu_tools_diagnostic.php
50481
0644
edit
dl
rm
menu_tools_importExport.php
1310
0644
edit
dl
rm
menu_tools_livetraffic.php
40381
0644
edit
dl
rm
menu_tools_twoFactor.php
20070
0644
edit
dl
rm
menu_tools_whois.php
4722
0644
edit
dl
rm
menu_wordfence_central.php
9889
0644
edit
dl
rm
noc1.key
1683
0644
edit
dl
rm
sodium_compat_fast.php
185
0644
edit
dl
rm
sysinfo.php
1496
0644
edit
dl
rm
viewFullActivityLog.php
1501
0644
edit
dl
rm
wf503.php
9860
0644
edit
dl
rm
wfActivityReport.php
20945
0644
edit
dl
rm
wfAdminNoticeQueue.php
5323
0644
edit
dl
rm
wfAlerts.php
7549
0644
edit
dl
rm
wfAPI.php
9889
0644
edit
dl
rm
wfArray.php
1816
0644
edit
dl
rm
wfBrowscap.php
3996
0644
edit
dl
rm
wfBrowscapCache.php
262994
0644
edit
dl
rm
wfBulkCountries.php
10002
0644
edit
dl
rm
wfCache.php
6166
0644
edit
dl
rm
wfCentralAPI.php
25502
0644
edit
dl
rm
wfConfig.php
90755
0644
edit
dl
rm
wfCrawl.php
6722
0644
edit
dl
rm
wfCredentialsController.php
5284
0644
edit
dl
rm
wfCrypt.php
4146
0644
edit
dl
rm
wfCurlInterceptor.php
1047
0644
edit
dl
rm
wfDashboard.php
8399
0644
edit
dl
rm
wfDateLocalization.php
360582
0644
edit
dl
rm
wfDB.php
11764
0644
edit
dl
rm
wfDeactivationOption.php
2184
0644
edit
dl
rm
wfDiagnostic.php
67805
0644
edit
dl
rm
wfDict.php
738
0644
edit
dl
rm
wfDirectoryIterator.php
1937
0644
edit
dl
rm
wfFileUtils.php
2784
0644
edit
dl
rm
wfHelperBin.php
2015
0644
edit
dl
rm
wfHelperString.php
2180
0644
edit
dl
rm
wfImportExportController.php
3306
0644
edit
dl
rm
wfInaccessibleDirectoryException.php
303
0644
edit
dl
rm
wfInvalidPathException.php
266
0644
edit
dl
rm
wfIpLocation.php
1768
0644
edit
dl
rm
wfIpLocator.php
2810
0644
edit
dl
rm
wfIPWhitelist.php
1596
0644
edit
dl
rm
wfIssues.php
27917
0644
edit
dl
rm
wfJWT.php
5455
0644
edit
dl
rm
wfLicense.php
10682
0644
edit
dl
rm
wfLockedOut.php
9959
0644
edit
dl
rm
wfLog.php
58396
0644
edit
dl
rm
WFLSPHP52Compatability.php
1303
0644
edit
dl
rm
wfMD5BloomFilter.php
5327
0644
edit
dl
rm
wfModuleController.php
754
0644
edit
dl
rm
wfNotification.php
6564
0644
edit
dl
rm
wfOnboardingController.php
8421
0644
edit
dl
rm
wfPersistenceController.php
798
0644
edit
dl
rm
wfRESTAPI.php
377
0644
edit
dl
rm
wfScan.php
16300
0644
edit
dl
rm
wfScanEngine.php
136195
0644
edit
dl
rm
wfScanEntrypoint.php
1070
0644
edit
dl
rm
wfScanFile.php
1037
0644
edit
dl
rm
wfScanFileLink.php
403
0644
edit
dl
rm
wfScanFileListItem.php
408
0644
edit
dl
rm
wfScanFileProperties.php
1095
0644
edit
dl
rm
wfScanMonitor.php
4152
0644
edit
dl
rm
wfScanPath.php
1817
0644
edit
dl
rm
wfSchema.php
10744
0644
edit
dl
rm
wfStyle.php
285
0644
edit
dl
rm
wfSupportController.php
24552
0644
edit
dl
rm
wfUnlockMsg.php
1163
0644
edit
dl
rm
wfUpdateCheck.php
27888
0644
edit
dl
rm
wfUtils.php
112786
0644
edit
dl
rm
wfVersionCheckController.php
19729
0644
edit
dl
rm
wfVersionSupport.php
447
0644
edit
dl
rm
wfView.php
2269
0644
edit
dl
rm
wfViewResult.php
1450
0644
edit
dl
rm
wfWebsite.php
1792
0644
edit
dl
rm
wordfenceClass.php
451606
0644
edit
dl
rm
wordfenceConstants.php
3216
0644
edit
dl
rm
wordfenceHash.php
43726
0644
edit
dl
rm
wordfenceScanner.php
31200
0644
edit
dl
rm
wordfenceURLHoover.php
18804
0644
edit
dl
rm
Edit:
/home/vianto5/.trash/cititower.mx/wp-content/plugins/wordfence/lib/wfCache.php
(6166B)
<?php class wfCache { private static $cacheStats = array(); private static $cacheClearedThisRequest = false; private static $lastRecursiveDeleteError = false; public static function removeCaching() { $cacheType = wfConfig::get('cacheType', false); if ($cacheType === 'disabled') { return; } if ($cacheType == 'falcon') { self::addHtaccessCode('remove'); self::updateBlockedIPs('remove'); } wfConfig::set('cacheType', 'disabled'); $cacheDir = WP_CONTENT_DIR . '/wfcache/'; if (file_exists($cacheDir . '.htaccess')) { unlink($cacheDir . '.htaccess'); } self::clearPageCacheSafe(); } public static function clearPageCacheSafe(){ if(self::$cacheClearedThisRequest){ return; } self::$cacheClearedThisRequest = true; self::clearPageCache(); } public static function clearPageCache(){ //If a clear is in progress this does nothing. self::$cacheStats = array( 'dirsDeleted' => 0, 'filesDeleted' => 0, 'totalData' => 0, 'totalErrors' => 0, 'error' => '', ); $cacheDir = WP_CONTENT_DIR . '/wfcache/'; if (!file_exists($cacheDir)) { return self::$cacheStats; } $cacheClearLock = WP_CONTENT_DIR . '/wfcache/clear.lock'; if(! is_file($cacheClearLock)){ if(! touch($cacheClearLock)){ self::$cacheStats['error'] = "Could not create a lock file $cacheClearLock to clear the cache."; self::$cacheStats['totalErrors']++; return self::$cacheStats; } } $fp = fopen($cacheClearLock, 'w'); if(! $fp){ self::$cacheStats['error'] = "Could not open the lock file $cacheClearLock to clear the cache. Please make sure the directory is writable by your web server."; self::$cacheStats['totalErrors']++; return self::$cacheStats; } if(flock($fp, LOCK_EX | LOCK_NB)){ //non blocking exclusive flock attempt. If we get a lock then it continues and returns true. If we don't lock, then return false, don't block and don't clear the cache. // This logic means that if a cache clear is currently in progress we don't try to clear the cache. // This prevents web server children from being queued up waiting to be able to also clear the cache. self::$lastRecursiveDeleteError = false; self::recursiveDelete(WP_CONTENT_DIR . '/wfcache/'); if(self::$lastRecursiveDeleteError){ self::$cacheStats['error'] = self::$lastRecursiveDeleteError; self::$cacheStats['totalErrors']++; } flock($fp, LOCK_UN); @unlink($cacheClearLock); @rmdir($cacheDir); } fclose($fp); return self::$cacheStats; } private static function recursiveDelete($dir) { $files = array_diff(scandir($dir), array('.','..')); foreach ($files as $file) { if(is_dir($dir . '/' . $file)){ if(! self::recursiveDelete($dir . '/' . $file)){ return false; } } else { if($file == 'clear.lock'){ continue; } //Don't delete our lock file $size = filesize($dir . '/' . $file); if($size){ self::$cacheStats['totalData'] += round($size / 1024); } if(strpos($dir, 'wfcache/') === false){ self::$lastRecursiveDeleteError = "Not deleting file in directory $dir because it appears to be in the wrong path."; self::$cacheStats['totalErrors']++; return false; //Safety check that we're in a subdir of the cache } if(@unlink($dir . '/' . $file)){ self::$cacheStats['filesDeleted']++; } else { self::$lastRecursiveDeleteError = "Could not delete file " . $dir . "/" . $file . " : " . wfUtils::getLastError(); self::$cacheStats['totalErrors']++; return false; } } } if($dir != WP_CONTENT_DIR . '/wfcache/'){ if(strpos($dir, 'wfcache/') === false){ self::$lastRecursiveDeleteError = "Not deleting directory $dir because it appears to be in the wrong path."; self::$cacheStats['totalErrors']++; return false; //Safety check that we're in a subdir of the cache } if(@rmdir($dir)){ self::$cacheStats['dirsDeleted']++; } else { self::$lastRecursiveDeleteError = "Could not delete directory $dir : " . wfUtils::getLastError(); self::$cacheStats['totalErrors']++; return false; } return true; } else { return true; } } public static function addHtaccessCode($action){ if($action != 'remove'){ die("Error: addHtaccessCode must be called with 'remove' as param"); } $htaccessPath = self::getHtaccessPath(); if(! $htaccessPath){ return "Wordfence could not find your .htaccess file."; } $fh = @fopen($htaccessPath, 'r+'); if(! $fh){ $err = error_get_last(); return $err['message']; } flock($fh, LOCK_EX); fseek($fh, 0, SEEK_SET); //start of file clearstatcache(); $contents = fread($fh, filesize($htaccessPath)); if(! $contents){ fclose($fh); return "Could not read from $htaccessPath"; } $contents = preg_replace('/#WFCACHECODE.*WFCACHECODE[\r\s\n\t]*/s', '', $contents); ftruncate($fh, 0); fflush($fh); fseek($fh, 0, SEEK_SET); fwrite($fh, $contents); flock($fh, LOCK_UN); fclose($fh); return false; } /** * @param $action * @return bool|string|void */ public static function updateBlockedIPs($action){ //'add' or 'remove' $htaccessPath = self::getHtaccessPath(); if(! $htaccessPath){ return "Wordfence could not find your .htaccess file."; } if($action == 'remove'){ $fh = @fopen($htaccessPath, 'r+'); if(! $fh){ $err = error_get_last(); return $err['message']; } flock($fh, LOCK_EX); fseek($fh, 0, SEEK_SET); //start of file clearstatcache(); $contents = @fread($fh, filesize($htaccessPath)); if(! $contents){ fclose($fh); return "Could not read from $htaccessPath"; } $contents = preg_replace('/#WFIPBLOCKS.*WFIPBLOCKS[\r\s\n\t]*/s', '', $contents); ftruncate($fh, 0); fflush($fh); fseek($fh, 0, SEEK_SET); @fwrite($fh, $contents); flock($fh, LOCK_UN); fclose($fh); return false; } return false; } public static function getHtaccessPath(){ $homePath = wfUtils::getHomePath(); $htaccessFile = $homePath.'.htaccess'; return $htaccessFile; } public static function doNotCache(){ if(! defined('WFDONOTCACHE')){ define('WFDONOTCACHE', true); } } }
Save
cmd:
run