forked from codingo/NoSQLMap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·76 lines (58 loc) · 2.25 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
#!/bin/bash
echo "This setup script will install pip and use it to load the necessary Python dependencies for NoSQLMap on Red Hat and Debian based systems."
echo "It is EXPERIMENTAL and messes with your system. Use at your own risk!!!"
echo "As far as installing Metasploit, you're on your own."
echo "Before we start, are you root? If not, this won't work."
echo -n "Continue (y/n)? "
read doIt
if [ "$doIt" = "y" ] || [ "$doIt" = "Y" ]; then
echo "You've been warned..."
if [ -f /etc/debian_version ]; then
echo "Debian-ish OS detected. using apt-get to install pip."
apt-get --force-yes install python-pip
pip install pymongo
pip install gridfs
pip install ipcalc
pip install hashlib
pip install json
pip install httplib2
pip install urllib
pip install hashlib
echo "All done. Check output for errors. Have fun!"
elif [ -f /etc/redhat-release ]; then
echo "Red Hat-ish OS detected. using yum to install pip."
vernum=$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos" | cut -d"-" -f3)
if [ "$vernum" = "6" ];then
echo "version 6 detected. Enabling repos."
cd /tmp
wget http://mirror-fpt-telecom.fpt.net/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum -y install python-pip
pip install pymongo
pip install gridfs
pip install ipcalc
pip install hashlib
pip install json
pip install httplib2
pip install urllib
pip install hashlib
echo "All done. Check output for errors. Have fun!"
elif [ "$vernum" = "5" ];then
echo "version 5 detected. Enabling repos."
cd /tmp
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
yum -y install python-pip
pip install pymongo
pip install gridfs
pip install ipcalc
pip install hashlib
pip install json
pip install httplib2
pip install urllib
pip install hashlib
echo "All done. Check output for errors. Have fun!"
fi
fi
fi
exit 1