| Server IP : 66.29.153.156 / Your IP : 216.73.216.223 Web Server : LiteSpeed System : Linux premium322.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64 User : lastyfjz ( 1521) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././opt/hc_python/lib64/python3.12/site-packages/dns/__pycache__/ |
Upload File : |
�
��!h� � � � d Z ddlZddlmZmZmZ ddlZddlZej Z ej Z
dedede
fd�Zdede
defd �Zdedefd
�Zdedefd�Zdedefd�Z dd
eeef dee defd�Zd� Zdedefd�Zy)z*Generic Internet address helper functions.� N)�Any�Optional�Tuple�family�text�returnc � � | t k( rt j j |� S | t k( r t j
j |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)r r s �7/opt/hc_python/lib/python3.12/site-packages/dns/inet.py� inet_ptonr ! sF � � ����x�x�!�!�$�'�'� �8� ��x�x�!�!�$��-�-�!�!� �addressc � � | t k( rt j j |� S | t k( rt j
j |� 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 � inet_ntoar r r )r r s r � inet_ntopr 6 sD � � ����x�x�!�!�'�*�*� �8� ��x�x�!�!�'�*�*�!�!r c �� � t j j | � t S # t $ r= t j
j | d� t cY S # t $ r t �w xY ww xY 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 s r �af_for_addressr K s` � �������4� ����� � ��H�H���t�T�*��O��� ��� �� �s �$'