!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/phpmyadmin/libraries/classes/Command/   drwxr-xr-x
Free 83.26 GB of 96.73 GB (86.08%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

declare(strict_types=1);

namespace 
PhpMyAdmin\Command;

use 
RangeException;
use 
Symfony\Component\Console\Command\Command;
use 
Symfony\Component\Console\Input\InputArgument;
use 
Symfony\Component\Console\Input\InputInterface;
use 
Symfony\Component\Console\Output\OutputInterface;
use function 
file_put_contents;
use function 
preg_match;
use function 
sprintf;

final class 
SetVersionCommand extends Command
{
    
/** @var string */
    
protected static $defaultName 'set-version';

    
/** @var string */
    
private static $generatedClassTemplate = <<<'PHP'
<?php

declare(strict_types=1);

namespace PhpMyAdmin;

/**
 * This class is generated by scripts/console.
 *
 * @see \PhpMyAdmin\Command\SetVersionCommand
 */
final class Version
{
    // The VERSION_SUFFIX constant is defined at libraries/vendor_config.php
    public const VERSION = '%1$u.%2$u.%3$u%4$s' . VERSION_SUFFIX;
    public const SERIES = '%1$u.%2$u';
    public const MAJOR = %1$u;
    public const MINOR = %2$u;
    public const PATCH = %3$u;
    public const ID = %1$u%2$02u%3$02u;
    public const PRE_RELEASE_NAME = '%5$s';
    public const IS_DEV = %6$s;
}

PHP;

    protected function 
configure(): void
    
{
        
$this->setDescription('Sets the version number');
        
$this->setHelp('This command generates the PhpMyAdmin\Version class based on the version number provided.');
        
$this->addArgument('version'InputArgument::REQUIRED'The version number');
    }

    protected function 
execute(InputInterface $inputOutputInterface $output): int
    
{
        
/** @var string $version */
        
$version $input->getArgument('version');

        
$generatedClass $this->getGeneratedClass($version);

        if (! 
$this->writeGeneratedClassFile($generatedClass)) {
            
// failure
            
return 1;
        }

        
$output->writeln('PhpMyAdmin\Version class successfully generated!');

        
// success
        
return 0;
    }

    private function 
getGeneratedClass(string $version): string
    
{
        
// Do not allow any major below 5
        
$return preg_match('/^([5-9]+)\.(\d{1,2})\.(\d{1,2})(-([a-z0-9]+))?$/'$version$matches);
        if (
$return === false || $return === 0) {
            throw new 
RangeException('The version number is in the wrong format: ' $version);
        }

        return 
sprintf(
            
self::$generatedClassTemplate,
            
$matches[1],
            
$matches[2],
            
$matches[3],
            
$matches[4] ?? '',
            
$matches[5] ?? '',
            (
$matches[5] ?? '') === 'dev' 'true' 'false'
        
);
    }

    private function 
writeGeneratedClassFile(string $generatedClass): bool
    
{
        
$result file_put_contents(
            
ROOT_PATH 'libraries/classes/Version.php',
            
$generatedClass
        
);

        return 
$result !== false;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by HackingTool | HackingTool | Generation time: 0.0044 ]--