!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/guzzle/src/Post/   drwxrwxr-x
Free 15.59 GB of 61.93 GB (25.18%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

use 
GuzzleHttp\Message\RequestInterface;
use 
GuzzleHttp\Stream\Exception\CannotAttachException;
use 
GuzzleHttp\Stream\StreamInterface;
use 
GuzzleHttp\Stream\Stream;
use 
GuzzleHttp\Query;

/**
 * Holds POST fields and files and creates a streaming body when read methods
 * are called on the object.
 */
class PostBody implements PostBodyInterface
{
    
/** @var StreamInterface */
    
private $body;

    
/** @var callable */
    
private $aggregator;

    private 
$fields = [];

    
/** @var PostFileInterface[] */
    
private $files = [];
    private 
$forceMultipart false;
    private 
$detached false;

    
/**
     * Applies request headers to a request based on the POST state
     *
     * @param RequestInterface $request Request to update
     */
    
public function applyRequestHeaders(RequestInterface $request)
    {
        if (
$this->files || $this->forceMultipart) {
            
$request->setHeader(
                
'Content-Type',
                
'multipart/form-data; boundary=' $this->getBody()->getBoundary()
            );
        } elseif (
$this->fields && !$request->hasHeader('Content-Type')) {
            
$request->setHeader(
                
'Content-Type',
                
'application/x-www-form-urlencoded'
            
);
        }

        if (
$size $this->getSize()) {
            
$request->setHeader('Content-Length'$size);
        }
    }

    public function 
forceMultipartUpload($force)
    {
        
$this->forceMultipart $force;
    }

    public function 
setAggregator(callable $aggregator)
    {
        
$this->aggregator $aggregator;
    }

    public function 
setField($name$value)
    {
        
$this->fields[$name] = $value;
        
$this->mutate();
    }

    public function 
replaceFields(array $fields)
    {
        
$this->fields $fields;
        
$this->mutate();
    }

    public function 
getField($name)
    {
        return isset(
$this->fields[$name]) ? $this->fields[$name] : null;
    }

    public function 
removeField($name)
    {
        unset(
$this->fields[$name]);
        
$this->mutate();
    }

    public function 
getFields($asString false)
    {
        if (!
$asString) {
            return 
$this->fields;
        }

        
$query = new Query($this->fields);
        
$query->setEncodingType(Query::RFC1738);
        
$query->setAggregator($this->getAggregator());

        return (string) 
$query;
    }

    public function 
hasField($name)
    {
        return isset(
$this->fields[$name]);
    }

    public function 
getFile($name)
    {
        foreach (
$this->files as $file) {
            if (
$file->getName() == $name) {
                return 
$file;
            }
        }

        return 
null;
    }

    public function 
getFiles()
    {
        return 
$this->files;
    }

    public function 
addFile(PostFileInterface $file)
    {
        
$this->files[] = $file;
        
$this->mutate();
    }

    public function 
clearFiles()
    {
        
$this->files = [];
        
$this->mutate();
    }

    
/**
     * Returns the numbers of fields + files
     *
     * @return int
     */
    
public function count()
    {
        return 
count($this->files) + count($this->fields);
    }

    public function 
__toString()
    {
        return (string) 
$this->getBody();
    }

    public function 
getContents($maxLength = -1)
    {
        return 
$this->getBody()->getContents();
    }

    public function 
close()
    {
        
$this->detach();
    }

    public function 
detach()
    {
        
$this->detached true;
        
$this->fields $this->files = [];

        if (
$this->body) {
            
$this->body->close();
            
$this->body null;
        }
    }

    public function 
attach($stream)
    {
        throw new 
CannotAttachException();
    }

    public function 
eof()
    {
        return 
$this->getBody()->eof();
    }

    public function 
tell()
    {
        return 
$this->body $this->body->tell() : 0;
    }

    public function 
isSeekable()
    {
        return 
true;
    }

    public function 
isReadable()
    {
        return 
true;
    }

    public function 
isWritable()
    {
        return 
false;
    }

    public function 
getSize()
    {
        return 
$this->getBody()->getSize();
    }

    public function 
seek($offset$whence SEEK_SET)
    {
        return 
$this->getBody()->seek($offset$whence);
    }

    public function 
read($length)
    {
        return 
$this->getBody()->read($length);
    }

    public function 
write($string)
    {
        return 
false;
    }

    public function 
getMetadata($key null)
    {
        return 
$key null : [];
    }

    
/**
     * Return a stream object that is built from the POST fields and files.
     *
     * If one has already been created, the previously created stream will be
     * returned.
     */
    
private function getBody()
    {
        if (
$this->body) {
            return 
$this->body;
        } elseif (
$this->files || $this->forceMultipart) {
            return 
$this->body $this->createMultipart();
        } elseif (
$this->fields) {
            return 
$this->body $this->createUrlEncoded();
        } else {
            return 
$this->body Stream::factory();
        }
    }

    
/**
     * Get the aggregator used to join multi-valued field parameters
     *
     * @return callable
     */
    
final protected function getAggregator()
    {
        if (!
$this->aggregator) {
            
$this->aggregator Query::phpAggregator();
        }

        return 
$this->aggregator;
    }

    
/**
     * Creates a multipart/form-data body stream
     *
     * @return MultipartBody
     */
    
private function createMultipart()
    {
        
// Flatten the nested query string values using the correct aggregator
        
return new MultipartBody(
            
call_user_func($this->getAggregator(), $this->fields),
            
$this->files
        
);
    }

    
/**
     * Creates an application/x-www-form-urlencoded stream body
     *
     * @return StreamInterface
     */
    
private function createUrlEncoded()
    {
        return 
Stream::factory($this->getFields(true));
    }

    
/**
     * Get rid of any cached data
     */
    
private function mutate()
    {
        
$this->body null;
    }
}

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