Empire/setup/install.sh

91 lines
2.3 KiB
Bash
Raw Normal View History

2015-08-05 18:36:39 +00:00
#!/bin/bash
2016-09-23 18:04:35 +00:00
if [[ $EUID -ne 0 ]]; then
echo " [!]This script must be run as root" 1>&2
exit 1
fi
IFS='/' read -a array <<< pwd
if [[ "$(pwd)" != *setup ]]
then
cd ./setup
fi
version=$( lsb_release -r | grep -oP "[0-9]+" | head -1 )
if lsb_release -d | grep -q "Fedora"; then
Release=Fedora
2017-02-27 02:00:58 +00:00
dnf install -y make g++ python-devel m2crypto python-m2ext swig python-iptools python3-iptools libxml2-devel default-jdk openssl-devel
2016-09-29 13:31:39 +00:00
pip install setuptools
pip install pycrypto
pip install iptools
pip install pydispatcher
pip install flask
2016-09-23 18:04:35 +00:00
pip install macholib
pip install dropbox
2016-10-17 21:58:32 +00:00
pip install pyopenssl
pip install pyinstaller
pip install zlib_wrapper
elif lsb_release -d | grep -q "Kali"; then
Release=Kali
2017-02-27 02:00:58 +00:00
apt-get install -y make g++ python-dev python-m2crypto swig libxml2-dev default-jdk libssl-dev
easy_install pip
2016-09-29 13:31:39 +00:00
pip install setuptools
pip install pycrypto
pip install iptools
pip install pydispatcher
pip install flask
2016-09-23 18:04:35 +00:00
pip install macholib
pip install dropbox
2016-10-17 21:58:32 +00:00
pip install pyopenssl
pip install pyinstaller
pip install zlib_wrapper
elif lsb_release -d | grep -q "Ubuntu"; then
Release=Ubuntu
2017-02-27 02:00:58 +00:00
apt-get install -y make g++ python-dev python-m2crypto swig libxml2-dev default-jdk libssl-dev
easy_install pip
2016-09-29 13:31:39 +00:00
pip install setuptools
pip install pycrypto
pip install iptools
pip install pydispatcher
pip install flask
2016-07-10 22:45:56 +00:00
pip install pyOpenSSL
2016-09-23 18:04:35 +00:00
pip install macholib
pip install dropbox
2016-10-17 21:58:32 +00:00
pip install pyopenssl
pip install pyinstaller
pip install zlib_wrapper
else
echo "Unknown distro - Debian/Ubuntu Fallback"
2017-02-27 02:00:58 +00:00
apt-get install -y make g++ python-dev python-m2crypto swig libxml2-dev default-jdk libffi-dev libssl-dev
easy_install pip
2016-09-29 13:31:39 +00:00
pip install setuptools
pip install pycrypto
pip install iptools
pip install pydispatcher
pip install flask
2016-09-23 18:04:35 +00:00
pip install macholib
pip install dropbox
2016-09-29 17:14:02 +00:00
pip install cryptography
2016-10-02 17:08:42 +00:00
pip install python-openssl
pip install pyinstaller
pip install zlib_wrapper
fi
2016-09-29 02:32:56 +00:00
tar -xvf ../data/misc/xar-1.5.2.tar.gz
(cd xar-1.5.2 && ./configure)
(cd xar-1.5.2 && make)
(cd xar-1.5.2 && make install)
git clone https://github.com/hogliux/bomutils.git
(cd bomutils && make)
(cd bomutils && make install)
chmod 755 bomutils/build/bin/mkbom && cp bomutils/build/bin/mkbom /usr/local/bin/mkbom
# set up the database schema
2015-08-05 18:36:39 +00:00
./setup_database.py
# generate a cert
./cert.sh
cd ..
echo -e '\n [*] Setup complete!\n'