-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
114 lines (100 loc) · 2.52 KB
/
setup.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
#
#Installación de los distintos complementos necesarios para el correcto funcionamiento
#De la herramienta.
#
#
if [[ $EUID != 0 ]] ; then
echo " "
echo "$(tput setaf 6)[$(tput setaf 1)!$(tput setaf 6)]Debe de usarse con root[$(tput setaf 1)!$(tput setaf 6)]"
echo " "
exit
fi
echo " "
echo "$(tput setaf 6)[$(tput setaf 1)+$(tput setaf 6)]Installing Web-Scanner..."
system=$(cat /etc/os-release | grep '^NAME=' | awk '{print $1}' FS=' ' | awk '{print $2}' FS='"')
programs=(cmseek html2text whatweb nmap gobuster whiptail)
echo "$(tput setaf 2)"
apt update -y &> /dev/null
echo ""
echo "--> updated."
if [ "$system" != "Parrot" ]; then
apt full-upgrade -y &> /dev/null
else
parrot-upgrade &>/dev/null
fi
echo " "
echo "--> upgraded."
if [ "$system" == "Parrot" ]; then
for program in "${programs[@]}"; do
which $program &>/dev/null
if [ "$(echo $?)" == "1" ]; then
echo "\n--> ${program}."
apt install "$program" -y &>/dev/null
fi
done
which theHarvester &>/dev/null
if [ "$(echo $?)" == "1" ];then
echo "\n--> theHarvester."
fi
fi
if [ "$system" == "Kali" ]; then
for program in "${programs[@]}"; do
which $program &>/dev/null
if [ "$(echo $?)" == "1" ]; then
echo "\n--> ${program}."
apt install "$program" -y &>/dev/null
fi
done
which theHarvester &>/dev/null
if [ "$(echo $?)" == "1" ];then
echo "\n--> theHarvester."
fi
fi
if [ "$system" == "Arch" ]; then
for program in "${programs[@]}"; do
which $program &>/dev/null
if [ "$(echo $?)" == "1" ]; then
echo "\n--> ${program}."
pacman -S "$program" --noconfirm &>/dev/null
fi
done
which theHarvester &>/dev/null
if [ "$(echo $?)" == "1" ];then
echo "\n--> theHarvester."
fi
fi
if [ "$system" == "Ubuntu" ]; then
for program in "${programs[@]}"; do
which $program &>/dev/null
if [ "$(echo $?)" == "1" ]; then
echo "\n--> ${program}."
apt install "$program" -y &>/dev/null
fi
done
which theHarvester &>/dev/null
if [ "$(echo $?)" == "1" ];then
echo "\n--> theHarvester."
fi
fi
cp Web-Scanner /usr/bin 2>/dev/null
chmod +x Web-Scanner 2>/dev/null
chmod +x /usr/bin/Web-Scanner 2>/dev/null
echo " "
echo "--> Web-Scanner."
chmod +x Web-Scanner-GUI
echo " "
echo "--> Web-Scanner-GUI. (No se guarda en sistema, hacer manualmente.)"
chmod +x extractports
cp extractports /usr/bin/
echo " "
echo "--> extractports."
chmod +x ipsint
cp ipsint /usr/bin/
echo " "
echo "--> ipsint."
echo " "
echo " "
echo "$(tput setaf 6)[$(tput setaf 1)-$(tput setaf 6)]Completado."
echo " "
rm setup.sh 2>/dev/null