SHELL BYPASS 403 |
Modern UI. Responsive. Powerful.

Faizzz-Chin Shell

Uname\Kernel: Linux server.kxo.bgz.mybluehostin.me 3.10.0-1160.119.1.el7.tuxcare.els19.x86_64 #1 SMP Mon Mar 31 17:29:00 UTC 2025 x86_64
Server: Apache
PHP Version: 8.2.29 [ PHP INFO ]
Operating System: Linux
Server Ip: 162.240.163.222
Your Ip: 216.73.216.145
Date Time: 2025-07-12 05:06:32
User: dilseshaadi (1027) | Group: dilseshaadi (1027)
Safe Mode: OFF
Disable Function: exec,passthru,shell_exec,system

name : filesystem.php
<?php

class VP_FileSystem
{

	private static $_instance = null;

	private $_lookup_dirs = array();

	public static function instance()
	{
		if(is_null(self::$_instance))
		{
			self::$_instance = new self();
		}
		return self::$_instance;
	}

	public function get_first_non_empty_dir($key, $name = null)
	{
		if(!isset($this->_lookup_dirs[$key]))
			return false;

		foreach ($this->_lookup_dirs[$key] as $dir)
		{
			if (is_link($dir))
			{
				$dir = readlink($dir);
			}
			if(!is_null($name))
			{
				$dir = $dir . DIRECTORY_SEPARATOR . $name;
			}
			/*if($this->dir_contains_children($dir, 'php'))
			{
				return $dir;
			}*/
		}
	}

	public function resolve_path($key, $name, $ext = 'php')
	{
		if(!isset($this->_lookup_dirs[$key]))
			return false;

		$name = $this->normalize_path($name, $ext);

		foreach ($this->_lookup_dirs[$key] as $dir)
		{
			$file = $dir . DIRECTORY_SEPARATOR . $name;
			if (is_link($file))
			{
				$file = readlink($file);
			}
			if(file_exists($file))
			{
				return $file;
			}
		}
		return false;
	}

	public function normalize_path($path, $ext)
	{
		$path = trim($path, '\\/');
		return $path . '.' . $ext;
	}

	/*function dir_contains_children($dir, $ext = null)
	{
		$result = false;
		if (is_link($dir))
		{
			$dir = readlink($dir);
		}

		if($dh = opendir($dir))
		{
			while(!$result && ($file = readdir($dh)) !== false)
			{
				$result = $file !== "." && $file !== "..";
				if(!is_null($ext))
				{
					$result = pathinfo($file, PATHINFO_EXTENSION) === $ext;
				}
			}
			closedir($dh);
		}
		return $result;
	}*/

	/**
	 * Add directories to the autoloader, loading process will be run in orderly fashion
	 * of directory addition.
	 * 
	 * @param  String|Array $directories
	 * @return void
	 */
	public function add_directories($key, $directories)
	{
		if(!isset($this->_lookup_dirs[$key]))
		{
			$this->_lookup_dirs[$key] = array();
		}
		$this->_lookup_dirs[$key] = array_merge($this->_lookup_dirs[$key], (array) $directories);
		$this->_lookup_dirs[$key] = array_unique($this->_lookup_dirs[$key]);
	}

	/**
	 * Remove directories.
	 * 
	 * @param  String|Array $directories
	 * @return void
	 */
	public function remove_directories($key, $directories = null)
	{
		// annihilate everything if none / null passed
		if(is_null($directories))
		{
			$this->_lookup_dirs[$key] = array();
		}
		else
		{
			// prepare directories to be filtered
			$directories = (array) $directories;

			// do the filtering
			foreach ($this->_lookup_dirs[$key] as $name => $dir)
			{
				if(in_array($dir, $directories))
				{
					unset($this->_lookup_dirs[$key][$name]);
				}
			}
		}
	}

	/**
	 * Get all directories
	 * 
	 * @return Array
	 */
	public function get_directories($key = null)
	{
		if(!is_null($key))
			return $this->_lookup_dirs[$key];
		return $this->_lookup_dirs;
	}

}
© 2025 Faizzz-Chin