Last active
March 7, 2023 22:11
-
-
Save six2dez/09588ab19ac6b360071fe56dd7a41e11 to your computer and use it in GitHub Desktop.
vps_installer.sh
This file contains 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 | |
# Install with | |
# bash -c "$(curl -fsSL https://gist.github.com/six2dez/09588ab19ac6b360071fe56dd7a41e11/raw)" | |
dir=~/Tools | |
mkdir -p $dir | |
DEBUG_STD="&>/dev/null" | |
DEBUG_ERROR="2>/dev/null" | |
bred='\033[1;31m' | |
bblue='\033[1;34m' | |
bgreen='\033[1;32m' | |
yellow='\033[0;33m' | |
red='\033[0;31m' | |
blue='\033[0;34m' | |
green='\033[0;32m' | |
reset='\033[0m' | |
profile_shell=".$(basename $(echo $SHELL))rc" | |
declare -A gotools | |
gotools["qsreplace"]="go get -v github.com/tomnomnom/qsreplace" | |
gotools["Amass"]="GO111MODULE=on go get -v github.com/OWASP/Amass/v3/..." | |
gotools["ffuf"]="go get -u github.com/ffuf/ffuf" | |
gotools["assetfinder"]="go get -v github.com/tomnomnom/assetfinder" | |
gotools["waybackurls"]="go get -v github.com/tomnomnom/hacks/waybackurls" | |
gotools["nuclei"]="GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei" | |
gotools["anew"]="go get -v github.com/tomnomnom/anew" | |
gotools["unfurl"]="go get -v github.com/tomnomnom/unfurl" | |
gotools["httpx"]="GO111MODULE=on go get -v github.com/projectdiscovery/httpx/cmd/httpx" | |
gotools["dnsx"]="GO111MODULE=on go get -v github.com/projectdiscovery/dnsx/cmd/dnsx" | |
gotools["subfinder"]="GO111MODULE=on go get -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder" | |
gotools["gau"]="go get -v github.com/lc/gau" | |
gotools["shuffledns"]="GO111MODULE=on go get -v github.com/projectdiscovery/shuffledns/cmd/shuffledns" | |
gotools["gospider"]="go get -u github.com/jaeles-project/gospider" | |
declare -A repos | |
repos["dnsvalidator"]="vortexau/dnsvalidator" | |
repos["dnsrecon"]="darkoperator/dnsrecon" | |
repos["dnsgen"]="ProjectAnte/dnsgen" | |
repos["massdns"]="blechschmidt/massdns" | |
repos["GitDorker"]="obheda12/GitDorker" | |
repos["S3Scanner"]="sa7mon/S3Scanner" | |
repos["puredns"]="d3mondev/puredns" | |
printf "\n\n${bgreen}#######################################################################${reset}\n" | |
printf "${bgreen} VPS installer ${reset}\n\n" | |
printf "${yellow} This may take time. So, go to grab a coffee! ${reset}\n\n" | |
install_apt(){ | |
eval apt install python3 python3-pip git curl libpcap-dev wget python3-dev dnsutils build-essential nmap jq python3-shodan apt-transport-https tmux medusa -y $DEBUG_STD | |
} | |
printf "${bblue} Running: Installing system packages ${reset}\n\n" | |
apt update | |
install_apt | |
# Installing latest Golang version | |
version=go1.15.10 | |
printf "${bblue} Running: Installing/Updating Golang ${reset}\n\n" | |
eval wget https://dl.google.com/go/${version}.linux-amd64.tar.gz $DEBUG_STD | |
eval $SUDO tar -C /usr/local -xzf ${version}.linux-amd64.tar.gz $DEBUG_STD | |
eval $SUDO cp /usr/local/go/bin/go /usr/bin | |
rm -rf go$LATEST_GO* | |
export GOROOT=/usr/local/go | |
export GOPATH=$HOME/go | |
export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH | |
cat << EOF >> ~/${profile_shell} | |
# Golang vars | |
export GOROOT=/usr/local/go | |
export GOPATH=\$HOME/go | |
export PATH=\$GOPATH/bin:\$GOROOT/bin:\$HOME/.local/bin:\$PATH | |
EOF | |
printf "${bblue} Running: Installing Golang tools ${reset}\n\n" | |
for gotool in "${!gotools[@]}"; do | |
eval type -P $gotool $DEBUG_STD || { eval ${gotools[$gotool]} $DEBUG_STD; } | |
done | |
printf "${bblue} Running: Installing repositories ${reset}\n\n" | |
# Repos with special configs | |
eval git clone https://github.com/projectdiscovery/nuclei-templates ~/nuclei-templates $DEBUG_STD | |
eval nuclei -update-templates $DEBUG_STD | |
sed -i 's/^miscellaneous/#miscellaneous/' ~/nuclei-templates/.nuclei-ignore | |
eval git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git $dir/sqlmap $DEBUG_STD | |
# Standard repos installation | |
for repo in "${!repos[@]}"; do | |
eval cd $dir/$repo $DEBUG_STD || { eval git clone https://github.com/${repos[$repo]} $dir/$repo $DEBUG_STD && cd $dir/$repo; } | |
eval git pull $DEBUG_STD | |
if [ -s "requirements.txt" ]; then | |
eval $SUDO pip3 install -r requirements.txt $DEBUG_STD | |
fi | |
if [ -s "setup.py" ]; then | |
eval $SUDO python3 setup.py install $DEBUG_STD | |
fi | |
if [ "massdns" = "$repo" ]; then | |
eval make $DEBUG_STD && strip -s bin/massdns && eval $SUDO cp bin/massdns /usr/bin/ $DEBUG_ERROR | |
fi | |
cd $dir | |
done | |
eval wget -N -c https://github.com/codingo/DNSCewl/raw/master/DNScewl $DEBUG_STD | |
eval $SUDO mv DNScewl /usr/local/bin/DNScewl | |
eval subfinder $DEBUG_STD | |
printf "${bblue} Running: Downloading required files ${reset}\n\n" | |
## Downloads | |
eval wget -N -c https://s3.amazonaws.com/assetnote-wordlists/data/manual/best-dns-wordlist.txt $DEBUG_STD && cp best-dns-wordlist.txt subdomains_big.txt | |
eval wget -N -c -O subdomains.txt https://gist.github.com/six2dez/a307a04a222fab5a57466c51e1569acf/raw $DEBUG_STD | |
eval wget -N -c -O permutations_list.txt https://gist.github.com/six2dez/ffc2b14d283e8f8eff6ac83e20a3c4b4/raw $DEBUG_STD | |
eval wget -N -c https://raw.githubusercontent.com/six2dez/OneListForAll/main/onelistforallmicro.txt $DEBUG_STD && cp onelistforallmicro.txt fuzz_wordlist.txt | |
## Stripping all Go binaries | |
eval strip -s $HOME/go/bin/* $DEBUG_STD | |
## Adding tmux config | |
cd $HOME | |
eval git clone https://github.com/gpakosz/.tmux.git $DEBUG_STD | |
ln -s -f .tmux/.tmux.conf | |
cp .tmux/.tmux.conf.local . | |
source ~/.bashrc | |
printf "${bgreen} Finished!${reset}\n\n" | |
printf "\n\n${bgreen}#######################################################################${reset}\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment