OwlCyberSecurity - MANAGER
Edit File: DocXMLRPCServer.pyo
� zfc�����������@���s����d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�m�Z�m�Z�m�Z�m�Z�d����Z �d�e�j �f�d�������YZ�d�d�d�������YZ�d �e�f�d �������YZ �d�e�e�f�d�������YZ�d �e�e�f�d�������YZ�d�S(���sK��Self documenting XML-RPC Server. This module 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. This module is built upon the pydoc and SimpleXMLRPCServer modules. i����N(���t���SimpleXMLRPCServert���SimpleXMLRPCRequestHandlert���CGIXMLRPCRequestHandlert���resolve_dotted_attributec���������C���s^���|��j��d�d���}��|��j��d�d���}��|��j��d�d���}��|��j��d�d���}��|��j��d �d ���}��|��S(���Nt���&s���&t���<s���<t���>s���>t���"s���"s���'s���'(���t���replace(���t���s(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt���_html_escape_quote���s����t ���ServerHTMLDocc�����������B���sD���e��Z�d��Z�d�i��i��i��d���Z�d�i��i��i��d�d���Z�d����Z�RS(���s7���Class used to generate pydoc HTML document for a serverc���������C���s���|�p�|��j��}�g��}�d�}�t�j�d���}�x�|�j�|�|���} �| �sI�Pn��| �j����\�} �}�|�j�|�|�|�| �!����| �j����\�}�} �}�}�}�}�| �r��|�|���j�d�d���}�|�j�d�|�|�f���n��|�rd�t�|���}�|�j�d�|�|�|���f���n��|�r7d�t�|���}�|�j�d�|�|�|���f���nl�|�|�|�d�!d �k�rp|�j�|��j �|�|�|�|�����n3�|�r�|�j�d �|���n�|�j�|��j �|�|�����|�}�q-�W|�j�|�|�|�����d�j �|���S(���s����Mark up some plain text, given a context of symbols to look for. Each context dictionary maps object names to anchor names.i����sM���\b((http|ftp)://\S+[\w/]|RFC[- ]?(\d+)|PEP[- ]?(\d+)|(self\.)?((?:\w|\.)+))\bR���s���"s���<a href="%s">%s</a>s'���http://www.rfc-editor.org/rfc/rfc%d.txts(���http://www.python.org/dev/peps/pep-%04d/i���t���(s���self.<strong>%s</strong>t����(���t���escapet���ret���compilet���searcht���spant���appendt���groupsR���t���intt���namelinkt���join(���t���selft���textR���t���funcst���classest���methodst���resultst���heret���patternt���matcht���startt���endt���allt���schemet���rfct���pept���selfdott���namet���url(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt���markup$���s8����� " c���������C���s���|�r�|�j��p�d�d�|�}�d�} �d�|��j�|���|��j�|���f�} �t�j�|���r��t�j�|�j���\�}�}�} �}�t�j�|�d�|�| �|�d�|��j��}�nT�t�j�|���r��t�j�|���\�}�}�} �}�t�j�|�|�| �|�d�|��j��}�n�d�}�t �|�t ���r |�d�p |�}�|�d�pd�}�n�t�j�|���}�| �|�| �oL|��j �d�| ���}�|��j�|�|��j�|�|�|���}�|�o{d �|�}�d �|�|�f�S(���s;���Produce HTML documentation for a function or method object.R ���t���-s$���<a name="%s"><strong>%s</strong></a>i���t���formatvalues���(...)i����s'���<font face="helvetica, arial">%s</font>s���<dd><tt>%s</tt></dd>s���<dl><dt>%s</dt>%s</dl> (���t���__name__R���t���inspectt���ismethodt ���getargspect���im_funct ���formatargspecR,���t ���isfunctiont ���isinstancet���tuplet���pydoct���getdoct���greyR*���t ���preformat(���R���t���objectR(���t���modR���R���R���t���clt���anchort���notet���titlet���argst���varargst���varkwt���defaultst���argspect ���docstringt���declt���doc(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt ���docroutineM���s6����c���������C���s��i��}�x6�|�j�����D](�\�}�}�d�|�|�|�<|�|�|�|�<q�W|��j�|���}�d�|�}�|��j�|�d�d���}�|��j�|�|��j�|���} �| �o��d�| �} �|�d�| �}�g��} �t�|�j�������}�x3�|�D]+�\�}�}�| �j�|��j�|�|�d�|����q��W|�|��j�d�d�d �t �j �| �����}�|�S( ���s1���Produce HTML documentation for an XML-RPC server.s���#-s)���<big><big><strong>%s</strong></big></big>s���#ffffffs���#7799ees���<tt>%s</tt>s ���<p>%s</p> R���t���Methodss���#eeaa77(���t���itemsR���t���headingR*���R9���t���sortedR���RH���t ���bigsectionR6���R���(���R���t���server_namet���package_documentationR���t���fdictt���keyt���valuet���headt���resultRG���t���contentst���method_items(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt ���docserverw���s"���� # N(���R-���t ���__module__t���__doc__t���NoneR*���RH���RW���(����(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyR���!���s ���))t���XMLRPCDocGeneratorc�����������B���s;���e��Z�d��Z�d����Z�d����Z�d����Z�d����Z�d����Z�RS(���s����Generates documentation for an XML-RPC server. This class is designed as mix-in and should not be constructed directly. c���������C���s���d�|��_��d�|��_�d�|��_�d��S(���Ns���XML-RPC Server DocumentationsG���This server exports the following methods through the XML-RPC protocol.(���RN���t���server_documentationt���server_title(���R���(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt���__init__����s���� c���������C���s ���|�|��_��d�S(���s8���Set the HTML title of the generated server documentationN(���R]���(���R���R]���(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt���set_server_title����s����c���������C���s ���|�|��_��d�S(���s7���Set the name of the generated HTML server documentationN(���RN���(���R���RN���(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt���set_server_name����s����c���������C���s ���|�|��_��d�S(���s3���Set the documentation string for the entire server.N(���R\���(���R���R\���(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt���set_server_documentation����s����c���������C���si��i��}�x|��j�����D]}�|�|��j�k�r8�|��j�|�}�n��|��j�d�k �rd�d�g�}�t�|��j�d���r~�|��j�j�|���|�d�<n��t�|��j�d���r��|��j�j�|���|�d�<n��t�|���}�|�d�k�r��|�}�qt�|��j�d���sy�t�|��j�|���}�Wqt �k �r|�}�qXq|�}�n��|�|�|�<q�Wt ����}�|�j�|��j�|��j �|���}�t�|��j���}�|�j�|�|���S(���s��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.t���_get_method_argstringi����t���_methodHelpi���t ���_dispatchN(���NN(���t���system_listMethodsR���t���instanceRZ���t���hasattrRb���Rc���R5���R���t���AttributeErrorR���RW���RN���R\���R ���R]���t���page(���R���R���t���method_namet���methodt���method_infot ���documentert ���documentationR?���(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt���generate_html_documentation����s:���� (���R-���RX���RY���R^���R_���R`���Ra���Ro���(����(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyR[�������s��� t���DocXMLRPCRequestHandlerc�����������B���s���e��Z�d��Z�d����Z�RS(���s����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���������C���s����|��j�����s�|��j����d�S|��j�j����}�|��j�d���|��j�d�d���|��j�d�t�t�|�������|��j����|��j �j �|���d�S(���s}���Handles the HTTP GET request. Interpret all HTTP GET requests as requests for server documentation. Ni����s���Content-types ���text/htmls���Content-length(���t���is_rpc_path_validt ���report_404t���serverRo���t ���send_responset���send_headert���strt���lent���end_headerst���wfilet���write(���R���t���response(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt���do_GET����s���� (���R-���RX���RY���R|���(����(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyRp�������s���t���DocXMLRPCServerc�����������B���s&���e��Z�d��Z�e�d�e�d�e�d���Z�RS(���s����XML-RPC and HTML documentation server. Adds the ability to serve server documentation to the capabilities of SimpleXMLRPCServer. i���c���������C���s0���t��j�|��|�|�|�|�|�|���t�j�|����d��S(���N(���R����R^���R[���(���R���t���addrt���requestHandlert���logRequestst ���allow_nonet���encodingt���bind_and_activate(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyR^�����s���� N(���R-���RX���RY���Rp���t���FalseRZ���t���TrueR^���(����(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyR}�������s��� t���DocCGIXMLRPCRequestHandlerc�����������B���s ���e��Z�d��Z�d����Z�d����Z�RS(���sJ���Handler for XML-RPC data and documentation requests passed through CGIc���������C���s5���|��j�����}�d�GHd�t�|���GHHt�j�j�|���d�S(���s}���Handles the HTTP GET request. Interpret all HTTP GET requests as requests for server documentation. s���Content-Type: text/htmls���Content-Length: %dN(���Ro���Rw���t���syst���stdoutRz���(���R���R{���(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt ���handle_get��s ����c���������C���s���t��j�|����t�j�|����d��S(���N(���R���R^���R[���(���R���(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyR^��� ��s���� (���R-���RX���RY���R����R^���(����(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyR���� ��s��� (����(���RY���R6���R.���R���R����R����R���R���R���R ���t���HTMLDocR���R[���Rp���R}���R����(����(����(����s'���/usr/lib64/python2.7/DocXMLRPCServer.pyt���<module>���s���" oR