!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/apex_led/php/vendor/guzzlehttp/streams/src/   drwxrwxr-x
Free 11.5 GB of 61.93 GB (18.56%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     CachingStream.php (3.71 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace GuzzleHttp\Stream;

use 
GuzzleHttp\Stream\Exception\SeekException;

/**
 * Stream decorator that can cache previously read bytes from a sequentially
 * read stream.
 */
class CachingStream implements StreamInterface
{
    use 
StreamDecoratorTrait;

    
/** @var StreamInterface Stream being wrapped */
    
private $remoteStream;

    
/** @var int Number of bytes to skip reading due to a write on the buffer */
    
private $skipReadBytes 0;

    
/**
     * We will treat the buffer object as the body of the stream
     *
     * @param StreamInterface $stream Stream to cache
     * @param StreamInterface $target Optionally specify where data is cached
     */
    
public function __construct(
        
StreamInterface $stream,
        
StreamInterface $target null
    
) {
        
$this->remoteStream $stream;
        
$this->stream $target ?: new Stream(fopen('php://temp''r+'));
    }

    public function 
getSize()
    {
        return 
max($this->stream->getSize(), $this->remoteStream->getSize());
    }

    
/**
     * {@inheritdoc}
     * @throws SeekException When seeking with SEEK_END or when seeking
     *     past the total size of the buffer stream
     */
    
public function seek($offset$whence SEEK_SET)
    {
        if (
$whence == SEEK_SET) {
            
$byte $offset;
        } elseif (
$whence == SEEK_CUR) {
            
$byte $offset $this->tell();
        } else {
            return 
false;
        }

        
// You cannot skip ahead past where you've read from the remote stream
        
if ($byte $this->stream->getSize()) {
            throw new 
SeekException(
                
$this,
                
$byte,
                
sprintf('Cannot seek to byte %d when the buffered stream only'
                    
' contains %d bytes'$byte$this->stream->getSize())
            );
        }

        return 
$this->stream->seek($byte);
    }

    public function 
read($length)
    {
        
// Perform a regular read on any previously read data from the buffer
        
$data $this->stream->read($length);
        
$remaining $length strlen($data);

        
// More data was requested so read from the remote stream
        
if ($remaining) {
            
// If data was written to the buffer in a position that would have
            // been filled from the remote stream, then we must skip bytes on
            // the remote stream to emulate overwriting bytes from that
            // position. This mimics the behavior of other PHP stream wrappers.
            
$remoteData $this->remoteStream->read(
                
$remaining $this->skipReadBytes
            
);

            if (
$this->skipReadBytes) {
                
$len strlen($remoteData);
                
$remoteData substr($remoteData$this->skipReadBytes);
                
$this->skipReadBytes max(0$this->skipReadBytes $len);
            }

            
$data .= $remoteData;
            
$this->stream->write($remoteData);
        }

        return 
$data;
    }

    public function 
write($string)
    {
        
// When appending to the end of the currently read stream, you'll want
        // to skip bytes from being read from the remote stream to emulate
        // other stream wrappers. Basically replacing bytes of data of a fixed
        // length.
        
$overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell();
        if (
$overflow 0) {
            
$this->skipReadBytes += $overflow;
        }

        return 
$this->stream->write($string);
    }

    public function 
eof()
    {
        return 
$this->stream->eof() && $this->remoteStream->eof();
    }

    
/**
     * Close both the remote stream and buffer stream
     */
    
public function close()
    {
        
$this->remoteStream->close() && $this->stream->close();
    }
}

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