errort 当前离线
列兵
f = open('mac.log').readlines()for line in f: mac = line.split('ether ')[1].strip('\n').strip(' ')COPY
brim 当前离线
三级士官
#encoding=utf-8import re with open('20200922MAC.txt','r') as fp: txtinfo = ''.join(fp.readlines())mac = re.findall(r'(?:[0-9a-fA-F]{2}:){5}(?:[0-9a-fA-F]{2})',txtinfo)print('\n'.join(mac))COPY
TOP