forked from infobyte/faraday
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·66 lines (53 loc) · 1.71 KB
/
install.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
#!/bin/bash
###
## Faraday Penetration Test IDE
## Copyright (C) 2013 Infobyte LLC (http://www.infobytesec.com/)
## See the file 'doc/LICENSE' for the license information
###
#Check if is it root
if [ $EUID -ne 0 ]; then
echo "You must be root."
exit 1
fi
update=0
#os detection
arch=$(uname -m)
kernel=$(uname -r)
if [ -f /etc/lsb-release ]; then
if [ ! -f /usr/bin/lsb_release ] ; then
apt-get update
update=1
apt-get -y install lsb-release
fi
os=$(lsb_release -s -d)
elif [ -f /etc/debian_version ]; then
os="Debian $(cat /etc/debian_version)"
elif [ -f /etc/redhat-release ]; then
os=`cat /etc/redhat-release`
else
os="$(uname -s) $(uname -r)"
fi
echo "[+] Install $os $arch"
if [[ "$os" =~ "Debian 8".*|"stretch/sid".* ]]; then
#Check if user agree with change to experimental
read -r -p "We need change your debian to experimental - sid branch (If you are not). You agree?[Y/n] " input
case $input in
[nN][oO]|[nN])
echo "[!]Faraday install: Aborted"
echo "[!]You need agree the update to experimental - sid"
exit 1;;
esac
echo "deb http://ftp.debian.org/debian experimental main" >> /etc/apt/sources.list
echo "deb http://ftp.debian.org/debian sid main" >> /etc/apt/sources.list
apt-get update
update=1
fi
if [ "$update" -eq 0 ]; then
apt-get update
update=1
fi
for pkg in build-essential ipython python-setuptools python-pip python-dev libpq-dev libffi-dev couchdb gir1.2-gtk-3.0 gir1.2-vte-2.91 gir1.2-vte-2.90 python-gobject zsh curl; do
sudo apt-get install -y $pkg
done
pip2 install -r requirements.txt
echo "You can now run Faraday, enjoy!"