HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: //proc/self/root/lib/python3.9/site-packages/dns/__pycache__/reversename.cpython-39.opt-1.pyc
a

�M�e��@s�dZddlZddlZddlZddlZej�d�Zej�d�Z	ee	fe
ejjejjejjd�dd�Zee	fejjejjejje
d�d	d
�Z
dS)zDNS Reverse Map Names.�Nz
in-addr.arpa.z	ip6.arpa.)�text�	v4_origin�	v6_origin�returncCs�zXtj�|�}tj�|�r6dd�|dd�D�}|}n dd�tt�|����D�}|}Wn,ty�dd�tj	�|�D�}|}Yn0tj
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``.
    cSsg|]}d|�qS�z%d���.0Zbyterr�3/usr/lib/python3.9/site-packages/dns/reversename.py�
<listcomp>9�z from_address.<locals>.<listcomp>�NcSsg|]}|�qSrr)r	�xrrr
r<rcSsg|]}d|�qSrrrrrr
r?r�.)�origin)�dns�ipv6�	inet_atonZ	is_mapped�str�binasciiZhexlify�decode�	Exception�ipv4�name�	from_text�join�reversed)rrrZv6�partsrrrr
�from_addresss
r)rrrrc	Cs�|�|�r8|�|�}d�t|j��}tj�tj�|��S|�|�r�|�|�}t	t|j��}g}t
dt|�d�D] }|�d�|||d���qnd�|�}tj
�tj
�|��Stj�d��dS)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�r�:z"unknown reverse-map address familyN)Zis_subdomainZ
relativizerr�labelsrrZ	inet_ntoar�list�range�len�appendr�	exception�SyntaxError)rrrrr"r�irrr
�
to_addressDs




r*)�__doc__rZdns.ipv4rZdns.ipv6Zdns.namerrZipv4_reverse_domainZipv6_reverse_domainr�Namerr*rrrr
�<module>s,��(��