-
Notifications
You must be signed in to change notification settings - Fork 102
/
cronxfixed
63 lines (58 loc) · 1.94 KB
/
cronxfixed
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
#!/bin/bash
crontab -r
cat >/var/www/html/kill.sh <<ENDOFFILE
#!/bin/bash
#By Alireza
i=0
while [ 1i -lt 10 ]; do
cmd=(bbh '$1/fixer/multiuser')
echo cmd &
sleep 6
i=(( i + 1 ))
done
ENDOFFILE
wait
sudo sed -i 's/(bbh/$(curl -v -H "A: B"/' /var/www/html/kill.sh
wait
sudo sed -i 's/cmd/$cmd/' /var/www/html/kill.sh
wait
sudo sed -i 's/1i/$i/' /var/www/html/kill.sh
wait
sudo sed -i 's/((/$((/' /var/www/html/kill.sh
wait
chmod +x /var/www/html/kill.sh
cat >/var/www/html/other.sh <<ENDOFFILE
#!/bin/bash
#By Alireza
i=0
while [ 1i -lt 3 ]; do
cmd=(bbh '$1/fixer/other')
echo cmd &
sleep 17
i=(( i + 1 ))
done
ENDOFFILE
wait
sudo sed -i 's/(bbh/$(curl -v -H "A: B"/' /var/www/html/other.sh
wait
sudo sed -i 's/cmd/$cmd/' /var/www/html/other.sh
wait
sudo sed -i 's/1i/$i/' /var/www/html/other.sh
wait
sudo sed -i 's/((/$((/' /var/www/html/other.sh
wait
chmod +x /var/www/html/other.sh
wait
(crontab -l | grep . ; echo -e "* * * * * /var/www/html/kill.sh") | crontab -
(crontab -l | grep . ; echo -e "* * * * * /var/www/html/other.sh") | crontab -
(crontab -l | grep . ; echo -e "0 */1 * * * /var/www/html/killlog.sh") | crontab -
(crontab -l ; echo "* * * * * wget -q -O /dev/null '$1/fixer/exp' > /dev/null 2>&1") | crontab -
(crontab -l ; echo "0 * * * * wget -q -O /dev/null '$1/fixer/checkhurly' > /dev/null 2>&1") | crontab -
(crontab -l ; echo "*/10 * * * * wget -q -O /dev/null '$1/fixer/checktraffic' > /dev/null 2>&1") | crontab -
(crontab -l ; echo "*/15 * * * * wget -q -O /dev/null '$1/fixer/checkfilter' > /dev/null 2>&1") | crontab -
(crontab -l ; echo "0 0 * * * wget -q -O /dev/null '$1/fixer/send/email/3day' > /dev/null 2>&1") | crontab -
(crontab -l ; echo "0 0 * * * wget -q -O /dev/null '$1/fixer/send/email/24h' > /dev/null 2>&1") | crontab -
if dpkg -l | grep -q dropbear; then
(crontab -l | grep . ; echo -e "* * * * * /var/www/html/dropbear.sh") | crontab -
fi
sudo systemctl restart crontab