This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathPDSuiteInstaller.sh
86 lines (60 loc) · 2.65 KB
/
PDSuiteInstaller.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env bash
printf "I love\n"
printf " _ _\n"
printf "|_) ._ _ o _ _ _|_ | \ o _ _ _ _ ._ \n"
printf "| | (_) | (/_ (_ |_ |_/ | _> (_ (_) \/ (/_ | \/ \n"
printf " _| /\n"
printf "by @machevalia\n"
read -n 1 -p "What shell are you using? zsh or bash? (z/b) " opt;
if [[ "$opt" == *"z"* ]]; then
shell=.zshrc
elif [[ "$opt" == *"b"* ]]; then
shell=.bashrc
fi
printf "\n\n"
printf "Shell is now equal to $shell\n\n"
if [ `whoami` != root ]; then
echo Please run this script as root or using sudo
exit
fi
#Install golang:
version=$(curl -L -s https://golang.org/VERSION?m=text)
printf "Installing/Updating Golang\n\n"
if [[ $(eval type go $DEBUG_ERROR | grep -o 'go is') == "go is" ]] && [ "$version" = $(go version | cut -d " " -f3) ]
then
printf "Golang is already installed and updated\n\n"
else
eval wget https://dl.google.com/go/${version}.linux-amd64.tar.gz
eval tar -C /usr/local -xzf ${version}.linux-amd64.tar.gz
fi
eval ln -sf /usr/local/go/bin/go /usr/local/bin/
rm -rf $version*
cat << EOF >> ~/${profile_shell}/$shell
# Golang vars
export GOROOT=/usr/local/go
export GOPATH=\$HOME/go
export PATH=\$GOPATH/bin:\$GOROOT/bin:\$HOME/.local/bin:\$PATH
EOF
#Installing PD Tools
printf "Installing Nuclei\n\n"
go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest > /dev/null
printf "Installing Subfinder\n\n"
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest > /dev/null
printf "Installing Naabu\n\n"
sudo apt install -y libpcap-dev >/dev/null 2>&1
go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest > /dev/null
printf "Installing Interactsh\n\n"
go install -v github.com/projectdiscovery/interactsh/cmd/interactsh-client@latest > /dev/null
printf "Installing Httpx\n\n"
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest > /dev/null
printf "Installing Dnsx\n\n"
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest > /dev/null
printf "Installing ShuffleDNS\n\n"
go install -v github.com/projectdiscovery/shuffledns/cmd/shuffledns@latest > /dev/null
printf "Installing notify\n\n"
go install -v github.com/projectdiscovery/notify/cmd/notify@latest > /dev/null
printf "Installing mapcidr\n\n"
go install -v github.com/projectdiscovery/mapcidr/cmd/mapcidr@latest > /dev/null
printf "Installing uncover\n\n"
go install -v github.com/projectdiscovery/uncover/cmd/uncover@latest > /dev/null
printf "Done installing.\n\nRun 'source ~/.zshrc' or 'source ~/.bashrc' to pick up your new Golang environmental variables if needed. Enjoy!"