!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.38 GB of 117.98 GB (21.51%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Mpdf;

use 
DirectoryIterator;

class 
Cache
{

    private 
$basePath;

    private 
$cleanupInterval;

    public function 
__construct($basePath$cleanupInterval 3600)
    {
        if (!
is_int($cleanupInterval) && false !== $cleanupInterval) {
            throw new 
\Mpdf\MpdfException('Cache cleanup interval has to be an integer or false');
        }

        if (!
$this->createBasePath($basePath)) {
            throw new 
\Mpdf\MpdfException(sprintf('Temporary files directory "%s" is not writable'$basePath));
        }

        
$this->basePath $basePath;
        
$this->cleanupInterval $cleanupInterval;
    }

    protected function 
createBasePath($basePath)
    {
        if (!
file_exists($basePath)) {
            if (!
$this->createBasePath(dirname($basePath))) {
                return 
false;
            }

            if (!
$this->createDirectory($basePath)) {
                return 
false;
            }
        }

        if (!
is_writable($basePath) || !is_dir($basePath)) {
            return 
false;
        }

        return 
true;
    }

    protected function 
createDirectory($basePath)
    {
        if (!
mkdir($basePath)) {
            return 
false;
        }

        if (!
chmod($basePath0777)) {
            return 
false;
        }

        return 
true;
    }

    public function 
tempFilename($filename)
    {
        return 
$this->getFilePath($filename);
    }

    public function 
has($filename)
    {
        return 
file_exists($this->getFilePath($filename));
    }

    public function 
load($filename)
    {
        return 
file_get_contents($this->getFilePath($filename));
    }

    public function 
write($filename$data)
    {
        
$tempFile tempnam($this->basePath'cache_tmp_');
        
file_put_contents($tempFile$data);
        
chmod($tempFile0664);

        
$path $this->getFilePath($filename);
        
rename($tempFile$path);

        return 
$path;
    }

    public function 
remove($filename)
    {
        return 
unlink($this->getFilePath($filename));
    }

    public function 
clearOld()
    {
        
$iterator = new DirectoryIterator($this->basePath);

        
/** @var \DirectoryIterator $item */
        
foreach ($iterator as $item) {
            if (!
$item->isDot()
                    && 
$item->isFile()
                    && !
$this->isDotFile($item)
                    && 
$this->isOld($item)) {
                
unlink($item->getPathname());
            }
        }
    }

    private function 
getFilePath($filename)
    {
        return 
$this->basePath '/' $filename;
    }

    private function 
isOld(DirectoryIterator $item)
    {
        return 
$this->cleanupInterval
            
$item->getMTime() + $this->cleanupInterval time()
            : 
false;
    }

    public function 
isDotFile(DirectoryIterator $item)
    {
        return 
substr($item->getFilename(), 01) === '.';
    }
}

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