관리-도구
편집 파일: reversename.cpython-39.opt-1.pyc
a �����M�e�����������������������@���s����d�Z�ddlZddlZddlZddlZej�d�Zej�d�Z ee fe ejjejjejjd�dd�Zee fejjejjejje d�d d �Z dS�)zDNS Reverse Map Names.�����Nz in-addr.arpa.z ip6.arpa.)�text� v4_origin� v6_origin�returnc�����������������C���s����zXt�j�|��}t�j�|�r6dd��|dd��D��}|}n dd��tt�|�����D��}|}W�n,�ty����dd��t�j �|��D��}|}Y�n0�t�j jd�t |��|d�S�) 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``. c�����������������S���s���g�|�]}d�|��qS��z%d����.0Zbyter���r����3/usr/lib/python3.9/site-packages/dns/reversename.py� <listcomp>9��������z from_address.<locals>.<listcomp>����Nc�����������������S���s���g�|�]}|�qS�r���r���)r ����xr���r���r ���r���<���r���c�����������������S���s���g�|�]}d�|��qS�r���r���r���r���r���r ���r���?���r����.)�origin)�dns�ipv6� inet_atonZ is_mapped�str�binasciiZhexlify�decode� Exception�ipv4�name� from_text�join�reversed)r���r���r���Zv6�partsr���r���r���r ����from_address���s���� r���)r���r���r���r���c�������������� ���C���s����|���|�r8|��|�}�d�t|�j��}tj�tj�|��S�|���|�r�|��|�}�t t|�j��}g�}t dt|�d�D�] }|�d�|||d������qnd�|�}tj �tj �|��S�tj�d��dS�)a��Convert 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�������r�������:z"unknown reverse-map address familyN)Zis_subdomainZ relativizer���r����labelsr���r���Z inet_ntoar����list�range�len�appendr���� exception�SyntaxError)r���r���r���r���r"���r����ir���r���r ���� to_addressD���s���� r*���)�__doc__r���Zdns.ipv4r���Zdns.ipv6Zdns.namer���r���Zipv4_reverse_domainZipv6_reverse_domainr����Namer���r*���r���r���r���r ����<module>���s,�����(��