!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_tdfonline/php/3ros/guzzle/guzzle/guzzle/src/Guzzle/Http/   drwxr-xr-x
Free 13.82 GB of 61.93 GB (22.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

namespace Guzzle\Http;

/**
 * EntityBody decorator used to return only a subset of an entity body
 */
class ReadLimitEntityBody extends AbstractEntityBodyDecorator
{
    
/** @var int Limit the number of bytes that can be read */
    
protected $limit;

    
/** @var int Offset to start reading from */
    
protected $offset;

    
/**
     * @param EntityBodyInterface $body   Body to wrap
     * @param int                 $limit  Total number of bytes to allow to be read from the stream
     * @param int                 $offset Position to seek to before reading (only works on seekable streams)
     */
    
public function __construct(EntityBodyInterface $body$limit$offset 0)
    {
        
parent::__construct($body);
        
$this->setLimit($limit)->setOffset($offset);
    }

    
/**
     * Returns only a subset of the decorated entity body when cast as a string
     * {@inheritdoc}
     */
    
public function __toString()
    {
        return 
substr((string) $this->body$this->offset$this->limit) ?: '';
    }

    public function 
isConsumed()
    {
        return ((
$this->offset $this->limit) - $this->body->ftell()) <= 0;
    }

    
/**
     * Returns the Content-Length of the limited subset of data
     * {@inheritdoc}
     */
    
public function getContentLength()
    {
        
$length $this->body->getContentLength();

        return 
$length === false
            
$this->limit
            
min($this->limitmin($length$this->offset $this->limit) - $this->offset);
    }

    
/**
     * Allow for a bounded seek on the read limited entity body
     * {@inheritdoc}
     */
    
public function seek($offset$whence SEEK_SET)
    {
        return 
$whence === SEEK_SET
            
$this->body->seek(max($this->offsetmin($this->offset $this->limit$offset)))
            : 
false;
    }

    
/**
     * Set the offset to start limiting from
     *
     * @param int $offset Offset to seek to and begin byte limiting from
     *
     * @return self
     */
    
public function setOffset($offset)
    {
        
$this->body->seek($offset);
        
$this->offset $offset;

        return 
$this;
    }

    
/**
     * Set the limit of bytes that the decorator allows to be read from the stream
     *
     * @param int $limit Total number of bytes to allow to be read from the stream
     *
     * @return self
     */
    
public function setLimit($limit)
    {
        
$this->limit $limit;

        return 
$this;
    }

    public function 
read($length)
    {
        
// Check if the current position is less than the total allowed bytes + original offset
        
$remaining = ($this->offset $this->limit) - $this->body->ftell();
        if (
$remaining 0) {
            
// Only return the amount of requested data, ensuring that the byte limit is not exceeded
            
return $this->body->read(min($remaining$length));
        } else {
            return 
false;
        }
    }
}

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