%PDF- %PDF-
Mini Shell

Mini Shell

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

�

5��e��	��dZddlZddlZddlZddlZejjd�Zejjd�Z	ee	fde
dejjdejjdejjfd	�Zee	fd
ejjdejjdejjde
fd�Z
y)zDNS Reverse Map Names.�Nz
in-addr.arpa.z	ip6.arpa.�text�	v4_origin�	v6_origin�returnc�8�	tjj|�}tjj|�r|ddD�cgc]}d|z��	}}|}n;t	tj|�j��D�cgc]}|��}}|}tjjdjt|��|��Scc}wcc}w#t$r:tjj|�D�cgc]}d|z��	ncc}w}}|}Y��wxYw)a�Convert an IPv4 or IPv6 address in textual form into a Name object whose
    value is the reverse-map domain name of the address.

    *text*, a ``str``, is an IPv4 or IPv6 address in textual form
    (e.g. '127.0.0.1', '::1')

    *v4_origin*, a ``dns.name.Name`` to append to the labels corresponding to
    the address if the address is an IPv4 address, instead of the default
    (in-addr.arpa.)

    *v6_origin*, a ``dns.name.Name`` to append to the labels corresponding to
    the address if the address is an IPv6 address, instead of the default
    (ip6.arpa.)

    Raises ``dns.exception.SyntaxError`` if the address is badly formed.

    Returns a ``dns.name.Name``.
    �Nz%d�.)�origin)�dns�ipv6�	inet_aton�	is_mapped�str�binascii�hexlify�decode�	Exception�ipv4�name�	from_text�join�reversed)rrr�v6�byte�partsr
�xs        �1/usr/lib/python3/dist-packages/dns/reversename.py�from_addressrs���0
�
�X�X�
�
��
%���8�8���b�!�-/���W�5�T�T�D�[�5�E�5��F� #�H�$4�$4�R�$8�$?�$?�$A� B�C�1�Q�C�E�C��F��8�8���c�h�h�x���7���G�G��6��D����),���);�);�D�)A�B�����B��B��B����s<�AC�C�3C�	C�C�
C�*D�D
�
D�Drc	���|j|�rq|j|�}djt|j��}t
jjt
jj|��S|j|�r�|j|�}tt|j��}g}tdt|�d�D](}|jdj|||dz���*dj|�}t
jjt
jj|��St
jjd��)aConvert a reverse map domain name into textual address form.

    *name*, a ``dns.name.Name``, an IPv4 or IPv6 address in reverse-map name
    form.

    *v4_origin*, a ``dns.name.Name`` representing the top-level domain for
    IPv4 addresses, instead of the default (in-addr.arpa.)

    *v6_origin*, a ``dns.name.Name`` representing the top-level domain for
    IPv4 addresses, instead of the default (ip6.arpa.)

    Raises ``dns.exception.SyntaxError`` if the name does not have a
    reverse-map form.

    Returns a ``str``.
    �.r���:z"unknown reverse-map address family)�is_subdomain�
relativizerr�labelsrr�	inet_ntoar
�list�range�len�appendr�	exception�SyntaxError)rrrrr&r�is       r�
to_addressr/Ds��,����#����y�)���y�y��$�+�+�.�/���x�x�!�!�#�(�(�"4�"4�T�":�;�;�	
�	�	�9�	%����y�)���h�t�{�{�+�,�����q�#�f�+�q�)�	6�A��L�L����&��Q��U�"3�4�5�	6��y�y�����x�x�!�!�#�(�(�"4�"4�T�":�;�;��m�m�'�'�(L�M�Mr")�__doc__r�dns.ipv4r�dns.ipv6�dns.namerr�ipv4_reverse_domain�ipv6_reverse_domainr�Namerr/�r"r�<module>r8s���$������h�h�(�(��9���h�h�(�(��5��
 3�2�#H�

�#H��x�x�}�}�#H��x�x�}�}�#H�	�X�X�]�]�	#H�P 3�2�%N�

�(�(�-�-�%N��x�x�}�}�%N��x�x�}�}�%N�	�	%Nr"

Zerion Mini Shell 1.0