复制代码 代码如下:#!/usr/bin/env pythonimport socket
s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW)s.bind((“lo”, 0))
src_addr = “\x50\x3d\xe5\x0e\x35\x3f”dst_addr = “\xff\xff\xff\xff\xff\xff”ethertype = “\x08\x06”
s.send(dst_addr+src_addr+ethertype+”\x