构造vlan报文

#!/usr/bin/python 
from scapy.all import *

packet = Ether(src='dc:99:14:01:a3:5e', dst='ff:ff:ff:ff:ff:ff', type=0x8100) / \
Dot1Q(vlan=1) / \
ARP(op="who-has", psrc='1.1.1.1', pdst='1.1.1.1')

sendp(packet, inter=0, count=10, iface='eth1')

 参考链接:https://scapy.readthedocs.io/en/latest/usage.html

posted @ 2020-04-10 17:17  salami_china  阅读(476)  评论(0编辑  收藏  举报