add bin/ with test script for sending 1 packet
This commit is contained in:
parent
5e10401f96
commit
ead0276527
2 changed files with 51 additions and 1 deletions
21
bin/send_packet.py
Normal file
21
bin/send_packet.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
from scapy.all import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
iface = sys.argv[1]
|
||||
|
||||
e = Ether(src="02:53:55:42:45:01",
|
||||
dst='ff:ff:ff:ff:ff:ff')
|
||||
|
||||
i = IPv6(src = "2001:db8:42::1",
|
||||
dst = "2001:db8::2")
|
||||
|
||||
t = TCP(dport=80, sport=random.randint(49152,65535))
|
||||
|
||||
d = "A"
|
||||
|
||||
pkg = e / i / t / d
|
||||
|
||||
sendp(pkg, iface=iface, verbose=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue