python-pcap模块解析mac地址 2015/06/25 15226 import pcap import binascii a = pcap.pcap() a.setfilter('arp') for i,j in a: if binascii.hexlify(j[21])=="02": print 'Mac Reply!' for index in range(len(j)): if index>=22 and index<=27: print binascii.hexlify(j[index])+":" print "Over" break