!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)

/var/www/html/main_file/vendor/coingate/coingate-php/lib/   drwxrwxr-x
Free 13.15 GB of 57.97 GB (22.69%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace CoinGate;

class 
CoinGate
{
    const 
VERSION '3.0.5';
    const 
USER_AGENT_ORIGIN 'CoinGate PHP Library';

    public static 
$auth_token '';
    public static 
$environment 'live';
    public static 
$user_agent '';
    public static 
$curlopt_ssl_verifypeer true;

    public static function 
config($authentication)
    {
        if (isset(
$authentication['auth_token'])) {
            
self::$auth_token $authentication['auth_token'];
        }

        if (isset(
$authentication['environment'])) {
            
self::$environment $authentication['environment'];
        }

        if (isset(
$authentication['user_agent'])) {
            
self::$user_agent $authentication['user_agent'];
        }

        if (isset(
$authentication['curlopt_ssl_verifypeer'])) {
            
self::$curlopt_ssl_verifypeer $authentication['curlopt_ssl_verifypeer'];
        }
    }

    public static function 
testConnection($authentication = array())
    {
        try {
            
self::request('/auth/test''GET', array(), $authentication);

            return 
true;
        } catch (
\Exception $e) {
            return 
get_class($e) . ': ' $e->getMessage();
        }
    }

    public static function 
request($url$method 'POST'$params = array(), $authentication = array())
    {
        
$auth_token = isset($authentication['auth_token']) ? $authentication['auth_token'] : self::$auth_token;
        
$environment = isset($authentication['environment']) ? $authentication['environment'] : self::$environment;
        
$user_agent = isset($authentication['user_agent']) ? $authentication['user_agent'] : (isset(self::$user_agent)
            ? 
self::$user_agent : (self::USER_AGENT_ORIGIN ' v' self::VERSION));
        
$curlopt_ssl_verifypeer = isset($authentication['curlopt_ssl_verifypeer'])
            ? 
$authentication['curlopt_ssl_verifypeer'] : self::$curlopt_ssl_verifypeer;

        
// Check if credentials was passed
        
if (empty($auth_token)) {
            
\CoinGate\Exception::throwException(400, array('reason' => 'AuthTokenMissing'));
        }

        
// Check if right environment passed
        
$environments = array('live''sandbox');

        if (!
in_array($environment$environments)) {
            
$availableEnvironments join(', '$environments);
            
\CoinGate\Exception::throwException(400, array(
                
'reason' => 'BadEnvironment',
                
'message' => "Environment does not exist. Available environments: $availableEnvironments"
            
));
        }

        
$url = ($environment === 'sandbox' 'https://api-sandbox.coingate.com/v2' 'https://api.coingate.com/v2')
            . 
$url;
        
$headers = array();
        
$headers[] = 'Authorization: Token ' $auth_token;
        
$curl curl_init();

        
$curl_options = array(
            
CURLOPT_RETURNTRANSFER => 1,
            
CURLOPT_URL => $url
        
);

        if (
$method == 'POST') {
            
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
            
array_merge($curl_options, array(CURLOPT_POST => 1));
            
curl_setopt($curlCURLOPT_POSTFIELDShttp_build_query($params));
        }

        
curl_setopt_array($curl$curl_options);
        
curl_setopt($curlCURLOPT_HTTPHEADER$headers);
        
curl_setopt($curlCURLOPT_USERAGENT$user_agent);
        
curl_setopt($curlCURLOPT_SSL_VERIFYPEER$curlopt_ssl_verifypeer);


        
$raw_response curl_exec($curl);
        
$decoded_response json_decode($raw_responsetrue);
        
$response $decoded_response $decoded_response $raw_response;
        
$http_status curl_getinfo($curlCURLINFO_HTTP_CODE);

        if (
$http_status === 200) {
            return 
$response;
        } else {
            
\CoinGate\Exception::throwException($http_status$response);
        }
    }
}

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