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 :  /lib/python2.7/site-packages/netaddr/eui/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/netaddr/eui/ieee.pyc
�
o�\c@sFdZddljZddlZddlmZddlm	Z	m
Z
ejeje
�d�Zejeje
�d�ZiZejeje
�d�Zejeje
�d�ZiZd	e	fd
��YZde
fd��YZd
e
fd��YZd�Zd�Zd�Zd�Zedkr;e�ne�dS(s�
Provides access to public OUI and IAB registration data published by the IEEE.

More details can be found at the following URLs :-

    - IEEE Home Page - http://www.ieee.org/
    - Registration Authority Home Page - http://standards.ieee.org/regauth/
i����N(t_bytes_type(t
Subscribert	Publishersoui.txtsoui.idxsiab.txtsiab.idxtFileIndexercBs eZdZd�Zd�ZRS(s�
    A concrete Subscriber that receives OUI record offset information that is
    written to an index data file as a set of comma separated records.
    cCs[t|d�r*t|d�r*||_nt|d�|_tj|jdd�|_dS(s�
        Constructor.

        :param index_file: a file-like object or name of index file where
            index records will be written.
        treadlinettelltwtlineterminators
N(thasattrtfhtopent_csvtwriter(tselft
index_file((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pyt__init__AscCs|jj|�dS(s�
        Receives and writes index data to a CSV data file.

        :param data: record containing offset record information.
        N(Rtwriterow(R
tdata((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pytupdateOs(t__name__t
__module__t__doc__RR(((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pyR<s	tOUIIndexParsercBs eZdZd�Zd�ZRS(s�
    A concrete Publisher that parses OUI (Organisationally Unique Identifier)
    records from IEEE text-based registration files

    It notifies registered Subscribers as each record is encountered, passing
    on the record's position relative to the start of the file (offset) and
    the size of the record (in bytes).

    The file processed by this parser is available online from this URL :-

        - http://standards.ieee.org/regauth/oui/oui.txt

    This is a sample of the record structure expected::

        00-CA-FE   (hex)        ACME CORPORATION
        00CAFE     (base 16)        ACME CORPORATION
                        1 MAIN STREET
                        SPRINGFIELD
                        UNITED STATES
    cCsStt|�j�t|d�r=t|d�r=||_nt|d�|_dS(s�
        Constructor.

        :param ieee_file: a file-like object or name of file containing OUI
            records. When using a file-like object always open it in binary
            mode otherwise offsets will probably misbehave.
        RRtrbN(tsuperRRRR	R
(R
t	ieee_file((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pyRmscCsEt}d}d}td�}td�}td�}x�tr&|jj�}|sXPn|rs||krst}n|rq9n||kr|dk	r�|j|�|j|�nt|�}|jj	�t|�}|j
�d}	t|	j||�d�}
|
|g}q9|t|�7}q9W|j|�|j|�dS(s�
        Starts the parsing process which detects records and notifies
        registered subscribers as it finds each OUI record.
        is(hex)t-tiN(
tTruetNoneRR	RtFalsetappendtnotifytlenRtsplittinttreplace(R
tskip_headertrecordtsizetmarkerthyphentempty_stringtlinetoffsettouitindex((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pytparse|s4		

(RRRRR/(((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pyRXs	tIABIndexParsercBs eZdZd�Zd�ZRS(s�
    A concrete Publisher that parses IAB (Individual Address Block) records
    from IEEE text-based registration files

    It notifies registered Subscribers as each record is encountered, passing
    on the record's position relative to the start of the file (offset) and
    the size of the record (in bytes).

    The file processed by this parser is available online from this URL :-

        - http://standards.ieee.org/regauth/oui/iab.txt

    This is a sample of the record structure expected::

        00-50-C2   (hex)        ACME CORPORATION
        ABC000-ABCFFF     (base 16)        ACME CORPORATION
                        1 MAIN STREET
                        SPRINGFIELD
                        UNITED STATES
    cCsStt|�j�t|d�r=t|d�r=||_nt|d�|_dS(s�
        Constructor.

        :param ieee_file: a file-like object or name of file containing IAB
            records. When using a file-like object always open it in binary
            mode otherwise offsets will probably misbehave.
        RRRN(RR0RRR	R
(R
R((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pyR�scCs�t}d}d}td�}td�}td�}td�}xLtr�|jj�}|sdPn|r||krt}n|r�qEn||kr
|dk	r�|j|�|j|�n|jj�t	|�}	|j
�d}
|
}||	g}t	|�}qE||kr}|t	|�7}|dj||�}|j
�d}
|
j
|�d}
t||
d�d?|d<qE|t	|�7}qEW|j|�|j|�dS(	s�
        Starts the parsing process which detects records and notifies
        registered subscribers as it finds each IAB record.
        is(hex)s	(base 16)RRiiN(
RRRR	RRRR RR!R"R$R#(R
R%R&R't
hex_markert
base16_markerR)R*R+R,t
iab_prefixR.tprefixtsuffix((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pyR/�sB		

(RRRRR/(((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pyR0�s	cCs-||�}|jt|��|j�dS(s4Generate an index files from the IEEE registry file.N(tattachRR/(t
registry_patht
index_pathtparsert
oui_parser((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pytcreate_index_from_registryscCs$tttt�tttt�dS(s1Create indices for OUI and IAB file based lookupsN(R;tOUI_REGISTRY_PATHtOUI_INDEX_PATHRtIAB_REGISTRY_PATHtIAB_INDEX_PATHR0(((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pytcreate_indicessc	Cs�t|d�}z�x�tjg|D]}|jd�^q"�D]U}g|D]}t|�^qK\}}}|j|g�||j||f�q>WWd|j�XdS(s/Load index from file into index data structure.RsUTF-8N(R
RtreadertdecodeR#t
setdefaultRtclose(	R.R8tfptxtrowt_tkeyR,R'((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pyt
load_indexs2(cCsttt�ttt�dS(s+Load OUI and IAB lookup indices into memoryN(RJt	OUI_INDEXR=t	IAB_INDEXR?(((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pytload_indicess
t__main__(Rtos.pathtpatht_pathtcsvRtnetaddr.compatRtnetaddr.coreRRtjointdirnamet__file__R<R=RKR>R?RLRRR0R;R@RJRMR(((s3/tmp/pip-install-zM1pc4/netaddr/netaddr/eui/ieee.pyt<module>!s(SZ				


https://t.me/AnonymousX5 - 2025