%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/dns/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/dns/__pycache__/_ddr.cpython-312.pyc

�

5��e���ddlZddlZddlmZddlZddlZddlZddlZddl	Zddl
Zejjd�Z
Gd�d�Zd�Zd�Zd�Zy)	�N)�urlparsez_dns.resolver.arpac�,�eZdZd�Zd�Zd�Zd�Zdd�Zy)�	_SVCBInfoc�<�||_||_||_||_y�N)�bootstrap_address�port�hostname�nameservers)�selfrr	r
rs     �*/usr/lib/python3/dist-packages/dns/_ddr.py�__init__z_SVCBInfo.__init__s ��!2�����	� ��
�&���c�L�|dD]\}}|dk(s�||jk(s�yy)zIVerify that the _SVCBInfo's address is in the cert's subjectAltName (SAN)�subjectAltNamez
IP AddressTF)r)r�cert�name�values    r
�ddr_check_certificatez_SVCBInfo.ddr_check_certificate!s8��� 0�1�	�K�D�%��|�#���1G�1G�(G��	�rc��tjj}|j�}|jj
|_|Sr)�dns�query�ssl�create_default_context�
TLSVersion�TLSv1_2�minimum_version)rr�ctxs   r
�make_tls_contextz_SVCBInfo.make_tls_context(s4���i�i�m�m���(�(�*��!�n�n�4�4����
rc��|j�}tj�|z}tj|j|j
f|�5}|j
||j��5}|jtjj|��|j�|j�}|j|�cddd�cddd�S#1swYnxYw	ddd�y#1swYyxYw)N)�server_hostname)r�time�socket�create_connectionrr	�wrap_socketr
�
settimeoutrr�
_remaining�do_handshake�getpeercertr)r�lifetimer�
expiration�s�tsrs       r
�ddr_tls_check_syncz_SVCBInfo.ddr_tls_check_sync.s����#�#�%���Y�Y�[�8�+�
�
�
%�
%�
�
#�
#�T�Y�Y�/��
�	8�
�����D�M�M��B�
8�b��
�
�c�i�i�2�2�:�>�?����!��~�~�'���1�1�$�7�	
8�
8�	8�	8�
8�
8��
8�	8�	8�	8�s%�C:�2AC$�	C:�$C-	�)C:�:DNc
��~K�|�tjj�}|j�}t	j�|z}|jtjj|j�tjdd|j|jf|||j��d{���4�d{���}|jtjj|���d{���}|j!|�cddd��d{���S7�e7�^7�*7�#1�d{���7swYyxYw�w)Nr)r�asyncbackend�get_default_backendrr"�make_socket�inet�af_for_addressrr#�SOCK_STREAMr	r
r)rr'r)rr*�backendrr+r-rs       r
�ddr_tls_check_asyncz_SVCBInfo.ddr_tls_check_async:s
�����?��&�&�:�:�<�G��#�#�%���Y�Y�[�8�+�
� �,�,��H�H�#�#�D�$:�$:�;����
��
�
#�
#�T�Y�Y�/����M�M�	
�	
�	4�	4������	�	�(<�(<�Z�(H�I�I�D��-�-�d�3�	4�	4�	4�	
��	4��J��	4��	4�	4�	4�sl�B8D=�:D �;D=�D"�D=�2D(�9D$�:D(�D=�D&�D=�"D=�$D(�&D=�(D:�.D1�/D:�6D=r)�__name__�
__module__�__qualname__rrrr.r7�rr
rrs��'���
8�4rrc	�t�|j}tjj|�sgSg}|jj�D�][}g}|jjtjjjj�}|��Pt|j�}|jjd��}d}|jjtjjjj �}|�|j"}d|vr�|jjtjjjj$�}|�|j&j)d�s��B|j&ddj+�}	|	j-d�sd|	z}	|�d}d|�d	|�|	��}
	t/|
�|j1tjj3|
|��d
|vr4|�d}|j1tjj7|||��d|vr5|�d}|j1tjj9||d|��t;|�d
kDs��?|j1t=||||����^|S#t4$rY��wxYw)NT)�omit_final_dotsh2s{?dns}i�����/i�zhttps://�:sdotiUsdoqr)�
nameserverrr3�
is_address�rrset�processing_order�params�get�rdtypes�svcbbase�ParamKey�ALPN�set�ids�target�to_text�PORTr	�DOHPATHr�endswith�decode�
startswithr�append�
DoHNameserver�	Exception�
DoTNameserver�
DoQNameserver�lenr)�answerr�infos�rrr�param�alpns�hostr	�path�urls           r
�_extract_nameservers_from_svcbraMsX���)�)���8�8���0�1��	��E��l�l�+�+�-�+P�����	�	�
�
�c�k�k�2�2�;�;�@�@�A���=���E�I�I����y�y� � �� �5�����	�	�
�
�c�k�k�2�2�;�;�@�@�A�����:�:�D��E�>��I�I�M�M�#�+�+�"6�"6�"?�"?�"G�"G�H�E��}�E�K�K�$8�$8��$C���;�;�s��#�*�*�,�D��?�?�3�'��T�z���|����T�F�!�D�6�$��0�C�
���
��"�"�3�>�>�#?�#?��EV�#W�X��U�?��|���������,�,�->��d�K�
��U�?��|���������,�,�->��d�D�Q�
��{��a���L�L��#4�d�D�+�N�O�W+P�X�L��#�
��
�s�:J+�+	J7�6J7c��g}t|�}|D]/}	|j|�r|j|j��1|S#t$rY�?wxYw)�VReturn a list of TLS-validated resolver nameservers extracted from an SVCB
    answer.)rar.�extendrrU�rYr*rrZ�infos     r
�_get_nameservers_syncrg�sf���K�*�6�2�E����	��&�&�x�0��"�"�4�#3�#3�4�������	��	�s�,A�	A�Ac���K�g}t|�}|D]7}	|j|��d{���r|j|j��9|S7�##t$rY�IwxYw�w)rcN)rar7rdrrUres     r
�_get_nameservers_asyncri�sr�����K�*�6�2�E����	��-�-�h�7�7�7��"�"�4�#3�#3�4�����	8���	��	�s8�A�A�A�A�
A�A�	A�A�A�A)r#r"�urllib.parser�dns.asyncbackendr�dns.inet�dns.name�dns.nameserver�	dns.query�dns.rdtypes.svcbbaser�	from_text�_local_resolver_namerrargrir;rr
�<module>rssU��
��!��������x�x�)�)�*>�?��04�04�f1�h�r

Zerion Mini Shell 1.0