Last active
August 10, 2022 00:52
-
-
Save subfission/2a82addd4c63190e4ce392d6c430bd3e to your computer and use it in GitHub Desktop.
init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# init.sh | |
# This script is meant to setup the environment for testing. | |
if [ "$EUID" -ne 0 ]; then | |
echo "This must be run as root" | |
exit | |
fi | |
INSTALLPATH="/opt/installers" | |
apt-get install -y golang jq wget curl git docker.io | |
systemctl enable docker --now | |
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest | |
echo "Updating Python Package Manager" | |
pip install --upgrade pip | |
echo "Installing ciphey" | |
python3 -m pip install ciphey --upgrade | |
echo "Installing Jython for Burp standalone" | |
wget https://repo1.maven.org/maven2/org/python/jython-standalone/2.7.2/jython-standalone-2.7.2.jar \ | |
-O /opt/jython-standalone-2.7.2.jar | |
echo "Install GoWitness" | |
wget https://github.com/sensepost/gowitness/releases/download/2.4.1/gowitness-2.4.1-linux-amd64 \ | |
-O "/opt/gowitness" \ | |
&& chmod +x /opt/gowitness \ | |
&& ln -s /opt/gowitness /usr/local/bin/gowitness | |
#---- Setup Installers { 3 phases } | |
# Phase 1 | |
# -------------------------- | |
mkdir "$INSTALLPATH" | |
# Phase 2 | |
# -------------------------- | |
curl -L 'https://portswigger-cdn.net/burp/releases/download?product=pro&version=2022.7.1&type=Linux' \ | |
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0' \ | |
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' \ | |
-H 'Referer: https://portswigger.net/' \ | |
-H 'Sec-Fetch-Dest: document' > "$INSTALLPATH/burpsuite_pro_linux_v2022_7_1.sh" | |
wget https://downloads.vivaldi.com/stable/vivaldi-stable_5.3.2679.73-1_amd64.deb \ | |
-O "$INSTALLPATH/vivaldi-stable_5.3.2679.73-1_amd64.deb" | |
wget https://discord.com/api/download?platform=linux&format=deb \ | |
-O "$INSTALLPATH/discord.deb" | |
cd /opt | |
git clone --depth=1 \ | |
https://github.com/gchq/CyberChef.git | |
git clone --depth=1 \ | |
https://github.com/swisskyrepo/PayloadsAllTheThings.git | |
git clone --depth 1 \ | |
https://github.com/danielmiessler/SecLists.git | |
git clone --depth 1 \ | |
https://github.com/yogeshojha/rengine && \ | |
chmod +x rengine/install.sh | |
# Phase 3 | |
# -------------------------- | |
chmod +x "$INSTALLPATH/*" | |
echo "Installing debian packages" | |
find $INSTALLPATH -name *.deb -exec dpkg -i {} \; | |
echo "Executing Shell Script Installers" | |
find $INSTALLPATH -name *.sh -exec bash {} \; | |
echo "Installing reNgine" | |
cd /opt/rengine && echo "Randomizing POSTGRES DB Password" | |
NEWPASS=`tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c16; echo` | |
sed -i "s/^\(POSTGRES_PASSWORD=\s*\).*\$/\1$NEWPASS/" .env | |
sed -i "s/^\(MAX_CONCURRENCY=\s*\).*\$/\110/" .env | |
unset NEWPASS | |
bash install.sh | |
echo "New Tools" | |
echo "+------------------+" | |
ls /opt | |
echo "+------------------+" | |
echo "init _cOmPlEtE_" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment