!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/phpmyadmin/vendor/twig/twig/src/Cache/   drwxr-xr-x
Free 13.53 GB of 61.93 GB (21.85%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of Twig.
 *
 * (c) Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Twig\Cache;

/**
 * Implements a cache on the filesystem.
 *
 * @author Andrew Tch <andrew@noop.lv>
 */
class FilesystemCache implements CacheInterface
{
    public const 
FORCE_BYTECODE_INVALIDATION 1;

    private 
$directory;
    private 
$options;

    public function 
__construct(string $directoryint $options 0)
    {
        
$this->directory rtrim($directory'\/').'/';
        
$this->options $options;
    }

    public function 
generateKey(string $namestring $className): string
    
{
        
$hash hash(\PHP_VERSION_ID 80100 'sha256' 'xxh128'$className);

        return 
$this->directory.$hash[0].$hash[1].'/'.$hash.'.php';
    }

    public function 
load(string $key): void
    
{
        if (
is_file($key)) {
            @include_once 
$key;
        }
    }

    public function 
write(string $keystring $content): void
    
{
        
$dir = \dirname($key);
        if (!
is_dir($dir)) {
            if (
false === @mkdir($dir0777true)) {
                
clearstatcache(true$dir);
                if (!
is_dir($dir)) {
                    throw new \
RuntimeException(sprintf('Unable to create the cache directory (%s).'$dir));
                }
            }
        } elseif (!
is_writable($dir)) {
            throw new \
RuntimeException(sprintf('Unable to write in the cache directory (%s).'$dir));
        }

        
$tmpFile tempnam($dirbasename($key));
        if (
false !== @file_put_contents($tmpFile$content) && @rename($tmpFile$key)) {
            @
chmod($key0666 & ~umask());

            if (
self::FORCE_BYTECODE_INVALIDATION == ($this->options self::FORCE_BYTECODE_INVALIDATION)) {
                
// Compile cached file into bytecode cache
                
if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) {
                    @
opcache_invalidate($keytrue);
                } elseif (\
function_exists('apc_compile_file')) {
                    
apc_compile_file($key);
                }
            }

            return;
        }

        throw new \
RuntimeException(sprintf('Failed to write cache file "%s".'$key));
    }

    public function 
getTimestamp(string $key): int
    
{
        if (!
is_file($key)) {
            return 
0;
        }

        return (int) @
filemtime($key);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.485 ]--