构造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')
#!/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')