#!/usr/bin/python import sys from scapy.all import * import time iface="eth0" if len(sys.argv)>=2: iface=sys.argv[1] while(1): packet=Ether(src=RandMAC("*:*:*:*:*:*"), dst=RandMAC("*:*:*:*:*:*")) / \ IP(src=RandIP("*.*.*.*"), dst=RandIP("*.*.*.*")) / \ ICMP() time.sleep(0.5) sendp(packet,iface=iface,loop=0)
这代码效率太低了,有没有提升的办法
|