HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //lib/python3.6/site-packages/sos/cleaner/mappings/__pycache__/mac_map.cpython-36.pyc
3

\��h�@s(ddlZddlmZGdd�de�ZdS)�N)�SoSMapcsPeZdZdZddgZdZdZdZdZdZ	�fd	d
�Z
�fdd�Zd
d�Z�Z
S)�	SoSMacMapa�Mapping store for MAC addresses

    MAC addresses added to this map will be broken into two halves, vendor and
    device like how MAC addresses are normally crafted. For the vendor hextets,
    obfuscation will take the form of 53:4f:53, or 'SOS' in hex. The following
    device hextets will be obfuscated by a series of suffixes starting from
    zeroes. For example a MAC address of '60:55:cb:4b:c9:27' may be obfuscated
    into '53:4f:53:00:00:1a' or similar.

    This map supports both 48-bit and 64-bit MAC addresses.

    48-bit address may take the form of either:

            MM:MM:MM:SS:SS:SS
            MM-MM-MM-SS-SS-SS

    For 64-bit addresses, the identifier injected by IPv6 standards is
    used in obfuscated returns. These addresses may take either of these forms:

        MM:MM:MM:FF:FE:SS:SS:SS
        MMMM:MMFF:FESS:SSSS

    All mapped mac addresses are converted to lower case.
    Dash delimited styles will be converted to colon-delimited style.
    zff:ff:ff:ff:ff:ffz00:00:00:00:00:00z53:4f:53:%s:%s:%sz53:4f:53:ff:fe:%s:%s:%sz534f:53ff:fe%s:%s%sFrcs&|jdd�j�jd�j�}t�j|�S)N�-�:z=.,)�replace�lower�strip�super�add)�self�item)�	__class__��/usr/lib/python3.6/mac_map.pyr
6sz
SoSMacMap.addcs&|jdd�j�jd�j�}t�j|�S)Nrrz=.,)rrrr	�get)rr)r
rrr:sz
SoSMacMap.getcs�d�|jd7_|jd?|jd?d|jdg}t�fdd�|D��}tjd|�r^|j|Stjd	|�rt|j|Stjd
|�r�|j|SdS)zVObfuscate the device hextets, and append those to our 'vendor'
        hextet
        Z0123456789abdcef����c3s*|]"}�|d��|d��VqdS)rNr)�.0�i)�	hexdigitsrr�	<genexpr>Jsz*SoSMacMap.sanitize_item.<locals>.<genexpr>z$(([0-9a-fA-F]{2}:){7}[0-9a-fA-F]{2})z&(([0-9a-fA-F]{4}:){3}([0-9a-fA-F]){4})z([0-9a-fA-F][:_]?){12}N)�ob_hextets_cnt�tuple�re�match�
mac6_template�mac6_quad_template�mac_template)rrZhextetsr)rr�
sanitize_item>s



zSoSMacMap.sanitize_item)�__name__�
__module__�__qualname__�__doc__Zignore_matchesrrrZcompile_regexesrr
rr �
__classcell__rr)r
rrsr)rZsos.cleaner.mappingsrrrrrr�<module>s