Prv8 Shell
Server : Apache
System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : matalashes ( 1004)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /usr/local/lib/python3.6/site-packages/urllib3/util/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib/python3.6/site-packages/urllib3/util/__pycache__/ssl_match_hostname.cpython-36.pyc
3

G�Kd~�@stdZddlZddlZyddlZWnek
r8dZYnXdZGdd�de�Zddd�Zd	d
�Z	dd�Z
d
d�ZdS)zJThe match_hostname() function from Python 3.3.3, essential when using SSL.�Nz3.5.0.1c@seZdZdS)�CertificateErrorN)�__name__�
__module__�__qualname__�rr�B/tmp/pip-build-8nxjc3nm/urllib3/urllib3/util/ssl_match_hostname.pyrsr�c
Cs�g}|sdS|jd�}|d}|dd�}|jd�}||krLtdt|���|s`|j�|j�kS|dkrt|jd�n>|jd	�s�|jd	�r�|jtj|��n|jtj|�j	d
d��x|D]}|jtj|��q�Wtj
dd
j|�dtj�}	|	j
|�S)zhMatching according to RFC 6125, section 6.4.3

    http://tools.ietf.org/html/rfc6125#section-6.4.3
    F�.rrN�*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)�split�countr�repr�lower�append�
startswith�re�escape�replace�compile�join�
IGNORECASE�match)
�dn�hostname�
max_wildcards�pats�parts�leftmost�	remainder�	wildcards�frag�patrrr�_dnsname_matchs*


r"cCs&t|t�r"tjdkr"t|ddd�}|S)N��ascii�strict)�encoding�errors)r#)�
isinstance�str�sys�version_info�unicode)�objrrr�_to_unicodeOsr.cCstjt|�j��}||kS)z�Exact matching of IP addresses.

    RFC 6125 explicitly doesn't define an algorithm for this
    (section 1.7.2 - "Out of Scope").
    )�	ipaddress�
ip_addressr.�rstrip)�ipname�host_ip�iprrr�_ipaddress_matchVsr5cCs~|std��ytjt|��}Wn>ttfk
r:d}Yn$tk
r\tdkrVd}n�YnXg}|jdf�}xb|D]Z\}}|dkr�|dkr�t||�r�dS|j|�qt|dkrt|dk	r�t	||�r�dS|j|�qtW|�s"xH|jdf�D]8}x2|D]*\}}|dkr�t||��rdS|j|�q�Wq�Wt
|�dk�rNtd	|d
jt
t|��f��n,t
|�dk�rrtd||df��ntd
��dS)a)Verify that *cert* (in decoded format as returned by
    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
    rules are followed, but IP addresses are not accepted for *hostname*.

    CertificateError is raised on failure. On success, the function
    returns nothing.
    ztempty or no certificate, match_hostname needs a SSL socket or SSL context with either CERT_OPTIONAL or CERT_REQUIREDN�subjectAltName�DNSz
IP Address�subject�
commonNamerz&hostname %r doesn't match either of %sz, zhostname %r doesn't match %rrz=no appropriate commonName or subjectAltName fields were found)�
ValueErrorr/r0r.�UnicodeError�AttributeError�getr"rr5�lenrr�mapr
)�certrr3�dnsnames�san�key�value�subrrr�match_hostnamebsJrF)r)�__doc__rr*r/�ImportError�__version__r:rr"r.r5rFrrrr�<module>s

6

haha - 2025