Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 3.144.106.138
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : server.cpython-313.pyc
�

*}g֏��T�SrSSKJrJrJrJrJr SSKJr SSK	J
r
 SSKJr SSK
r
SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrS(SjrS	r"S
S5r"SS
\5r"SS\R6\5r"SS\5r"SS\5r"SS\R>5r "SS5r!"SS\5r""SS\\!5r#"SS\\!5r$\%S:Xa�SSK&r&"SS 5r'\"S!5r(\(RS\*5 \(RSS"S#5 \(RW\'"5SS$9 \(RY5 \-"S%5 \-"S&5 \(R]5 SSS5 gg!\a SrGN'f=f!\/a \-"S'5 \R`"S5 N;f=f!,(df   g=f))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()
�)�Fault�dumps�loads�gzip_encode�gzip_decode)�BaseHTTPRequestHandler)�partial)�	signatureNTc��U(aURS5nOU/nUH2nURS5(a[SU-5e[X5nM4 U$)a3resolve_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�
startswith�AttributeError�getattr)�obj�attr�allow_dotted_names�attrs�is     �4/opt/alt/python313/lib64/python3.13/xmlrpc/server.py�resolve_dotted_attributer|s[����
�
�3������
���<�<���� �:�Q�>��
��#�.�C�
��J�c	��[U5Vs/sH8nURS5(aM[[X55(dM6UPM: sn$s snf)zgReturns a list of attribute strings, found in the specified
object, which represent callable attributesr
)�dirr�callabler)r�members  r�list_public_methodsr�sK��"%�S��4��v��(�(��-�
��W�S�1�2�
��4�4��4s�A�A�Ac�n�\rSrSrSrSSjrSSjrSSjrSrSr	SS	jr
S
rSrSr
S
rSrSrg)�SimpleXMLRPCDispatcher�aMix-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
Nc�X�0UlSUlXlU=(d SUlX0lg�N�utf-8)�funcs�instance�
allow_none�encoding�use_builtin_types��selfr'r(r)s    r�__init__�SimpleXMLRPCDispatcher.__init__�s'����
���
�$�� �+�G��
�!2�rc��XlX lg)anRegisters 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)r&r)r+r&rs   r�register_instance�(SimpleXMLRPCDispatcher.register_instance�s��B!�
�"4�rc�n�Uc[URUS9$UcURnXRU'U$)z�Registers a function to respond to XML-RPC requests.

The optional name argument can be used to set a Unicode name
for the function.
)�name)r	�register_function�__name__r%)r+�functionr2s   rr3�(SimpleXMLRPCDispatcher.register_function�s>�����4�1�1��=�=��<��$�$�D�#�
�
�4���rc�~�URRURURURS.5 g)zxRegisters the XML-RPC introspection methods in the system
namespace.

see http://xmlrpc.usefulinc.com/doc/reserved.html
)zsystem.listMethodszsystem.methodSignaturezsystem.methodHelpN)r%�update�system_listMethods�system_methodSignature�system_methodHelp�r+s r� register_introspection_functions�7SimpleXMLRPCDispatcher.register_introspection_functions�s7��	
�
�
���$�2I�2I�15�1L�1L�,0�,B�,B�D�	Erc�R�URRSUR05 g)zqRegisters the XML-RPC multicall method in the system
namespace.

see http://www.xmlrpc.com/discuss/msgReader$1208zsystem.multicallN)r%r8�system_multicallr<s r�register_multicall_functions�3SimpleXMLRPCDispatcher.register_multicall_functions�s"��	
�
�
���-��0E�0E�F�Grc	���[XRS9upEUb	U"XT5nOURXT5nU4n[USURUR
S9nURUR
S5$![a(n[XpRUR
S9nSnANISnAf[aCn[[
S[U5<SU<35UR
URS9nSnAN�SnAff=f)	a�Dispatches 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�)�methodresponser'r()r'r(�:�r(r'�xmlcharrefreplace)
rr)�	_dispatchrr'r(r�
BaseException�type�encode)	r+�data�dispatch_method�path�params�method�response�fault�excs	         r�_marshaled_dispatch�*SimpleXMLRPCDispatcher._marshaled_dispatch�s���	�"�4�;Q�;Q�R�N�F��*�*�6�:���>�>�&�9�� �{�H��X�a�(,���$�-�-�Q�H����t�}�}�.A�B�B���	5��U���&*�m�m�5�H���	���a�D��I�s�3�4����4�?�?��H��	�s$�AA3�3
C0�=B � 
C0�-9C+�+C0c�t�[URR55nURb~[	URS5(a'U[URR55-nO<[	URS5(d!U[[
UR55-n[U5$)zosystem.listMethods() => ['add', 'subtract', 'multiple']

Returns a list of the methods supported by the server.�_listMethodsrI)�setr%�keysr&�hasattrrXr�sorted)r+�methodss  rr9�)SimpleXMLRPCDispatcher.system_listMethodss���
�d�j�j�o�o�'�(���=�=�$��t�}�}�n�5�5��3�t�}�}�9�9�;�<�<���T�]�]�K�8�8��3�2�4�=�=�A�B�B���g��rc��g)asystem.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 supported�)r+�method_names  rr:�-SimpleXMLRPCDispatcher.system_methodSignature)s��*rc��SnXR;aURUnO�URbs[URS5(aURRU5$[URS5(d"[	URUUR
5nUcg[R"U5$![a N&f=f)z}system.methodHelp('add') => "Adds two integers together"

Returns a string containing documentation for the specified method.N�_methodHelprI�)	r%r&r[rdrrr�pydoc�getdoc)r+rarQs   rr;�(SimpleXMLRPCDispatcher.system_methodHelp6s���
���*�*�$��Z�Z��,�F�
�]�]�
&��t�}�}�m�4�4��}�}�0�0��=�=��T�]�]�K�8�8��5� $�
�
� +� $� 7� 7�"�F��>���<�<��'�'��&����s�!B<�<
C	�C	c�b�/nUH/nUSnUSnURURXE5/5 M1 U$![a3nURURURS.5 SnAMmSnAf[
a/nURS[
U5<SU<3S.5 SnAM�SnAff=f)z�system.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
�
methodNamerP)�	faultCode�faultStringNrDrF)�appendrIrrkrlrJrK)r+�	call_list�results�callrarPrSrTs        rr@�'SimpleXMLRPCDispatcher.system_multicallUs������D��|�,�K��(�^�F�

�������{� C�D�E��$����
����#(�?�?�%*�%6�%6�8����!�
����#$�04�S�	�3�%?�A����
�s!�!:�
B.�(A2�2
B.�?$B)�)B.c��URUnUbU"U6$[SU-5e![a Of=fURbq[	URS5(aURRX5$[
URUUR5nUbU"U6$O![a Of=f[SU-5e)a�Dispatches 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.
zmethod "%s" is not supportedrI)	r%�	Exception�KeyErrorr&r[rIrrr)r+rQrP�funcs    rrI� SimpleXMLRPCDispatcher._dispatchts���*	E��:�:�f�%�D����V�}�$��:�V�C�D�D���	��	���=�=�$��t�}�}�k�2�2��}�}�.�.�v�>�>�

)�/��M�M���+�+����#���=�(�$��"�
��
���6��?�@�@s�'�
4�4�;!B%�%
B2�1B2)rr'r(r%r&r)�FNF)F�NN)r4�
__module__�__qualname__�__firstlineno__�__doc__r,r/r3r=rArUr9r:r;r@rI�__static_attributes__r`rrr r �sL���37�#(�3�"5�H� 	E�H�!C�F�$*�(�>�>1Arr c��\rSrSrSrSrSrSrSr\	R"S\	R\	R-5r
SrS	rS
rSrSrSS
jrSrg)�SimpleXMLRPCRequestHandleri�zwSimple XML-RPC request handler class.

Handles all HTTP POST requests and attempts to decode them as
XML-RPC requests.
)�/z/RPC2�
/pydoc.cssix���Tz�
                            \s* ([^\s;]+) \s*            #content-coding
                            (;\s* q \s*=\s* ([0-9\.]+))? #q
                            c�*�0nURRSS5nURS5H_nURR	U5nU(dM'URS5nU(a[
U5OSnXQURS5'Ma U$)NzAccept-Encodingre�,�g�?rD)�headers�getr�	aepattern�match�group�float)r+�r�ae�er��vs      r�accept_encodings�+SimpleXMLRPCRequestHandler.accept_encodings�sz����
�\�\�
�
�/��
4�����#��A��N�N�(�(��+�E��u��K�K��N�� !�E�!�H�s��$%�%�+�+�a�.�!���rc�X�UR(aURUR;$g)NT)�	rpc_pathsrOr<s r�is_rpc_path_valid�,SimpleXMLRPCRequestHandler.is_rpc_path_valid�s!���>�>��9�9����.�.�rc��UR5(dUR5 gSn[URS5n/nU(aY[	X!5nUR
R
U5nU(dO+URU5 U[US5-nU(aMYSRU5nURU5nUcgURRU[USS5UR5nURS5 UR!SS	5 UR"b^[U5UR":�aEUR%5R'S
S5nU(a[)U5nUR!SS
5 UR!S
[-[U555 UR/5 UR0R3U5 g![*a N\f=f![4a�n	URS5 [7URS5(ayURR8(a^UR!S[-U	55 [:R<"5n
[-U
R?SS5S5n
UR!SU
5 UR!S
S5 UR/5 Sn	A	gSn	A	ff=f)z�Handles the HTTP POST request.

Attempts to interpret all HTTP POST requests as XML-RPC calls,
which are forwarded to the server's _dispatch method for handling.
Ni�zcontent-lengthr�rrI���Content-typeztext/xml�gziprzContent-Encoding�Content-lengthi��_send_traceback_headerzX-exception�ASCII�backslashreplacezX-traceback�0) r��
report_404�intr��min�rfile�readrm�len�join�decode_request_content�serverrUrrO�
send_response�send_header�encode_thresholdr�r�r�NotImplementedError�str�end_headers�wfile�writersr[r��	traceback�
format_excrL)r+�max_chunk_size�size_remaining�L�
chunk_size�chunkrMrR�qr��traces           r�do_POST�"SimpleXMLRPCRequestHandler.do_POST�sS���%�%�'�'��O�O���9	'�
*�N� ����.>�!?�@�N��A� � ��@�
��
�
���
�3����������#�a��e�*�,��
!�.��8�8�A�;�D��.�.�t�4�D��|���{�{�6�6��'�$��T�:�D�I�I��H�$
���s�#����^�Z�8��$�$�0��x�=�4�#8�#8�8��-�-�/�3�3�F�A�>�A��!�'2�8�'<�H� �,�,�-?��H�
���-�s�3�x�=�/A�B������J�J���X�&��	 3�!� �!��1�
	����s�#��t�{�{�$<�=�=��K�K�6�6�� � ���A��7�!�,�,�.���E�L�L��2D�E�w�O��� � ���6����-�s�3�������
	�s7�A:G*�$%G*�
2G*�-G�
G'�&G'�*
K�4CK�Kc�~�URRSS5R5nUS:XaU$US:Xa[U5$URSSU-5 URSS	5 UR5 g![a URSSU-5 ND[a URSS5 Naf=f)
Nzcontent-encoding�identityr�i�zencoding %r not supported�zerror decoding gzip contentr�r�)	r�r��lowerrr�r��
ValueErrorr�r�)r+rMr(s   rr��1SimpleXMLRPCRequestHandler.decode_request_contents����<�<�#�#�$6�
�C�I�I�K���z�!��K��v��
G�"�4�(�(�
���s�$?�(�$J�K����)�3�/������'�
P��"�"�3�(C�h�(N�O��
G��"�"�3�(E�F�
G�s�
A=�=B<�B<�;B<c���URS5 SnURSS5 URS[[U555 UR	5 UR
R
U5 g)Ni�sNo such pager�z
text/plainr�)r�r�r�r�r�r�r��r+rRs  rr��%SimpleXMLRPCRequestHandler.report_404*s]�����3��"�������6����)�3�s�8�}�+=�>������
�
����"rc�j�URR(a[R"XU5 gg)z$Selectively log an accepted request.N)r��logRequestsr�log_request)r+�code�sizes   rr��&SimpleXMLRPCRequestHandler.log_request3s&���;�;�"�"�"�.�.�t�4�@�#rr`N)�-r�)r4ryrzr{r|r�r��wbufsize�disable_nagle_algorithm�re�compile�VERBOSE�
IGNORECASEr�r�r�r�r�r�r�r}r`rrrr�sk���-�I����H�"���
�
� �"$���b�m�m�!;�=�I�
	��E'�N�"#�Arrc�6�\rSrSrSrSrSr\SSSSS4SjrSr	g)�SimpleXMLRPCServeri9aOSimple XML-RPC server.

Simple XML-RPC server that allows functions and a single instance
to be installed to handle requests. The default implementation
attempts to dispatch XML-RPC calls to the functions or instance
installed in the server. Override the _dispatch method inherited
from SimpleXMLRPCDispatcher to change this behavior.
TFNc�|�X0l[RXXW5 [RRXX&5 g�N)r�r r,�socketserver�	TCPServer�r+�addr�requestHandlerr�r'r(�bind_and_activater)s        rr,�SimpleXMLRPCServer.__init__Ls0��'���'�'��(�V����'�'��N�Vr)r�)
r4ryrzr{r|�allow_reuse_addressr�rr,r}r`rrr�r�9s,�����#��,F�!�e�d�#'�5�Wrr�c�D�\rSrSrSr\SSSSS4SjrSrSrSS	jr	S
r
g)�MultiPathXMLRPCServeriUaDMultipath XML-RPC Server
This specialization of SimpleXMLRPCServer allows the user to create
multiple Dispatcher instances and assign them to different
HTTP request paths.  This makes it possible to run two or more
'virtual XML-RPC servers' at the same port.
Make sure that the requestHandler accepts the paths in question.
TFNc
�p�[RXX#UXVU5 0UlX@lU=(d SUlgr#)r�r,�dispatchersr'r(r�s        rr,�MultiPathXMLRPCServer.__init__]s8��	�#�#�D��Z�$,�AR�	T����$�� �+�G��
rc�"�X RU'U$r��r�)r+rO�
dispatchers   r�add_dispatcher�$MultiPathXMLRPCServer.add_dispatchergs��!+������rc� �URU$r�r�)r+rOs  r�get_dispatcher�$MultiPathXMLRPCServer.get_dispatcherks������%�%rc	� �URURXU5nU$![a`n[[	S[U5<SU<35URURS9nURURS5nSnAU$SnAff=f)NrDrFrGrH)	r�rUrJrrrKr(r'rL)r+rMrNrOrRrTs      rrU�)MultiPathXMLRPCServer._marshaled_dispatchns���
	K��'�'��-�A�A��d�,�H�����	K���a�D��I�s�3�4����4�?�?�D�H� ���t�}�}�6I�J�H����	K�s�#�
B
�AB�B
)r'r�r(rx)r4ryrzr{r|rr,r�r�rUr}r`rrr�r�Us-���-G�!�e�d�#'�5�,��&�rr�c�8�\rSrSrSrS	SjrSrSrS
SjrSr	g)�CGIXMLRPCRequestHandleri|z3Simple handler for XML-RPC data passed through CGI.Nc�0�[RXX#5 gr�)r r,r*s    rr,� CGIXMLRPCRequestHandler.__init__s���'�'��(�Vrc�\�URU5n[S5 [S[U5-5 [5 [RR5 [RRRU5 [RRR5 g)zHandle a single XML-RPC requestzContent-Type: text/xml�Content-Length: %dN)rU�printr��sys�stdout�flush�bufferr�)r+�request_textrRs   r�
handle_xmlrpc�%CGIXMLRPCRequestHandler.handle_xmlrpc�sr���+�+�L�9��
�&�'�
�"�S��]�2�3�
���
�
�����
�
������)��
�
�����!rc� �Sn[RUup#[RRUUUS.-nURS5n[
SX4-5 [
S[RR-5 [
S[U5-5 [
5 [RR5 [RRRU5 [RRR5 g)zsHandle a single HTTP GET request.

Default implementation indicates an error because
XML-RPC uses the POST method.
r�)r��message�explainr$z
Status: %d %szContent-Type: %sr�N)r�	responses�httpr��DEFAULT_ERROR_MESSAGErLr��DEFAULT_ERROR_CONTENT_TYPEr�r�r�r�r�r�)r+r�r�r�rRs     r�
handle_get�"CGIXMLRPCRequestHandler.handle_get�s�����1�;�;�D�A����;�;�4�4�� � �
����?�?�7�+��
�o���/�0�
� �4�;�;�#I�#I�I�J�
�"�S��]�2�3�
���
�
�����
�
������)��
�
�����!rc�^�Uc5[RRSS5S:XaUR5 g[	[RRSS55nUc[RRU5nURU5 g![
[4a SnNHf=f)z�Handle a single XML-RPC request passed through a CGI post method.

If no XML data is given then it is read from stdin. The resulting
XML-RPC response is printed to stdout along with the correct HTTP
headers.
N�REQUEST_METHOD�GET�CONTENT_LENGTHr�)�os�environr�rr�r��	TypeErrorr��stdinr�r�)r+r��lengths   r�handle_request�&CGIXMLRPCRequestHandler.handle_request�s������J�J�N�N�+�T�2�e�;��O�O��
��R�Z�Z�^�^�,<�d�C�D���#�"�y�y�~�~�f�5�����|�,���	�*�
���
�s�)B�B,�+B,r`rwr�)
r4ryrzr{r|r,r�rrr}r`rrr�r�|s��=�W�
"�"�2-rr�c�J�\rSrSrSrS0004SjrS000S4SjrSrSrSr	g)	�
ServerHTMLDoci�z7Class used to generate pydoc HTML document for a serverNc���U=(d URn/nSn[R"S5nURX5=n	(GanU	R	5up�URU"XU
55 U	R
5up�p�nnU
(a3U"U5RSS5nURSU<SU<S35 O�U(a/S[U5-nURSU<SU"U5<S35 O�U(a/S	[U5-nURSU<SU"U5<S35 OkXUS
-S:Xa#URURUXSU55 O=U(aURSU-5 O!URURUU55 UnURX5=n	(aGMnURU"XS
55 SRU5$)z{Mark up some plain text, given a context of symbols to look for.
Each context dictionary maps object names to anchor names.rzS\b((http|https|ftp)://\S+[\w/]|RFC[- ]?(\d+)|PEP[- ]?(\d+)|(self\.)?((?:\w|\.)+))\b�"z&quot;z	<a href="z">z</a>z(https://www.rfc-editor.org/rfc/rfc%d.txtz!https://peps.python.org/pep-%04d/rD�(zself.<strong>%s</strong>Nre)�escaper�r��search�spanrm�groups�replacer��namelinkr�)r+�textrr%�classesr]ro�here�patternr��start�end�all�scheme�rfc�pep�selfdotr2�urls                   r�markup�ServerHTMLDoc.markup�s����&�4�;�;�������*�*�<�=���~�~�d�1�1�e�1�����J�E��N�N�6�$�E�"2�3�4�38�<�<�>�0�C��7�D���S�k�)�)�#�x�8������S�A�B��@�3�s�8�K������V�C�[�I�J��9�C��H�D������V�C�[�I�J��#�a�%��C�'����t�}�}�T�7�7�K�L�����9�D�@�A����t�}�}�T�7�;�<��D�)�~�~�d�1�1�e�1�1�*	���v�d�5�k�*�+��w�w�w��rc�.�U=(a UR=(d SS-U-nSn	SURU5<SURU5<S3n
[U5(a[[	U55nOSn[U[5(aUS=(d UnUS=(d SnO[R"U5nX�-U	=(a URS	U	-5-n
URX�RXEU5nU=(a S
U-nSU
<SU<S
3$)z;Produce HTML documentation for a function or method object.rer�z	<a name="z
"><strong>z
</strong></a>z(...)rrDz'<font face="helvetica, arial">%s</font>z<dd><tt>%s</tt></dd>z<dl><dt>z</dt>z</dl>
)r4rrr�r
�
isinstance�tuplerfrg�greyr%�	preformat)r+�objectr2�modr%rr]�cl�anchor�note�title�argspec�	docstring�decl�docs               r�
docroutine�ServerHTMLDoc.docroutine�s����$����*��c�1�D�8����
�K�K������T�!2�4���F����)�F�+�,�G��G��f�e�$�$��Q�i�*�7�G��q�	��R�I����V�,�I���$�#A�4�9�9�8�4�?�,A�B���k�k��~�~�u�w�@���2�,�s�2��-1�3�7�7rc	���0nUR5HupVSU-XE'XEXF'M URU5nSU-nURU5nURX RU5n	U	=(a SU	-n	USU	--n/n
[UR55nUH$upVU
R
URXeUS95 M& X�RSSSRU
55-nU$)	z1Produce HTML documentation for an XML-RPC server.z#-z)<big><big><strong>%s</strong></big></big>z<tt>%s</tt>z
<p>%s</p>
)r%�Methods�	functionsre)
�itemsr�headingr%r+r\rmr6�
bigsectionr�)r+�server_name�package_documentationr]�fdict�key�value�head�resultr5�contents�method_itemss            r�	docserver�ServerHTMLDoc.docservers�����!�-�-�/�J�C����E�J� �:�E�L�*��k�k�+�.��:�[�H�����d�#���k�k�/����G���)�m�c�)���-�#�-�-�����g�m�m�o�.��&�J�C��O�O�D�O�O�E�e�O�D�E�'��/�/��{�B�G�G�H�$5�7�7���
rc�.�SnSU-nSU<SU<SU<S3$)zFormat an HTML page.r�z1<link rel="stylesheet" type="text/css" href="%s">zI<!DOCTYPE>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Python: z	</title>
z
</head><body>z</body></html>r`)r+r1rE�css_path�css_links     r�page�ServerHTMLDoc.page"s,����?��
�	�',�X�x�
A�	Arr`)
r4ryrzr{r|r%r6rGrLr}r`rrrr�s2��A�"&�b�"�b�% �N,0��R���8�:�4Arrc�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�XMLRPCDocGeneratori0zyGenerates documentation for an XML-RPC server.

This class is designed as mix-in and should not
be constructed directly.
c�.�SUlSUlSUlg)NzXML-RPC Server DocumentationzGThis server exports the following methods through the XML-RPC protocol.)r>�server_documentation�server_titler<s rr,�XMLRPCDocGenerator.__init__7s!��9���
�	
�!�;��rc��Xlg)z8Set the HTML title of the generated server documentationN)rR)r+rRs  r�set_server_title�#XMLRPCDocGenerator.set_server_title?s
��)�rc��Xlg)z7Set the name of the generated HTML server documentationN)r>)r+r>s  r�set_server_name�"XMLRPCDocGenerator.set_server_nameDs
��'�rc��Xlg)z3Set the documentation string for the entire server.N)rQ)r+rQs  r�set_server_documentation�+XMLRPCDocGenerator.set_server_documentationIs
��%9�!rc��0nUR5H�nX R;aURUnO�URb�SS/n[URS5(aURR	U5US'[URS5(aURRU5US'[
U5nUS:waUnO=[URS5(d[URU5nO
UnOS5eX1U'M� [5nURURURU5nUR[R"UR 5U5$![a UnNwf=f)	a�generate_html_documentation() => html documentation for the server

Generates HTML documentation for the server using introspection for
installed functions and instances that do not implement the
_dispatch method. Alternatively, instances can choose to implement
the _get_method_argstring(method_name) method to provide the
argument string used in the documentation and the
_methodHelp(method_name) method to provide the help text used
in the documentation.N�_get_method_argstringrrdrDrxrIzACould not find method in self.functions and no instance installed)r9r%r&r[r^rdr)rrrrGr>rQrL�htmlrrR)r+r]rarQ�method_info�
documenter�
documentations       r�generate_html_documentation�.XMLRPCDocGenerator.generate_html_documentationNsc�����2�2�4�K��j�j�(����K�0�����*�#�T�l���4�=�=�*A�B�B�%)�]�]�%H�%H��%U�K��N��4�=�=�-�8�8�%)�]�]�%>�%>�{�%K�K��N�#�K�0���,�.�(�F� �����<�<�-�!9�$(�M�M�$/�"&��)�F�/�/�/�q�$*�K� �75�:#�_�
�"�,�,� $� 0� 0� $� 9� 9� '��
����t�{�{�4�+<�+<�=�}�M�M��#*�-�!,��-�s�(E2�2F�F)rQr>rRN)r4ryrzr{r|r,rUrXr[rcr}r`rrrOrO0s!���;�)�
'�
9�
1NrrOc�$�\rSrSrSrSrSrSrg)�DocXMLRPCRequestHandleri�z�XML-RPC and documentation request handler class.

Handles all HTTP POST requests and attempts to decode them as
XML-RPC requests.

Handles all HTTP GET requests and interprets them as requests
for documentation.
c�0�[RR[RR[55n[RRUSSS5n[
USS9nUR5sSSS5 $!,(df   g=f)Nz..�
pydoc_dataz
_pydoc.css�rb)�mode)rrO�dirname�realpath�__file__r��openr�)r+r$�	path_hererJ�fps     r�_get_css� DocXMLRPCRequestHandler._get_css�s\���G�G�O�O�B�G�G�$4�$4�X�$>�?�	��7�7�<�<�	�4��|�L��
�(��
&�"��7�7�9�'�
&�
&�s�-B�
Bc��UR5(dUR5 gURRS5(aSnUR	UR5nO+SnUR
R
5RS5nURS5 URSSU-5 URS	[[U555 UR5 URRU5 g)
�eHandles the HTTP GET request.

Interpret all HTTP GET requests as requests for server
documentation.
Nz.cssztext/cssz	text/htmlr$r�zContent-Typez%s; charset=UTF-8r�)r�r�rO�endswithrqr�rcrLr�r�r�r�r�r�r�)r+�content_typerRs   r�do_GET�DocXMLRPCRequestHandler.do_GET�s����%�%�'�'��O�O����9�9���f�%�%�%�L��}�}�T�Y�Y�/�H�&�L��{�{�>�>�@�G�G��P�H����3������)<�|�)K�L����)�3�s�8�}�+=�>������
�
����"rr`N)r4ryrzr{r|rqrwr}r`rrrfrf�s����#rrfc�.�\rSrSrSr\SSSSS4SjrSrg)�DocXMLRPCServeri�z�XML-RPC and HTML documentation server.

Adds the ability to serve server documentation to the capabilities
of SimpleXMLRPCServer.
TFNc
�`�[RXX#XEUU5 [RU5 gr�)r�r,rOr�s        rr,�DocXMLRPCServer.__init__�s/��	�#�#�D��$.�:K�$5�	7�	�#�#�D�)rr`)r4ryrzr{r|rfr,r}r`rrrzrz�s���-D�!�e�d�#'�5�*rrzc�$�\rSrSrSrSrSrSrg)�DocCGIXMLRPCRequestHandleri�zFHandler for XML-RPC data and documentation requests passed through
CGIc�x�UR5RS5n[S5 [S[U5-5 [5 [R
R
5 [R
RRU5 [R
RR
5 g)rtr$zContent-Type: text/htmlr�N)	rcrLr�r�r�r�r�r�r�r�s  rr�%DocCGIXMLRPCRequestHandler.handle_get�s{���3�3�5�<�<�W�E��
�'�(�
�"�S��]�2�3�
���
�
�����
�
������)��
�
�����!rc�X�[RU5 [RU5 gr�)r�r,rOr<s rr,�#DocCGIXMLRPCRequestHandler.__init__�s���(�(��.��#�#�D�)rr`N)r4ryrzr{r|rr,r}r`rrr~r~�s���"� *rr~�__main__c�.�\rSrSrSr"SS5rSrg)�ExampleServicei�c��g)N�42r`r<s r�getData�ExampleService.getData�s��rc�$�\rSrSr\S5rSrg)�ExampleService.currentTimei�c�>�[RR5$r�)�datetime�nowr`rr�getCurrentTime�)ExampleService.currentTime.getCurrentTime�s���(�(�,�,�.�.rr`N)r4ryrzr{�staticmethodr�r}r`rr�currentTimer��s��
�
/��
/rr�r`N)r4ryrzr{r�r�r}r`rrr�r��s��	�	/�	/rr�)�	localhosti@c�
�X-$r�r`)�x�ys  r�<lambda>r��s��Q�Sr�add)rz&Serving XML-RPC on localhost port 8000zKIt is advisable to run this example server within a secure, closed network.z&
Keyboard interrupt received, exiting.)T)1r|�
xmlrpc.clientrrrrr�http.serverr�	functoolsr	�inspectr
r_r�r�r�rr�rfr��fcntl�ImportErrorrrr rr�r�r�r��HTMLDocrrOrfrzr~r4r�r�r�r3�powr/rAr��
serve_forever�KeyboardInterrupt�exitr`rr�<module>r�s���e�TH�G�.������
�	�	������04�IA�IA�VPA�!7�PA�dW��/�/�/�W�8%�.�%�N?-�4�?-�JmA�E�M�M�mA�^ON�ON�b&#�8�&#�P*�*�*�*� *�$;�$6�*�4�z���/�/�
�/�	0�F�� � ��%�� � ��%�8�� � ��!1�d� �K��+�+�-�
�6�7�
�[�\�	�� � �"�
1�	0���u���E���^!�	��;�<��H�H�Q�K�	��
1�	0�s=�E$�/AF�
E3�$E0�/E0�3 F�F�F�F�
F'
© 2025 GrazzMean-Shell