Webapp Automated recon using bash scripting~~
Webapp Automated recon using bash scripting~~
Finding subdomains using subfinder, assetfinder & amass. b)Script modification technique
Enumerating whether subdomains are alive using httprobe.
Take screenshots of alive subdomains.
scan alive subdomains using nmap.
Steps :
Start the Linux machine and create a nano file with .sh extension.
Script :-
#!/bin/bash
if [ -z "$1" ]; then
exit 1
fi
domain=$1
RED="\033[1;31m"
GREEN="\033[1;32m"
RESET="\033[0m"
subdomain_path="$domain/subdomains"
screenshot_path="$domain/screenshots"
scan_path="$domain/scans"
else
echo -e "${RED}[-] Subfinder failed. Check if it's installed and configured correctly.${RESET}"
exit 1
fi
else
echo -e "${RED}[-] Assetfinder failed. Check if it's installed and configured correctly.${RESET}"
exit 1
fi
if [ ! -s "$subdomain_path/found.txt" ]; then
fi
else
exit 1
fi
if [ ! -s "$subdomain_path/alive.txt" ]; then
exit 1
fi
else
exit 1
fi
exit 1
fi
Live subdomains~~
Screenshots of subdomains~~
____________________________
Note : - Modify the bash script according to your set of tools. All you have to do is copy paste this
part of the script for adding as much as tools you want and modify the script according to the
commands you want to use for using the tools :
else
echo -e "${RED}[-] Assetfinder failed. Check if it's installed and configured correctly.${RESET}"
exit 1
fi
---------------------------------------------------------------------------------------
In line 2 replace ‘assetfinder “$domain”’ with the command you use for scanning.
Example :
If we scan using subfinder then we use ‘subfinder –d tesla.com’ and if we add this command in the
script we will write ‘subfinder –d “$domain”’.
Now after modification paste the script below ‘fi’ of the assetfinder script.
Now you have successfully added your desired tool inside the script.
Good luck.
_________________
Akash