!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/laravel/framework/src/Illuminate/Http/Client/   drwxr-xr-x
Free 13.17 GB of 57.97 GB (22.72%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Illuminate\Http\Client;

use 
Illuminate\Support\Traits\Macroable;
use 
OutOfBoundsException;

class 
ResponseSequence
{
    use 
Macroable;

    
/**
     * The responses in the sequence.
     *
     * @var array
     */
    
protected $responses;

    
/**
     * Indicates that invoking this sequence when it is empty should throw an exception.
     *
     * @var bool
     */
    
protected $failWhenEmpty true;

    
/**
     * The response that should be returned when the sequence is empty.
     *
     * @var \GuzzleHttp\Promise\PromiseInterface
     */
    
protected $emptyResponse;

    
/**
     * Create a new response sequence.
     *
     * @param  array  $responses
     * @return void
     */
    
public function __construct(array $responses)
    {
        
$this->responses $responses;
    }

    
/**
     * Push a response to the sequence.
     *
     * @param  string|array  $body
     * @param  int  $status
     * @param  array  $headers
     * @return $this
     */
    
public function push($body ''int $status 200, array $headers = [])
    {
        
$body is_array($body) ? json_encode($body) : $body;

        return 
$this->pushResponse(
            
Factory::response($body$status$headers)
        );
    }

    
/**
     * Push a response with the given status code to the sequence.
     *
     * @param  int  $status
     * @param  array  $headers
     * @return $this
     */
    
public function pushStatus(int $status, array $headers = [])
    {
        return 
$this->pushResponse(
            
Factory::response(''$status$headers)
        );
    }

    
/**
     * Push response with the contents of a file as the body to the sequence.
     *
     * @param  string  $filePath
     * @param  int  $status
     * @param  array  $headers
     * @return $this
     */
    
public function pushFile(string $filePathint $status 200, array $headers = [])
    {
        
$string file_get_contents($filePath);

        return 
$this->pushResponse(
            
Factory::response($string$status$headers)
        );
    }

    
/**
     * Push a response to the sequence.
     *
     * @param  mixed  $response
     * @return $this
     */
    
public function pushResponse($response)
    {
        
$this->responses[] = $response;

        return 
$this;
    }

    
/**
     * Make the sequence return a default response when it is empty.
     *
     * @param  \GuzzleHttp\Promise\PromiseInterface|\Closure  $response
     * @return $this
     */
    
public function whenEmpty($response)
    {
        
$this->failWhenEmpty false;
        
$this->emptyResponse $response;

        return 
$this;
    }

    
/**
     * Make the sequence return a default response when it is empty.
     *
     * @return $this
     */
    
public function dontFailWhenEmpty()
    {
        return 
$this->whenEmpty(Factory::response());
    }

    
/**
     * Indicate that this sequence has depleted all of its responses.
     *
     * @return bool
     */
    
public function isEmpty()
    {
        return 
count($this->responses) === 0;
    }

    
/**
     * Get the next response in the sequence.
     *
     * @return mixed
     */
    
public function __invoke()
    {
        if (
$this->failWhenEmpty && count($this->responses) === 0) {
            throw new 
OutOfBoundsException('A request was made, but the response sequence is empty.');
        }

        if (! 
$this->failWhenEmpty && count($this->responses) === 0) {
            return 
value($this->emptyResponse ?? Factory::response());
        }

        return 
array_shift($this->responses);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.006 ]--