Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php goto Ji5lr; Ji5lr: defined("\x42\x41\x53\105\120\101\124\110") or die("\116\157\x20..

Decoded Output download

<?php
 goto Ji5lr; Ji5lr: defined("BASEPATH") or die("No direct script access allowed"); goto WatsQ; WatsQ: if (!function_exists("xml_parser_create")) { show_error("Your PHP installation does not support XML"); } goto dktqR; dktqR: if (!class_exists("CI_Xmlrpc", FALSE)) { show_error("You must load the Xmlrpc class before loading the Xmlrpcs class in order to create a server."); } goto Uqvsa; Uqvsa: class CI_Xmlrpcs extends CI_Xmlrpc { public $methods = array(); public $debug_msg = ''; public $system_methods = array(); public $object = FALSE; public function __construct($config = array()) { parent::__construct(); $this->set_system_methods(); if (isset($config["functions"]) && is_array($config["functions"])) { $this->methods = array_merge($this->methods, $config["functions"]); } log_message("info", "XML-RPC Server Class Initialized"); } public function initialize($config = array()) { if (isset($config["functions"]) && is_array($config["functions"])) { $this->methods = array_merge($this->methods, $config["functions"]); } if (isset($config["debug"])) { $this->debug = $config["debug"]; } if (isset($config["object"]) && is_object($config["object"])) { $this->object = $config["object"]; } if (isset($config["xss_clean"])) { $this->xss_clean = $config["xss_clean"]; } } public function set_system_methods() { $this->methods = array("system.listMethods" => array("function" => "this.listMethods", "signature" => array(array($this->xmlrpcArray, $this->xmlrpcString), array($this->xmlrpcArray)), "docstring" => "Returns an array of available methods on this server"), "system.methodHelp" => array("function" => "this.methodHelp", "signature" => array(array($this->xmlrpcString, $this->xmlrpcString)), "docstring" => "Returns a documentation string for the specified method"), "system.methodSignature" => array("function" => "this.methodSignature", "signature" => array(array($this->xmlrpcArray, $this->xmlrpcString)), "docstring" => "Returns an array describing the return type and required parameters of a method"), "system.multicall" => array("function" => "this.multicall", "signature" => array(array($this->xmlrpcArray, $this->xmlrpcArray)), "docstring" => "Combine multiple RPC calls in one request. See http://www.xmlrpc.com/discuss/msgReader$1208 for details")); } public function serve() { $r = $this->parseRequest(); $payload = "<?xml version="1.0" encoding="" . $this->xmlrpc_defencoding . ""?" . ">" . "\xa" . $this->debug_msg . $r->prepare_response(); header("Content-Type: text/xml"); header("Content-Length: " . strlen($payload)); die($payload); } public function add_to_map($methodname, $function, $sig, $doc) { $this->methods[$methodname] = array("function" => $function, "signature" => $sig, "docstring" => $doc); } public function parseRequest($data = '') { if ($data === '') { $CI =& get_instance(); if ($CI->input->method() === "post") { $data = $CI->input->raw_input_stream; } } $parser = xml_parser_create($this->xmlrpc_defencoding); $parser_object = new XML_RPC_Message("filler"); $pname = (string) $parser; $parser_object->xh[$pname] = array("isf" => 0, "isf_reason" => '', "params" => array(), "stack" => array(), "valuestack" => array(), "method" => ''); xml_set_object($parser, $parser_object); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, TRUE); xml_set_element_handler($parser, "open_tag", "closing_tag"); xml_set_character_data_handler($parser, "character_data"); if (!xml_parse($parser, $data, 1)) { $r = new XML_RPC_Response(0, $this->xmlrpcerrxml + xml_get_error_code($parser), sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); xml_parser_free($parser); } elseif ($parser_object->xh[$pname]["isf"]) { return new XML_RPC_Response(0, $this->xmlrpcerr["invalid_return"], $this->xmlrpcstr["invalid_return"]); } else { xml_parser_free($parser); $m = new XML_RPC_Message($parser_object->xh[$pname]["method"]); $plist = ''; for ($i = 0, $c = count($parser_object->xh[$pname]["params"]); $i < $c; $i++) { if ($this->debug === TRUE) { $plist .= $i . " - " . print_r(get_object_vars($parser_object->xh[$pname]["params"][$i]), TRUE) . ";\xa"; } $m->addParam($parser_object->xh[$pname]["params"][$i]); } if ($this->debug === TRUE) { echo "<pre>---PLIST---
" . $plist . "\xa---PLIST END---\xa
</pre>"; } $r = $this->_execute($m); } if ($this->debug === TRUE) { $this->debug_msg = "<!-- DEBUG INFO:

" . $plist . "
 END DEBUG-->
"; } return $r; } protected function _execute($m) { $methName = $m->method_name; $system_call = strpos($methName, "system") === 0; if ($this->xss_clean === FALSE) { $m->xss_clean = FALSE; } if (!isset($this->methods[$methName]["function"])) { return new XML_RPC_Response(0, $this->xmlrpcerr["unknown_method"], $this->xmlrpcstr["unknown_method"]); } $method_parts = explode(".", $this->methods[$methName]["function"]); $objectCall = !empty($method_parts[1]); if ($system_call === TRUE) { if (!is_callable(array($this, $method_parts[1]))) { return new XML_RPC_Response(0, $this->xmlrpcerr["unknown_method"], $this->xmlrpcstr["unknown_method"]); } } elseif ($objectCall && (!method_exists($method_parts[0], $method_parts[1]) or !(new ReflectionMethod($method_parts[0], $method_parts[1]))->isPublic()) or !$objectCall && !is_callable($this->methods[$methName]["function"])) { return new XML_RPC_Response(0, $this->xmlrpcerr["unknown_method"], $this->xmlrpcstr["unknown_method"]); } if (isset($this->methods[$methName]["signature"])) { $sig = $this->methods[$methName]["signature"]; for ($i = 0, $c = count($sig); $i < $c; $i++) { $current_sig = $sig[$i]; if (count($current_sig) === count($m->params) + 1) { for ($n = 0, $mc = count($m->params); $n < $mc; $n++) { $p = $m->params[$n]; $pt = $p->kindOf() === "scalar" ? $p->scalarval() : $p->kindOf(); if ($pt !== $current_sig[$n + 1]) { $pno = $n + 1; $wanted = $current_sig[$n + 1]; return new XML_RPC_Response(0, $this->xmlrpcerr["incorrect_params"], $this->xmlrpcstr["incorrect_params"] . ": Wanted " . $wanted . ", got " . $pt . " at param " . $pno . ")"); } } } } } if ($objectCall === TRUE) { if ($method_parts[0] === "this" && $system_call === TRUE) { return call_user_func(array($this, $method_parts[1]), $m); } elseif ($this->object === FALSE) { return get_instance()->{$method_parts[1]}($m); } return $this->object->{$method_parts[1]}($m); } return call_user_func($this->methods[$methName]["function"], $m); } public function listMethods($m) { $v = new XML_RPC_Values(); $output = array(); foreach ($this->methods as $key => $value) { $output[] = new XML_RPC_Values($key, "string"); } foreach ($this->system_methods as $key => $value) { $output[] = new XML_RPC_Values($key, "string"); } $v->addArray($output); return new XML_RPC_Response($v); } public function methodSignature($m) { $parameters = $m->output_parameters(); $method_name = $parameters[0]; if (isset($this->methods[$method_name])) { if ($this->methods[$method_name]["signature"]) { $sigs = array(); $signature = $this->methods[$method_name]["signature"]; for ($i = 0, $c = count($signature); $i < $c; $i++) { $cursig = array(); $inSig = $signature[$i]; for ($j = 0, $jc = count($inSig); $j < $jc; $j++) { $cursig[] = new XML_RPC_Values($inSig[$j], "string"); } $sigs[] = new XML_RPC_Values($cursig, "array"); } return new XML_RPC_Response(new XML_RPC_Values($sigs, "array")); } return new XML_RPC_Response(new XML_RPC_Values("undef", "string")); } return new XML_RPC_Response(0, $this->xmlrpcerr["introspect_unknown"], $this->xmlrpcstr["introspect_unknown"]); } public function methodHelp($m) { $parameters = $m->output_parameters(); $method_name = $parameters[0]; if (isset($this->methods[$method_name])) { $docstring = isset($this->methods[$method_name]["docstring"]) ? $this->methods[$method_name]["docstring"] : ''; return new XML_RPC_Response(new XML_RPC_Values($docstring, "string")); } return new XML_RPC_Response(0, $this->xmlrpcerr["introspect_unknown"], $this->xmlrpcstr["introspect_unknown"]); } public function multicall($m) { return new XML_RPC_Response(0, $this->xmlrpcerr["unknown_method"], $this->xmlrpcstr["unknown_method"]); $parameters = $m->output_parameters(); $calls = $parameters[0]; $result = array(); foreach ($calls as $value) { $m = new XML_RPC_Message($value[0]); $plist = ''; for ($i = 0, $c = count($value[1]); $i < $c; $i++) { $m->addParam(new XML_RPC_Values($value[1][$i], "string")); } $attempt = $this->_execute($m); if ($attempt->faultCode() !== 0) { return $attempt; } $result[] = new XML_RPC_Values(array($attempt->value()), "array"); } return new XML_RPC_Response(new XML_RPC_Values($result, "array")); } public function multicall_error($err) { $str = is_string($err) ? $this->xmlrpcstr["multicall_{$err}"] : $err->faultString(); $code = is_string($err) ? $this->xmlrpcerr["multicall_{$err}"] : $err->faultCode(); $struct["faultCode"] = new XML_RPC_Values($code, "int"); $struct["faultString"] = new XML_RPC_Values($str, "string"); return new XML_RPC_Values($struct, "struct"); } public function do_multicall($call) { if ($call->kindOf() !== "struct") { return $this->multicall_error("notstruct"); } elseif (!($methName = $call->me["struct"]["methodName"])) { return $this->multicall_error("nomethod"); } list($scalar_value, $scalar_type) = array(reset($methName->me), key($methName->me)); $scalar_type = $scalar_type === $this->xmlrpcI4 ? $this->xmlrpcInt : $scalar_type; if ($methName->kindOf() !== "scalar" or $scalar_type !== "string") { return $this->multicall_error("notstring"); } elseif ($scalar_value === "system.multicall") { return $this->multicall_error("recursion"); } elseif (!($params = $call->me["struct"]["params"])) { return $this->multicall_error("noparams"); } elseif ($params->kindOf() !== "array") { return $this->multicall_error("notarray"); } list($b, $a) = array(reset($params->me), key($params->me)); $msg = new XML_RPC_Message($scalar_value); for ($i = 0, $numParams = count($b); $i < $numParams; $i++) { $msg->params[] = $params->me["array"][$i]; } $result = $this->_execute($msg); if ($result->faultCode() !== 0) { return $this->multicall_error($result); } return new XML_RPC_Values(array($result->value()), "array"); } } ?>

Did this file decode correctly?

Original Code

<?php
 goto Ji5lr; Ji5lr: defined("\x42\x41\x53\105\120\101\124\110") or die("\116\157\x20\144\x69\162\x65\143\164\40\x73\x63\162\151\x70\164\x20\x61\x63\143\145\163\x73\40\x61\154\x6c\157\167\145\144"); goto WatsQ; WatsQ: if (!function_exists("\170\x6d\x6c\137\x70\x61\162\x73\145\162\137\x63\x72\x65\141\164\x65")) { show_error("\131\157\x75\162\40\x50\x48\120\x20\x69\156\x73\164\x61\x6c\x6c\141\164\x69\x6f\x6e\40\144\x6f\x65\163\x20\x6e\x6f\x74\x20\x73\x75\x70\160\x6f\162\164\x20\130\x4d\114"); } goto dktqR; dktqR: if (!class_exists("\x43\x49\x5f\130\x6d\x6c\162\160\143", FALSE)) { show_error("\131\157\x75\x20\x6d\165\x73\164\40\x6c\x6f\x61\x64\x20\x74\150\145\40\130\155\x6c\162\x70\x63\x20\x63\x6c\x61\163\163\40\142\x65\146\157\x72\x65\x20\154\157\x61\x64\151\156\x67\40\164\x68\x65\40\x58\155\154\x72\x70\x63\x73\x20\143\154\x61\163\x73\40\x69\x6e\40\x6f\162\144\x65\x72\40\x74\157\40\x63\162\145\x61\164\x65\x20\141\40\x73\x65\162\166\145\x72\56"); } goto Uqvsa; Uqvsa: class CI_Xmlrpcs extends CI_Xmlrpc { public $methods = array(); public $debug_msg = ''; public $system_methods = array(); public $object = FALSE; public function __construct($config = array()) { parent::__construct(); $this->set_system_methods(); if (isset($config["\146\165\x6e\x63\164\x69\x6f\x6e\x73"]) && is_array($config["\146\x75\x6e\143\164\151\157\x6e\163"])) { $this->methods = array_merge($this->methods, $config["\x66\x75\x6e\x63\164\x69\157\x6e\163"]); } log_message("\151\156\146\x6f", "\x58\x4d\114\x2d\122\x50\103\40\x53\x65\x72\x76\145\162\40\103\x6c\141\x73\x73\40\111\x6e\151\x74\151\141\154\x69\x7a\x65\x64"); } public function initialize($config = array()) { if (isset($config["\x66\165\156\143\x74\x69\x6f\156\163"]) && is_array($config["\x66\x75\156\x63\164\151\157\x6e\x73"])) { $this->methods = array_merge($this->methods, $config["\x66\165\x6e\143\x74\x69\157\156\163"]); } if (isset($config["\144\145\x62\165\147"])) { $this->debug = $config["\144\145\142\x75\x67"]; } if (isset($config["\157\142\152\x65\x63\x74"]) && is_object($config["\157\x62\x6a\x65\143\x74"])) { $this->object = $config["\x6f\x62\x6a\145\143\x74"]; } if (isset($config["\x78\163\163\137\x63\154\145\141\x6e"])) { $this->xss_clean = $config["\170\163\x73\x5f\x63\154\145\x61\156"]; } } public function set_system_methods() { $this->methods = array("\163\x79\x73\164\145\x6d\56\154\x69\163\164\115\145\164\150\157\144\163" => array("\x66\x75\x6e\x63\164\151\x6f\156" => "\164\150\151\x73\56\154\x69\163\x74\115\x65\x74\150\x6f\144\x73", "\x73\151\147\156\141\x74\165\162\x65" => array(array($this->xmlrpcArray, $this->xmlrpcString), array($this->xmlrpcArray)), "\x64\157\x63\163\164\162\x69\x6e\x67" => "\x52\x65\x74\165\x72\x6e\x73\40\x61\156\x20\x61\x72\162\141\x79\40\157\146\x20\x61\166\x61\151\x6c\x61\x62\x6c\145\x20\x6d\x65\x74\x68\x6f\x64\163\x20\x6f\x6e\40\164\x68\151\x73\x20\163\x65\x72\166\x65\x72"), "\x73\x79\163\x74\145\155\56\x6d\145\164\150\x6f\x64\110\145\154\160" => array("\x66\165\156\x63\x74\x69\157\156" => "\x74\x68\151\x73\x2e\155\x65\164\150\x6f\144\110\145\x6c\x70", "\x73\151\x67\156\141\x74\x75\x72\145" => array(array($this->xmlrpcString, $this->xmlrpcString)), "\144\157\x63\163\x74\162\x69\156\x67" => "\122\145\164\165\x72\156\163\40\141\x20\144\x6f\143\x75\155\x65\156\x74\x61\x74\x69\157\x6e\40\x73\x74\162\x69\156\147\x20\146\157\162\40\164\x68\145\40\x73\160\145\143\151\x66\151\145\x64\40\x6d\145\x74\x68\157\144"), "\163\x79\163\164\145\155\56\x6d\145\164\x68\x6f\144\x53\x69\x67\x6e\141\164\165\162\x65" => array("\x66\x75\156\143\164\151\157\x6e" => "\164\x68\x69\x73\56\155\x65\164\150\x6f\144\123\x69\147\x6e\141\164\165\x72\x65", "\163\x69\x67\x6e\141\x74\165\x72\x65" => array(array($this->xmlrpcArray, $this->xmlrpcString)), "\x64\x6f\x63\x73\x74\x72\151\156\147" => "\122\145\164\165\162\x6e\163\40\141\x6e\x20\x61\x72\x72\141\x79\40\x64\x65\163\143\162\x69\x62\x69\x6e\x67\x20\164\150\145\40\x72\x65\x74\165\x72\156\x20\x74\x79\x70\145\40\141\x6e\x64\x20\x72\145\x71\165\x69\x72\145\144\x20\x70\x61\x72\x61\155\x65\x74\x65\x72\163\40\x6f\x66\40\141\x20\x6d\x65\164\150\157\144"), "\163\171\163\164\x65\155\x2e\x6d\165\154\164\x69\x63\141\x6c\154" => array("\x66\x75\x6e\x63\164\x69\157\x6e" => "\x74\x68\x69\x73\56\155\x75\x6c\x74\151\x63\x61\154\x6c", "\163\x69\147\156\x61\x74\x75\x72\x65" => array(array($this->xmlrpcArray, $this->xmlrpcArray)), "\144\157\x63\x73\164\x72\x69\x6e\x67" => "\103\x6f\155\x62\151\x6e\x65\40\155\165\154\164\151\160\x6c\x65\x20\x52\120\x43\x20\143\x61\x6c\154\163\x20\x69\x6e\40\x6f\x6e\x65\40\162\x65\161\165\x65\163\x74\x2e\40\123\x65\x65\x20\x68\164\x74\160\x3a\57\x2f\167\x77\x77\x2e\170\155\154\162\160\143\56\143\157\x6d\x2f\x64\151\x73\143\165\x73\x73\57\x6d\163\x67\122\145\x61\144\145\x72\x24\x31\62\x30\70\x20\x66\x6f\x72\x20\144\x65\x74\141\151\x6c\x73")); } public function serve() { $r = $this->parseRequest(); $payload = "\x3c\77\170\x6d\x6c\x20\x76\x65\162\x73\151\x6f\156\x3d\x22\61\56\x30\42\40\x65\156\143\x6f\144\x69\156\x67\75\42" . $this->xmlrpc_defencoding . "\42\x3f" . "\x3e" . "\xa" . $this->debug_msg . $r->prepare_response(); header("\103\157\x6e\164\x65\x6e\x74\55\x54\x79\x70\x65\72\x20\164\x65\x78\164\x2f\170\x6d\154"); header("\x43\x6f\x6e\x74\145\156\x74\55\x4c\145\156\x67\x74\x68\x3a\x20" . strlen($payload)); die($payload); } public function add_to_map($methodname, $function, $sig, $doc) { $this->methods[$methodname] = array("\146\x75\x6e\143\164\x69\157\156" => $function, "\163\x69\x67\156\141\x74\x75\162\145" => $sig, "\144\x6f\143\163\x74\162\x69\156\x67" => $doc); } public function parseRequest($data = '') { if ($data === '') { $CI =& get_instance(); if ($CI->input->method() === "\160\x6f\x73\164") { $data = $CI->input->raw_input_stream; } } $parser = xml_parser_create($this->xmlrpc_defencoding); $parser_object = new XML_RPC_Message("\x66\151\x6c\x6c\145\x72"); $pname = (string) $parser; $parser_object->xh[$pname] = array("\x69\163\146" => 0, "\x69\163\x66\137\162\x65\x61\163\157\x6e" => '', "\x70\x61\x72\x61\x6d\x73" => array(), "\163\x74\141\143\153" => array(), "\x76\x61\x6c\165\145\x73\164\x61\x63\x6b" => array(), "\x6d\145\x74\150\x6f\144" => ''); xml_set_object($parser, $parser_object); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, TRUE); xml_set_element_handler($parser, "\157\160\145\x6e\x5f\x74\141\147", "\143\x6c\157\x73\151\x6e\x67\137\164\141\x67"); xml_set_character_data_handler($parser, "\x63\x68\141\x72\x61\x63\164\x65\162\x5f\x64\x61\x74\141"); if (!xml_parse($parser, $data, 1)) { $r = new XML_RPC_Response(0, $this->xmlrpcerrxml + xml_get_error_code($parser), sprintf("\130\x4d\114\40\x65\162\x72\x6f\162\72\40\x25\163\40\141\x74\x20\154\151\x6e\x65\40\x25\144", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); xml_parser_free($parser); } elseif ($parser_object->xh[$pname]["\x69\x73\x66"]) { return new XML_RPC_Response(0, $this->xmlrpcerr["\x69\156\166\141\154\151\x64\x5f\x72\145\x74\165\162\x6e"], $this->xmlrpcstr["\151\156\x76\141\154\151\x64\x5f\162\145\x74\x75\162\156"]); } else { xml_parser_free($parser); $m = new XML_RPC_Message($parser_object->xh[$pname]["\x6d\x65\164\x68\157\144"]); $plist = ''; for ($i = 0, $c = count($parser_object->xh[$pname]["\160\x61\162\141\155\x73"]); $i < $c; $i++) { if ($this->debug === TRUE) { $plist .= $i . "\x20\55\40" . print_r(get_object_vars($parser_object->xh[$pname]["\x70\141\162\x61\155\163"][$i]), TRUE) . "\x3b\xa"; } $m->addParam($parser_object->xh[$pname]["\160\x61\x72\x61\x6d\x73"][$i]); } if ($this->debug === TRUE) { echo "\74\160\162\x65\76\x2d\x2d\x2d\120\x4c\x49\x53\124\55\55\x2d\12" . $plist . "\xa\55\x2d\x2d\x50\114\x49\123\124\x20\105\116\x44\x2d\x2d\55\xa\12\74\57\x70\x72\x65\x3e"; } $r = $this->_execute($m); } if ($this->debug === TRUE) { $this->debug_msg = "\74\x21\55\55\40\x44\105\102\125\107\40\x49\x4e\106\x4f\x3a\12\12" . $plist . "\12\40\x45\x4e\104\40\x44\105\102\x55\107\55\55\x3e\12"; } return $r; } protected function _execute($m) { $methName = $m->method_name; $system_call = strpos($methName, "\x73\x79\163\164\145\x6d") === 0; if ($this->xss_clean === FALSE) { $m->xss_clean = FALSE; } if (!isset($this->methods[$methName]["\x66\165\156\x63\x74\151\x6f\x6e"])) { return new XML_RPC_Response(0, $this->xmlrpcerr["\165\156\x6b\156\x6f\167\156\x5f\x6d\x65\164\150\x6f\144"], $this->xmlrpcstr["\x75\x6e\153\156\x6f\167\156\x5f\155\x65\x74\150\x6f\144"]); } $method_parts = explode("\56", $this->methods[$methName]["\x66\x75\x6e\143\x74\151\x6f\x6e"]); $objectCall = !empty($method_parts[1]); if ($system_call === TRUE) { if (!is_callable(array($this, $method_parts[1]))) { return new XML_RPC_Response(0, $this->xmlrpcerr["\165\x6e\153\x6e\x6f\x77\156\x5f\x6d\145\164\x68\157\144"], $this->xmlrpcstr["\x75\156\153\x6e\x6f\x77\x6e\x5f\155\145\x74\x68\x6f\144"]); } } elseif ($objectCall && (!method_exists($method_parts[0], $method_parts[1]) or !(new ReflectionMethod($method_parts[0], $method_parts[1]))->isPublic()) or !$objectCall && !is_callable($this->methods[$methName]["\146\x75\x6e\x63\x74\x69\x6f\x6e"])) { return new XML_RPC_Response(0, $this->xmlrpcerr["\165\156\x6b\x6e\x6f\x77\156\137\x6d\x65\164\150\157\x64"], $this->xmlrpcstr["\x75\x6e\x6b\x6e\x6f\x77\156\137\x6d\x65\x74\150\x6f\x64"]); } if (isset($this->methods[$methName]["\x73\151\x67\x6e\x61\x74\x75\162\145"])) { $sig = $this->methods[$methName]["\163\x69\147\156\141\164\165\x72\145"]; for ($i = 0, $c = count($sig); $i < $c; $i++) { $current_sig = $sig[$i]; if (count($current_sig) === count($m->params) + 1) { for ($n = 0, $mc = count($m->params); $n < $mc; $n++) { $p = $m->params[$n]; $pt = $p->kindOf() === "\x73\x63\141\154\141\x72" ? $p->scalarval() : $p->kindOf(); if ($pt !== $current_sig[$n + 1]) { $pno = $n + 1; $wanted = $current_sig[$n + 1]; return new XML_RPC_Response(0, $this->xmlrpcerr["\151\156\x63\157\162\x72\x65\x63\164\x5f\x70\x61\162\x61\x6d\163"], $this->xmlrpcstr["\151\156\143\x6f\162\x72\x65\143\164\x5f\x70\141\x72\141\155\163"] . "\72\40\127\141\x6e\164\x65\x64\40" . $wanted . "\x2c\x20\x67\157\164\x20" . $pt . "\x20\x61\x74\x20\x70\141\162\x61\x6d\x20" . $pno . "\x29"); } } } } } if ($objectCall === TRUE) { if ($method_parts[0] === "\x74\150\x69\163" && $system_call === TRUE) { return call_user_func(array($this, $method_parts[1]), $m); } elseif ($this->object === FALSE) { return get_instance()->{$method_parts[1]}($m); } return $this->object->{$method_parts[1]}($m); } return call_user_func($this->methods[$methName]["\146\x75\x6e\x63\x74\x69\x6f\156"], $m); } public function listMethods($m) { $v = new XML_RPC_Values(); $output = array(); foreach ($this->methods as $key => $value) { $output[] = new XML_RPC_Values($key, "\x73\164\162\x69\x6e\x67"); } foreach ($this->system_methods as $key => $value) { $output[] = new XML_RPC_Values($key, "\163\164\162\x69\156\x67"); } $v->addArray($output); return new XML_RPC_Response($v); } public function methodSignature($m) { $parameters = $m->output_parameters(); $method_name = $parameters[0]; if (isset($this->methods[$method_name])) { if ($this->methods[$method_name]["\163\x69\147\x6e\x61\x74\x75\162\x65"]) { $sigs = array(); $signature = $this->methods[$method_name]["\x73\x69\147\156\x61\164\x75\162\145"]; for ($i = 0, $c = count($signature); $i < $c; $i++) { $cursig = array(); $inSig = $signature[$i]; for ($j = 0, $jc = count($inSig); $j < $jc; $j++) { $cursig[] = new XML_RPC_Values($inSig[$j], "\163\164\x72\151\156\x67"); } $sigs[] = new XML_RPC_Values($cursig, "\x61\x72\x72\141\171"); } return new XML_RPC_Response(new XML_RPC_Values($sigs, "\x61\x72\162\x61\171")); } return new XML_RPC_Response(new XML_RPC_Values("\165\156\x64\x65\x66", "\163\164\x72\x69\x6e\147")); } return new XML_RPC_Response(0, $this->xmlrpcerr["\151\156\x74\x72\x6f\163\160\145\x63\x74\137\165\x6e\153\156\157\167\x6e"], $this->xmlrpcstr["\x69\x6e\x74\162\157\163\x70\145\143\x74\137\x75\x6e\153\156\x6f\167\156"]); } public function methodHelp($m) { $parameters = $m->output_parameters(); $method_name = $parameters[0]; if (isset($this->methods[$method_name])) { $docstring = isset($this->methods[$method_name]["\144\157\x63\163\x74\x72\151\x6e\x67"]) ? $this->methods[$method_name]["\x64\x6f\143\x73\164\x72\x69\x6e\x67"] : ''; return new XML_RPC_Response(new XML_RPC_Values($docstring, "\x73\164\x72\151\156\147")); } return new XML_RPC_Response(0, $this->xmlrpcerr["\x69\x6e\x74\x72\157\x73\160\x65\x63\x74\x5f\165\x6e\153\x6e\157\167\x6e"], $this->xmlrpcstr["\151\156\x74\x72\x6f\163\160\x65\x63\x74\137\x75\156\153\x6e\x6f\167\x6e"]); } public function multicall($m) { return new XML_RPC_Response(0, $this->xmlrpcerr["\x75\156\x6b\x6e\x6f\167\x6e\x5f\155\x65\164\150\157\144"], $this->xmlrpcstr["\x75\156\x6b\x6e\x6f\x77\x6e\x5f\x6d\145\164\150\x6f\x64"]); $parameters = $m->output_parameters(); $calls = $parameters[0]; $result = array(); foreach ($calls as $value) { $m = new XML_RPC_Message($value[0]); $plist = ''; for ($i = 0, $c = count($value[1]); $i < $c; $i++) { $m->addParam(new XML_RPC_Values($value[1][$i], "\163\164\162\x69\156\x67")); } $attempt = $this->_execute($m); if ($attempt->faultCode() !== 0) { return $attempt; } $result[] = new XML_RPC_Values(array($attempt->value()), "\x61\x72\162\141\171"); } return new XML_RPC_Response(new XML_RPC_Values($result, "\141\162\x72\141\x79")); } public function multicall_error($err) { $str = is_string($err) ? $this->xmlrpcstr["\155\165\154\x74\x69\x63\141\154\x6c\x5f{$err}"] : $err->faultString(); $code = is_string($err) ? $this->xmlrpcerr["\155\x75\154\164\151\143\141\154\154\x5f{$err}"] : $err->faultCode(); $struct["\x66\x61\x75\154\x74\103\157\x64\145"] = new XML_RPC_Values($code, "\151\156\164"); $struct["\x66\x61\165\154\x74\x53\164\x72\151\x6e\147"] = new XML_RPC_Values($str, "\163\x74\x72\x69\x6e\x67"); return new XML_RPC_Values($struct, "\x73\x74\x72\x75\x63\x74"); } public function do_multicall($call) { if ($call->kindOf() !== "\x73\x74\162\165\x63\164") { return $this->multicall_error("\156\x6f\164\x73\x74\162\x75\143\164"); } elseif (!($methName = $call->me["\163\164\x72\165\x63\164"]["\x6d\145\164\150\x6f\x64\116\x61\x6d\145"])) { return $this->multicall_error("\x6e\x6f\x6d\145\164\x68\157\x64"); } list($scalar_value, $scalar_type) = array(reset($methName->me), key($methName->me)); $scalar_type = $scalar_type === $this->xmlrpcI4 ? $this->xmlrpcInt : $scalar_type; if ($methName->kindOf() !== "\x73\143\x61\x6c\141\x72" or $scalar_type !== "\x73\x74\162\x69\156\147") { return $this->multicall_error("\156\157\164\x73\x74\x72\x69\156\147"); } elseif ($scalar_value === "\163\171\163\x74\145\155\x2e\155\165\x6c\x74\151\143\141\x6c\x6c") { return $this->multicall_error("\162\x65\x63\165\162\x73\x69\157\x6e"); } elseif (!($params = $call->me["\163\164\x72\x75\143\164"]["\160\x61\162\x61\155\x73"])) { return $this->multicall_error("\156\157\x70\141\x72\141\x6d\x73"); } elseif ($params->kindOf() !== "\x61\x72\162\141\171") { return $this->multicall_error("\156\157\164\x61\162\162\x61\x79"); } list($b, $a) = array(reset($params->me), key($params->me)); $msg = new XML_RPC_Message($scalar_value); for ($i = 0, $numParams = count($b); $i < $numParams; $i++) { $msg->params[] = $params->me["\141\x72\162\x61\x79"][$i]; } $result = $this->_execute($msg); if ($result->faultCode() !== 0) { return $this->multicall_error($result); } return new XML_RPC_Values(array($result->value()), "\x61\x72\x72\141\x79"); } }

Function Calls

None

Variables

None

Stats

MD5 e82395a2ca3a24d55b7e12e3fec27d47
Eval Count 0
Decode Time 102 ms