Created
July 18, 2020 19:14
-
-
Save h3mantD/21602a38f10ceb75b6b39a3751f15b0a to your computer and use it in GitHub Desktop.
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 | |
# Color | |
red='\e[31m' | |
green='\e[32m' | |
blue='\e[34m' | |
white='\e[97m' | |
echo "*** setting up a environment for running a tool ***" | |
if [ ! `command -v python3` ]; then | |
sudo apt install python3 | |
fi | |
if [ ! `command -v pip` ]; then | |
sudo apt install python3-pip | |
sudo apt install python-pip | |
fi | |
if [ ! `command -v django-admin`]; then | |
sudo apt-get install python3-pip | |
sudo pip3 install Django | |
fi | |
main_dir=~/reconData | |
tools=~/tools | |
if [ ! -d "$main_dir" ]; then | |
mkdir $main_dir | |
fi | |
if [ ! -d "$tools" ]; then | |
mkdir $tools | |
else | |
echo "all set to go" | |
fi | |
cd $tools | |
sudo apt-get install -y snapd | |
sudo systemctl start snap | |
echo 'PATH=$PATH:/snap/bin' >> ~/.bashrc | |
if [[ -z "$GOPATH" ]];then | |
echo "It looks like go is not installed, would you like to install it now" | |
PS3="Please select an option : " | |
choices=("yes" "no") | |
select choice in "${choices[@]}"; do | |
case $choice in | |
yes) | |
echo "Installing Golang" | |
wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz | |
sudo tar -xvf go1.13.4.linux-amd64.tar.gz | |
sudo mv go /usr/local | |
export GOROOT=/usr/local/go | |
export GOPATH=$HOME/go | |
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH | |
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc | |
echo 'export GOPATH=$HOME/go' >> ~/.bashrc | |
echo 'export PATH=$GOPATH/bin:$GOROOT/bin:$PATH' >> ~/.bashrc | |
source ~/.bashrc | |
sleep 1 | |
break | |
;; | |
no) | |
echo "Please install go and rerun this script" | |
echo "Aborting installation..." | |
exit 1 | |
;; | |
esac | |
done | |
fi | |
if [ ! -f ~/go/bin/hakcheckurl ];then | |
# [hakcheckurl] | |
echo -e "\n${red}[+]${green}Install hakcheckurl " | |
go get github.com/hakluke/hakcheckurl | |
echo -e "${red}[+] Done Install hakcheckurl " | |
fi | |
if [ ! -f ~/go/bin/hakrawler ];then | |
# [hakrawler] | |
echo -e "\n${red}[+]${green}Install hakrawler " | |
go get github.com/hakluke/hakrawler | |
echo -e "${red}[+] Done Install hakrawler " | |
fi | |
if [ ! -f ~/go/bin/waybackurls ];then | |
# [Waybackurls] | |
echo -e "\n${red}[+]${green}Install Waybackurls " | |
go get github.com/tomnomnom/waybackurls | |
echo -e "${red}[+] Done Install Waybackurls " | |
fi | |
if [ ! -f ~/go/bin/gau ];then | |
# [ Gau] | |
echo -e "\n${red}[+]${green}Install Gau " | |
go get -u github.com/lc/gau | |
echo -e "${red}[+] Done Install Gau " | |
fi | |
if [ ! -f ~/go/bin/assetfinder ];then | |
# [ Assetfinder] | |
echo -e "\n${red}[+]${green}Install Assetfinder " | |
go get -u github.com/tomnomnom/assetfinder | |
echo -e "${red}[+] Done Install Assetfinder " | |
fi | |
if [ ! -f ~/go/bin/httprobe ];then | |
# [Httprobe] | |
echo -e "\n${red}[+]${green}Install Httprobe " | |
go get -u github.com/tomnomnom/httprobe | |
echo -e "${red}[+] Done Install Httprobe " | |
fi | |
if [ ! -f ~/go/bin/ffuf ];then | |
# [ffuf] | |
echo -e "\n${red}[+]${green}Install ffuf " | |
go get github.com/ffuf/ffuf | |
echo -e "${red}[+] Done Install ffuf " | |
fi | |
if [ ! -f ~/go/bin/subfinder ];then | |
# [subfinder] | |
echo -e "\n${red}[+]${green}Install subfinder " | |
go get -v github.com/projectdiscovery/subfinder/cmd/subfinder | |
echo -e "${red}[+] Done Install subfinder" | |
fi | |
if [ ! -f ~/go/bin/CORS-Scanner ];then | |
# [cors] | |
echo -e "\n${red}[+]${green}Install CORS-Scanner " | |
go get -u github.com/Tanmay-N/CORS-Scanner | |
echo -e "${red}[+] Done Install CORS-Scanner" | |
fi | |
if [ ! -f ~/go/bin/gf ];then | |
# [gf] | |
echo -e "\n${red}[+]${green}Install gf " | |
go get -u github.com/tomnomnom/gf | |
echo 'source $GOPATH/src/github.com/tomnomnom/gf/gf-completion.bash' >> ~/.bashrc | |
echo 'source $GOPATH/src/github.com/tomnomnom/gf/gf-completion.zsh' >> ~/.zshrc | |
cp -r $GOPATH/src/github.com/tomnomnom/gf/examples ~/.gf | |
echo -e "${red}[+] Done Install gf" | |
fi | |
if [ ! -d ~/.gf/ ];then | |
echo -e "\n${red}[+]${green}Install Gf-Patterns" | |
git clone https://github.com/1ndianl33t/Gf-Patterns | |
mv Gf-Patterns/*.json ~/.gf | |
cp *.json ~/.gf | |
rm -rf Gf-Patterns | |
echo -e "${red}[+] Done Install Gf-Patterns" | |
fi | |
if [ ! -f ~/go/bin/httpx ];then | |
echo -e "\n${red}[+]${green}Install httpx" | |
GO111MODULE=on go get -u -v github.com/projectdiscovery/httpx/cmd/httpx | |
echo -e "${red}[+] Done Install httpxs" | |
fi | |
if [ ! -f /usr/bin/jq ];then | |
echo -e "\n${red}[+]${green}Install jq" | |
sudo apt install jq -y | |
echo -e "${red}[+] Done Install jq" | |
fi | |
if [ ! `command -v aquatone` ]; then | |
echo -e "\n${red}[+]${green}Install aquatone" | |
go get github.com/michenriksen/aquatone | |
echo -e "${red}[+] Done Install aquatone" | |
fi | |
if [ ! `command -v sublist3r` ]; then | |
echo -e "\n${red}[+]${green}Install sublist3r" | |
git clone https://github.com/aboul3la/Sublist3r.git | |
cd Sublist3r* | |
pip install -r requirements.txt | |
sudo python setup.py install | |
cd $tools | |
echo -e "${red}[+] Done Install sublist3r" | |
fi | |
if [ ! `command -v nuclei` ]; then | |
echo -e "\n${red}[+]${green}Install nuclei" | |
GO111MODULE=on go get -u -v github.com/projectdiscovery/nuclei/cmd/nuclei | |
git clone https://github.com/projectdiscovery/nuclei-templates.git | |
echo -e "${red}[+] Done Install nuclei" | |
fi | |
if [ ! -e "$tools/dirsearch" ]; then | |
echo -e "\n${red}[+]${green}Install dirsearch" | |
git clone https://github.com/maurosoria/dirsearch.git | |
echo -e "${red}[+] Done Install dirsearch" | |
fi | |
if [ ! -e "$tools/findomain" ]; then | |
echo -e "\n${red}[+]${green}Install findomain" | |
git clone https://github.com/Edu4rdSHL/findomain.git | |
echo -e "${red}[+] Done Install findomain" | |
fi | |
if [ ! `command -v nmap` ]; then | |
echo -e "\n${red}[+]${green}Install nmap" | |
sudo apt-get install -y nmap | |
echo -e "${red}[+] Done Install nmap" | |
fi | |
if [ ! -e "$tools/smuggler.py" ]; then | |
echo -e "\n${red}[+]${green}Install smuggler.py" | |
wget https://raw.githubusercontent.com/gwen001/pentest-tools/master/smuggler.py | |
echo -e "${red}[+] Done Install smuggler.py" | |
fi | |
if [ ! `command -v amass` ]; then | |
echo -e "\n${red}[+]${green}Install amsaa" | |
go get -v -u github.com/OWASP/Amass/v3/... | |
cd $GOPATH/src/github.com/OWASP/Amass | |
go install ./... | |
echo -e "${red}[+] Done Install amass" | |
fi | |
if [ ! `command -v subfinder` ]; then | |
echo -e "\n${red}[+]${green}Install subfinder" | |
go get -v github.com/projectdiscovery/subfinder/cmd/subfinder | |
echo -e "${red}[+] Done Install subfinder" | |
fi | |
if [ ! `command -v altdns` ]; then | |
echo -e "\n${red}[+]${green}Install altdns" | |
pip3 install py-altdns | |
echo -e "${red}[+] Done Install altdns" | |
fi | |
if [ ! `command -v concurl` ]; then | |
echo -e "\n${red}[+]${green}Install concurl" | |
go get -u github.com/tomnomnom/concurl | |
echo -e "${red}[+] Done Install concurl" | |
fi | |
if [ ! `command -v antiburl` ]; then | |
echo -e "\n${red}[+]${green}Install antiburl" | |
git clone https://github.com/tomnomnom/hacks.git | |
cd hacks/anti-burl | |
go build main.go | |
mv main antiburl | |
sudo cp antiburl /usr/bin/ | |
cd $tools | |
echo -e "${red}[+] Done Install antiburl" | |
fi | |
if [ ! `command -v subjs` ]; then | |
echo -e "\n${red}[+]${green}Install subjs" | |
GO111MODULE=on go get -u -v github.com/lc/subjs | |
echo -e "${red}[+] Done Install subjs" | |
fi | |
if [ ! -e "$tools/LinkFinder" ]; then | |
echo -e "\n${red}[+]${green}Install LinkFinder" | |
git clone https://github.com/GerbenJavado/LinkFinder.git | |
echo -e "${red}[+] Done Install LinkFinder" | |
fi | |
if [ ! -e "$tools/relative-url-extractor" ]; then | |
echo -e "\n${red}[+]${green}Install relative-url-extractor" | |
git clone https://github.com/jobertabma/relative-url-extractor.git | |
echo -e "${red}[+] Done Install relative-url-extractor" | |
fi | |
if [ ! -e "$tools/Corsy" ]; then | |
echo -e "\n${red}[+]${green}Install Corsy" | |
git clone https://github.com/s0md3v/Corsy.git | |
cd Corsy | |
pip3 install -r requirments.txt | |
cd .. | |
echo -e "${red}[+] Done Install Corsy" | |
fi | |
if [ `command -v whatweb` ]; then | |
echo -e "\n${red}[+]${green}Install whatweb" | |
sudo apt install whatweb | |
echo -e "${red}[+] Done Install whatweb" | |
fi | |
if [ -e "$tools/massdns" ]; then | |
echo -e "\n${red}[+]${green}Install massdns" | |
git clone https://github.com/blechschmidt/massdns.git | |
cd massdns | |
make | |
cd .. | |
echo -e "${red}[+] Done Install massdns" | |
fi | |
else | |
echo -e "${green}\n[+] Donee Check Module.\n" | |
fi | |
echo "installing your scripts" | |
git clone https://github.com/venom26/recon.git | |
echo "done" | |
echo "Creating Wordlist" | |
cd $tools/dirsearch/db/ | |
wget https://raw.githubusercontent.com/assetnote/commonspeak2-wordlists/master/wordswithext/php.txt | |
wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/raft-large-files.txt | |
wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/raft-large-directories.txt | |
wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/Web-Content/spring-boot.txt | |
cd $tools | |
cd $tools | |
wget https://raw.githubusercontent.com/gwen001/github-search/master/github-endpoints.py | |
wget https://raw.githubusercontent.com/gwen001/github-search/master/github-subdomains.py | |
cd $GOPATH/bin | |
cp * /usr/bin/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment