-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_tools_mac.sh
131 lines (109 loc) · 3.97 KB
/
install_tools_mac.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/bin/bash
#
# install_tools_mac.sh
# --------------------
# This script installs the necessary reconnaissance tools on macOS
# using Homebrew and go install.
#
# Usage:
# chmod +x install_tools_mac.sh
# ./install_tools_mac.sh
#
set -e # Exit immediately if a command exits with a non-zero status.
echo "[*] Checking for Homebrew..."
if ! command -v brew &> /dev/null; then
echo "[!] Homebrew not found. Please install from https://brew.sh/ and re-run."
exit 1
fi
echo "[*] Checking for Go..."
if ! command -v go &> /dev/null; then
echo "[!] Go not found. Please install using 'brew install go' and re-run."
exit 1
fi
echo "[*] Updating Homebrew..."
brew update
echo "[*] Installing basic tools via Homebrew..."
brew install git wget curl python3 nmap jq nikto
# --------------------------------------------------
# Python environment check
# --------------------------------------------------
echo "[*] Ensuring Python 3 pip is installed..."
pip3 install --upgrade pip setuptools wheel
# --------------------------------------------------
# Install Recon Tools
# --------------------------------------------------
echo "[*] Installing Sublist3r..."
if ! command -v sublist3r &> /dev/null; then
# Clone Sublist3r to /opt and symlink
sudo mkdir -p /opt/Sublist3r
sudo git clone https://github.com/aboul3la/Sublist3r.git /opt/Sublist3r 2>/dev/null || true
sudo ln -sf /opt/Sublist3r/sublist3r.py /usr/local/bin/sublist3r
# Install Python dependencies
sudo pip3 install -r /opt/Sublist3r/requirements.txt
fi
echo "[*] Installing Assetfinder..."
if ! command -v assetfinder &> /dev/null; then
go install github.com/tomnomnom/assetfinder@latest
sudo cp ~/go/bin/assetfinder /usr/local/bin/assetfinder
fi
echo "[*] Installing Amass..."
if ! command -v amass &> /dev/null; then
brew install amass
fi
echo "[*] Installing Subfinder..."
if ! command -v subfinder &> /dev/null; then
go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
sudo cp ~/go/bin/subfinder /usr/local/bin/subfinder
fi
echo "[*] Installing httprobe..."
if ! command -v httprobe &> /dev/null; then
go install github.com/tomnomnom/httprobe@latest
sudo cp ~/go/bin/httprobe /usr/local/bin/httprobe
fi
echo "[*] Installing Gowitness..."
if ! command -v gowitness &> /dev/null; then
go install github.com/sensepost/gowitness@latest
sudo cp ~/go/bin/gowitness /usr/local/bin/gowitness
fi
echo "[*] Installing Dirsearch..."
# Homebrew doesn’t have a dirsearch formula by default, so we’ll clone it:
if [ ! -d "/opt/dirsearch" ]; then
sudo git clone https://github.com/maurosoria/dirsearch.git /opt/dirsearch
fi
sudo ln -sf /opt/dirsearch/dirsearch.py /usr/local/bin/dirsearch
echo "[*] Installing FFuf..."
if ! command -v ffuf &> /dev/null; then
brew install ffuf
fi
echo "[*] Installing Nuclei..."
if ! command -v nuclei &> /dev/null; then
go install github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest
sudo cp ~/go/bin/nuclei /usr/local/bin/nuclei
fi
echo "[*] Installing getJS..."
if ! command -v getJS &> /dev/null; then
go install github.com/003random/getJS@latest
sudo cp ~/go/bin/getJS /usr/local/bin/getJS
fi
echo "[*] Installing waybackurls..."
if ! command -v waybackurls &> /dev/null; then
go install github.com/tomnomnom/waybackurls@latest
sudo cp ~/go/bin/waybackurls /usr/local/bin/waybackurls
fi
echo "[*] Installing gau..."
if ! command -v gau &> /dev/null; then
go install github.com/lc/gau@latest
sudo cp ~/go/bin/gau /usr/local/bin/gau
fi
echo "[*] Installing qsreplace..."
if ! command -v qsreplace &> /dev/null; then
go install github.com/tomnomnom/qsreplace@latest
sudo cp ~/go/bin/qsreplace /usr/local/bin/qsreplace
fi
echo "[*] Installing Subjack..."
if ! command -v subjack &> /dev/null; then
go install github.com/haccer/subjack@latest
sudo cp ~/go/bin/subjack /usr/local/bin/subjack
fi
echo "[*] macOS installation script completed successfully!"
echo "[*] All tools installed and ready to use."