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


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

use 
GuzzleHttp\Event\RequestEvents;
use 
GuzzleHttp\Event\SubscriberInterface;
use 
GuzzleHttp\Event\BeforeEvent;
use 
GuzzleHttp\Exception\RequestException;
use 
GuzzleHttp\Message\MessageFactory;
use 
GuzzleHttp\Message\ResponseInterface;

/**
 * Queues mock responses or exceptions and delivers mock responses or
 * exceptions in a fifo order.
 */
class Mock implements SubscriberInterface, \Countable
{
    
/** @var array Array of mock responses / exceptions */
    
private $queue = [];

    
/** @var bool Whether or not to consume an entity body when mocking */
    
private $readBodies;

    
/** @var MessageFactory */
    
private $factory;

    
/**
     * @param array $items      Array of responses or exceptions to queue
     * @param bool  $readBodies Set to false to not consume the entity body of
     *                          a request when a mock is served.
     */
    
public function __construct(array $items = [], $readBodies true)
    {
        
$this->factory = new MessageFactory();
        
$this->readBodies $readBodies;
        
$this->addMultiple($items);
    }

    public function 
getEvents()
    {
        
// Fire the event last, after signing
        
return ['before' => ['onBefore'RequestEvents::SIGN_REQUEST 10]];
    }

    
/**
     * @throws \OutOfBoundsException|\Exception
     */
    
public function onBefore(BeforeEvent $event)
    {
        if (!
$item array_shift($this->queue)) {
            throw new \
OutOfBoundsException('Mock queue is empty');
        } elseif (
$item instanceof RequestException) {
            throw 
$item;
        }

        
// Emulate reading a response body
        
$request $event->getRequest();
        if (
$this->readBodies && $request->getBody()) {
            while (!
$request->getBody()->eof()) {
                
$request->getBody()->read(8096);
            }
        }

        
$event->intercept($item);
    }

    public function 
count()
    {
        return 
count($this->queue);
    }

    
/**
     * Add a response to the end of the queue
     *
     * @param string|ResponseInterface $response Response or path to response file
     *
     * @return self
     * @throws \InvalidArgumentException if a string or Response is not passed
     */
    
public function addResponse($response)
    {
        if (
is_string($response)) {
            
$response file_exists($response)
                ? 
$this->factory->fromMessage(file_get_contents($response))
                : 
$this->factory->fromMessage($response);
        } elseif (!(
$response instanceof ResponseInterface)) {
            throw new \
InvalidArgumentException('Response must a message '
                
'string, response object, or path to a file');
        }

        
$this->queue[] = $response;

        return 
$this;
    }

    
/**
     * Add an exception to the end of the queue
     *
     * @param RequestException $e Exception to throw when the request is executed
     *
     * @return self
     */
    
public function addException(RequestException $e)
    {
        
$this->queue[] = $e;

        return 
$this;
    }

    
/**
     * Add multiple items to the queue
     *
     * @param array $items Items to add
     */
    
public function addMultiple(array $items)
    {
        foreach (
$items as $item) {
            if (
$item instanceof RequestException) {
                
$this->addException($item);
            } else {
                
$this->addResponse($item);
            }
        }
    }

    
/**
     * Clear the queue
     */
    
public function clearQueue()
    {
        
$this->queue = [];
    }
}

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