📂 FileMgr
📍
/
usr
/
lib
/
python3
/
dist-packages
/
sos
/
cleaner
/
parsers
/
__pycache__
✏️ /usr/lib/python3/dist-packages/sos/cleaner/parsers/__pycache__/mac_parser.cpython-312.pyc
✕ Tutup
� G%@i � �F � d dl Z d dlmZ d dlmZ dZdZdZ G d� de� Zy) � N)�SoSCleanerParser)� SoSMacMapze((?<!([0-9a-fA-F\'\"]:)|::)([^:|-])?([0-9a-fA-F]{2}(:|-)){7}[0-9a-fA-F]{2}(\'|\")?(\/|\,|\-|\.|\s|$))z�((?<!(?:([.|^|\b]{5}\w|[.|^|\b]fe80:|fe80::)))(([0-9a-fA-F]{4}:){3}[0-9a-fA-F]{4})(?!\w))|((?<!\w)(([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{4})(?!\w))zW((?<!([0-9a-fA-F\'\"]:)|::)(([^:\-])?(([0-9a-fA-F]{2}([:\-\_])){5,6}([0-9a-fA-F]{2}))))c �R � � e Zd ZdZdZeeegZdZ dgZ dZdZg f� fd� Z d� Zd � Z� xZS ) �SoSMacParserz!Handles parsing for MAC addressesz MAC Parser)z53:4f:53z534f:53zsos_commands/.*/modinfo.*�mac_mapFc �F �� t |� | _ t �| � ||� y )N)r �mapping�super�__init__)�self�config�workdir�skip_cleaning_files� __class__s ��@/usr/lib/python3/dist-packages/sos/cleaner/parsers/mac_parser.pyr zSoSMacParser.__init__8 s �� � ��)��� ����!4�5� c �r � |d dvr |dd }|d dvr� |d dvr |dd }|d dvr� |j � S )z�Strips away leading and trailing non-alphanum characters from any matched string to leave us with just the bare MAC addr r �0123456789abcdefABCDEF� N���)�strip)r �matchs r �reduce_mac_matchzSoSMacParser.reduce_mac_match<