@@ -21,10 +21,10 @@ echo -e "${BOLD}${GREEN}[+] Welcome to MagicRecon"
2121echo -e " "
2222echo -e " ${BOLD}${GREEN} [+] MagicRecon has 5 steps: "
2323echo -e " ${BOLD}${GREEN} [+] STEP 1: Subdomain Enumeration"
24- echo -e " ${BOLD}${GREEN} [+] STEP 2: JavaScript files and Hidden Endpoints "
25- echo -e " ${BOLD}${GREEN} [+] STEP 3: Find directories and hidden files "
26- echo -e " ${BOLD}${GREEN} [+] STEP 4: Port scan for alive domains "
27- echo -e " ${BOLD}${GREEN} [+] STEP 5: Subdomain headers and response bodies "
24+ echo -e " ${BOLD}${GREEN} [+] STEP 2: Subdomain headers and response bodies "
25+ echo -e " ${BOLD}${GREEN} [+] STEP 3: JavaScript files and Hidden Endpoints "
26+ echo -e " ${BOLD}${GREEN} [+] STEP 4: Find directories and hidden files "
27+ echo -e " ${BOLD}${GREEN} [+] STEP 5: Port scan for alive domains "
2828
2929echo -e " "
3030echo -e " ${BOLD}${GREEN} [+] STEP 1: Starting Subdomain Enumeration"
@@ -87,9 +87,24 @@ cat alive.txt | python -c "import sys; import json; print (json.dumps({'domains'
8787
8888cat domains.txt | python -c " import sys; import json; print (json.dumps({'domains':list(sys.stdin)}))" > domains.json
8989
90+ # ########SUBDOMAIN HEADERS#########
91+ echo -e " "
92+ echo -e " ${BOLD}${GREEN} [+] STEP 2: Storing subdomain headers and response bodies"
93+
94+ mkdir headers
95+
96+ CURRENT_PATH=$( pwd)
97+
98+ for x in $( cat alive.txt)
99+ do
100+ NAME=$( echo $x | awk -F/ ' {print $3}' )
101+ curl -X GET -H " X-Forwarded-For: evil.com" $x -I > " $CURRENT_PATH /headers/$NAME "
102+ curl -s -X GET -H " X-Forwarded-For: evil.com" -L $x > " $CURRENT_PATH /responsebody/$NAME "
103+ done
104+
90105# ########JAVASCRIPT FILES#########
91106echo -e " "
92- echo -e " ${BOLD}${GREEN} [+] STEP 2 : Collecting JavaScript files and Hidden Endpoints"
107+ echo -e " ${BOLD}${GREEN} [+] STEP 3 : Collecting JavaScript files and Hidden Endpoints"
93108
94109mkdir scripts
95110mkdir scriptsresponse
165180
166181# ########FILES AND DIRECTORIES#########
167182echo -e " "
168- echo -e " ${BOLD}${GREEN} [+] STEP 3 : Starting Gobuster to find directories and hidden files"
183+ echo -e " ${BOLD}${GREEN} [+] STEP 4 : Starting Gobuster to find directories and hidden files"
169184
170185mkdir directories
171186
@@ -182,27 +197,11 @@ done
182197
183198# ########NMAP#########
184199echo -e " "
185- echo -e " ${BOLD}${GREEN} [+]STEP 4 : Starting Nmap Scan for alive domains"
200+ echo -e " ${BOLD}${GREEN} [+]STEP 5 : Starting Nmap Scan for alive domains"
186201
187202mkdir nmapscans
188203
189204for domain in $( cat domains.txt)
190205do
191206 nmap -sC -sV -v $domain | tee nmapscans/$domain
192207done
193-
194- # ########SUBDOMAIN HEADERS#########
195- echo -e " "
196- echo -e " ${BOLD}${GREEN} [+] STEP 5: Storing subdomain headers and response bodies"
197-
198- mkdir headers
199-
200- CURRENT_PATH=$( pwd)
201-
202- for x in $( cat alive.txt)
203- do
204- NAME=$( echo $x | awk -F/ ' {print $3}' )
205- curl -X GET -H " X-Forwarded-For: evil.com" $x -I > " $CURRENT_PATH /headers/$NAME "
206- curl -s -X GET -H " X-Forwarded-For: evil.com" -L $x > " $CURRENT_PATH /responsebody/$NAME "
207- done
208-
0 commit comments