blob: 9c856cd1dcccd279607435dfa338befa05fc584e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/python
import os
import sys
if os.getuid() !=0:
print """
ERROR: This script requires root privileges.
Use 'sudo' to run it.
"""
quit()
from scapy.all import *
try:
ip_dst = sys.argv[1]
except:
ip_dst = "192.168.2.2"
print "Sending IP packet to", ip_dst
p = (Ether(dst="00:00:02:00:00:02", src="00:00:01:00:00:01")/
IP(src="10.10.18.13", dst=ip_dst)/
TCP(sport=1,dport=17,flags="FA")/
"This is a test")
sendp(p, iface="veth1")
|