!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/enlightn/enlightn/src/Reporting/   drwxr-xr-x
Free 13.19 GB of 57.97 GB (22.76%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Enlightn\Enlightn\Reporting;

use 
GuzzleHttp\Client as GuzzleClient;

class 
Client
{
    
/**
     * @var \GuzzleHttp\Client
     */
    
private $client;

    public function 
__construct(
        
$username,
        
$apiToken,
        
string $baseUrl 'https://www.laravel-enlightn.com/api/',
        
float $timeout 10.0
    
) {
        
$this->client = new GuzzleClient([
            
'base_uri' => $baseUrl,
            
'auth' => [$username$apiToken],
            
'timeout' => $timeout,
            
'http_errors' => false,
        ]);
    }

    
/**
     * @param string $url
     * @param array $data
     * @return array|string
     */
    
public function get(string $url, array $data = [])
    {
        return 
$this->request('GET'$url$data);
    }

    
/**
     * @param string $url
     * @param array $data
     * @return array|string
     */
    
public function post(string $url, array $data = [])
    {
        return 
$this->request('POST'$url$data);
    }

    
/**
     * @param string $url
     * @param array $data
     * @return array|string
     */
    
public function patch(string $url, array $data = [])
    {
        return 
$this->request('PATCH'$url$data);
    }

    
/**
     * @param string $url
     * @param array $data
     * @return array|string
     */
    
public function put(string $url, array $data = [])
    {
        return 
$this->request('PUT'$url$data);
    }

    
/**
     * @param string $url
     * @param array $data
     * @return array|string
     */
    
public function delete(string $url, array $data = [])
    {
        return 
$this->request('DELETE'$url$data);
    }

    
/**
     * @param string $httpVerb
     * @param string $url
     * @param array $data
     * @return array|string
     * @throws \Enlightn\Enlightn\Reporting\UnauthorizedException|\Enlightn\Enlightn\Reporting\BadResponseException
     */
    
public function request(string $httpVerbstring $url, array $data = [])
    {
        
$response $this->client->request($httpVerb$url, [
            
'json' => $data,
        ]);

        
$statusCode $response->getStatusCode();

        if (
$statusCode === 403 || $statusCode === 401) {
            throw new 
UnauthorizedException("Invalid credentials. Please check your username and API token.");
        }

        if (
$statusCode !== 200 && $statusCode !== 204) {
            throw new 
BadResponseException("Bad response: ".$response->getBody());
        }

        
$responseData json_decode($response->getBody(), true);

        if (
json_last_error() == JSON_ERROR_NONE) {
            return 
$responseData;
        } else {
            return (string) 
$response->getBody();
        }
    }
}

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