-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathupdater.sh
65 lines (60 loc) · 2.79 KB
/
updater.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
#!/bin/sh
# If you update this from Windows, using Notepad ++, do the following:
# sudo apt-get -y install dos2unix
# dos2unix <FILE>
# chmod u+x <FILE>
#
clear
echo "
_____ _ _ _ _
| |___ ___ ___| |_ ___ _| | | |_ _ _ |_|
| --| _| -_| .'| _| -_| . | | . | | | _
|_____|_| |___|__,|_| |___|___| |___|_ | |_|
|___|
_____ _ _ _ _ _____ __ _____
| | |_ ___|_|___| |_ ___ ___| |_ ___ ___ | |__| | | __|___ ___ _ _
| --| | _| |_ -| _| . | . | | -_| _| | | | | | | | | | _| .'| | |
|_____|_|_|_| |_|___|_| |___| _|_|_|___|_| |_|_|_|_____| |_____|_| |__,|_ |
|_| |___|
\r\n \r\n
Version: 0.5.4 \r\n
Last Updated: 6/24/2017
\r\n \r\n
Updating system first..."
sudo apt-get update
wait
sudo apt-get upgrade -y
wait
#--------------------------------------------------------------------------------------------
if [ -s "getSources.py" ]
then
echo "Deleting old files!!!"
rm updater.sh
rm collector.py
rm getSources.py
rm func_REST.py
rm client.html
rm client_submissions.html
rm config.json.new
fi
#------------------------------
echo "\n\n\n\n"
echo "Downloading latest versions to all files ... \n\n\n\n"
sudo wget -O updater.sh "https://raw.githubusercontent.com/c2theg/DDoS_Information_Sharing/master/updater.sh"
sudo wget -O func_REST.py "https://raw.githubusercontent.com/c2theg/DDoS_Information_Sharing/master/func_REST.py"
sudo wget -O func_common.py "https://raw.githubusercontent.com/c2theg/DDoS_Information_Sharing/master/func_common.py"
sudo wget -O collector.py "https://raw.githubusercontent.com/c2theg/DDoS_Information_Sharing/master/collector.py"
sudo wget -O getSources.py "https://raw.githubusercontent.com/c2theg/DDoS_Information_Sharing/master/getSources.py"
sudo wget -O config.json.new "https://raw.githubusercontent.com/c2theg/DDoS_Information_Sharing/master/config.json"
sudo wget -0 client.html "https://raw.githubusercontent.com/c2theg/DDoS_Information_Sharing/master/client.html"
sudo wget -0 client_submissions.html "https://raw.githubusercontent.com/c2theg/DDoS_Information_Sharing/master/client_submissions.html"
wait
echo "\n\n\n Done... \n\n"
#----- Update priv. -----------
chmod u+x updater.sh
chmod u+x collector.py
chmod u+x getSources.py
chmod u+x func_REST.py
#------------------------------
echo "Done! \r\n \r\n"
python2 ./collector.py -c config.json