master-thesis/bin/send_packet.py
Nico Schottelius 9c205bc39e chmod u+x
2019-08-15 14:59:13 +02:00

21 lines
397 B
Python
Executable file

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