403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/pia/wp-content/plugins/nitropack/classes/Integration/Plugin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/pia/wp-content/plugins/nitropack/classes/Integration/Plugin/RC.php
<?php

namespace NitroPack\Integration\Plugin;

class RC {
	public static $modules = [//Key should match the value from nitropack_get_conflicting_plugins() assigned to the $clashingPlugins array
		'WP-Rocket' => 'NitroPack\Integration\Plugin\WPRocket',
	];

	public static function clearCache() {
	}

	public static function dirHasContents( $dir_path, $recursive_scan ) {
		$exclude_list = [ '.', '..', '.htaccess', 'index.html' ];
		if ( is_dir( $dir_path ) ) {
			$dir_path = nitropack_trailingslashit( $dir_path );
			$dir_contents = scandir( $dir_path );
			foreach ( $dir_contents as $current_item ) {
				if ( ! in_array( $current_item, $exclude_list ) ) {
					$current_item_path = nitropack_trailingslashit( $dir_path . $current_item );
					if ( is_dir( $current_item_path ) ) {
						if ( $recursive_scan ) {
							if ( self::dirHasContents( $current_item_path, true ) )
								return true;
						} else {
							return true;
						}
					} else {
						return true;
					}
				}
			}
		}
		return false;
	}

	public static function clearResidualCache( $full_cache_path ) {
		try {
			if ( file_exists( $full_cache_path ) ) {
				if ( is_dir( $full_cache_path ) && is_writable( $full_cache_path ) ) {
					$diskStorage = new \NitroPack\SDK\StorageDriver\Disk();
					$diskStorage->deleteDir( $full_cache_path );
					return true;
				}
				return false;
			}
		} catch (\Exception $e) {
			//TODO: Log the exception in a NP log
			return false;
		}
	}

	public static function getCurrentDomain() {
		$url = new \NitroPack\Url\Url( get_site_url() );
		return $url ? $url->getHost() : NULL;
	}

	public static function getWPCacheDir() {
		$wpc_dir = nitropack_trailingslashit( defined( 'WP_CONTENT_DIR' ) ? WP_CONTENT_DIR : ( defined( 'ABSPATH' ) ? ABSPATH . '/wp-content' : 'Undefined' ) ) . 'cache';
		if ( file_exists( $wpc_dir ) ) {
			return $wpc_dir;
		}
		return false;
	}

	public static function isConflictingPluginActive( $cp_name ) {
		$conflictingPlugins = \NitroPack\WordPress\ConflictingPlugins::getInstance();
		$conflictingPlugins = $conflictingPlugins->nitropack_get_conflicting_plugins();
		foreach ( $conflictingPlugins as $clashingPlugin ) {
			if ( $clashingPlugin['name'] === $cp_name ) {
				$cp_name = $clashingPlugin['plugin'];
				return true;
			}
		}
		return false;
	}

	public static function detectThirdPartyCaches() {
		$residual_cache = array();

		foreach ( self::$modules as $module_name => $module ) {
			if ( ! self::isConflictingPluginActive( $module_name ) && $module::hasResidualCache() ) {
				$residual_cache[] = $module_name;
			}
		}

		return $residual_cache;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit