构造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

原文地址:https://www.cnblogs.com/wangjq19920210/p/12674702.html