forked from decrypthash/coretools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
59 lines (50 loc) · 1.44 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
#!/usr/bin/env bash
# Author: m8r0wn
# Script: setup.sh
# Description:
# pentest-scripts setup verifies all required packages
# are installed on the system.
#Check if Script run as root
if [[ $(id -u) != 0 ]]; then
echo -e "\n[!] Setup script needs to run as root\n\n"
exit 0
fi
echo -e "\n[*] Starting pentest-scripts setup"
echo -e "[*] Checking for Python 2.7"
if [[ $(python2.7 -V 2>&1) == *"not found"* ]]
then
echo -e "[*] Installing Python 2.7"
apt-get install python2.7 -y
else
echo "[+] Python 2.7 installed"
fi
echo -e "[*] Checking for non-standard libraries"
if [[ $(python2.7 -c "import BeautifulSoup" 2>&1) == *"No module"* ]]
then
echo -e "[*] Installing python-beautifulsoup"
apt-get install python-beautifulsoup -y
else
echo "[+] BeautifulSoup installed"
fi
if [[ $(python2.7 -c "import dns.resolver" 2>&1) == *"No module"* ]]
then
echo -e "[*] Installing python-dnspython"
apt-get install python-dnspython -y
else
echo "[+] dnspython installed"
fi
if [[ $(python2.7 -c "import paramiko" 2>&1) == *"No module"* ]]
then
echo -e "[*] Installing python-paramiko"
apt-get install python-paramiko -y
else
echo "[+] Paramiko installed"
fi
if [[ $(python2.7 -c "from smb.SMBConnection import SMBConnection" 2>&1) == *"No module"* ]]
then
echo -e "[*] Installing python-smb"
apt-get install python-smb -y
else
echo "[+] pysmb installed"
fi
echo -e "\n[*] pentest-scripts setup complete\n\n"