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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

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

Safe-mode: OFF (not secure)

/usr/share/php/Twig-Extensions/lib/Twig/Extensions/   drwxr-xr-x
Free 13.18 GB of 57.97 GB (22.75%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/*
 * This file is part of Twig.
 *
 * (c) 2010 Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

@trigger_error('The grammar feature is deprecated since version 1.5 and will be removed in 2.0.'E_USER_DEPRECATED);

/**
 * @deprecated since version 1.5
 */
abstract class Twig_Extensions_SimpleTokenParser extends Twig_TokenParser
{
    
/**
     * Parses a token and returns a node.
     *
     * @param Twig_Token $token A Twig_Token instance
     *
     * @return Twig_Node A Twig_Node instance
     */
    
public function parse(Twig_Token $token)
    {
        
$grammar $this->getGrammar();
        if (!
is_object($grammar)) {
            
$grammar self::parseGrammar($grammar);
        }

        
$grammar->setParser($this->parser);
        
$values $grammar->parse($token);

        return 
$this->getNode($values$token->getLine());
    }

    
/**
     * Gets the grammar as an object or as a string.
     *
     * @return string|Twig_Extensions_Grammar A Twig_Extensions_Grammar instance or a string
     */
    
abstract protected function getGrammar();

    
/**
     * Gets the nodes based on the parsed values.
     *
     * @param array $values An array of values
     * @param int   $line   The parser line
     */
    
abstract protected function getNode(array $values$line);

    protected function 
getAttribute($node$attribute$arguments = array(), $type Twig_Node_Expression_GetAttr::TYPE_ANY$line = -1)
    {
        return new 
Twig_Node_Expression_GetAttr(
            
$node instanceof Twig_Node $node : new Twig_Node_Expression_Name($node$line),
            
$attribute instanceof Twig_Node $attribute : new Twig_Node_Expression_Constant($attribute$line),
            
$arguments instanceof Twig_Node $arguments : new Twig_Node($arguments),
            
$type,
            
$line
        
);
    }

    protected function 
call($node$attribute$arguments = array(), $line = -1)
    {
        return 
$this->getAttribute($node$attribute$argumentsTwig_Node_Expression_GetAttr::TYPE_METHOD$line);
    }

    protected function 
markAsSafe(Twig_Node $node$line = -1)
    {
        return new 
Twig_Node_Expression_Filter(
            
$node,
            new 
Twig_Node_Expression_Constant('raw'$line),
            new 
Twig_Node(),
            
$line
        
);
    }

    protected function 
output(Twig_Node $node$line = -1)
    {
        return new 
Twig_Node_Print($node$line);
    }

    protected function 
getNodeValues(array $values)
    {
        
$nodes = array();
        foreach (
$values as $value) {
            if (
$value instanceof Twig_Node) {
                
$nodes[] = $value;
            }
        }

        return 
$nodes;
    }

    public static function 
parseGrammar($str$main true)
    {
        static 
$cursor;

        if (
true === $main) {
            
$cursor 0;
            
$grammar = new Twig_Extensions_Grammar_Tag();
        } else {
            
$grammar = new Twig_Extensions_Grammar_Optional();
        }

        while (
$cursor strlen($str)) {
            if (
preg_match('/\s+/A'$str$matchnull$cursor)) {
                
$cursor += strlen($match[0]);
            } elseif (
preg_match('/<(\w+)(?:\:(\w+))?>/A'$str$matchnull$cursor)) {
                
$class sprintf('Twig_Extensions_Grammar_%s'ucfirst(isset($match[2]) ? $match[2] : 'Expression'));
                if (!
class_exists($class)) {
                    throw new 
Twig_Error_Runtime(sprintf('Unable to understand "%s" in grammar (%s class does not exist)'$match[0], $class));
                }
                
$grammar->addGrammar(new $class($match[1]));
                
$cursor += strlen($match[0]);
            } elseif (
preg_match('/\w+/A'$str$matchnull$cursor)) {
                
$grammar->addGrammar(new Twig_Extensions_Grammar_Constant($match[0]));
                
$cursor += strlen($match[0]);
            } elseif (
preg_match('/,/A'$str$matchnull$cursor)) {
                
$grammar->addGrammar(new Twig_Extensions_Grammar_Constant($match[0], Twig_Token::PUNCTUATION_TYPE));
                
$cursor += strlen($match[0]);
            } elseif (
preg_match('/\[/A'$str$matchnull$cursor)) {
                
$cursor += strlen($match[0]);
                
$grammar->addGrammar(self::parseGrammar($strfalse));
            } elseif (
true !== $main && preg_match('/\]/A'$str$matchnull$cursor)) {
                
$cursor += strlen($match[0]);

                return 
$grammar;
            } else {
                throw new 
Twig_Error_Runtime(sprintf('Unable to parse grammar "%s" near "...%s..."'$strsubstr($str$cursor10)));
            }
        }

        return 
$grammar;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

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