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/eui64.pyc
�
o�\c	@s�dZddlZddlZddlmZddlmZ	m
ZmZ
mZmZmZmZmZmZdZdZeZdZdZdedZd	e fd
��YZ!de!fd��YZ"d
e"fd��YZ#de!fd��YZ$de!fd��YZ%e!Z&ddj'dgd�dddj'dgd�dddj'dgd�dddj'dgd�dddj'dgd�dddj'dgd�d fZ(ge(D]Z)ej*e)ej+�^q�Z(d!�Z,d"�Z-d#�Z.dd$�Z0d%�Z1d&�Z2dd'�Zdd(�Z
dd)�Zdd*�Zdd+�Zdd,�Zdd-�Zd.�Zd/�ZdS(0s6
IEEE 64-bit EUI (Extended Unique Indentifier) logic.
i����N(tAddrFormatError(	tvalid_wordstint_to_wordstwords_to_intt
valid_bitstbits_to_inttint_to_bitst	valid_bint
int_to_bint
bin_to_inti@sEUI-64iit
eui64_basecBs>eZdZdZeeZdedZdZdZdZ	RS(s%A standard IEEE EUI-64 dialect class.iiit-s%.2Xi(
t__name__t
__module__t__doc__t	word_sizetwidtht	num_wordstmax_wordtword_septword_fmtt	word_base(((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyR
+s
t
eui64_unixcBs0eZdZdZeeZdZdZdZRS(s'A UNIX-style MAC address dialect class.it:s%xi(	RR
RRRRRRR(((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyR@s
teui64_unix_expandedcBseZdZdZRS(s;A UNIX-style MAC address dialect class with leading zeroes.s%.2x(RR
RR(((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyRIsteui64_ciscocBs0eZdZdZeeZdZdZdZRS(s2A Cisco 'triple hextet' MAC address dialect class.it.s%.4x(	RR
RRRRRRR(((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyRNs
t
eui64_barecBs0eZdZdZeeZdZdZdZRS(s1A bare (no delimiters) MAC address dialect class.i@ts%.16Xi(	RR
RRRRRRR(((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyRWs
t^Rs([0-9A-F]{1,2})it$Rs([0-9A-F]{1,4})is\.s^(Rs[0-9A-F]is)$cCs2x+|D]#}|j|�}|r|dSqWdS(Ni(tfindall(taddresstformatstregexptmatch((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyt_get_match_resultxs
cCs/yt|t�rtSWntk
r*nXtS(s�
    :param addr: An IEEE EUI-64 indentifier in string form.

    :return: ``True`` if EUI-64 indentifier is valid, ``False`` otherwise.
    (R$tRE_EUI64_FORMATStTruet	TypeErrortFalse(taddr((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyt	valid_strs
cCsJg}y"t|t�}|s't�nWn!tk
rKtd|��nXt|t�r^n	|f}t|�dkr�tdjg|D]}dt|d�^q��d�}n�t|�dkrtdjg|D]}dt|d�^q��d�}nEt|�dkr6td	t|d
d�d�}ntd|��|S(s�
    :param addr: An IEEE EUI-64 indentifier in string form.

    :return: An unsigned integer that is equivalent to value represented
        by EUI-64 string address formatted according to the dialect
    s#invalid IEEE EUI-64 identifier: %r!iRs%.2xiis%.4xis%016xis)bad word count for EUI-64 identifier: %r!(	R$R%R'Rt
isinstancettupletlentinttjoin(R)twordstwtint_val((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyt
str_to_int�s&

	;;#
cCsZ|dkrt}nt||�}g|D]}|j|^q+}|jj|�}|S(s�
    :param int_val: An unsigned integer.

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

    :return: An IEEE EUI-64 identifier that is equivalent to unsigned integer.
    N(tNoneR
RRRR/(R2tdialectR0tittokensR)((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyt
int_to_str�s	 cCst|�}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.
    s>8B(Rt_structtpack(R2R0((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyt
int_to_packed�scCscttjd|��}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>8Bii(tlistR9tunpackt	enumeratetreversed(t
packed_intR0R2R6tnumtword((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyt
packed_to_int�scCs+|dkrt}nt||j|j�S(N(R4tDEFAULT_EUI64_DIALECTt_valid_wordsRR(R0R5((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyR�s	cCs+|dkrt}nt||j|j�S(N(R4RDt
_int_to_wordsRR(R2R5((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyR�s	cCs+|dkrt}nt||j|j�S(N(R4RDt
_words_to_intRR(R0R5((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyR�s	cCs(|dkrt}nt|t|j�S(N(R4RDt_valid_bitsRR(tbitsR5((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyR�s	cCs(|dkrt}nt|t|j�S(N(R4RDt_bits_to_intRR(RIR5((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyR�s	cCs1|dkrt}nt||j|j|j�S(N(R4RDt_int_to_bitsRRR(R2R5((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyR�s	cCs"|dkrt}nt|t�S(N(R4RDt
_valid_binR(tbin_valR5((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyRs	cCs
t|t�S(N(t_int_to_binR(R2((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyRscCs
t|t�S(N(t_bin_to_intR(RM((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyR	s(3RtstructR9tret_retnetaddr.coreRtnetaddr.strategyRRERRFRRGRRHRRJRRKRRLRRNR	ROtAF_EUI64Rtfamilytfamily_nametversiontmax_inttobjectR
RRRRRDR/R%t_tcompilet
IGNORECASER$R*R3R4R8R;RC(((s9/tmp/pip-install-zM1pc4/netaddr/netaddr/strategy/eui64.pyt<module>sL@			!(			%			

https://t.me/AnonymousX5 - 2025