https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/netaddr/strategy/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/netaddr/strategy/ipv6.pyc
�
o�\c@sdZddlZeZyXddlZejs?ed��nej	ej
ddlm	ZmZ
m
Z
eZWn-ek
r�ddlm	ZmZ
m
Z
nXddlmZddlmZmZmZmZmZmZmZ m!Z"m#Z$dZ%dZ&d	Z'e
Z(d
Z)dZ*dZ+de%d
Z,e%e&Z-de&d
Z.e/ge0de%d
�D]"Z1e1e,de%e1d
Af^qW�Z2e/ge0de%d
�D]"Z1e,de%e1d
Ae1f^q��Z3e/ge0de%d
�D]Z1e1de%e1d
f^q��Z4e/ge0de%d
�D]Z1de%e1d
e1f^q�Z5de6fd��YZ7de7fd��YZ8de7fd��YZ9dd�Z:dd�Z;dd�Z=d�Z>d�Z?d�Z@d�Zddd�Zd�Zd�Zd�Zdd �Zd!�Zd"�Z!d#�Z#dS($s
IPv6 address logic.
i����Ns
IPv6 disabled(t	inet_ptont	inet_ntoptAF_INET6(tAddrFormatError(	tvalid_wordstint_to_wordstwords_to_intt
valid_bitstbits_to_inttint_to_bitst	valid_bint
int_to_bint
bin_to_inti�it:tIPv6iiiitipv6_compactcBseZdZdZeZRS(s%An IPv6 dialect class - compact form.s%x(t__name__t
__module__t__doc__tword_fmttTruetcompact(((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyRVst	ipv6_fullcBseZdZeZRS(s*An IPv6 dialect class - 'all zeroes' form.(RRRtFalseR(((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR^stipv6_verbosecBseZdZdZeZRS(s5An IPv6 dialect class - extra wide 'all zeroes' form.s%.4x(RRRRRR(((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyRdscCs;|dkrtd��nytt|�WntSXtS(s
    :param addr: An IPv6 address in presentation (string) format.

    :param flags: decides which rules are applied to the interpretation of the
        addr value. Future use - currently has no effect.

    :return: ``True`` if IPv6 address is valid, ``False`` otherwise.
    ts Empty strings are not supported!(Rt
_inet_ptonRRR(taddrtflags((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyt	valid_strns	cCsEytt|�}t|�SWn!tk
r@td|��nXdS(s
    :param addr: An IPv6 address in string form.

    :param flags: decides which rules are applied to the interpretation of the
        addr value. Future use - currently has no effect.

    :return: The equivalent unsigned integer for a given IPv6 address.
    s&%r is not a valid IPv6 address string!N(RRt
packed_to_intt	ExceptionR(RRt
packed_int((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyt
str_to_int�s
	
cCs�|dkrt}nd}yrt|�}|jrEtt|�}nGttjd|��}g|D]}|j	|^qd}t
j|�}Wn!tk
r�t
d|��nX|S(s�
    :param int_val: An unsigned integer.

    :param dialect: (optional) a Python class defining formatting options.

    :return: The IPv6 presentation (string) format address equivalent to the
        unsigned integer provided.
    s>8Hs+%r is not a valid 128-bit unsigned integer!N(tNoneRt
int_to_packedRt
_inet_ntopRtlistt_structtunpackRtword_septjoinRt
ValueError(tint_valtdialectRR twordstwordttokens((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyt
int_to_str�s			 
cCsQt|t�}t|jdd��}|j�|dddg}dj|�S(s�
    :param int_val: An unsigned integer.

    :return: The reverse DNS lookup for an IPv6 address in network byte
        order integer form.
    R
Rtip6tarpat.(R0RR%treplacetreverseR)(R+RR/((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pytint_to_arpa�s

cCs"t|dd�}tjd|�S(s�
    :param int_val: the integer to be packed.

    :return: a packed string that is equivalent to value represented by an
    unsigned integer.
    ii s>4I(RR&tpack(R+R-((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR#�scCscttjd|��}d}x>tt|��D]*\}}|}|d|>}||B}q1W|S(s
    :param packed_int: a packed string containing an unsigned integer.
        It is assumed that string is packed in network byte order.

    :return: An unsigned integer equivalent to value of network address
        represented by packed binary string.
    s>4Iii (R%R&R't	enumeratetreversed(R R-R+titnumR.((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR�scCst|tt�S(N(t_valid_wordst	word_sizet	num_words(R-((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR�scCsH|dkrt�d}n|dkr8t�d}nt|||�S(NR>R=(R"tglobalst
_int_to_words(R+R>R=((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR�s
cCst|tt�S(N(t
_words_to_intR=R>(R-((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR�scCst|tt�S(N(t_valid_bitstwidthR((tbits((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR�scCst|tt�S(N(t_bits_to_intRCR((RD((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR�scCs/|dkrt�d}nt|tt|�S(NR((R"R?t_int_to_bitsR=R>(R+R(((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR	�scCs
t|t�S(N(t
_valid_binRC(tbin_val((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR
�scCs
t|t�S(N(t_int_to_binRC(R+((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyR�scCs
t|t�S(N(t_bin_to_intRC(RH((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyRs(ARtstructR&RtOPT_IMPORTStsockett_socketthas_ipv6RRRRRR$Rtnetaddr.fbsockettnetaddr.coreRtnetaddr.strategyRR<RR@RRARRBRRER	RFR
RGRRIRRJRCR=R(tfamilytfamily_nametversiont	word_basetmax_intR>tmax_wordtdicttrangeR:tprefix_to_netmasktnetmask_to_prefixtprefix_to_hostmaskthostmask_to_prefixtobjectRRRRR!R"R0R6R#R(((s8/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/ipv6.pyt<module>sd	

 @
??;;
									

https://t.me/AnonymousX5 - 2025