|
2 | 2 |
|
3 | 3 | . ./configuration.cfg
|
4 | 4 |
|
| 5 | +BOLD=$(tput bold) |
| 6 | +YELLOW=$(tput setaf 3) |
| 7 | +MAGENTA=$(tput setaf 5) |
| 8 | +CYAN=$(tput setaf 6) |
| 9 | +NORMAL=$(tput sgr0) |
| 10 | + |
5 | 11 | printf "${BOLD}${YELLOW}##########################################################\n"
|
6 | 12 | printf "##### Welcome to the MagicRecon dependency installer #####\n"
|
7 | 13 | printf "##########################################################\n\n${NORMAL}"
|
8 | 14 |
|
9 | 15 | sudo apt-get -y update
|
10 | 16 |
|
11 |
| -printf "${BOLD}${MAGENTA}Installing programming languages\n${NORMAL}" |
12 |
| - |
13 |
| -printf "${CYAN}Installing Python\n${NORMAL}" |
14 |
| -sudo apt-get install -y python3-pip |
15 |
| -sudo apt-get install -y python-pip |
16 |
| -sudo apt-get install -y dnspython |
17 |
| - |
18 |
| -printf "${CYAN}Installing GO\n\n${NORMAL}" |
19 |
| -sudo apt install -y golang |
20 |
| -export GOROOT=/usr/lib/go |
21 |
| -export GOPATH=~/go |
22 |
| -export PATH=$GOPATH/bin:$GOROOT/bin:$PATH |
23 |
| - |
24 |
| -echo "export GOROOT=/usr/lib/go" >> ~/.bashrc |
25 |
| -echo "export GOPATH=~/go" >> ~/.bashrc |
26 |
| -echo "export PATH=$GOPATH/bin:$GOROOT/bin:$PATH" >> ~/.bashrc |
27 |
| - |
28 |
| -source ~/.bashrc |
29 |
| - |
30 |
| -printf "${CYAN}Installing Cargo\n\n${NORMAL}" |
31 |
| -sudo apt install cargo |
32 |
| - |
33 |
| -printf "${CYAN}Installing html2text\n\n${NORMAL}" |
34 |
| -sudo apt install html2text |
| 17 | +printf "${BOLD}${MAGENTA}Installing programming languages and essential packages\n${NORMAL}" |
| 18 | +sudo apt-get install -y python3-pip dnspython golang cargo html2text whatweb theharvester nmap dirsearch sqlmap cargo subjack |
35 | 19 |
|
36 |
| -printf "${BOLD}${MAGENTA}Installing repositories\n${NORMAL}" |
| 20 | +printf "${BOLD}${MAGENTA}Cloning repositories and installing dependencies\n${NORMAL}" |
37 | 21 | cd $HOME
|
38 |
| -mkdir tools |
| 22 | +mkdir -p tools |
39 | 23 | cd tools
|
40 | 24 |
|
41 |
| -printf "${CYAN}Cloning ASNLookup\n${NORMAL}" |
42 |
| -git clone https://github.com/yassineaboukir/Asnlookup |
43 |
| -cd Asnlookup |
44 |
| -pip3 install -r requirements.txt |
45 |
| -cd .. |
46 |
| - |
47 |
| -printf "${CYAN}Cloning ssl-checker\n${NORMAL}" |
48 |
| -git clone https://github.com/narbehaj/ssl-checker |
49 |
| -cd ssl-checker |
50 |
| -pip3 install -r requirements.txt |
51 |
| -cd .. |
52 |
| - |
53 |
| -printf "${CYAN}Cloning CloudEnum\n${NORMAL}" |
54 |
| -git clone https://github.com/initstring/cloud_enum |
55 |
| -cd cloud_enum |
56 |
| -pip3 install -r requirements.txt |
57 |
| -cd .. |
58 |
| - |
59 |
| -printf "${CYAN}Cloning GitDorker\n${NORMAL}" |
60 |
| -git clone https://github.com/obheda12/GitDorker |
61 |
| -cd GitDorker |
62 |
| -pip3 install -r requirements.txt |
63 |
| -cd .. |
64 |
| - |
65 |
| -printf "${CYAN}Cloning RobotScraper\n${NORMAL}" |
66 |
| -git clone https://github.com/robotshell/robotScraper.git |
| 25 | +declare -A REPOS=( |
| 26 | + ["Asnlookup"]="https://github.com/yassineaboukir/Asnlookup" |
| 27 | + ["ssl-checker"]="https://github.com/narbehaj/ssl-checker" |
| 28 | + ["cloud_enum"]="https://github.com/initstring/cloud_enum" |
| 29 | + ["GitDorker"]="https://github.com/obheda12/GitDorker" |
| 30 | + ["robotScraper"]="https://github.com/robotshell/robotScraper.git" |
| 31 | + ["nuclei-templates"]="https://github.com/projectdiscovery/nuclei-templates.git" |
| 32 | + ["SecLists"]="https://github.com/danielmiessler/SecLists" |
| 33 | + ["Corsy"]="https://github.com/s0md3v/Corsy.git" |
| 34 | + ["SecretFinder"]="https://github.com/m4ll0k/SecretFinder.git" |
| 35 | + ["CMSeeK"]="https://github.com/Tuhinshubhra/CMSeeK" |
| 36 | + ["findomain"]="https://github.com/findomain/findomain.git" |
| 37 | + ["hacks"]="https://github.com/tomnomnom/hacks" |
| 38 | + ["Bolt"]="https://github.com/s0md3v/Bolt" |
| 39 | + ["Gf-Patterns"]="https://github.com/1ndianl33t/Gf-Patterns" |
| 40 | +) |
| 41 | + |
| 42 | +for repo in "${!REPOS[@]}"; do |
| 43 | + printf "${CYAN}Cloning ${repo}\n${NORMAL}" |
| 44 | + git clone "${REPOS[$repo]}" |
| 45 | + cd "$repo" |
| 46 | + if [ -f requirements.txt ]; then |
| 47 | + pip3 install -r requirements.txt --break-system-packages |
| 48 | + fi |
| 49 | + cd .. |
| 50 | +done |
67 | 51 |
|
68 |
| -printf "${CYAN}Install Arjun\n${NORMAL}" |
69 | 52 | pip3 install arjun
|
70 | 53 |
|
71 |
| -printf "${CYAN}Cloning nuclei-templates\n${NORMAL}" |
72 |
| -git clone https://github.com/projectdiscovery/nuclei-templates.git |
73 |
| - |
74 |
| -printf "${CYAN}Cloning SecLists\n${NORMAL}" |
75 |
| -git clone https://github.com/danielmiessler/SecLists |
76 |
| - |
77 |
| -printf "${CYAN}Cloning Corsy\n${NORMAL}" |
78 |
| -git clone https://github.com/s0md3v/Corsy.git |
79 |
| -cd Corsy |
80 |
| -pip3 install requests |
81 |
| -cd .. |
82 |
| - |
83 |
| -printf "${CYAN}Cloning SecretFinder\n${NORMAL}" |
84 |
| -git clone https://github.com/m4ll0k/SecretFinder.git secretfinder |
85 |
| -cd secretfinder |
86 |
| -pip install -r requirements.txt |
87 |
| -cd .. |
88 |
| - |
89 |
| -printf "${CYAN}Cloning CMSeek\n${NORMAL}" |
90 |
| -git clone https://github.com/Tuhinshubhra/CMSeeK |
91 |
| -cd CMSeeK |
92 |
| -pip3 install -r requirements.txt |
93 |
| -cd .. |
94 |
| - |
95 |
| -printf "${CYAN}Cloning Findomain\n${NORMAL}" |
96 |
| -git clone https://github.com/findomain/findomain.git |
| 54 | +printf "${CYAN}Building findomain\n${NORMAL}" |
97 | 55 | cd findomain
|
98 | 56 | cargo build --release
|
99 | 57 | sudo cp target/release/findomain /usr/bin/
|
100 | 58 | cd ..
|
101 | 59 |
|
102 |
| -printf "${CYAN}Cloning anti-burl\n${NORMAL}" |
103 |
| -git clone https://github.com/tomnomnom/hacks |
| 60 | +printf "${CYAN}Building anti-burl\n${NORMAL}" |
104 | 61 | cd hacks/anti-burl/
|
105 | 62 | go build main.go
|
106 | 63 | sudo mv main ~/go/bin/anti-burl
|
107 |
| -cd .. |
108 |
| - |
109 |
| -printf "${CYAN}Cloning XSRFProbe\n${NORMAL}" |
110 |
| -git clone https://github.com/s0md3v/Bolt |
111 |
| -cd Bolt |
112 |
| -pip3 install -r requirements.txt |
113 |
| -cd .. |
| 64 | +cd ../.. |
114 | 65 |
|
115 |
| -printf "${CYAN}Cloning Gf-Patterns\n${NORMAL}" |
116 |
| -git clone https://github.com/1ndianl33t/Gf-Patterns |
117 |
| -mkdir ~/.gf |
| 66 | +mkdir -p ~/.gf |
118 | 67 | cp -r Gf-Patterns/* ~/.gf
|
119 |
| -cd .. |
120 |
| -cd .. |
121 |
| - |
122 |
| - |
123 |
| -printf "${BOLD}${MAGENTA}Installing tools\n${NORMAL}" |
124 | 68 |
|
125 |
| -printf "${CYAN}Installing WhatWeb\n\n${NORMAL}" |
126 |
| -sudo apt-get install whatweb |
| 69 | +printf "${BOLD}${MAGENTA}Installing GO tools\n${NORMAL}" |
| 70 | +declare -a GO_TOOLS=( |
| 71 | + "github.com/OWASP/Amass/v3/..." |
| 72 | + "github.com/michenriksen/aquatone" |
| 73 | + "github.com/projectdiscovery/subfinder/v2/cmd/subfinder" |
| 74 | + "github.com/hakluke/hakrawler" |
| 75 | + "github.com/tomnomnom/anew" |
| 76 | + "github.com/projectdiscovery/httpx/cmd/httpx" |
| 77 | + "github.com/projectdiscovery/notify/cmd/notify" |
| 78 | + "github.com/projectdiscovery/nuclei/v2/cmd/nuclei" |
| 79 | + "github.com/lc/gau" |
| 80 | + "github.com/tomnomnom/gf" |
| 81 | + "github.com/tomnomnom/qsreplace" |
| 82 | + "github.com/hahwul/dalfox/v2" |
| 83 | + "github.com/tomnomnom/hacks/html-tool" |
| 84 | + "github.com/tomnomnom/waybackurls" |
| 85 | +) |
| 86 | + |
| 87 | +for tool in "${GO_TOOLS[@]}"; do |
| 88 | + printf "${CYAN}Installing $(basename $tool)\n${NORMAL}" |
| 89 | + go install "$tool@latest" |
| 90 | + sudo cp "$HOME/go/bin/$(basename $tool)" /usr/local/bin/ |
| 91 | +done |
127 | 92 |
|
128 |
| -printf "${CYAN}Installing TheHarvester\n\n${NORMAL}" |
129 |
| -sudo apt-get install theharvester |
130 |
| - |
131 |
| -printf "${CYAN}Installing Nmap\n\n${NORMAL}" |
132 |
| -sudo apt-get install nmap |
133 |
| - |
134 |
| -printf "${CYAN}Installing Dirsearch\n\n${NORMAL}" |
135 |
| -sudo apt-get install dirsearch |
136 |
| - |
137 |
| -printf "${CYAN}Installing SqlMap\n\n${NORMAL}" |
138 |
| -sudo apt-get install sqlmap |
139 |
| - |
140 |
| -printf "${CYAN}Installing Amass\n${NORMAL}" |
141 |
| -go get -v github.com/OWASP/Amass/v3/.. |
142 |
| -sudo cp ~/go/bin/amass /usr/local/bin |
143 |
| - |
144 |
| -printf "${CYAN}Installing Aquatone\n${NORMAL}" |
145 |
| -go get -u github.com/michenriksen/aquatone |
146 |
| -sudo cp ~/go/bin/aquatone /usr/local/bin |
147 |
| - |
148 |
| -printf "${CYAN}Installing Subfinder\n${NORMAL}" |
149 |
| -GO111MODULE=on go get -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder |
150 |
| -sudo cp ~/go/bin/subfinder /usr/local/bin |
151 |
| - |
152 |
| -printf "${CYAN}Installing Hakrawler\n${NORMAL}" |
153 |
| -go install github.com/hakluke/hakrawler@latest |
154 |
| -sudo cp ~/go/bin/hakrawler /usr/local/bin |
155 |
| - |
156 |
| -printf "${CYAN}Installing anew\n${NORMAL}" |
157 |
| -go get -u github.com/tomnomnom/anew |
158 |
| -sudo cp ~/go/bin/anew /usr/local/bin |
159 |
| - |
160 |
| -printf "${CYAN}Installing HTTPX\n${NORMAL}" |
161 |
| -GO111MODULE=on go get -v github.com/projectdiscovery/httpx/cmd/httpx |
162 |
| -sudo cp ~/go/bin/httpx /usr/local/bin |
163 |
| - |
164 |
| -printf "${CYAN}Installing Notify\n${NORMAL}" |
165 |
| -GO111MODULE=on go get -v github.com/projectdiscovery/notify/cmd/notify |
166 |
| -sudo cp ~/go/bin/notify /usr/local/bin |
167 |
| - |
168 |
| -printf "${CYAN}Installing Nuclei\n${NORMAL}" |
169 |
| -GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei |
170 |
| -sudo cp ~/go/bin/nuclei /usr/local/bin |
171 |
| - |
172 |
| -printf "${CYAN}Installing Shcheck\n${NORMAL}" |
173 |
| -git clone https://github.com/santoru/shcheck |
| 93 | +echo 'source $GOPATH/src/github.com/tomnomnom/gf/gf-completion.bash' >> ~/.bashrc |
| 94 | +cp -r ~/go/src/github.com/tomnomnom/gf/examples ~/.gf |
174 | 95 |
|
175 | 96 | printf "${CYAN}Installing MailSpoof\n${NORMAL}"
|
176 | 97 | sudo pip3 install mailspoof
|
177 | 98 |
|
178 |
| -printf "${CYAN}Installing MailSpoof\n${NORMAL}" |
179 |
| -go get github.com/haccer/subjack |
180 |
| -sudo cp ~/go/bin/subjack /usr/local/bin |
181 |
| - |
182 |
| -printf "${CYAN}Installing gau\n${NORMAL}" |
183 |
| -GO111MODULE=on go get -u -v github.com/lc/gau |
184 |
| -sudo cp ~/go/bin/gau /usr/local/bin |
185 |
| - |
186 |
| -printf "${CYAN}Installing gf\n${NORMAL}" |
187 |
| -go get -u github.com/tomnomnom/gf |
188 |
| -echo 'source $GOPATH/src/github.com/tomnomnom/gf/gf-completion.bash' >> ~/.bashrc |
189 |
| -cp -r $GOPATH/src/github.com/tomnomnom/gf/examples ~/.gf |
190 |
| -sudo cp ~/go/bin/gf /usr/local/bin |
191 |
| - |
192 |
| -printf "${CYAN}Installing qsreplace\n${NORMAL}" |
193 |
| -go get -u github.com/tomnomnom/qsreplace |
194 |
| -sudo cp ~/go/bin/qsreplace /usr/local/bin |
195 |
| - |
196 |
| -printf "${CYAN}Installing Dalfox\n${NORMAL}" |
197 |
| -GO111MODULE=on go get -v github.com/hahwul/dalfox/v2 |
198 |
| -sudo cp ~/go/bin/dalfox /usr/local/bin |
199 |
| - |
200 |
| -printf "${CYAN}Installing html-tool\n${NORMAL}" |
201 |
| -go get -u github.com/tomnomnom/hacks/html-tool |
202 |
| -sudo cp ~/go/bin/html-tool /usr/local/bin |
| 99 | +printf "${CYAN}Installing Shcheck\n${NORMAL}" |
| 100 | +git clone https://github.com/santoru/shcheck |
203 | 101 |
|
204 |
| -printf "${CYAN}Installing waybackurls\n${NORMAL}" |
205 |
| -go get github.com/tomnomnom/waybackurls |
| 102 | +printf "${BOLD}${YELLOW}Installation completed successfully!\n${NORMAL}" |
0 commit comments