Skip to content

Commit dd1a8cd

Browse files
committed
Added setup.sh install script
1 parent cde8458 commit dd1a8cd

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

setup.sh

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/bin/bash
2+
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."
3+
echo "It is EXPERIMENTAL and messes with your system. Use at your own risk!!!"
4+
echo "As far as installing Metasploit, you're on your own."
5+
echo "Before we start, are you root? If not, this won't work."
6+
echo -n "Continue (y/n)? "
7+
8+
read doIt
9+
10+
if [ "$doIt" = "y" ] || [ "$doIt" = "Y" ]; then
11+
echo "You've been warned..."
12+
13+
if [ -f /etc/debian_version ]; then
14+
echo "Debian-ish OS detected. using apt-get to install pip."
15+
apt-get --force-yes install python-pip
16+
pip install pymongo
17+
pip install gridfs
18+
pip install ipcalc
19+
pip install hashlib
20+
pip install json
21+
pip install httplib2
22+
pip install urllib
23+
pip install hashlib
24+
25+
echo "All done. Check output for errors. Have fun!"
26+
27+
elif [ -f /etc/redhat-release ]; then
28+
echo "Red Hat-ish OS detected. using yum to install pip."
29+
vernum=$(rpm -qa \*-release | grep -Ei "oracle|redhat|centos" | cut -d"-" -f3)
30+
31+
if [ "$vernum" = "6" ];then
32+
33+
echo "version 6 detected. Enabling repos."
34+
cd /tmp
35+
wget http://mirror-fpt-telecom.fpt.net/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
36+
rpm -ivh epel-release-6-8.noarch.rpm
37+
yum -y install python-pip
38+
pip install pymongo
39+
pip install gridfs
40+
pip install ipcalc
41+
pip install hashlib
42+
pip install json
43+
pip install httplib2
44+
pip install urllib
45+
pip install hashlib
46+
47+
echo "All done. Check output for errors. Have fun!"
48+
49+
50+
51+
52+
elif [ "$vernum" = "5" ];then
53+
echo "version 5 detected. Enabling repos."
54+
cd /tmp
55+
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
56+
rpm -ivh epel-release-5-4.noarch.rpm
57+
yum -y install python-pip
58+
pip install pymongo
59+
pip install gridfs
60+
pip install ipcalc
61+
pip install hashlib
62+
pip install json
63+
pip install httplib2
64+
pip install urllib
65+
pip install hashlib
66+
67+
echo "All done. Check output for errors. Have fun!"
68+
69+
fi
70+
71+
fi
72+
fi
73+
74+
75+
exit 1
76+

0 commit comments

Comments
 (0)