Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.222
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby23 /
share /
ri /
2.3.0 /
system /
XMLRPC /
Delete
Unzip
Name
Size
Permission
Date
Action
Base64
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
BasicServer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
CGIServer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Client
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Config
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Convert
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Create
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
DateTime
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
FaultException
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Marshal
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Marshallable
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ModRubyServer
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ParseContentType
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
ParserWriterChooseMixin
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Server
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
Service
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
WEBrickServlet
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
XMLParser
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
XMLWriter
[ DIR ]
drwxr-xr-x
2026-05-01 04:23
cdesc-XMLRPC.ri
11.62
KB
-rw-r--r--
2023-07-26 18:09
Save
Rename
U:RDoc::NormalModule[iI"XMLRPC:EF@0o:RDoc::Markup::Document:@parts[o;;[lo:RDoc::Markup::Paragraph;[I"!frozen_string_literal: false;TS:RDoc::Markup::Heading: leveli: textI"Author and Copyright;To:RDoc::Markup::BlankLine o; ;[I"JCopyright (C) 2001-2004 by Michael Neumann (mailto:mneumann@ntecs.de);T@o; ;[I"5Released under the same term of license as Ruby.;T@S; ;i;I" Overview;T@o; ;[I"OXMLRPC is a lightweight protocol that enables remote procedure calls over ;TI"3HTTP. It is defined at http://www.xmlrpc.com.;T@o; ;[I"RXMLRPC allows you to create simple distributed computing solutions that span ;TI"Pcomputer languages. Its distinctive feature is its simplicity compared to ;TI"*other approaches like SOAP and CORBA.;T@o; ;[I"TThe Ruby standard library package 'xmlrpc' enables you to create a server that ;TI"Rimplements remote procedures and a client that calls them. Very little code ;TI",is required to achieve either of these.;T@S; ;i;I"Example;T@o; ;[I"QTry the following code. It calls a standard demonstration remote procedure.;T@o:RDoc::Markup::Verbatim;[I"require 'xmlrpc/client' ;TI"require 'pp' ;TI" ;TI"Tserver = XMLRPC::Client.new2("http://xmlrpc-c.sourceforge.net/api/sample.php") ;TI";result = server.call("sample.sumAndDifference", 5, 3) ;TI"pp result ;T:@format0S; ;i;I"Documentation;T@o; ;[I"QSee http://www.ntecs.de/ruby/xmlrpc4r/. There is plenty of detail there to ;TI"+use the client and implement a server.;T@S; ;i;I" Features of XMLRPC for Ruby;T@o:RDoc::Markup::List: @type:BULLET:@items[ o:RDoc::Markup::ListItem:@label0;[o; ;[I"Extensions;To;;;;[o;;0;[o; ;[I"Introspection;To;;0;[o; ;[I"multiCall;To;;0;[o; ;[I":optionally nil values and integers larger than 32 Bit;T@o;;0;[o; ;[I"Server;To;;;;[ o;;0;[o; ;[I"Standalone XML-RPC server;To;;0;[o; ;[I"#CGI-based (works with FastCGI);To;;0;[o; ;[I"Apache mod_ruby server;To;;0;[o; ;[I"WEBrick servlet;T@o;;0;[o; ;[I"Client;To;;;;[o;;0;[o; ;[I"#synchronous/asynchronous calls;To;;0;[o; ;[I""Basic HTTP-401 Authentication;To;;0;[o; ;[I"HTTPS protocol (SSL);T@o;;0;[o; ;[I"Parsers;To;;;;[ o;;0;[o; ;[I"ENQXML (XMLParser::NQXMLStreamParser, XMLParser::NQXMLTreeParser);To;;;;[o;;0;[o; ;[I"Not compiled (pure ruby);To;;0;[o; ;[I"ONote: NQXML's website recommends rexml and isn't available on rubygems.org;To;;0;[o; ;[I"&See http://nqxml.sourceforge.net/;To;;0;[o; ;[I"AExpat (XMLParser::XMLStreamParser, XMLParser::XMLTreeParser);To;;;;[o;;0;[o; ;[I" Compiled;To;;0;[o; ;[I"2Fastest parser and also uses the least memory;To;;0;[o; ;[I",See https://rubygems.org/gems/xmlparser;To;;0;[o; ;[I")REXML (XMLParser::REXMLStreamParser);To;;;;[o;;0;[o; ;[I"Not compiled (pure ruby);To;;0;[o; ;[I"See ruby standard library;To;;0;[o; ;[I".xml-scan (XMLParser::XMLScanStreamParser);To;;;;[o;;0;[o; ;[I"Not compiled (pure ruby);To;;0;[o; ;[I"*See https://rubygems.org/gems/xmlscan;To;;0;[o; ;[I":Fastest parser is Expat's XMLParser::XMLStreamParser!;T@o;;0;[o; ;[I"General;To;;;;[o;;0;[o; ;[I"dpossible to choose between XMLParser module (Expat wrapper) and REXML/NQXML (pure Ruby) parsers;To;;0;[o; ;[I"NMarshalling Ruby objects to Hashes and reconstruct them later from a Hash;To;;0;[o; ;[I">SandStorm component architecture XMLRPC::Client interface;T@S; ;i;I" Howto;T@S; ;i;I"Client;T@o;;[I"require "xmlrpc/client" ;TI" ;TI"7# Make an object to represent the XML-RPC server. ;TI"Qserver = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") ;TI" ;TI"1# Call the remote server and get our result ;TI";result = server.call("sample.sumAndDifference", 5, 3) ;TI" ;TI"sum = result["sum"] ;TI"'difference = result["difference"] ;TI" ;TI"3puts "Sum: #{sum}, Difference: #{difference}" ;T;0S; ;i;I"9XMLRPC::Client with XML-RPC fault-structure handling;T@o; ;[I"@There are two possible ways, of handling a fault-structure:;T@S; ;i ;I"3by catching a XMLRPC::FaultException exception;T@o;;[I"require "xmlrpc/client" ;TI" ;TI"7# Make an object to represent the XML-RPC server. ;TI"Qserver = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") ;TI" ;TI"begin ;TI"3 # Call the remote server and get our result ;TI"= result = server.call("sample.sumAndDifference", 5, 3) ;TI" ;TI" sum = result["sum"] ;TI") difference = result["difference"] ;TI" ;TI"5 puts "Sum: #{sum}, Difference: #{difference}" ;TI" ;TI"(rescue XMLRPC::FaultException => e ;TI" puts "Error: " ;TI" puts e.faultCode ;TI" puts e.faultString ;TI" end ;T;0S; ;i ;I"/by calling "call2" which returns a boolean;T@o;;[I"require "xmlrpc/client" ;TI" ;TI"7# Make an object to represent the XML-RPC server. ;TI"Qserver = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") ;TI" ;TI"1# Call the remote server and get our result ;TI"@ok, result = server.call2("sample.sumAndDifference", 5, 3) ;TI" ;TI"if ok ;TI" sum = result["sum"] ;TI") difference = result["difference"] ;TI" ;TI"5 puts "Sum: #{sum}, Difference: #{difference}" ;TI" else ;TI" puts "Error: " ;TI" puts result.faultCode ;TI" puts result.faultString ;TI" end ;T;0S; ;i;I" Using XMLRPC::Client::Proxy;T@o; ;[ I"PYou can create a Proxy object onto which you can call methods. This way it ;TI"Slooks nicer. Both forms, _call_ and _call2_ are supported through _proxy_ and ;TI"P_proxy2_. You can additionally give arguments to the Proxy, which will be ;TI"1given to each XML-RPC call using that Proxy.;T@o;;[I"require "xmlrpc/client" ;TI" ;TI"7# Make an object to represent the XML-RPC server. ;TI"Qserver = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") ;TI" ;TI"# Create a Proxy object ;TI"%sample = server.proxy("sample") ;TI" ;TI"1# Call the remote server and get our result ;TI"+result = sample.sumAndDifference(5,3) ;TI" ;TI"sum = result["sum"] ;TI"'difference = result["difference"] ;TI" ;TI"3puts "Sum: #{sum}, Difference: #{difference}" ;T;0S; ;i;I"-CGI-based server using XMLRPC::CGIServer;T@o; ;[I"=There are also two ways to define handler, the first is ;TI";like C/PHP, the second like Java, of course both ways ;TI"can be mixed:;T@S; ;i ;I"#C/PHP-like (handler functions);T@o;;[I"require "xmlrpc/server" ;TI" ;TI"s = XMLRPC::CGIServer.new ;TI" ;TI"7s.add_handler("sample.sumAndDifference") do |a,b| ;TI"1 { "sum" => a + b, "difference" => a - b } ;TI" end ;TI" ;TI" s.serve ;T;0S; ;i ;I" Java-like (handler classes);T@o;;[I"require "xmlrpc/server" ;TI" ;TI"s = XMLRPC::CGIServer.new ;TI" ;TI"class MyHandler ;TI"" def sumAndDifference(a, b) ;TI"3 { "sum" => a + b, "difference" => a - b } ;TI" end ;TI" end ;TI" ;TI"+# NOTE: Security Hole (read below)!!! ;TI",s.add_handler("sample", MyHandler.new) ;TI" s.serve ;T;0o; ;[I"RTo return a fault-structure you have to raise an XMLRPC::FaultException e.g.:;T@o;;[I"=raise XMLRPC::FaultException.new(3, "division by Zero") ;T;0S; ;i ;I"Security Note;T@o; ;[I"From Brian Candler:;T@o;;[I"VAbove code sample has an extremely nasty security hole, in that you can now call ;TI"Qany method of 'MyHandler' remotely, including methods inherited from Object ;TI">and Kernel! For example, in the client code, you can use ;TI" ;TI"0 puts server.call("sample.send","`","ls") ;TI" ;TI"P(backtick being the method name for running system processes). Needless to ;TI"4say, 'ls' can be replaced with something else. ;TI" ;TI"_The version which binds proc objects (or the version presented below in the next section) ;TI"adoesn't have this problem, but people may be tempted to use the second version because it's ;TI"Eso nice and 'Rubyesque'. I think it needs a big red disclaimer. ;T;0o; ;[I"From Michael:;T@o; ;[I"7A solution is to undef insecure methods or to use ;TI"DXMLRPC::Service::PublicInstanceMethodsInterface as shown below:;T@o;;[I"class MyHandler ;TI"" def sumAndDifference(a, b) ;TI"3 { "sum" => a + b, "difference" => a - b } ;TI" end ;TI" end ;TI" ;TI"%# ... server initialization ... ;TI" ;TI"@s.add_handler(XMLRPC::iPIMethods("sample"), MyHandler.new) ;TI" ;TI"# ... ;T;0o; ;[I"SThis adds only public instance methods explicitly declared in class MyHandler ;TI"4(and not those inherited from any other class).;T@S; ;i ;I" With interface declarations;T@o; ;[I"6Code sample from the book Ruby Developer's Guide:;T@o;;[I"require "xmlrpc/server" ;TI" ;TI"class Num ;TI". INTERFACE = XMLRPC::interface("num") { ;TI"< meth 'int add(int, int)', 'Add two numbers', 'add' ;TI"8 meth 'int div(int, int)', 'Divide two numbers' ;TI" } ;TI" ;TI" def add(a, b) a + b end ;TI" def div(a, b) a / b end ;TI" end ;TI" ;TI"s = XMLRPC::CGIServer.new ;TI",s.add_handler(Num::INTERFACE, Num.new) ;TI" s.serve ;T;0S; ;i;I"Standalone XMLRPC::Server;T@o; ;[I"8Same as CGI-based server, the only difference being;T@o;;[I"$server = XMLRPC::CGIServer.new ;T;0o; ;[I"must be changed to;T@o;;[I"'server = XMLRPC::Server.new(8080) ;T;0o; ;[I"2if you want a server listening on port 8080. ;TI"The rest is the same.;T@S; ;i;I"0Choosing a different XMLParser or XMLWriter;T@o; ;[I"KThe examples above all use the default parser (which is now since 1.8 ;TI"DXMLParser::REXMLStreamParser) and a default XMLRPC::XMLWriter. ;TI"IIf you want to use a different XMLParser, then you have to call the ;TI"KParserWriterChooseMixin#set_parser method of XMLRPC::Client instances ;TI"Eor instances of subclasses of XMLRPC::BasicServer or by editing ;TI"xmlrpc/config.rb.;T@o; ;[I"XMLRPC::Client Example:;T@o;;[ I"# ... ;TI"Qserver = XMLRPC::Client.new( "xmlrpc-c.sourceforge.net", "/api/sample.php") ;TI"9server.set_parser(XMLRPC::XMLParser::XMLParser.new) ;TI"# ... ;T;0o; ;[I"XMLRPC::Server Example:;T@o;;[ I"# ... ;TI"s = XMLRPC::CGIServer.new ;TI":s.set_parser(XMLRPC::XMLParser::XMLStreamParser.new) ;TI"# ... ;T;0o; ;[I"or:;T@o;;[ I"# ... ;TI"'server = XMLRPC::Server.new(8080) ;TI";server.set_parser(XMLRPC::XMLParser::NQXMLParser.new) ;TI"# ... ;T;0o; ;[ I"]Note XMLParser::XMLStreamParser (xmlparser gem) is faster and uses less memory than any ;TI"Tother parser and scales well for large documents. For example for a 0.5 MB XML ;TI"Wdocument with many tags, XMLParser::XMLStreamParser is ~350 (!) times faster than ;TI"XXMLParser::NQXMLTreeParser and still ~18 times as fast as XMLParser::XMLTreeParser.;T@o; ;[I"XYou can change the XML-writer by calling method ParserWriterChooseMixin#set_writer.;T: @fileI"lib/xmlrpc.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ [ [[I" class;T[[:public[ [:protected[ [:private[ [I" instance;T[[;[ [;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@�I"lib/xmlrpc/base64.rb;TI"lib/xmlrpc/client.rb;TI"lib/xmlrpc/config.rb;TI"lib/xmlrpc/create.rb;TI"lib/xmlrpc/datetime.rb;TI"lib/xmlrpc/marshal.rb;TI"lib/xmlrpc/parser.rb;TI"lib/xmlrpc/server.rb;TI"lib/xmlrpc/utils.rb;T@ cRDoc::TopLevel