reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities
Shell bug-bountybugbountybugbounty-tooldnshackingnucleiosintpenetration-testingpentestpentest-toolpentestingreconreconnaissancescannersecuritysecurity-toolssubdomainsubdomain-enumerationvulnerabilities
Code quality improvements
six2dez6a5d58c83e6b
diff --git a/reconftw.sh b/reconftw.shindex 8d433f6..45f86e7 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -25,13 +25,11 @@ function check_version(){eval timeout 10 git fetch $DEBUG_STDexit_status=$?-if [ $exit_status -eq 0 ]-then+if [ $exit_status -eq 0 ]; thenBRANCH=$(git rev-parse --abbrev-ref HEAD)HEADHASH=$(git rev-parse HEAD)UPSTREAMHASH=$(git rev-parse ${BRANCH}@{upstream})- if [ "$HEADHASH" != "$UPSTREAMHASH" ]- then+ if [ "$HEADHASH" != "$UPSTREAMHASH" ]; thenprintf "\n${yellow} There is a new version, run ./install.sh to get latest version${reset}\n\n"fielse@@ -50,20 +48,20 @@ function tools_installed(){[ -n "$GOPATH" ] || { printf "${bred} [*] GOPATH var [NO]${reset}\n"; allinstalled=false;}[ -n "$GOROOT" ] || { printf "${bred} [*] GOROOT var [NO]${reset}\n"; allinstalled=false;}[ -n "$PATH" ] || { printf "${bred} [*] PATH var [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/degoogle_hunter/degoogle.py ] || { printf "${bred} [*] degoogle [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/ParamSpider/paramspider.py ] || { printf "${bred} [*] Paramspider [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/brutespray/brutespray.py ] || { printf "${bred} [*] brutespray [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/dnsrecon/dnsrecon.py ] || { printf "${bred} [*] dnsrecon [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/fav-up/favUp.py ] || { printf "${bred} [*] fav-up [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/Corsy/corsy.py ] || { printf "${bred} [*] Corsy [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/testssl.sh/testssl.sh ] || { printf "${bred} [*] testssl [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/CMSeeK/cmseek.py ] || { printf "${bred} [*] CMSeeK [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/ctfr/ctfr.py ] || { printf "${bred} [*] ctfr [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/fuzz_wordlist.txt ] || { printf "${bred} [*] OneListForAll [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/LinkFinder/linkfinder.py ] || { printf "${bred} [*] LinkFinder [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/GitDorker/GitDorker.py ] || { printf "${bred} [*] GitDorker [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/degoogle_hunter/degoogle_hunter.sh ] || { printf "${bred} [*] degoogle_hunter [NO]${reset}\n"; allinstalled=false;}- [ -f $tools/getjswords.py ] || { printf "${bred} [*] getjswords [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/degoogle_hunter/degoogle.py" ] || { printf "${bred} [*] degoogle [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/ParamSpider/paramspider.py" ] || { printf "${bred} [*] Paramspider [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/brutespray/brutespray.py" ] || { printf "${bred} [*] brutespray [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/dnsrecon/dnsrecon.py" ] || { printf "${bred} [*] dnsrecon [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/fav-up/favUp.py" ] || { printf "${bred} [*] fav-up [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/Corsy/corsy.py" ] || { printf "${bred} [*] Corsy [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/testssl.sh/testssl.sh" ] || { printf "${bred} [*] testssl [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/CMSeeK/cmseek.py" ] || { printf "${bred} [*] CMSeeK [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/ctfr/ctfr.py" ] || { printf "${bred} [*] ctfr [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/fuzz_wordlist.txt" ] || { printf "${bred} [*] OneListForAll [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/LinkFinder/linkfinder.py" ] || { printf "${bred} [*] LinkFinder [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/GitDorker/GitDorker.py" ] || { printf "${bred} [*] GitDorker [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/degoogle_hunter/degoogle_hunter.sh" ] || { printf "${bred} [*] degoogle_hunter [NO]${reset}\n"; allinstalled=false;}+ [ -f "$tools/getjswords.py" ] || { printf "${bred} [*] getjswords [NO]${reset}\n"; allinstalled=false;}eval type -P arjun $DEBUG_STD || { printf "${bred} [*] Arjun [NO]${reset}\n"; allinstalled=false;}eval type -P dirdar $DEBUG_STD || { printf "${bred} [*] dirdar [NO]${reset}\n"; allinstalled=false;}eval type -P github-endpoints $DEBUG_STD || { printf "${bred} [*] github-endpoints [NO]${reset}\n"; allinstalled=false;}@@ -101,7 +99,7 @@ function tools_installed(){eval type -P dalfox $DEBUG_STD || { printf "${bred} [*] dalfox [NO]${reset}\n${reset}"; allinstalled=false;}eval type -P puredns $DEBUG_STD || { printf "${bred} [*] puredns [NO]${reset}\n${reset}"; allinstalled=false;}- if [ "${allinstalled}" = true ] ; then+ if [ "${allinstalled}" = true ]; thenprintf "${bgreen} Good! All installed! ${reset}\n\n"elseprintf "\n${yellow} Try running the installer script again ./install.sh"@@ -119,12 +117,11 @@ function tools_installed(){###############################################################################################################function google_dorks(){- if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] && [ "$GOOGLE_DORKS" = true ] && [ "$OSINT" = true ]- then+ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] && [ "$GOOGLE_DORKS" = true ] && [ "$OSINT" = true ]; thenstart_func "Google Dorks in process"$tools/degoogle_hunter/degoogle_hunter.sh $domain | tee osint/dorks.txtsed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" osint/dorks.txt- end_func "Results are saved in osint/dorks.txt" ${FUNCNAME[0]}+ end_func "Results are saved in $domain/osint/dorks.txt" ${FUNCNAME[0]}elseif [ "$GOOGLE_DORKS" = false ] || [ "$OSINT" = false ]; thenprintf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"@@ -135,126 +132,116 @@ function google_dorks(){}function github_dorks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$GITHUB_DORKS" = true ] && [ "$OSINT" = true ]- then- start_func "Github Dorks in process"- if [ -s "${GITHUB_TOKENS}" ]- then- if [ "$DEEP" = true ] ; then- eval python3 $tools/GitDorker/GitDorker.py -tf ${GITHUB_TOKENS} -e $GITDORKER_THREADS -q $domain -p -d $tools/GitDorker/Dorks/alldorksv3 | grep "\[+\]" | grep "git" | anew -q osint/gitdorks.txt $DEBUG_STD- else- eval python3 $tools/GitDorker/GitDorker.py -tf ${GITHUB_TOKENS} -e $GITDORKER_THREADS -q $domain -p -d $tools/GitDorker/Dorks/medium_dorks.txt | grep "\[+\]" | grep "git" | anew -q osint/gitdorks.txt $DEBUG_STD- fi- sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" osint/gitdorks.txt+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$GITHUB_DORKS" = true ] && [ "$OSINT" = true ]; then+ start_func "Github Dorks in process"+ if [ -s "${GITHUB_TOKENS}" ]; then+ if [ "$DEEP" = true ]; then+ eval python3 "$tools/GitDorker/GitDorker.py" -tf "${GITHUB_TOKENS}" -e "$GITDORKER_THREADS" -q "$domain" -p -d "$tools/GitDorker/Dorks/alldorksv3" | grep "\[+\]" | grep "git" | anew -q osint/gitdorks.txt $DEBUG_STDelse- printf "\n${bred} Required file ${GITHUB_TOKENS} not exists or empty${reset}\n"+ eval python3 "$tools/GitDorker/GitDorker.py" -tf "${GITHUB_TOKENS}" -e "$GITDORKER_THREADS" -q "$domain" -p -d "$tools/GitDorker/Dorks/medium_dorks.txt" | grep "\[+\]" | grep "git" | anew -q osint/gitdorks.txt $DEBUG_STDfi- end_func "Results are saved in osint/gitdorks.txt" ${FUNCNAME[0]}+ sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" osint/gitdorks.txtelse- if [ "$GITHUB_DORKS" = false ] || [ "$OSINT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "\n${bred} Required file ${GITHUB_TOKENS} not exists or empty${reset}\n"+ fi+ end_func "Results are saved in $domain/osint/gitdorks.txt" ${FUNCNAME[0]}+ else+ if [ "$GITHUB_DORKS" = false ] || [ "$OSINT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function metadata(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$METADATA" = true ] && [ "$OSINT" = true ]- then- start_func "Scanning metadata in public files"- eval metafinder -d $domain -l 20 -o osint -go -bi -ba $DEBUG_STD- eval mv osint/${domain}/* osint/ $DEBUG_ERROR- eval rmdir osint/${domain} $DEBUG_ERROR- end_func "Results are saved in osint/[software/authors/metadata_results].txt" ${FUNCNAME[0]}+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$METADATA" = true ] && [ "$OSINT" = true ]; then+ start_func "Scanning metadata in public files"+ eval metafinder -d "$domain" -l 20 -o osint -go -bi -ba $DEBUG_STD+ eval mv "osint/${domain}/*" "osint/" $DEBUG_ERROR+ eval rmdir "osint/${domain}" $DEBUG_ERROR+ end_func "Results are saved in $domain/osint/[software/authors/metadata_results].txt" ${FUNCNAME[0]}+ else+ if [ "$METADATA" = false ] || [ "$OSINT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$METADATA" = false ] || [ "$OSINT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function emails(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$EMAILS" = true ] && [ "$OSINT" = true ]- then- start_func "Searching emails/users/passwords leaks"- cd $tools/theHarvester- eval python3 theHarvester.py -d $domain -b all $DEBUG_ERROR > $dir/.tmp/harvester.txt- cd $dir- cat .tmp/harvester.txt | awk '/Emails/,/Hosts/' | sed -e '1,2d' | head -n -2 | sed -e '/Searching /d' -e '/exception has occurred/d' -e '/found:/Q' | anew -q osint/emails.txt- cat .tmp/harvester.txt | awk '/Users/,/IPs/' | sed -e '1,2d' | head -n -2 | sed -e '/Searching /d' -e '/exception has occurred/d' -e '/found:/Q' | anew -q osint/users.txt- cat .tmp/harvester.txt | awk '/Links/,/Users/' | sed -e '1,2d' | head -n -2 | sed -e '/Searching /d' -e '/exception has occurred/d' -e '/found:/Q' | anew -q osint/linkedin.txt-- eval h8mail -t $domain -q domain --loose -c $tools/h8mail_config.ini -j .tmp/h8_results.json $DEBUG_STD- if [ -s ".tmp/h8_results.json" ]- then- cat .tmp/h8_results.json | jq -r '.targets[0] | .data[] | .[]' | cut -d '-' -f2 | anew -q osint/h8mail.txt- fi+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$EMAILS" = true ] && [ "$OSINT" = true ]; then+ start_func "Searching emails/users/passwords leaks"+ cd "$tools/theHarvester" || { echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }+ eval python3 theHarvester.py -d $domain -b all $DEBUG_ERROR > $dir/.tmp/harvester.txt+ cd "$dir" || { echo "Failed to cd to $dir in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }+ cat .tmp/harvester.txt | awk '/Emails/,/Hosts/' | sed -e '1,2d' | head -n -2 | sed -e '/Searching /d' -e '/exception has occurred/d' -e '/found:/Q' | anew -q osint/emails.txt+ cat .tmp/harvester.txt | awk '/Users/,/IPs/' | sed -e '1,2d' | head -n -2 | sed -e '/Searching /d' -e '/exception has occurred/d' -e '/found:/Q' | anew -q osint/users.txt+ cat .tmp/harvester.txt | awk '/Links/,/Users/' | sed -e '1,2d' | head -n -2 | sed -e '/Searching /d' -e '/exception has occurred/d' -e '/found:/Q' | anew -q osint/linkedin.txt++ eval h8mail -t $domain -q domain --loose -c $tools/h8mail_config.ini -j .tmp/h8_results.json $DEBUG_STD+ if [ -s ".tmp/h8_results.json" ]; then+ cat .tmp/h8_results.json | jq -r '.targets[0] | .data[] | .[]' | cut -d '-' -f2 | anew -q osint/h8mail.txt+ fi- PWNDB_STATUS=$(timeout 15s curl -Is --socks5-hostname localhost:9050 http://pwndb2am4tzkvold.onion | grep HTTP | cut -d ' ' -f2)+ PWNDB_STATUS=$(timeout 15s curl -Is --socks5-hostname localhost:9050 http://pwndb2am4tzkvold.onion | grep HTTP | cut -d ' ' -f2)- if [ "$PWNDB_STATUS" = 200 ]- then- cd $tools/pwndb- python3 pwndb.py --target "@${domain}" | sed '/^[-]/d' | anew -q $dir/osint/passwords.txt- cd $dir- sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" osint/passwords.txt- else- text="${yellow}\n pwndb is currently down :(\n\n Check xjypo5vzgmo7jca6b322dnqbsdnp3amd24ybx26x5nxbusccjkm4pwid.onion${reset}\n"- printf "${text}" && printf "${text}" | $NOTIFY- fi- end_func "Results are saved in osint/[emails/users/h8mail/passwords].txt" ${FUNCNAME[0]}+ if [ "$PWNDB_STATUS" = 200 ]; then+ cd "$tools/pwndb" || { echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }+ python3 pwndb.py --target "@${domain}" | sed '/^[-]/d' | anew -q $dir/osint/passwords.txt+ cd "$dir" || { echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }+ sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" osint/passwords.txtelse- if [ "$EMAILS" = false ] || [ "$OSINT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ text="${yellow}\n pwndb is currently down :(\n\n Check xjypo5vzgmo7jca6b322dnqbsdnp3amd24ybx26x5nxbusccjkm4pwid.onion${reset}\n"+ printf "${text}" && printf "${text}" | $NOTIFY+ fi+ end_func "Results are saved in $domain/osint/[emails/users/h8mail/passwords].txt" ${FUNCNAME[0]}+ else+ if [ "$EMAILS" = false ] || [ "$OSINT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function domain_info(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$DOMAIN_INFO" = true ] && [ "$OSINT" = true ]- then- start_func "Searching domain info (whois, registrant name/email domains)"- lynx -dump https://domainbigdata.com/${domain} | tail -n +19 > osint/domain_info_general.txt+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$DOMAIN_INFO" = true ] && [ "$OSINT" = true ]; then+ start_func "Searching domain info (whois, registrant name/email domains)"+ lynx -dump "https://domainbigdata.com/${domain}" | tail -n +19 > osint/domain_info_general.txt- cat osint/domain_info_general.txt | grep '/nj/' | tr -s ' ' ',' | cut -d ',' -f3 > .tmp/domain_registrant_name.txt- cat osint/domain_info_general.txt | grep '/mj/' | tr -s ' ' ',' | cut -d ',' -f3 > .tmp/domain_registrant_email.txt- cat osint/domain_info_general.txt | grep -E "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | grep "https://domainbigdata.com" | tr -s ' ' ',' | cut -d ',' -f3 > .tmp/domain_registrant_ip.txt+ cat osint/domain_info_general.txt | grep '/nj/' | tr -s ' ' ',' | cut -d ',' -f3 > .tmp/domain_registrant_name.txt+ cat osint/domain_info_general.txt | grep '/mj/' | tr -s ' ' ',' | cut -d ',' -f3 > .tmp/domain_registrant_email.txt+ cat osint/domain_info_general.txt | grep -E "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | grep "https://domainbigdata.com" | tr -s ' ' ',' | cut -d ',' -f3 > .tmp/domain_registrant_ip.txt- sed -i -n '/Copyright/q;p' osint/domain_info_general.txt+ sed -i -n '/Copyright/q;p' osint/domain_info_general.txt- if [ -s ".tmp/domain_registrant_name.txt" ]- then- for line in $(cat .tmp/domain_registrant_name.txt); do- lynx -dump $line | tail -n +18 | sed -n '/]domainbigdata.com/q;p' >> osint/domain_info_name.txt && echo -e "\n\n#######################################################################\n\n" >> osint/domain_info_name.txt- done- fi+ if [ -s ".tmp/domain_registrant_name.txt" ]; then+ for line in $(cat .tmp/domain_registrant_name.txt); do+ lynx -dump $line | tail -n +18 | sed -n '/]domainbigdata.com/q;p' >> osint/domain_info_name.txt && echo -e "\n\n#######################################################################\n\n" >> osint/domain_info_name.txt+ done+ fi- if [ -s ".tmp/domain_registrant_email.txt" ]- then- for line in $(cat .tmp/domain_registrant_email.txt); do- lynx -dump $line | tail -n +18 | sed -n '/]domainbigdata.com/q;p' >> osint/domain_info_email.txt && echo -e "\n\n#######################################################################\n\n" >> osint/domain_info_email.txt- done- fi+ if [ -s ".tmp/domain_registrant_email.txt" ]; then+ for line in $(cat .tmp/domain_registrant_email.txt); do+ lynx -dump $line | tail -n +18 | sed -n '/]domainbigdata.com/q;p' >> osint/domain_info_email.txt && echo -e "\n\n#######################################################################\n\n" >> osint/domain_info_email.txt+ done+ fi- if [ -s ".tmp/domain_registrant_ip.txt" ]- then- for line in $(cat .tmp/domain_registrant_ip.txt); do- lynx -dump $line | tail -n +18 | sed -n '/]domainbigdata.com/q;p' >> osint/domain_info_ip.txt && echo -e "\n\n#######################################################################\n\n" >> osint/domain_info_ip.txt- done- fi- end_func "Results are saved in osint/domain_info_[general/name/email/ip].txt" ${FUNCNAME[0]}+ if [ -s ".tmp/domain_registrant_ip.txt" ]; then+ for line in $(cat .tmp/domain_registrant_ip.txt); do+ lynx -dump $line | tail -n +18 | sed -n '/]domainbigdata.com/q;p' >> osint/domain_info_ip.txt && echo -e "\n\n#######################################################################\n\n" >> osint/domain_info_ip.txt+ done+ fi+ end_func "Results are saved in $domain/osint/domain_info_[general/name/email/ip].txt" ${FUNCNAME[0]}+ else+ if [ "$DOMAIN_INFO" = false ] || [ "$OSINT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$DOMAIN_INFO" = false ] || [ "$OSINT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -267,167 +254,153 @@ function subdomains_full(){NUMOFLINES_subs="0"NUMOFLINES_probed="0"printf "${bgreen}#######################################################################\n\n"- printf "${bblue} Subdomain Enumeration\n\n"- if [ -f "subdomains/subdomains.txt" ]- then+ printf "${bblue} Subdomain Enumeration $domain\n\n"+ if [ -f "subdomains/subdomains.txt" ]; theneval cp subdomains/subdomains.txt .tmp/subdomains_old.txt $DEBUG_ERRORfi- if [ -f "webs/webs.txt" ]- then+ if [ -f "webs/webs.txt" ]; theneval cp webs/webs.txt .tmp/probed_old.txt $DEBUG_ERRORfi- if [ "$update_resolvers" = true ]- then- if [[ $(find "$resolvers" -mtime +1 -print) ]]; then- notification " Resolvers seem older than 1 day\n Generating custom resolvers..." warn- eval dnsvalidator -tL https://public-dns.info/nameservers.txt -threads 100 -o $resolvers $DEBUG_STD- notification "Updated\n" good- fi- fi+ resolvers_updatesub_passivesub_crtsub_activesub_brutesub_permut- if [ "$DEEP" = true ] ; then+ if [ "$DEEP" = true ]; thensub_recursivefisub_dnssub_scrapingwebprobe_simple- if [ -f "subdomains/subdomains.txt" ]- then- deleteOutScoped $outOfScope_file subdomains/subdomains.txt- NUMOFLINES_subs=$(eval cat subdomains/subdomains.txt $DEBUG_ERROR | anew .tmp/subdomains_old.txt | wc -l)+ if [ -f "subdomains/subdomains.txt" ]; then+ deleteOutScoped $outOfScope_file subdomains/subdomains.txt+ NUMOFLINES_subs=$(eval cat subdomains/subdomains.txt $DEBUG_ERROR | anew .tmp/subdomains_old.txt | wc -l)fi- if [ -f "webs/webs.txt" ]- then- deleteOutScoped $outOfScope_file webs/webs.txt- NUMOFLINES_probed=$(eval cat webs/webs.txt $DEBUG_ERROR | anew .tmp/probed_old.txt | wc -l)+ if [ -f "webs/webs.txt" ]; then+ deleteOutScoped $outOfScope_file webs/webs.txt+ NUMOFLINES_probed=$(eval cat webs/webs.txt $DEBUG_ERROR | anew .tmp/probed_old.txt | wc -l)fiprintf "${bblue}\n Total subdomains: ${reset}\n\n"notification "- ${NUMOFLINES_subs} new alive subdomains" good- eval cat subdomains/subdomains.txt $DEBUG_ERROR | sort+ [ -f "subdomains/subdomains.txt" ] && eval cat subdomains/subdomains.txt $DEBUG_ERROR | sortnotification "- ${NUMOFLINES_probed} new web probed" good- eval cat webs/webs.txt $DEBUG_ERROR | sort+ [ -f "webs/webs.txt" ] && eval cat webs/webs.txt $DEBUG_ERROR | sortnotification "Subdomain Enumeration Finished" goodprintf "${bblue} Results are saved in subdomains/subdomains.txt and webs/webs.txt${reset}\n"printf "${bgreen}#######################################################################\n\n"}function sub_passive(){- if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]- then- start_subfunc "Running : Passive Subdomain Enumeration"- eval subfinder -d $domain -all -o .tmp/subfinder_psub.txt $DEBUG_STD- eval assetfinder --subs-only $domain $DEBUG_ERROR | anew -q .tmp/assetfinder_psub.txt- eval amass enum -passive -d $domain -config $AMASS_CONFIG -o .tmp/amass_psub.txt $DEBUG_STD- eval findomain --quiet -t $domain -u .tmp/findomain_psub.txt $DEBUG_STD- timeout 10m waybackurls $domain | unfurl --unique domains | anew -q .tmp/waybackurls_psub.txt- timeout 10m gauplus -t $GAUPLUS_THREADS -random-agent -subs $domain | unfurl --unique domains | anew -q .tmp/gau_psub.txt- eval crobat -s $domain $DEBUG_ERROR | anew -q .tmp/crobat_psub.txt- if [ -s "${GITHUB_TOKENS}" ];then- if [ "$DEEP" = true ] ; then- eval github-subdomains -d $domain -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STD- else- eval github-subdomains -d $domain -k -q -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STD- fi- fi- eval curl -s "https://jldc.me/anubis/subdomains/${domain}" $DEBUG_ERROR | grep -Po "((http|https):\/\/)?(([\w.-]*)\.([\w]*)\.([A-z]))\w+" | sed '/^\./d' | anew -q .tmp/jldc_psub.txt- if echo $domain | grep -q ".mil$"; then- mildew- mv mildew.out .tmp/mildew.out- cat .tmp/mildew.out | grep ".$domain$" | anew -q .tmp/mil_psub.txt+ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; then+ start_subfunc "Running : Passive Subdomain Enumeration"+ eval subfinder -d $domain -all -o .tmp/subfinder_psub.txt $DEBUG_STD+ eval assetfinder --subs-only $domain $DEBUG_ERROR | anew -q .tmp/assetfinder_psub.txt+ eval amass enum -passive -d $domain -config $AMASS_CONFIG -o .tmp/amass_psub.txt $DEBUG_STD+ eval findomain --quiet -t $domain -u .tmp/findomain_psub.txt $DEBUG_STD+ timeout 10m waybackurls $domain | unfurl --unique domains | anew -q .tmp/waybackurls_psub.txt+ timeout 10m gauplus -t $GAUPLUS_THREADS -random-agent -subs $domain | unfurl --unique domains | anew -q .tmp/gau_psub.txt+ eval crobat -s $domain $DEBUG_ERROR | anew -q .tmp/crobat_psub.txt+ if [ -s "${GITHUB_TOKENS}" ]; then+ if [ "$DEEP" = true ]; then+ eval github-subdomains -d $domain -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STD+ else+ eval github-subdomains -d $domain -k -q -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STDfi- NUMOFLINES=$(eval cat .tmp/*_psub.txt $DEBUG_ERROR | sed "s/*.//" | anew .tmp/passive_subs.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (passive)" ${FUNCNAME[0]}- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fi+ eval curl -s "https://jldc.me/anubis/subdomains/${domain}" $DEBUG_ERROR | grep -Po "((http|https):\/\/)?(([\w.-]*)\.([\w]*)\.([A-z]))\w+" | sed '/^\./d' | anew -q .tmp/jldc_psub.txt+ if echo $domain | grep -q ".mil$"; then+ mildew+ mv mildew.out .tmp/mildew.out+ cat .tmp/mildew.out | grep ".$domain$" | anew -q .tmp/mil_psub.txt+ fi+ NUMOFLINES=$(eval cat .tmp/*_psub.txt $DEBUG_ERROR | sed "s/*.//" | anew .tmp/passive_subs.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (passive)" ${FUNCNAME[0]}+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi}function sub_crt(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBCRT" = true ]- then- start_subfunc "Running : Crtsh Subdomain Enumeration"- eval python3 $tools/ctfr/ctfr.py -d $domain -o .tmp/crtsh_subs_tmp.txt $DEBUG_STD- eval curl "https://tls.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r .Results[] $DEBUG_ERROR | cut -d ',' -f3 | grep -F ".$domain" | anew -q .tmp/crtsh_subs.txt- eval curl "https://dns.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r '.FDNS_A'[],'.RDNS'[] $DEBUG_ERROR | cut -d ',' -f2 | grep -F ".$domain" | anew -q .tmp/crtsh_subs_tmp.txt- NUMOFLINES=$(eval cat .tmp/crtsh_subs_tmp.txt $DEBUG_ERROR | anew .tmp/crtsh_subs.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (cert transparency)" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBCRT" = true ]; then+ start_subfunc "Running : Crtsh Subdomain Enumeration"+ eval python3 $tools/ctfr/ctfr.py -d $domain -o .tmp/crtsh_subs_tmp.txt $DEBUG_STD+ eval curl "https://tls.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r .Results[] $DEBUG_ERROR | cut -d ',' -f3 | grep -F ".$domain" | anew -q .tmp/crtsh_subs.txt+ eval curl "https://dns.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r '.FDNS_A'[],'.RDNS'[] $DEBUG_ERROR | cut -d ',' -f2 | grep -F ".$domain" | anew -q .tmp/crtsh_subs_tmp.txt+ NUMOFLINES=$(eval cat .tmp/crtsh_subs_tmp.txt $DEBUG_ERROR | anew .tmp/crtsh_subs.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (cert transparency)" ${FUNCNAME[0]}+ else+ if [ "$SUBCRT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$SUBCRT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function sub_active(){- if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]- then- start_subfunc "Running : Active Subdomain Enumeration"- if [ -s "${inScope_file}" ]- then- cat ${inScope_file} .tmp/inscope_subs.txt- fi- cat .tmp/*_subs.txt | anew -q .tmp/subs_no_resolved.txt- deleteOutScoped $outOfScope_file .tmp/subs_no_resolved.txt- eval puredns resolve .tmp/subs_no_resolved.txt -w .tmp/subdomains_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD- echo $domain | eval dnsx -retry 3 -silent -r $resolvers_trusted $DEBUG_ERROR | anew -q .tmp/subdomains_tmp.txt- NUMOFLINES=$(eval cat .tmp/subdomains_tmp.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (active resolution)" ${FUNCNAME[0]}- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; then+ start_subfunc "Running : Active Subdomain Enumeration"+ if [ -s "${inScope_file}" ]; then+ cat ${inScope_file} .tmp/inscope_subs.txt+ fi+ cat .tmp/*_subs.txt | anew -q .tmp/subs_no_resolved.txt+ deleteOutScoped $outOfScope_file .tmp/subs_no_resolved.txt+ eval puredns resolve .tmp/subs_no_resolved.txt -w .tmp/subdomains_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD+ echo $domain | eval dnsx -retry 3 -silent -r $resolvers_trusted $DEBUG_ERROR | anew -q .tmp/subdomains_tmp.txt+ NUMOFLINES=$(eval cat .tmp/subdomains_tmp.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (active resolution)" ${FUNCNAME[0]}+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi}function sub_dns(){- if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]- then- start_subfunc "Running : DNS Subdomain Enumeration"- eval dnsx -retry 3 -a -aaaa -cname -ns -ptr -mx -soa -resp -silent -l subdomains/subdomains.txt -o subdomains/subdomains_cname.txt -r $resolvers_trusted $DEBUG_STD- cat subdomains/subdomains_cname.txt | cut -d '[' -f2 | sed 's/.$//' | grep ".$domain$" | anew -q .tmp/subdomains_dns.txt- eval puredns resolve .tmp/subdomains_dns.txt -w .tmp/subdomains_dns_resolved.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD- NUMOFLINES=$(eval cat .tmp/subdomains_dns_resolved.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (dns resolution)" ${FUNCNAME[0]}- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; then+ start_subfunc "Running : DNS Subdomain Enumeration"+ eval dnsx -retry 3 -a -aaaa -cname -ns -ptr -mx -soa -resp -silent -l subdomains/subdomains.txt -o subdomains/subdomains_cname.txt -r $resolvers_trusted $DEBUG_STD+ cat subdomains/subdomains_cname.txt | cut -d '[' -f2 | sed 's/.$//' | grep ".$domain$" | anew -q .tmp/subdomains_dns.txt+ eval puredns resolve .tmp/subdomains_dns.txt -w .tmp/subdomains_dns_resolved.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD+ NUMOFLINES=$(eval cat .tmp/subdomains_dns_resolved.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (dns resolution)" ${FUNCNAME[0]}+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi}function sub_brute(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBBRUTE" = true ]- then- start_subfunc "Running : Bruteforce Subdomain Enumeration"- if [ "$DEEP" = true ] ; then- eval puredns bruteforce $subs_wordlist_big $domain -w .tmp/subs_brute.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD- else- eval puredns bruteforce $subs_wordlist $domain -w .tmp/subs_brute.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD- fi- NUMOFLINES=$(eval cat .tmp/subs_brute.txt $DEBUG_ERROR | sed "s/*.//" | grep ".$domain$" | anew subdomains/subdomains.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (bruteforce)" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBBRUTE" = true ]; then+ start_subfunc "Running : Bruteforce Subdomain Enumeration"+ if [ "$DEEP" = true ]; then+ eval puredns bruteforce $subs_wordlist_big $domain -w .tmp/subs_brute.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STDelse- if [ "$SUBBRUTE" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ eval puredns bruteforce $subs_wordlist $domain -w .tmp/subs_brute.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD+ fi+ if [[ -s ".tmp/subs_brute.txt" ]]; then+ eval puredns resolve .tmp/subs_brute.txt -w .tmp/subs_brute_valid.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD+ fi+ NUMOFLINES=$(eval cat .tmp/subs_brute_valid.txt $DEBUG_ERROR | sed "s/*.//" | grep ".$domain$" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (bruteforce)" ${FUNCNAME[0]}+ else+ if [ "$SUBBRUTE" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function sub_scraping(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBSCRAPING" = true ]- then- start_subfunc "Running : Source code scraping subdomain search"- touch .tmp/scrap_subs.txt+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SUBSCRAPING" = true ]; then+ start_subfunc "Running : Source code scraping subdomain search"+ touch .tmp/scrap_subs.txt+ if [ -s "$dir/subdomains/subdomains.txt" ]; thencat subdomains/subdomains.txt | httpx -follow-host-redirects -random-agent -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp_scrap.txtcat .tmp/probed_tmp_scrap.txt | httpx -csp-probe -random-agent -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew .tmp/probed_tmp_scrap.txt | unfurl -u domains | anew -q .tmp/scrap_subs.txtcat .tmp/probed_tmp_scrap.txt | httpx -tls-grab -tls-probe -random-agent -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew .tmp/probed_tmp_scrap.txt | unfurl -u domains | anew -q .tmp/scrap_subs.txt- if [ "$DEEP" = true ] ; then+ if [ "$DEEP" = true ]; thengospider -S .tmp/probed_tmp_scrap.txt --js -t $GOSPIDER_THREADS -d 3 --sitemap --robots -w -r > .tmp/gospider.txtelsegospider -S .tmp/probed_tmp_scrap.txt --js -t $GOSPIDER_THREADS -d 2 --sitemap --robots -w -r > .tmp/gospider.txt@@ -439,167 +412,156 @@ function sub_scraping(){cat .tmp/diff_scrap.txt | httpx -follow-host-redirects -random-agent -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp_scrap.txtend_subfunc "${NUMOFLINES} new subs (code scraping)" ${FUNCNAME[0]}else- if [ "$SUBSCRAPING" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ end_subfunc "No subdomains to search (code scraping)" ${FUNCNAME[0]}+ fi+ else+ if [ "$SUBSCRAPING" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function sub_permut(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBPERMUTE" = true ]- then- start_subfunc "Running : Permutations Subdomain Enumeration"- if [ "$DEEP" = true ] ; then- eval DNScewl --tL subdomains/subdomains.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txt+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBPERMUTE" = true ]; then+ start_subfunc "Running : Permutations Subdomain Enumeration"+ if [ "$DEEP" = true ]; then+ eval DNScewl --tL subdomains/subdomains.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txt+ eval puredns resolve .tmp/DNScewl1.txt -w .tmp/permute1_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD+ eval cat .tmp/permute1_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1.txt+ eval DNScewl --tL .tmp/permute1.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl2.txt+ eval puredns resolve .tmp/DNScewl2.txt -w .tmp/permute2_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD+ eval cat .tmp/permute2_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute2.txt+ eval cat .tmp/permute1.txt .tmp/permute2.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt+ else+ if [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 100 ]]; then+ eval DNScewl --tL .tmp/subs_no_resolved.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txteval puredns resolve .tmp/DNScewl1.txt -w .tmp/permute1_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STDeval cat .tmp/permute1_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1.txteval DNScewl --tL .tmp/permute1.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl2.txteval puredns resolve .tmp/DNScewl2.txt -w .tmp/permute2_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STDeval cat .tmp/permute2_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute2.txteval cat .tmp/permute1.txt .tmp/permute2.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt+ elif [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 200 ]]; then+ eval DNScewl --tL .tmp/subs_no_resolved.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txt+ eval puredns resolve .tmp/DNScewl1.txt -w .tmp/permute_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD+ eval cat .tmp/permute_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txtelse- if [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 100 ]]- then- eval DNScewl --tL .tmp/subs_no_resolved.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txt+ if [[ $(cat subdomains/subdomains.txt | wc -l) -le 100 ]]; then+ eval DNScewl --tL subdomains/subdomains.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txteval puredns resolve .tmp/DNScewl1.txt -w .tmp/permute1_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STDeval cat .tmp/permute1_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1.txteval DNScewl --tL .tmp/permute1.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl2.txteval puredns resolve .tmp/DNScewl2.txt -w .tmp/permute2_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STDeval cat .tmp/permute2_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute2.txteval cat .tmp/permute1.txt .tmp/permute2.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt- elif [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 200 ]]- then- eval DNScewl --tL .tmp/subs_no_resolved.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txt+ elif [[ $(cat subdomains/subdomains.txt | wc -l) -le 200 ]]; then+ eval DNScewl --tL subdomains/subdomains.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txteval puredns resolve .tmp/DNScewl1.txt -w .tmp/permute_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STDeval cat .tmp/permute_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txtelse- if [[ $(cat subdomains/subdomains.txt | wc -l) -le 100 ]]- then- eval DNScewl --tL subdomains/subdomains.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txt- eval puredns resolve .tmp/DNScewl1.txt -w .tmp/permute1_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD- eval cat .tmp/permute1_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1.txt- eval DNScewl --tL .tmp/permute1.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl2.txt- eval puredns resolve .tmp/DNScewl2.txt -w .tmp/permute2_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD- eval cat .tmp/permute2_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute2.txt- eval cat .tmp/permute1.txt .tmp/permute2.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt- elif [[ $(cat subdomains/subdomains.txt | wc -l) -le 200 ]]- then- eval DNScewl --tL subdomains/subdomains.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1.txt- eval puredns resolve .tmp/DNScewl1.txt -w .tmp/permute_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD- eval cat .tmp/permute_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt- else- printf "\n${bred} Skipping Permutations: Too Much Subdomains${reset}\n\n"- fi+ printf "\n${bred} Skipping Permutations: Too Much Subdomains${reset}\n\n"fifi- if [ -f ".tmp/permute_subs.txt" ]- then- deleteOutScoped $outOfScope_file .tmp/permute_subs.txt- NUMOFLINES=$(eval cat .tmp/permute_subs.txt $DEBUG_ERROR | grep ".$domain$" | anew subdomains/subdomains.txt | wc -l)- else- NUMOFLINES=0- fi- end_subfunc "${NUMOFLINES} new subs (permutations)" ${FUNCNAME[0]}+ fi+ if [ -f ".tmp/permute_subs.txt" ]; then+ deleteOutScoped $outOfScope_file .tmp/permute_subs.txt+ NUMOFLINES=$(eval cat .tmp/permute_subs.txt $DEBUG_ERROR | grep ".$domain$" | anew subdomains/subdomains.txt | wc -l)else- if [ "$SUBPERMUTE" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ NUMOFLINES=0+ fi+ end_subfunc "${NUMOFLINES} new subs (permutations)" ${FUNCNAME[0]}+ else+ if [ "$SUBPERMUTE" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function sub_recursive(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBRECURSIVE" = true ]- then- if [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 1000 ]]- then- start_subfunc "Running : Subdomains recursive search"- echo "" > .tmp/brute_recursive_wordlist.txt- for sub in $(cat subdomains/subdomains.txt); do- sed "s/$/.$sub/" $subs_wordlist >> .tmp/brute_recursive_wordlist.txt- done- eval puredns resolve .tmp/brute_recursive_wordlist.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT -w .tmp/brute_recursive_result.txt $DEBUG_STD- cat .tmp/brute_recursive_result.txt | anew -q .tmp/brute_recursive.txt- eval DNScewl --tL .tmp/brute_recursive.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1_recursive.txt- eval puredns resolve .tmp/DNScewl1_recursive.txt -w .tmp/permute1_recursive_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD- eval cat .tmp/permute1_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1_recursive.txt- eval DNScewl --tL .tmp/permute1_recursive.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl2_recursive.txt- eval puredns resolve .tmp/DNScewl2_recursive.txt -w .tmp/permute2_recursive_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD- eval cat .tmp/permute1_recursive.txt .tmp/permute2_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_recursive.txt-- NUMOFLINES=$(eval cat .tmp/permute_recursive.txt .tmp/brute_recursive.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)-- end_subfunc "${NUMOFLINES} new subs (recursive)" ${FUNCNAME[0]}- else- notification "Skipping Recursive: Too Much Subdomains" warn- fi+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBRECURSIVE" = true ]; then+ if [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 1000 ]]; then+ start_subfunc "Running : Subdomains recursive search"+ echo "" > .tmp/brute_recursive_wordlist.txt+ for sub in $(cat subdomains/subdomains.txt); do+ sed "s/$/.$sub/" $subs_wordlist >> .tmp/brute_recursive_wordlist.txt+ done+ eval puredns resolve .tmp/brute_recursive_wordlist.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT -w .tmp/brute_recursive_result.txt $DEBUG_STD+ cat .tmp/brute_recursive_result.txt | anew -q .tmp/brute_recursive.txt+ eval DNScewl --tL .tmp/brute_recursive.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl1_recursive.txt+ eval puredns resolve .tmp/DNScewl1_recursive.txt -w .tmp/permute1_recursive_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD+ eval cat .tmp/permute1_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1_recursive.txt+ eval DNScewl --tL .tmp/permute1_recursive.txt -p $tools/permutations_list.txt --level=0 --subs --no-color $DEBUG_ERROR | tail -n +14 | grep ".$domain$" > .tmp/DNScewl2_recursive.txt+ eval puredns resolve .tmp/DNScewl2_recursive.txt -w .tmp/permute2_recursive_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT $DEBUG_STD+ eval cat .tmp/permute1_recursive.txt .tmp/permute2_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_recursive.txt+ NUMOFLINES=$(eval cat .tmp/permute_recursive.txt .tmp/brute_recursive.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (recursive)" ${FUNCNAME[0]}else- if [ "$SUBRECURSIVE" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ notification "Skipping Recursive: Too Much Subdomains" warn+ fi+ else+ if [ "$SUBRECURSIVE" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function subtakeover(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBTAKEOVER" = true ]- then- start_func "Looking for possible subdomain takeover"- touch .tmp/tko.txt- cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/takeovers/ -r $resolvers_trusted -o .tmp/tko.txt- NUMOFLINES=$(eval cat .tmp/tko.txt $DEBUG_ERROR | anew webs/takeover.txt | wc -l)- if [ "$NUMOFLINES" -gt 0 ]; then- notification "${NUMOFLINES} new possible takeovers found" info- fi- end_func "Results are saved in webs/takeover.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBTAKEOVER" = true ]; then+ start_func "Looking for possible subdomain takeover"+ touch .tmp/tko.txt+ cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/takeovers/ -r $resolvers_trusted -o .tmp/tko.txt+ NUMOFLINES=$(eval cat .tmp/tko.txt $DEBUG_ERROR | anew webs/takeover.txt | wc -l)+ if [ "$NUMOFLINES" -gt 0 ]; then+ notification "${NUMOFLINES} new possible takeovers found" info+ fi+ end_func "Results are saved in webs/takeover.txt" ${FUNCNAME[0]}+ else+ if [ "$SUBTAKEOVER" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$SUBTAKEOVER" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function zonetransfer(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$ZONETRANSFER" = true ]- then- start_func "Zone transfer check"- eval python3 $tools/dnsrecon/dnsrecon.py -d $domain -a -j subdomains/zonetransfer.json $DEBUG_STD- if [ -s "subdomains/zonetransfer.json" ]- then- if grep -q "\"zone_transfer\"\: \"success\"" subdomains/zonetransfer.json ; then notification "Zone transfer found on ${domain}!" info; fi- fi- end_func "Results are saved in subdomains/zonetransfer.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$ZONETRANSFER" = true ]; then+ start_func "Zone transfer check"+ eval python3 $tools/dnsrecon/dnsrecon.py -d $domain -a -j subdomains/zonetransfer.json $DEBUG_STD+ if [ -s "subdomains/zonetransfer.json" ]; then+ if grep -q "\"zone_transfer\"\: \"success\"" subdomains/zonetransfer.json ; then notification "Zone transfer found on ${domain}!" info; fi+ fi+ end_func "Results are saved in subdomains/zonetransfer.txt" ${FUNCNAME[0]}+ else+ if [ "$ZONETRANSFER" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$ZONETRANSFER" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function s3buckets(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$S3BUCKETS" = true ]- then- start_func "AWS S3 buckets search"- eval s3scanner scan --buckets-file subdomains/subdomains.txt $DEBUG_ERROR | grep -iv "not_exist" | anew -q .tmp/s3buckets.txt- NUMOFLINES=$(eval cat .tmp/s3buckets.txt $DEBUG_ERROR | anew subdomains/s3buckets.txt | wc -l)- if [ "$NUMOFLINES" -gt 0 ]; then- notification "${NUMOFLINES} new S3 buckets found" info- fi- end_func "Results are saved in subdomains/s3buckets.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$S3BUCKETS" = true ]; then+ start_func "AWS S3 buckets search"+ eval s3scanner scan --buckets-file subdomains/subdomains.txt $DEBUG_ERROR | grep -iv "not_exist" | anew -q .tmp/s3buckets.txt+ NUMOFLINES=$(eval cat .tmp/s3buckets.txt $DEBUG_ERROR | anew subdomains/s3buckets.txt | wc -l)+ if [ "$NUMOFLINES" -gt 0 ]; then+ notification "${NUMOFLINES} new S3 buckets found" info+ fi+ end_func "Results are saved in subdomains/s3buckets.txt" ${FUNCNAME[0]}+ else+ if [ "$S3BUCKETS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$S3BUCKETS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -608,73 +570,65 @@ function s3buckets(){###############################################################################################################function webprobe_simple(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBESIMPLE" = true ]- then- start_subfunc "Running : Http probing"-- if [ -s ".tmp/probed_tmp_scrap.txt" ]- then- mv .tmp/probed_tmp_scrap.txt .tmp/probed_tmp.txt- else- cat subdomains/subdomains.txt | httpx -follow-host-redirects -random-agent -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt- fi- deleteOutScoped $outOfScope_file .tmp/probed_tmp.txt- NUMOFLINES=$(eval cat .tmp/probed_tmp.txt $DEBUG_ERROR | anew webs/webs.txt | wc -l)- end_subfunc "${NUMOFLINES} new websites resolved" ${FUNCNAME[0]}- if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/webs.txt| wc -l) -le 1500 ]]- then- notification "Sending websites to proxy" info- eval ffuf -mc all -w webs/webs.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD- fi+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBESIMPLE" = true ]; then+ start_subfunc "Running : Http probing"+ if [ -s ".tmp/probed_tmp_scrap.txt" ]; then+ mv .tmp/probed_tmp_scrap.txt .tmp/probed_tmp.txtelse- if [ "$WEBPROBESIMPLE" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ cat subdomains/subdomains.txt | httpx -follow-host-redirects -random-agent -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt+ fi+ deleteOutScoped $outOfScope_file .tmp/probed_tmp.txt+ NUMOFLINES=$(eval cat .tmp/probed_tmp.txt $DEBUG_ERROR | anew webs/webs.txt | wc -l)+ end_subfunc "${NUMOFLINES} new websites resolved" ${FUNCNAME[0]}+ if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/webs.txt| wc -l) -le 1500 ]]; then+ notification "Sending websites to proxy" info+ eval ffuf -mc all -w webs/webs.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD+ fi+ else+ if [ "$WEBPROBESIMPLE" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function webprobe_full(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBEFULL" = true ]- then- start_func "Http probing non standard ports"- eval nmap -p $UNCOMMON_PORTS_WEB --max-retries 2 -Pn -iL subdomains/subdomains.txt -oG .tmp/nmap_uncommonweb.txt $DEBUG_STD && uncommon_ports_checked=$(cat .tmp/nmap_uncommonweb.txt | egrep -v "^#|Status: Up" | cut -d' ' -f4- | sed -n -e 's/Ignored.*//p' | tr ',' '\n' | sed -e 's/^[ \t]*//' | sort -u | grep "open" | cut -d '/' -f1 | sed -e 'H;${x;s/\n/,/g;s/^,//;p;};d')- if [ -n "$uncommon_ports_checked" ]- then- cat subdomains/subdomains.txt | httpx -ports $uncommon_ports_checked -follow-host-redirects -random-agent -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain" | anew -q .tmp/probed_uncommon_ports_tmp.txt- fi- NUMOFLINES=$(eval cat .tmp/probed_uncommon_ports_tmp.txt $DEBUG_ERROR | anew webs/webs_uncommon_ports.txt | wc -l)- notification "Uncommon web ports: ${NUMOFLINES} new websites" good- eval cat webs/webs_uncommon_ports.txt $DEBUG_ERROR- end_func "Results are saved in webs/webs_uncommon_ports.txt" ${FUNCNAME[0]}- if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/webs_uncommon_ports.txt| wc -l) -le 1500 ]]- then- notification "Sending websites uncommon ports to proxy" info- eval ffuf -mc all -w webs/webs_uncommon_ports.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD- fi+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBEFULL" = true ]; then+ start_func "Http probing non standard ports"+ eval nmap -p $UNCOMMON_PORTS_WEB --max-retries 2 -Pn -iL subdomains/subdomains.txt -oG .tmp/nmap_uncommonweb.txt $DEBUG_STD && uncommon_ports_checked=$(cat .tmp/nmap_uncommonweb.txt | egrep -v "^#|Status: Up" | cut -d' ' -f4- | sed -n -e 's/Ignored.*//p' | tr ',' '\n' | sed -e 's/^[ \t]*//' | sort -u | grep "open" | cut -d '/' -f1 | sed -e 'H;${x;s/\n/,/g;s/^,//;p;};d')+ if [ -n "$uncommon_ports_checked" ]; then+ cat subdomains/subdomains.txt | httpx -ports $uncommon_ports_checked -follow-host-redirects -random-agent -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain" | anew -q .tmp/probed_uncommon_ports_tmp.txt+ fi+ NUMOFLINES=$(eval cat .tmp/probed_uncommon_ports_tmp.txt $DEBUG_ERROR | anew webs/webs_uncommon_ports.txt | wc -l)+ notification "Uncommon web ports: ${NUMOFLINES} new websites" good+ eval cat webs/webs_uncommon_ports.txt $DEBUG_ERROR+ end_func "Results are saved in webs/webs_uncommon_ports.txt" ${FUNCNAME[0]}+ if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/webs_uncommon_ports.txt| wc -l) -le 1500 ]]; then+ notification "Sending websites uncommon ports to proxy" info+ eval ffuf -mc all -w webs/webs_uncommon_ports.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD+ fi+ else+ if [ "$WEBPROBEFULL" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$WEBPROBEFULL" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function screenshot(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBSCREENSHOT" = true ]- then- start_func "Web Screenshots"- eval cat webs/webs.txt webs/webs_uncommon_ports.txt $DEBUG_ERROR | anew -q .tmp/webs_screenshots.txt- eval gowitness file -f .tmp/webs_screenshots.txt --disable-logging $DEBUG_ERROR- end_func "Results are saved in screenshots folder" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBSCREENSHOT" = true ]; then+ start_func "Web Screenshots"+ eval cat webs/webs.txt webs/webs_uncommon_ports.txt $DEBUG_ERROR | anew -q .tmp/webs_screenshots.txt+ eval gowitness file -f .tmp/webs_screenshots.txt --disable-logging $DEBUG_ERROR+ end_func "Results are saved in screenshots folder" ${FUNCNAME[0]}+ else+ if [ "$WEBSCREENSHOT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$WEBSCREENSHOT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -683,80 +637,71 @@ function screenshot(){###############################################################################################################function favicon(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$FAVICON" = true ]- then- start_func "Favicon Ip Lookup"- cd $tools/fav-up- eval python3 favUp.py -w $domain -sc -o favicontest.json $DEBUG_STD- if [ -f "favicontest.json" ]- then- cat favicontest.json | eval jq -r '.found_ips' $DEBUG_ERROR | grep -v "not-found" > favicontest.txt- sed -i "s/|/\n/g" favicontest.txt- eval cat favicontest.txt $DEBUG_ERROR- eval mv favicontest.txt $dir/hosts/favicontest.txt $DEBUG_ERROR- eval rm favicontest.json $DEBUG_ERROR- fi- cd $dir- end_func "Results are saved in hosts/favicontest.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$FAVICON" = true ]; then+ start_func "Favicon Ip Lookup"+ cd $tools/fav-up+ eval python3 favUp.py -w $domain -sc -o favicontest.json $DEBUG_STD+ if [ -f "favicontest.json" ]; then+ cat favicontest.json | eval jq -r '.found_ips' $DEBUG_ERROR | grep -v "not-found" > favicontest.txt+ sed -i "s/|/\n/g" favicontest.txt+ eval cat favicontest.txt $DEBUG_ERROR+ eval mv favicontest.txt $dir/hosts/favicontest.txt $DEBUG_ERROR+ eval rm favicontest.json $DEBUG_ERROR+ fi+ cd $dir+ end_func "Results are saved in hosts/favicontest.txt" ${FUNCNAME[0]}+ else+ if [ "$FAVICON" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$FAVICON" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function portscan(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$PORTSCANNER" = true ]- then- start_func "Port scan"- for sub in $(cat subdomains/subdomains.txt); do- echo "$sub $(dig +short a $sub | tail -n1)" | anew -q .tmp/subs_ips.txt+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$PORTSCANNER" = true ]; then+ start_func "Port scan"+ for sub in $(cat subdomains/subdomains.txt); do+ echo "$sub $(dig +short a $sub | tail -n1)" | anew -q .tmp/subs_ips.txt+ done+ awk '{ print $2 " " $1}' .tmp/subs_ips.txt | sort -k2 -n | anew -q hosts/subs_ips_vhosts.txt+ eval cat hosts/subs_ips_vhosts.txt $DEBUG_ERROR | cut -d ' ' -f1 | egrep -iv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q hosts/ips.txt+ eval cat hosts/ips.txt $DEBUG_ERROR | cf-check | egrep -iv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q .tmp/ips_nowaf.txt+ printf "${bblue}\n Resolved IP addresses (No WAF) ${reset}\n\n";+ eval cat .tmp/ips_nowaf.txt $DEBUG_ERROR | sort+ printf "${bblue}\n Scanning ports... ${reset}\n\n";+ if [ "$PORTSCAN_PASSIVE" = true ] && [ ! -f "hosts/portscan_passive.txt" ]; then+ for sub in $(cat hosts/ips.txt); do+ shodan host $sub 2>/dev/null >> hosts/portscan_passive.txt && echo -e "\n\n#######################################################################\n\n" >> hosts/portscan_passive.txtdone- awk '{ print $2 " " $1}' .tmp/subs_ips.txt | sort -k2 -n | anew -q hosts/subs_ips_vhosts.txt- eval cat hosts/subs_ips_vhosts.txt $DEBUG_ERROR | cut -d ' ' -f1 | egrep -iv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q hosts/ips.txt- eval cat hosts/ips.txt $DEBUG_ERROR | cf-check | egrep -iv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q .tmp/ips_nowaf.txt- printf "${bblue}\n Resolved IP addresses (No WAF) ${reset}\n\n";- eval cat .tmp/ips_nowaf.txt $DEBUG_ERROR | sort-- printf "${bblue}\n Scanning ports... ${reset}\n\n";- if [ "$PORTSCAN_PASSIVE" = true ] && [ ! -f "hosts/portscan_passive.txt" ]- then- for sub in $(cat hosts/ips.txt); do- shodan host $sub 2>/dev/null >> hosts/portscan_passive.txt && echo -e "\n\n#######################################################################\n\n" >> hosts/portscan_passive.txt- done- fi-- if [ "$PORTSCAN_ACTIVE" = true ]- then- eval nmap --top-ports 1000 -sV -n --max-retries 2 -Pn -iL .tmp/ips_nowaf.txt -oN hosts/portscan_active.txt -oG .tmp/nmap_grep.gnmap $DEBUG_STD- fi-- end_func "Results are saved in hosts/portscan_[passive|active].txt" ${FUNCNAME[0]}+ fi+ if [ "$PORTSCAN_ACTIVE" = true ]; then+ eval nmap --top-ports 1000 -sV -n --max-retries 2 -Pn -iL .tmp/ips_nowaf.txt -oN hosts/portscan_active.txt -oG .tmp/nmap_grep.gnmap $DEBUG_STD+ fi+ end_func "Results are saved in hosts/portscan_[passive|active].txt" ${FUNCNAME[0]}+ else+ if [ "$PORTSCANNER" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$PORTSCANNER" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function cloudprovider(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CLOUD_IP" = true ]- then- start_func "Cloud provider check"- cd $tools/ip2provider- eval cat $dir/hosts/ips.txt | ./ip2provider.py | anew -q $dir/hosts/cloud_providers.txt $DEBUG_STD- cd $dir- end_func "Results are saved in hosts/cloud_providers.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CLOUD_IP" = true ]; then+ start_func "Cloud provider check"+ cd $tools/ip2provider+ eval cat $dir/hosts/ips.txt | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | ./ip2provider.py | anew -q $dir/hosts/cloud_providers.txt $DEBUG_STD+ cd $dir+ end_func "Results are saved in hosts/cloud_providers.txt" ${FUNCNAME[0]}+ else+ if [ "$CLOUD_IP" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$CLOUD_IP" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -765,54 +710,52 @@ function cloudprovider(){###############################################################################################################function waf_checks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WAF_DETECTION" = true ]- then- start_func "Website's WAF detection"- wafw00f -i webs/webs.txt -o .tmp/wafs.txt &>/dev/null- cat .tmp/wafs.txt | sed -e 's/^[ \t]*//' -e 's/ \+ /\t/g' -e '/(None)/d' | tr -s "\t" ";" > webs/webs_wafs.txt- NUMOFLINES=$(eval cat webs/webs_wafs.txt $DEBUG_ERROR | wc -l)- notification "${NUMOFLINES} websites protected by waf" info- end_func "Results are saved in webs/webs_wafs.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WAF_DETECTION" = true ]; then+ start_func "Website's WAF detection"+ wafw00f -i webs/webs.txt -o .tmp/wafs.txt &>/dev/null+ cat .tmp/wafs.txt | sed -e 's/^[ \t]*//' -e 's/ \+ /\t/g' -e '/(None)/d' | tr -s "\t" ";" > webs/webs_wafs.txt+ NUMOFLINES=$(eval cat webs/webs_wafs.txt $DEBUG_ERROR | wc -l)+ notification "${NUMOFLINES} websites protected by waf" info+ end_func "Results are saved in webs/webs_wafs.txt" ${FUNCNAME[0]}+ else+ if [ "$WAF" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$WAF" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function nuclei_check(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$NUCLEICHECK" = true ]- then- start_func "Templates based web scanner"- eval nuclei -update-templates $DEBUG_STD- mkdir -p nuclei_output- printf "${yellow}\n Running : Nuclei Info${reset}\n\n"- cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity info -r $resolvers_trusted -o nuclei_output/info.txt- printf "${yellow}\n\n Running : Nuclei Low${reset}\n\n"- cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity low -r $resolvers_trusted -o nuclei_output/low.txt- printf "${yellow}\n\n Running : Nuclei Medium${reset}\n\n"- cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity medium -r $resolvers_trusted -o nuclei_output/medium.txt- printf "${yellow}\n\n Running : Nuclei High${reset}\n\n"- cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity high -r $resolvers_trusted -o nuclei_output/high.txt- printf "${yellow}\n\n Running : Nuclei Critical${reset}\n\n"- cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity critical -r $resolvers_trusted -o nuclei_output/critical.txt- printf "\n\n"- end_func "Results are saved in nuclei_output folder" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$NUCLEICHECK" = true ]; then+ start_func "Templates based web scanner"+ eval nuclei -update-templates $DEBUG_STD+ mkdir -p nuclei_output+ printf "${yellow}\n Running : Nuclei Info${reset}\n\n"+ cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity info -r $resolvers_trusted -o nuclei_output/info.txt+ printf "${yellow}\n\n Running : Nuclei Low${reset}\n\n"+ cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity low -r $resolvers_trusted -o nuclei_output/low.txt+ printf "${yellow}\n\n Running : Nuclei Medium${reset}\n\n"+ cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity medium -r $resolvers_trusted -o nuclei_output/medium.txt+ printf "${yellow}\n\n Running : Nuclei High${reset}\n\n"+ cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity high -r $resolvers_trusted -o nuclei_output/high.txt+ printf "${yellow}\n\n Running : Nuclei Critical${reset}\n\n"+ cat webs/webs.txt | nuclei -silent -t ~/nuclei-templates/ -severity critical -r $resolvers_trusted -o nuclei_output/critical.txt+ printf "\n\n"+ end_func "Results are saved in nuclei_output folder" ${FUNCNAME[0]}+ else+ if [ "$NUCLEICHECK" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$NUCLEICHECK" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function fuzz(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$FUZZ" = true ]- then- start_func "Web directory fuzzing"+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$FUZZ" = true ]; then+ start_func "Web directory fuzzing"+ if [ -s "./webs/webs.txt" ]; thenmkdir -p $dir/fuzzingfor sub in $(cat webs/webs.txt); doprintf "${yellow}\n\n Running: Fuzzing in ${sub}${reset}\n"@@ -821,152 +764,159 @@ function fuzz(){eval cat $dir/fuzzing/${sub_out}.tmp $DEBUG_ERROR | jq '[.results[]|{status: .status, length: .length, url: .url}]' | grep -oP "status\":\s(\d{3})|length\":\s(\d{1,7})|url\":\s\"(http[s]?:\/\/.*?)\"" | paste -d' ' - - - | awk '{print $2" "$4" "$6}' | sed 's/\"//g' | sort |anew -q $dir/fuzzing/${sub_out}.txteval rm $dir/fuzzing/${sub_out}.tmp $DEBUG_ERRORdone- end_func "Results are saved in fuzzing/*subdomain*.txt" ${FUNCNAME[0]}+ end_func "Results are saved in $domain/fuzzing/*subdomain*.txt" ${FUNCNAME[0]}else- if [ "$FUZZ" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ end_func "No $domain/web/webs.txts file found, fuzzing skipped " ${FUNCNAME[0]}+ fi+ else+ if [ "$FUZZ" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function cms_scanner(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CMS_SCANNER" = true ]- then- start_func "CMS Scanner"- mkdir -p $dir/cms && rm -rf $dir/cms/*+ if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$CMS_SCANNER" = true ]; then+ start_func "CMS Scanner"+ mkdir -p $dir/cms && rm -rf $dir/cms/*+ if [ -s "./webs/webs.txt" ]; thentr '\n' ',' < webs/webs.txt > .tmp/cms.txt- eval python3 $tools/CMSeeK/cmseek.py -l .tmp/cms.txt --batch -r $DEBUG_STD+ eval timeout -k 30 $CMSSCAN_TIMEOUT python3 $tools/CMSeeK/cmseek.py -l .tmp/cms.txt --batch -r $DEBUG_STD+ exit_status=$?+ if [[ $exit_status -eq 125 ]]; then+ echo "TIMEOUT cmseek.py - investigate manually for $dir" $DEBUG_STD+ end_func "TIMEOUT cmseek.py - investigate manually for $dir" ${FUNCNAME[0]}+ return+ elif [[ $exit_status -ne 0 ]]; then+ echo "ERROR cmseek.py - investigate manually for $dir" $DEBUG_STD+ end_func "ERROR cmseek.py - investigate manually for $dir" ${FUNCNAME[0]}+ return+ fi # otherwise Assume we have a successfully exited cmseekfor sub in $(cat webs/webs.txt); dosub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')cms_id=$(eval cat $tools/CMSeeK/Result/${sub_out}/cms.json $DEBUG_ERROR | jq -r '.cms_id')- if [ -z "$cms_id" ]- then+ if [ -z "$cms_id" ]; thenrm -rf $tools/CMSeeK/Result/${sub_out}elsemv -f $tools/CMSeeK/Result/${sub_out} $dir/cms/fidone- end_func "Results are saved in cms/*subdomain* folder" ${FUNCNAME[0]}+ end_func "Results are saved in $domain/cms/*subdomain* folder" ${FUNCNAME[0]}else- if [ "$CMS_SCANNER" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ end_func "No $domain/web/webs.txts file found, cms scanner skipped" ${FUNCNAME[0]}+ fi+ else+ if [ "$CMS_SCANNER" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function params(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$PARAMS" = true ]- then- start_func "Parameter Discovery"- printf "${yellow}\n\n Running : Searching params with paramspider${reset}\n"- cat webs/webs.txt | sed -r "s/https?:\/\///" | anew -q .tmp/probed_nohttp.txt- interlace -tL .tmp/probed_nohttp.txt -threads 10 -c "python3 $tools/ParamSpider/paramspider.py -d _target_ -l high -q --exclude eot,jpg,jpeg,gif,css,tif,tiff,png,ttf,otf,woff,woff2,ico,pdf,svg,txt,js" &>/dev/null- eval cat output/*.txt $DEBUG_ERROR | anew -q .tmp/param_tmp.txt- sed '/^FUZZ/d' -i .tmp/param_tmp.txt- eval rm -rf output/ $DEBUG_ERROR- if [ "$DEEP" = true ] ; then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$PARAMS" = true ]; then+ start_func "Parameter Discovery"+ printf "${yellow}\n\n Running : Searching params with paramspider${reset}\n"+ cat webs/webs.txt | sed -r "s/https?:\/\///" | anew -q .tmp/probed_nohttp.txt+ interlace -tL .tmp/probed_nohttp.txt -threads 10 -c "python3 $tools/ParamSpider/paramspider.py -d _target_ -l high -q --exclude eot,jpg,jpeg,gif,css,tif,tiff,png,ttf,otf,woff,woff2,ico,pdf,svg,txt,js" &>/dev/null+ eval cat output/*.txt $DEBUG_ERROR | anew -q .tmp/param_tmp.txt+ sed '/^FUZZ/d' -i .tmp/param_tmp.txt+ eval rm -rf output/ $DEBUG_ERROR+ if [ "$DEEP" = true ]; then+ printf "${yellow}\n\n Running : Checking ${domain} with Arjun${reset}\n"+ eval arjun -i .tmp/param_tmp.txt -t $ARJUN_THREADS -oT webs/param.txt $DEBUG_STD+ else+ if [[ $(cat .tmp/param_tmp.txt | wc -l) -le 50 ]]; thenprintf "${yellow}\n\n Running : Checking ${domain} with Arjun${reset}\n"eval arjun -i .tmp/param_tmp.txt -t $ARJUN_THREADS -oT webs/param.txt $DEBUG_STDelse- if [[ $(cat .tmp/param_tmp.txt | wc -l) -le 50 ]]- then- printf "${yellow}\n\n Running : Checking ${domain} with Arjun${reset}\n"- eval arjun -i .tmp/param_tmp.txt -t $ARJUN_THREADS -oT webs/param.txt $DEBUG_STD- else- cp .tmp/param_tmp.txt webs/param.txt- fi+ cp .tmp/param_tmp.txt webs/param.txtfi- end_func "Results are saved in webs/param.txt" ${FUNCNAME[0]}+ fi+ end_func "Results are saved in webs/param.txt" ${FUNCNAME[0]}+ else+ if [ "$PARAMS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$PARAMS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function urlchecks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_CHECK" = true ]- then- start_func "URL Extraction"- mkdir -p js- cat webs/webs.txt | waybackurls | anew -q .tmp/url_extract_tmp.txt- cat webs/webs.txt | gauplus -t $GAUPLUS_THREADS -subs | anew -q .tmp/url_extract_tmp.txt- diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt) <(sort -u webs/webs.txt) | wc -l)- if [ $diff_webs != "0" ] || [ ! -s ".tmp/gospider.txt" ] ;- then- if [ "$DEEP" = true ] ; then- gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -d 3 --sitemap --robots -w -r > .tmp/gospider.txt- else- gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -d 2 --sitemap --robots -w -r > .tmp/gospider.txt- fi- fi- sed -i '/^.\{2048\}./d' .tmp/gospider.txt- cat .tmp/gospider.txt | egrep -o 'https?://[^ ]+' | sed 's/]$//' | grep ".$domain$" | anew -q .tmp/url_extract_tmp.txt- if [ -s "${GITHUB_TOKENS}" ]- then- eval github-endpoints -q -k -d $domain -t ${GITHUB_TOKENS} -o .tmp/github-endpoints.txt $DEBUG_STD- eval cat .tmp/github-endpoints.txt $DEBUG_ERROR | anew -q .tmp/url_extract_tmp.txt- fi- eval cat .tmp/url_extract_tmp.txt webs/param.txt $DEBUG_ERROR | grep "${domain}" | grep "=" | eval qsreplace -a $DEBUG_ERROR | egrep -iv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)$" | anew -q .tmp/url_extract_tmp2.txt- cat .tmp/url_extract_tmp.txt | grep "${domain}" | egrep -i "\.(js)" | anew -q js/url_extract_js.txt- eval uddup -u .tmp/url_extract_tmp2.txt -o .tmp/url_extract_uddup.txt $DEBUG_STD- NUMOFLINES=$(eval cat .tmp/url_extract_uddup.txt $DEBUG_ERROR | anew webs/url_extract.txt | wc -l)- notification "${NUMOFLINES} new urls with params" info- end_func "Results are saved in webs/url_extract.txt" ${FUNCNAME[0]}- if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/url_extract.txt | wc -l) -le 1500 ]]- then- notification "Sending urls to proxy" info- eval ffuf -mc all -w webs/url_extract.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_CHECK" = true ]; then+ start_func "URL Extraction"+ mkdir -p js+ cat webs/webs.txt | waybackurls | anew -q .tmp/url_extract_tmp.txt+ cat webs/webs.txt | gauplus -t $GAUPLUS_THREADS -subs | anew -q .tmp/url_extract_tmp.txt+ diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt) <(sort -u webs/webs.txt) | wc -l)+ if [ $diff_webs != "0" ] || [ ! -s ".tmp/gospider.txt" ]; then+ if [ "$DEEP" = true ]; then+ gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -d 3 --sitemap --robots -w -r > .tmp/gospider.txt+ else+ gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -d 2 --sitemap --robots -w -r > .tmp/gospider.txtfi- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fi+ sed -i '/^.\{2048\}./d' .tmp/gospider.txt+ cat .tmp/gospider.txt | egrep -o 'https?://[^ ]+' | sed 's/]$//' | grep ".$domain$" | anew -q .tmp/url_extract_tmp.txt+ if [ -s "${GITHUB_TOKENS}" ]; then+ eval github-endpoints -q -k -d $domain -t ${GITHUB_TOKENS} -o .tmp/github-endpoints.txt $DEBUG_STD+ eval cat .tmp/github-endpoints.txt $DEBUG_ERROR | anew -q .tmp/url_extract_tmp.txt+ fi+ eval cat .tmp/url_extract_tmp.txt webs/param.txt $DEBUG_ERROR | grep "${domain}" | grep "=" | eval qsreplace -a $DEBUG_ERROR | egrep -iv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)$" | anew -q .tmp/url_extract_tmp2.txt+ cat .tmp/url_extract_tmp.txt | grep "${domain}" | egrep -i "\.(js)" | anew -q js/url_extract_js.txt+ eval uddup -u .tmp/url_extract_tmp2.txt -o .tmp/url_extract_uddup.txt $DEBUG_STD+ NUMOFLINES=$(eval cat .tmp/url_extract_uddup.txt $DEBUG_ERROR | anew webs/url_extract.txt | wc -l)+ notification "${NUMOFLINES} new urls with params" info+ end_func "Results are saved in webs/url_extract.txt" ${FUNCNAME[0]}+ if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/url_extract.txt | wc -l) -le 1500 ]]; then+ notification "Sending urls to proxy" info+ eval ffuf -mc all -w webs/url_extract.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD+ fi+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi}function url_gf(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_GF" = true ]- then- start_func "Vulnerable Pattern Search"- mkdir -p gf- gf xss webs/url_extract.txt | anew -q gf/xss.txt- gf ssti webs/url_extract.txt | anew -q gf/ssti.txt- gf ssrf webs/url_extract.txt | anew -q gf/ssrf.txt- gf sqli webs/url_extract.txt | anew -q gf/sqli.txt- gf redirect webs/url_extract.txt | anew -q gf/redirect.txt && cat gf/ssrf.txt | anew -q gf/redirect.txt- gf rce webs/url_extract.txt | anew -q gf/rce.txt- gf potential webs/url_extract.txt | cut -d ':' -f3-5 |anew -q gf/potential.txt- cat .tmp/url_extract_tmp.txt | egrep -iv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)$" | unfurl -u format %s://%d%p | anew -q gf/endpoints.txt- gf lfi webs/url_extract.txt | anew -q gf/lfi.txt- end_func "Results are saved in gf folder" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_GF" = true ]; then+ start_func "Vulnerable Pattern Search"+ mkdir -p gf+ gf xss webs/url_extract.txt | anew -q gf/xss.txt+ gf ssti webs/url_extract.txt | anew -q gf/ssti.txt+ gf ssrf webs/url_extract.txt | anew -q gf/ssrf.txt+ gf sqli webs/url_extract.txt | anew -q gf/sqli.txt+ gf redirect webs/url_extract.txt | anew -q gf/redirect.txt && cat gf/ssrf.txt | anew -q gf/redirect.txt+ gf rce webs/url_extract.txt | anew -q gf/rce.txt+ gf potential webs/url_extract.txt | cut -d ':' -f3-5 |anew -q gf/potential.txt+ cat .tmp/url_extract_tmp.txt | egrep -iv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)$" | unfurl -u format %s://%d%p | anew -q gf/endpoints.txt+ gf lfi webs/url_extract.txt | anew -q gf/lfi.txt+ end_func "Results are saved in gf folder" ${FUNCNAME[0]}+ else+ if [ "$URL_GF" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$URL_GF" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function url_ext(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_EXT" = true ]- then- ext=("7z" "achee" "action" "adr" "apk" "arj" "ascx" "asmx" "asp" "aspx" "axd" "backup" "bak" "bat" "bin" "bkf" "bkp" "bok" "cab" "cer" "cfg" "cfm" "cfml" "cgi" "cnf" "conf" "config" "cpl" "crt" "csr" "csv" "dat" "db" "dbf" "deb" "dmg" "dmp" "doc" "docx" "drv" "email" "eml" "emlx" "env" "exe" "gadget" "gz" "html" "ica" "inf" "ini" "iso" "jar" "java" "jhtml" "json" "jsp" "key" "log" "lst" "mai" "mbox" "mbx" "md" "mdb" "msg" "msi" "nsf" "ods" "oft" "old" "ora" "ost" "pac" "passwd" "pcf" "pdf" "pem" "pgp" "php" "php3" "php4" "php5" "phtm" "phtml" "pkg" "pl" "plist" "pst" "pwd" "py" "rar" "rb" "rdp" "reg" "rpm" "rtf" "sav" "sh" "shtm" "shtml" "skr" "sql" "swf" "sys" "tar" "tar.gz" "tmp" "toast" "tpl" "txt" "url" "vcd" "vcf" "wml" "wpd" "wsdl" "wsf" "xls" "xlsm" "xlsx" "xml" "xsd" "yaml" "yml" "z" "zip")- echo "" > webs/url_extract.txt- for t in "${ext[@]}"; do- NUMOFLINES=$(cat .tmp/url_extract_tmp.txt | egrep -i "\.(${t})($|\/|\?)" | sort -u | wc -l)- if [[ ${NUMOFLINES} -gt 0 ]]; then- echo -e "\n############################\n + ${t} + \n############################\n" >> webs/urls_by_ext.txt- cat .tmp/url_extract_tmp.txt | egrep -i "\.(${t})($|\/|\?)" | sort -u >> webs/urls_by_ext.txt- fi- done- end_func "Results are saved in webs/urls_by_ext.txt" ${FUNCNAME[0]}- else+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_EXT" = true ]; then+ ext=("7z" "achee" "action" "adr" "apk" "arj" "ascx" "asmx" "asp" "aspx" "axd" "backup" "bak" "bat" "bin" "bkf" "bkp" "bok" "cab" "cer" "cfg" "cfm" "cfml" "cgi" "cnf" "conf" "config" "cpl" "crt" "csr" "csv" "dat" "db" "dbf" "deb" "dmg" "dmp" "doc" "docx" "drv" "email" "eml" "emlx" "env" "exe" "gadget" "gz" "html" "ica" "inf" "ini" "iso" "jar" "java" "jhtml" "json" "jsp" "key" "log" "lst" "mai" "mbox" "mbx" "md" "mdb" "msg" "msi" "nsf" "ods" "oft" "old" "ora" "ost" "pac" "passwd" "pcf" "pdf" "pem" "pgp" "php" "php3" "php4" "php5" "phtm" "phtml" "pkg" "pl" "plist" "pst" "pwd" "py" "rar" "rb" "rdp" "reg" "rpm" "rtf" "sav" "sh" "shtm" "shtml" "skr" "sql" "swf" "sys" "tar" "tar.gz" "tmp" "toast" "tpl" "txt" "url" "vcd" "vcf" "wml" "wpd" "wsdl" "wsf" "xls" "xlsm" "xlsx" "xml" "xsd" "yaml" "yml" "z" "zip")+ echo "" > webs/url_extract.txt+ for t in "${ext[@]}"; do+ NUMOFLINES=$(cat .tmp/url_extract_tmp.txt | egrep -i "\.(${t})($|\/|\?)" | sort -u | wc -l)+ if [[ ${NUMOFLINES} -gt 0 ]]; then+ echo -e "\n############################\n + ${t} + \n############################\n" >> webs/urls_by_ext.txt+ cat .tmp/url_extract_tmp.txt | egrep -i "\.(${t})($|\/|\?)" | sort -u >> webs/urls_by_ext.txt+ fi+ done+ end_func "Results are saved in webs/urls_by_ext.txt" ${FUNCNAME[0]}+ elseif [ "$URL_EXT" = false ]; thenprintf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else@@ -976,68 +926,60 @@ function url_ext(){}function jschecks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$JSCHECKS" = true ]- then- start_func "Javascript Scan"- if [ -s "js/url_extract_js.txt" ]- then- printf "${yellow} Running : Fetching Urls 1/5${reset}\n"- cat js/url_extract_js.txt | cut -d '?' -f 1 | grep -iE "\.js$" | grep "$domain$" | anew -q js/jsfile_links.txt- cat js/url_extract_js.txt | subjs | grep "$domain$" | anew -q js/jsfile_links.txt- printf "${yellow} Running : Resolving JS Urls 2/5${reset}\n"- cat js/jsfile_links.txt | httpx -follow-redirects -random-agent -silent -timeout 15 -threads $HTTPX_THREADS -status-code -retries 2 -no-color | grep "[200]" | cut -d ' ' -f1 | anew -q js/js_livelinks.txt- printf "${yellow} Running : Gathering endpoints 3/5${reset}\n"- if [ -s "js/js_livelinks.txt" ]- then- interlace -tL js/js_livelinks.txt -threads 10 -c "python3 $tools/LinkFinder/linkfinder.py -d -i _target_ -o cli >> .tmp/js_endpoints.txt" &>/dev/null- fi- if [ -s ".tmp/js_endpoints.txt" ]- then- sed -i '/^\//!d' .tmp/js_endpoints.txt- cat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txt.txt- fi- printf "${yellow} Running : Gathering secrets 4/5${reset}\n"- if [ -s "js/js_livelinks.txt" ]- then- cat js/js_livelinks.txt | eval nuclei -silent -t ~/nuclei-templates/exposures/ -r $resolvers_trusted -o js/js_secrets.txt $DEBUG_STD- fi- printf "${yellow} Running : Building wordlist 5/5${reset}\n"- if [ -s "js/js_livelinks.txt" ]- then- cat js/js_livelinks.txt | eval python3 $tools/getjswords.py $DEBUG_ERROR | anew -q webs/dict_words.txt- fi- end_func "Results are saved in js folder" ${FUNCNAME[0]}- else- end_func "No JS urls found, function skipped" ${FUNCNAME[0]}- fi+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$JSCHECKS" = true ]; then+ start_func "Javascript Scan"+ if [ -s "js/url_extract_js.txt" ]; then+ printf "${yellow} Running : Fetching Urls 1/5${reset}\n"+ cat js/url_extract_js.txt | cut -d '?' -f 1 | grep -iE "\.js$" | grep "$domain$" | anew -q js/jsfile_links.txt+ cat js/url_extract_js.txt | subjs | grep "$domain$" | anew -q js/jsfile_links.txt+ printf "${yellow} Running : Resolving JS Urls 2/5${reset}\n"+ cat js/jsfile_links.txt | httpx -follow-redirects -random-agent -silent -timeout 15 -threads $HTTPX_THREADS -status-code -retries 2 -no-color | grep "[200]" | cut -d ' ' -f1 | anew -q js/js_livelinks.txt+ printf "${yellow} Running : Gathering endpoints 3/5${reset}\n"+ if [ -s "js/js_livelinks.txt" ]; then+ interlace -tL js/js_livelinks.txt -threads 10 -c "python3 $tools/LinkFinder/linkfinder.py -d -i _target_ -o cli >> .tmp/js_endpoints.txt" &>/dev/null+ fi+ if [ -s ".tmp/js_endpoints.txt" ]; then+ sed -i '/^\//!d' .tmp/js_endpoints.txt+ cat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txt.txt+ fi+ printf "${yellow} Running : Gathering secrets 4/5${reset}\n"+ if [ -s "js/js_livelinks.txt" ]; then+ cat js/js_livelinks.txt | eval nuclei -silent -t ~/nuclei-templates/exposures/ -r $resolvers_trusted -o js/js_secrets.txt $DEBUG_STD+ fi+ printf "${yellow} Running : Building wordlist 5/5${reset}\n"+ if [ -s "js/js_livelinks.txt" ]; then+ cat js/js_livelinks.txt | eval python3 $tools/getjswords.py $DEBUG_ERROR | anew -q webs/dict_words.txt+ fi+ end_func "Results are saved in js folder" ${FUNCNAME[0]}else- if [ "$JSCHECKS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ end_func "No JS urls found, function skipped" ${FUNCNAME[0]}+ fi+ else+ if [ "$JSCHECKS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function wordlist_gen(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WORDLIST" = true ]- then- start_func "Wordlist generation"- cat .tmp/url_extract_tmp.txt | unfurl -u keys | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt- cat .tmp/url_extract_tmp.txt | unfurl -u values | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt- cat .tmp/url_extract_tmp.txt | tr "[:punct:]" "\n" | anew -q webs/dict_words.txt- if [ -s ".tmp/js_endpoints.txt" ]- then- cat .tmp/js_endpoints.txt | unfurl -u path | anew -q webs/dict_paths.txt- fi- cat .tmp/url_extract_tmp.txt | unfurl -u path | anew -q webs/dict_paths.txt- end_func "Results are saved in webs/dict_[words|paths].txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WORDLIST" = true ]; then+ start_func "Wordlist generation"+ cat .tmp/url_extract_tmp.txt | unfurl -u keys | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt+ cat .tmp/url_extract_tmp.txt | unfurl -u values | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt+ cat .tmp/url_extract_tmp.txt | tr "[:punct:]" "\n" | anew -q webs/dict_words.txt+ if [ -s ".tmp/js_endpoints.txt" ]; then+ cat .tmp/js_endpoints.txt | unfurl -u path | anew -q webs/dict_paths.txt+ fi+ cat .tmp/url_extract_tmp.txt | unfurl -u path | anew -q webs/dict_paths.txt+ end_func "Results are saved in webs/dict_[words|paths].txt" ${FUNCNAME[0]}+ else+ if [ "$WORDLIST" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$WORDLIST" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -1046,10 +988,10 @@ function wordlist_gen(){###############################################################################################################function brokenLinks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$BROKENLINKS" = true ] ; then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$BROKENLINKS" = true ]; thenstart_func "Broken links checks"if [ ! -s ".tmp/gospider.txt" ]; then- if [ "$DEEP" = true ] ; then+ if [ "$DEEP" = true ]; thengospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -d 3 --sitemap --robots -w -r > .tmp/gospider.txtelsegospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -d 2 --sitemap --robots -w -r > .tmp/gospider.txt@@ -1070,11 +1012,10 @@ function brokenLinks(){}function xss(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$XSS" = true ] && [ -s "gf/xss.txt" ]- then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$XSS" = true ] && [ -s "gf/xss.txt" ]; thenstart_func "XSS Analysis"cat gf/xss.txt | qsreplace FUZZ | Gxss -c 100 -p Xss | anew -q .tmp/xss_reflected.txt- if [ "$DEEP" = true ] ; then+ if [ "$DEEP" = true ]; thenif [ -n "$XSS_SERVER" ]; theneval cat .tmp/xss_reflected.txt | dalfox pipe --silence --no-color --no-spinner --mass --mass-worker 100 --multicast --skip-bav -b ${XSS_SERVER} -w $DALFOX_THREADS $DEBUG_ERROR | anew -q vulns/xss.txtelse@@ -1082,8 +1023,7 @@ function xss(){eval cat .tmp/xss_reflected.txt | dalfox pipe --silence --no-color --no-spinner --mass --mass-worker 100 --multicast --skip-bav -w $DALFOX_THREADS $DEBUG_ERROR | anew -q vulns/xss.txtfielse- if [[ $(cat .tmp/xss_reflected.txt | wc -l) -le 500 ]]- then+ if [[ $(cat .tmp/xss_reflected.txt | wc -l) -le 500 ]]; thenif [ -n "$XSS_SERVER" ]; theneval cat .tmp/xss_reflected.txt | dalfox pipe --silence --no-color --no-spinner --mass --mass-worker 100 --multicast --skip-bav --skip-grepping --skip-mining-all --skip-mining-dict -b ${XSS_SERVER} -w $DALFOX_THREADS $DEBUG_ERROR | anew -q vulns/xss.txtelse@@ -1107,59 +1047,55 @@ function xss(){}function cors(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CORS" = true ]- then- start_func "CORS Scan"- eval python3 $tools/Corsy/corsy.py -i webs/webs.txt > webs/cors.txt $DEBUG_STD- eval cat webs/cors.txt $DEBUG_ERROR- end_func "Results are saved in webs/cors.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CORS" = true ]; then+ start_func "CORS Scan"+ eval python3 $tools/Corsy/corsy.py -i webs/webs.txt > webs/cors.txt $DEBUG_STD+ eval cat webs/cors.txt $DEBUG_ERROR+ end_func "Results are saved in webs/cors.txt" ${FUNCNAME[0]}+ else+ if [ "$CORS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$CORS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function open_redirect(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$OPEN_REDIRECT" = true ] && [ -s "gf/redirect.txt" ]- then- start_func "Open redirects checks"- if [ "$DEEP" = true ] ; then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$OPEN_REDIRECT" = true ] && [ -s "gf/redirect.txt" ]; then+ start_func "Open redirects checks"+ if [ "$DEEP" = true ]; then+ cat gf/redirect.txt | qsreplace FUZZ | anew -q .tmp/tmp_redirect.txt+ eval python3 $tools/OpenRedireX/openredirex.py -l .tmp/tmp_redirect.txt --keyword FUZZ -p $tools/OpenRedireX/payloads.txt $DEBUG_ERROR | grep "^http" > vulns/redirect.txt+ sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" vulns/redirect.txt+ end_func "Results are saved in vulns/redirect.txt" ${FUNCNAME[0]}+ else+ if [[ $(cat gf/redirect.txt | wc -l) -le 1000 ]]; thencat gf/redirect.txt | qsreplace FUZZ | anew -q .tmp/tmp_redirect.txteval python3 $tools/OpenRedireX/openredirex.py -l .tmp/tmp_redirect.txt --keyword FUZZ -p $tools/OpenRedireX/payloads.txt $DEBUG_ERROR | grep "^http" > vulns/redirect.txtsed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" vulns/redirect.txtend_func "Results are saved in vulns/redirect.txt" ${FUNCNAME[0]}else- if [[ $(cat gf/redirect.txt | wc -l) -le 1000 ]]- then- cat gf/redirect.txt | qsreplace FUZZ | anew -q .tmp/tmp_redirect.txt- eval python3 $tools/OpenRedireX/openredirex.py -l .tmp/tmp_redirect.txt --keyword FUZZ -p $tools/OpenRedireX/payloads.txt $DEBUG_ERROR | grep "^http" > vulns/redirect.txt- sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" vulns/redirect.txt- end_func "Results are saved in vulns/redirect.txt" ${FUNCNAME[0]}- else- printf "${bred} Skipping Open redirects: Too Much URLs to test, try with --deep flag${reset}\n"- printf "${bgreen}#######################################################################${reset}\n"- fi+ printf "${bred} Skipping Open redirects: Too Much URLs to test, try with --deep flag${reset}\n"+ printf "${bgreen}#######################################################################${reset}\n"fi+ fi+ else+ if [ "$OPEN_REDIRECT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ elif [ ! -s "gf/redirect.txt" ]; then+ printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to Open Redirect ${reset}\n\n"else- if [ "$OPEN_REDIRECT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- elif [ ! -s "gf/redirect.txt" ]; then- printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to Open Redirect ${reset}\n\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function ssrf_checks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSRF_CHECKS" = true ] && [ -s "gf/ssrf.txt" ]- then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSRF_CHECKS" = true ] && [ -s "gf/ssrf.txt" ]; thenif [ -n "$COLLAB_SERVER" ]; thenstart_func "SSRF checks"- if [ "$DEEP" = true ] ; then+ if [ "$DEEP" = true ]; thencat gf/ssrf.txt | qsreplace FUZZ | anew -q .tmp/tmp_ssrf.txtCOLLAB_SERVER_FIX=$(echo $COLLAB_SERVER | sed -r "s/https?:\/\///")echo $COLLAB_SERVER_FIX | anew -q .tmp/ssrf_server.txt@@ -1170,8 +1106,7 @@ function ssrf_checks(){eval python3 $tools/ssrf.py $dir/gf/ssrf.txt $COLLAB_SERVER_FIX $DEBUG_ERROR | anew -q vulns/ssrf.txtend_func "Results are saved in vulns/ssrf.txt" ${FUNCNAME[0]}else- if [[ $(cat gf/ssrf.txt | wc -l) -le 1000 ]]- then+ if [[ $(cat gf/ssrf.txt | wc -l) -le 1000 ]]; thencat gf/ssrf.txt | qsreplace FUZZ | anew -q .tmp/tmp_ssrf.txtCOLLAB_SERVER_FIX=$(echo $COLLAB_SERVER | sed -r "s/https?:\/\///")echo $COLLAB_SERVER_FIX | anew -q .tmp/ssrf_server.txt@@ -1202,123 +1137,116 @@ function ssrf_checks(){}function crlf_checks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CRLF_CHECKS" = true ]- then- start_func "CRLF checks"- eval crlfuzz -l webs/webs.txt -o vulns/crlf.txt $DEBUG_STD- end_func "Results are saved in vulns/crlf.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CRLF_CHECKS" = true ]; then+ start_func "CRLF checks"+ eval crlfuzz -l webs/webs.txt -o vulns/crlf.txt $DEBUG_STD+ end_func "Results are saved in vulns/crlf.txt" ${FUNCNAME[0]}+ else+ if [ "$CRLF_CHECKS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$CRLF_CHECKS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function lfi(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$LFI" = true ] && [ -s "gf/lfi.txt" ]- then- start_func "LFI checks"- cat gf/lfi.txt | qsreplace FUZZ | anew -q .tmp/tmp_lfi.txt- for url in $(cat .tmp/tmp_lfi.txt); do- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w $lfi_wordlist -u $url -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/lfi.txt- done- end_func "Results are saved in vulns/lfi.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$LFI" = true ] && [ -s "gf/lfi.txt" ]; then+ start_func "LFI checks"+ cat gf/lfi.txt | qsreplace FUZZ | anew -q .tmp/tmp_lfi.txt+ for url in $(cat .tmp/tmp_lfi.txt); do+ ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w $lfi_wordlist -u $url -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/lfi.txt+ done+ end_func "Results are saved in vulns/lfi.txt" ${FUNCNAME[0]}+ else+ if [ "$LFI" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ elif [ ! -s "gf/lfi.txt" ]; then+ printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to LFI ${reset}\n\n"else- if [ "$LFI" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- elif [ ! -s "gf/lfi.txt" ]; then- printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to LFI ${reset}\n\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function ssti(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSTI" = true ] && [ -s "gf/ssti.txt" ]- then- start_func "SSTI checks"- cat gf/ssti.txt | qsreplace "ssti{{7*7}}" | anew -q .tmp/ssti_fuzz.txt- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "ssti49" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt- cat gf/ssti.txt | qsreplace "{{''.class.mro[2].subclasses()[40]('/etc/passwd').read()}}" | anew -q .tmp/ssti_fuzz2.txt- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt- end_func "Results are saved in vulns/ssti.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSTI" = true ] && [ -s "gf/ssti.txt" ]; then+ start_func "SSTI checks"+ cat gf/ssti.txt | qsreplace "ssti{{7*7}}" | anew -q .tmp/ssti_fuzz.txt+ ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "ssti49" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt+ cat gf/ssti.txt | qsreplace "{{''.class.mro[2].subclasses()[40]('/etc/passwd').read()}}" | anew -q .tmp/ssti_fuzz2.txt+ ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt+ end_func "Results are saved in vulns/ssti.txt" ${FUNCNAME[0]}+ else+ if [ "$SSTI" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ elif [ ! -s "gf/ssti.txt" ]; then+ printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SSTI ${reset}\n\n"else- if [ "$SSTI" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- elif [ ! -s "gf/ssti.txt" ]; then- printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SSTI ${reset}\n\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function sqli(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SQLI" = true ] && [ -s "gf/sqli.txt" ]- then- start_func "SQLi checks"- cat gf/sqli.txt | qsreplace FUZZ | anew -q .tmp/tmp_sqli.txt- interlace -tL .tmp/tmp_sqli.txt -threads 10 -c "python3 $tools/sqlmap/sqlmap.py -u _target_ -b --batch --disable-coloring --random-agent --output-dir=sqlmap" &>/dev/null- end_func "Results are saved in sqlmap folder" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SQLI" = true ] && [ -s "gf/sqli.txt" ]; then+ start_func "SQLi checks"+ cat gf/sqli.txt | qsreplace FUZZ | anew -q .tmp/tmp_sqli.txt+ interlace -tL .tmp/tmp_sqli.txt -threads 10 -c "python3 $tools/sqlmap/sqlmap.py -u _target_ -b --batch --disable-coloring --random-agent --output-dir=sqlmap" &>/dev/null+ end_func "Results are saved in sqlmap folder" ${FUNCNAME[0]}+ else+ if [ "$SQLI" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ elif [ ! -s "gf/sqli.txt" ]; then+ printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SQLi ${reset}\n\n"else- if [ "$SQLI" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- elif [ ! -s "gf/sqli.txt" ]; then- printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SQLi ${reset}\n\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function test_ssl(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$TEST_SSL" = true ]- then- start_func "SSL Test"- eval $tools/testssl.sh/testssl.sh --quiet --color 0 -U -iL hosts/ips.txt $DEBUG_ERROR > hosts/testssl.txt- end_func "Results are saved in hosts/testssl.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$TEST_SSL" = true ]; then+ start_func "SSL Test"+ eval $tools/testssl.sh/testssl.sh --quiet --color 0 -U -iL hosts/ips.txt $DEBUG_ERROR > hosts/testssl.txt+ end_func "Results are saved in hosts/testssl.txt" ${FUNCNAME[0]}+ else+ if [ "$TEST_SSL" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$TEST_SSL" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function spraying(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SPRAY" = true ]- then- start_func "Password spraying"- cd $tools/brutespray- eval python3 brutespray.py --file $dir/.tmp/nmap_grep.gnmap --threads $BRUTESPRAY_THREADS --hosts $BRUTESPRAY_CONCURRENCE -o $dir/hosts/brutespray.txt $DEBUG_STD- cd $dir- end_func "Results are saved in hosts/brutespray.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SPRAY" = true ]; then+ start_func "Password spraying"+ cd $tools/brutespray+ eval python3 brutespray.py --file $dir/.tmp/nmap_grep.gnmap --threads $BRUTESPRAY_THREADS --hosts $BRUTESPRAY_CONCURRENCE -o $dir/hosts/brutespray.txt $DEBUG_STD+ cd $dir+ end_func "Results are saved in hosts/brutespray.txt" ${FUNCNAME[0]}+ else+ if [ "$SPRAY" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$SPRAY" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function 4xxbypass(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$BYPASSER4XX" = true ]- then- start_func "403 bypass"- eval cat fuzzing/*.txt $DEBUG_ERROR | egrep '^4' | egrep -v '^404' | cut -d ' ' -f3 | dirdar -only-ok > .tmp/dirdar.txt- eval cat .tmp/dirdar.txt $DEBUG_ERROR | sed -e '1,12d' | sed '/^$/d' | anew -q vulns/4xxbypass.txt- end_func "Results are saved in vulns/4xxbypass.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$BYPASSER4XX" = true ]; then+ start_func "403 bypass"+ eval cat fuzzing/*.txt $DEBUG_ERROR | egrep '^4' | egrep -v '^404' | cut -d ' ' -f3 | dirdar -only-ok > .tmp/dirdar.txt+ eval cat .tmp/dirdar.txt $DEBUG_ERROR | sed -e '1,12d' | sed '/^$/d' | anew -q vulns/4xxbypass.txt+ end_func "Results are saved in vulns/4xxbypass.txt" ${FUNCNAME[0]}+ else+ if [ "$BYPASSER4XX" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$BYPASSER4XX" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -1327,8 +1255,7 @@ function 4xxbypass(){###############################################################################################################function deleteOutScoped(){- if [ -z "$1" ]- then+ if [ -z "$1" ]; thencat $1 | while read outscopeddoif grep -q "^[*]" <<< $outscoped@@ -1357,8 +1284,7 @@ function getElapsedTime {function isAsciiText {IS_ASCII="False";- if [[ $(file $1 | grep -o 'ASCII text$') == "ASCII text" ]]- then+ if [[ $(file $1 | grep -o 'ASCII text$') == "ASCII text" ]]; thenIS_ASCII="True";elseIS_ASCII="False";@@ -1371,8 +1297,7 @@ function output(){}function notification(){- if [ -n "$1" ] && [ -n "$2" ]- then+ if [ -n "$1" ] && [ -n "$2" ]; thencase $2 ininfo)text="\n${bblue} ${1} ${reset}"@@ -1397,12 +1322,12 @@ function notification(){function start_func(){printf "${bgreen}#######################################################################"notification "${1}" info- start=`date +%s`+ start=$(date +%s)}function end_func(){touch $called_fn_dir/.${2}- end=`date +%s`+ end=$(date +%s)getElapsedTime $start $endnotification "${2} Finished in ${runtime}" infoprintf "${bblue} ${1} ${reset}\n"@@ -1411,21 +1336,31 @@ function end_func(){function start_subfunc(){notification "${1}" warn- start_sub=`date +%s`+ start_sub=$(date +%s)}function end_subfunc(){touch $called_fn_dir/.${2}- end_sub=`date +%s`+ end_sub=$(date +%s)getElapsedTime $start_sub $end_subnotification "${1} in ${runtime}" good}+function resolvers_update(){+ if [ "$update_resolvers" = true ]; then+ if [[ $(find "$resolvers" -mtime +1 -print) ]]; then+ notification " Resolvers seem older than 1 day\n Generating custom resolvers..." warn+ eval dnsvalidator -tL https://public-dns.info/nameservers.txt -threads 100 -o $resolvers $DEBUG_STD+ notification "Updated\n" good+ fi+ fi+}+function start(){- global_start=`date +%s`+ global_start=$(date +%s)- if [ "$NOTIFICATION" = true ] ; then+ if [ "$NOTIFICATION" = true ]; thenNOTIFY="notify -silent"elseNOTIFY=""@@ -1434,12 +1369,9 @@ function start(){echo "Recon succesfully started on $domain" | $NOTIFYtools_installed- if [ -z "$domain" ]- then- if [ -n "$list" ]- then- if [ -z "$domain" ]- then+ if [ -z "$domain" ]; then+ if [ -n "$list" ]; then+ if [ -z "$domain" ]; thendomain="Multi"dir=$SCRIPTPATH/Recon/$domaincalled_fn_dir=$dir/.called_fn@@ -1455,22 +1387,19 @@ function start(){called_fn_dir=$dir/.called_fnfi- if [ -z "$domain" ]- then+ if [ -z "$domain" ]; thennotification "\n\n${bred} No domain or list provided ${reset}\n\n" errorexitfi- if [ ! -d "$called_fn_dir" ]- then+ if [ ! -d "$called_fn_dir" ]; thenmkdir -p $called_fn_dirficd $dirmkdir -p .tmp osint subdomains webs hosts vulns- if [ -n "$findomain_virustotal_token" ]- then+ if [ -n "$findomain_virustotal_token" ]; thenVT_API_KEY=$findomain_virustotal_tokenfi@@ -1482,13 +1411,11 @@ function end(){find $dir -type f -empty | grep -v "called_fn" | xargs rm -f &>/dev/nullfind $dir -type d -empty | grep -v "called_fn" | xargs rm -rf &>/dev/null- if [ "$REMOVETMP" = true ]- then+ if [ "$REMOVETMP" = true ]; thenrm -rf $dir/.tmpfi- if [ -n "$dir_output" ]- then+ if [ -n "$dir_output" ]; thenoutputfinaldir=$dir_outputelse@@ -1572,16 +1499,15 @@ function recon(){function multi_recon(){- global_start=`date +%s`+ global_start=$(date +%s)- if [ "$NOTIFICATION" = true ] ; then+ if [ "$NOTIFICATION" = true ]; thenNOTIFY="notify -silent"elseNOTIFY=""fi- if [ -s "$list" ]- then+ if [ -s "$list" ]; thentargets=$(cat $list)elsenotification "Target list not provided" error@@ -1589,37 +1515,38 @@ function multi_recon(){fiworkdir=$SCRIPTPATH/Recon/$multi- mkdir -p $workdir && cd $workdir+ mkdir -p $workdir || { echo "Failed to create directory '$workdir' in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }+ cd "$workdir" || { echo "Failed to cd directory '$workdir' in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }mkdir -p .tmp .called_fn osint subdomains webs hosts vulnsfor domain in $targets; dodir=$workdir/targets/$domaincalled_fn_dir=$dir/.called_fnmkdir -p $dir- cd $dir+ cd "$dir" || { echo "Failed to cd directory '$dir' in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }mkdir -p .tmp .called_fn osint subdomains webs hosts vulnsdomain_infoemailsgoogle_dorksgithub_dorksmetadata+ zonetransfer+ faviconsubdomains_fullsubtakeover- zonetransferwebprobe_fullscreenshot- favicondone- cd $workdir+ cd "$workdir" || { echo "Failed to cd directory '$workdir' in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }notification "############################# Total data ############################" info- NUMOFLINES_users_total=$(find . -type f -name 'users.txt' -exec cat {} + | anew -q osint/users.txt | wc -l)- NUMOFLINES_pwndb_total=$(find . -type f -name 'passwords.txt' -exec cat {} + | anew -q osint/passwords.txt | wc -l)- NUMOFLINES_software_total=$(find . -type f -name 'software.txt' -exec cat {} + | anew -q osint/software.txt | wc -l)- NUMOFLINES_authors_total=$(find . -type f -name 'authors.txt' -exec cat {} + | anew -q osint/authors.txt | wc -l)- NUMOFLINES_subs_total=$(find . -type f -name 'subdomains.txt' -exec cat {} + | anew -q subdomains/subdomains.txt | wc -l)- NUMOFLINES_subtko_total=$(find . -type f -name 'takeover.txt' -exec cat {} + | anew -q webs/takeover.txt | wc -l)- NUMOFLINES_webs_total=$(find . -type f -name 'webs.txt' -exec cat {} + | anew -q webs/webs.txt | wc -l)- NUMOFLINES_webs_total=$(find . -type f -name 'webs_uncommon_ports.txt' -exec cat {} + | anew -q webs/webs_uncommon_ports.txt | wc -l)+ NUMOFLINES_users_total=$(find . -type f -name 'users.txt' -exec cat {} + | anew osint/users.txt | wc -l)+ NUMOFLINES_pwndb_total=$(find . -type f -name 'passwords.txt' -exec cat {} + | anew osint/passwords.txt | wc -l)+ NUMOFLINES_software_total=$(find . -type f -name 'software.txt' -exec cat {} + | anew osint/software.txt | wc -l)+ NUMOFLINES_authors_total=$(find . -type f -name 'authors.txt' -exec cat {} + | anew osint/authors.txt | wc -l)+ NUMOFLINES_subs_total=$(find . -type f -name 'subdomains.txt' -exec cat {} + | anew subdomains/subdomains.txt | wc -l)+ NUMOFLINES_subtko_total=$(find . -type f -name 'takeover.txt' -exec cat {} + | anew webs/takeover.txt | wc -l)+ NUMOFLINES_webs_total=$(find . -type f -name 'webs.txt' -exec cat {} + | anew webs/webs.txt | wc -l)+ NUMOFLINES_webs_total=$(find . -type f -name 'webs_uncommon_ports.txt' -exec cat {} + | anew webs/webs_uncommon_ports.txt | wc -l)notification "- ${NUMOFLINES_users_total} total users found" goodnotification "- ${NUMOFLINES_pwndb_total} total creds leaked" good@@ -1636,7 +1563,8 @@ function multi_recon(){nuclei_checkfor domain in $targets; dodir=$workdir/targets/$domain- cd $dir+ called_fn_dir=$dir/.called_fn+ cd "$dir" || { echo "Failed to cd directory '$dir' in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }cms_scannerfuzzparams@@ -1645,7 +1573,8 @@ function multi_recon(){jscheckswordlist_gendone- cd $workdir++ cd "$workdir" || { echo "Failed to cd directory '$workdir' in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }dir=$workdirdomain=$multiend@@ -1710,8 +1639,7 @@ bannercheck_version-if [ -z "$1" ]-then+if [ -z "$1" ]; thenhelptools_installedexit@@ -1738,16 +1666,14 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; do;;x ) outOfScope_file=$OPTARGisAsciiText $outOfScope_file- if [ "False" = "$IS_ASCII" ]- then+ if [ "False" = "$IS_ASCII" ]; thenprintf "\n\n${bred} Out of Scope file is not a text file${reset}\n\n"exitfi;;i ) inScope_file=$OPTARGisAsciiText $inScope_file- if [ "False" = "$IS_ASCII" ]- then+ if [ "False" = "$IS_ASCII" ]; thenprintf "\n\n${bred} In Scope file is not a text file${reset}\n\n"exitfi@@ -1755,13 +1681,11 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; do## MODES- r ) if [ -n "$multi" ]- then+ r ) if [ -n "$multi" ]; thenmulti_reconexitfi- if [ -n "$list" ]- then+ if [ -n "$list" ]; thenfor domain in $(cat $list); dostartrecon@@ -1774,8 +1698,7 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; dofiexit;;- s ) if [ -n "$list" ]- then+ s ) if [ -n "$list" ]; thenfor domain in $(cat $list); dosubs_menudone@@ -1784,8 +1707,7 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; dofiexit;;- a ) if [ -n "$list" ]- then+ a ) if [ -n "$list" ]; thenfor domain in $(cat $list); doalldone@@ -1795,8 +1717,7 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; doexit;;w ) start- if [ -n "$list" ]- then+ if [ -n "$list" ]; thenif [[ "$list" = /* ]]; thencp $list $dir/webs/webs.txtelse@@ -1829,8 +1750,7 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; doendexit;;- p ) if [ -n "$list" ]- then+ p ) if [ -n "$list" ]; thenfor domain in $(cat $list); dopassivedonediff --git a/reconftw_axiom.sh b/reconftw_axiom.shindex 1cb1795..dbc6b06 100755--- a/reconftw_axiom.sh+++ b/reconftw_axiom.sh@@ -25,13 +25,11 @@ function check_version(){eval timeout 10 git fetch $DEBUG_STDexit_status=$?-if [ $exit_status -eq 0 ]-then+if [ $exit_status -eq 0 ]; thenBRANCH=$(git rev-parse --abbrev-ref HEAD)HEADHASH=$(git rev-parse HEAD)UPSTREAMHASH=$(git rev-parse ${BRANCH}@{upstream})- if [ "$HEADHASH" != "$UPSTREAMHASH" ]- then+ if [ "$HEADHASH" != "$UPSTREAMHASH" ]; thenprintf "\n${yellow} There is a new version, run ./install.sh to get latest version${reset}\n\n"fielse@@ -102,7 +100,7 @@ function tools_installed(){eval type -P puredns $DEBUG_STD || { printf "${bred} [*] puredns [NO]${reset}\n${reset}"; allinstalled=false;}eval type -P axiom-ls $DEBUG_STD || { printf "${bred} [*] axiom [NO]${reset}\n${reset}"; allinstalled=false;}- if [ "${allinstalled}" = true ] ; then+ if [ "${allinstalled}" = true ]; thenprintf "${bgreen} Good! All installed! ${reset}\n\n"elseprintf "\n${yellow} Try running the installer script again ./install.sh"@@ -137,9 +135,8 @@ function google_dorks(){function github_dorks(){if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$GITHUB_DORKS" = true ] && [ "$OSINT" = true ]; thenstart_func "Github Dorks in process"- if [ -s "${GITHUB_TOKENS}" ]- then- if [ "$DEEP" = true ] ; then+ if [ -s "${GITHUB_TOKENS}" ]; then+ if [ "$DEEP" = true ]; theneval python3 "$tools/GitDorker/GitDorker.py" -tf "${GITHUB_TOKENS}" -e "$GITDORKER_THREADS" -q "$domain" -p -d "$tools/GitDorker/Dorks/alldorksv3" | grep "\[+\]" | grep "git" | anew -q osint/gitdorks.txt $DEBUG_STDelseeval python3 "$tools/GitDorker/GitDorker.py" -tf "${GITHUB_TOKENS}" -e "$GITDORKER_THREADS" -q "$domain" -p -d "$tools/GitDorker/Dorks/medium_dorks.txt" | grep "\[+\]" | grep "git" | anew -q osint/gitdorks.txt $DEBUG_STD@@ -185,15 +182,13 @@ function emails(){cat .tmp/harvester.txt | awk '/Links/,/Users/' | sed -e '1,2d' | head -n -2 | sed -e '/Searching /d' -e '/exception has occurred/d' -e '/found:/Q' | anew -q osint/linkedin.txteval h8mail -t $domain -q domain --loose -c $tools/h8mail_config.ini -j .tmp/h8_results.json $DEBUG_STD- if [ -s ".tmp/h8_results.json" ]- then+ if [ -s ".tmp/h8_results.json" ]; thencat .tmp/h8_results.json | jq -r '.targets[0] | .data[] | .[]' | cut -d '-' -f2 | anew -q osint/h8mail.txtfiPWNDB_STATUS=$(timeout 15s curl -Is --socks5-hostname localhost:9050 http://pwndb2am4tzkvold.onion | grep HTTP | cut -d ' ' -f2)- if [ "$PWNDB_STATUS" = 200 ]- then+ if [ "$PWNDB_STATUS" = 200 ]; thencd "$tools/pwndb" || { echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }python3 pwndb.py --target "@${domain}" | sed '/^[-]/d' | anew -q $dir/osint/passwords.txtcd "$dir" || { echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }@@ -224,22 +219,19 @@ function domain_info(){sed -i -n '/Copyright/q;p' osint/domain_info_general.txt- if [ -s ".tmp/domain_registrant_name.txt" ]- then+ if [ -s ".tmp/domain_registrant_name.txt" ]; thenfor line in $(cat .tmp/domain_registrant_name.txt); dolynx -dump $line | tail -n +18 | sed -n '/]domainbigdata.com/q;p' >> osint/domain_info_name.txt && echo -e "\n\n#######################################################################\n\n" >> osint/domain_info_name.txtdonefi- if [ -s ".tmp/domain_registrant_email.txt" ]- then+ if [ -s ".tmp/domain_registrant_email.txt" ]; thenfor line in $(cat .tmp/domain_registrant_email.txt); dolynx -dump $line | tail -n +18 | sed -n '/]domainbigdata.com/q;p' >> osint/domain_info_email.txt && echo -e "\n\n#######################################################################\n\n" >> osint/domain_info_email.txtdonefi- if [ -s ".tmp/domain_registrant_ip.txt" ]- then+ if [ -s ".tmp/domain_registrant_ip.txt" ]; thenfor line in $(cat .tmp/domain_registrant_ip.txt); dolynx -dump $line | tail -n +18 | sed -n '/]domainbigdata.com/q;p' >> osint/domain_info_ip.txt && echo -e "\n\n#######################################################################\n\n" >> osint/domain_info_ip.txtdone@@ -278,21 +270,19 @@ function subdomains_full(){sub_activesub_brutesub_permut- if [ "$DEEP" = true ] ; then+ if [ "$DEEP" = true ]; thensub_recursivefisub_dnssub_scrapingwebprobe_simple- if [ -f "subdomains/subdomains.txt" ]- then- deleteOutScoped $outOfScope_file subdomains/subdomains.txt- NUMOFLINES_subs=$(eval cat subdomains/subdomains.txt $DEBUG_ERROR | anew .tmp/subdomains_old.txt | wc -l)+ if [ -f "subdomains/subdomains.txt" ]; then+ deleteOutScoped $outOfScope_file subdomains/subdomains.txt+ NUMOFLINES_subs=$(eval cat subdomains/subdomains.txt $DEBUG_ERROR | anew .tmp/subdomains_old.txt | wc -l)fi- if [ -f "webs/webs.txt" ]- then- deleteOutScoped $outOfScope_file webs/webs.txt- NUMOFLINES_probed=$(eval cat webs/webs.txt $DEBUG_ERROR | anew .tmp/probed_old.txt | wc -l)+ if [ -f "webs/webs.txt" ]; then+ deleteOutScoped $outOfScope_file webs/webs.txt+ NUMOFLINES_probed=$(eval cat webs/webs.txt $DEBUG_ERROR | anew .tmp/probed_old.txt | wc -l)fiprintf "${bblue}\n Total subdomains: ${reset}\n\n"notification "- ${NUMOFLINES_subs} new alive subdomains" good@@ -305,109 +295,102 @@ function subdomains_full(){}function sub_passive(){- if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]- then- start_subfunc "Running : Passive Subdomain Enumeration"- eval axiom-scan $list -m subfinder -all -o .tmp/subfinder_psub.txt $DEBUG_STD- eval axiom-scan $list -m assetfinder -o .tmp/assetfinder_psub.txt $DEBUG_STD- eval axiom-scan $list -m amass -passive -o .tmp/amass_psub.txt $DEBUG_STD- eval axiom-scan $list -m findomain -o .tmp/findomain_psub.txt $DEBUG_STD- eval axiom-scan $list -m waybackurls -o .tmp/waybackurls_psub_tmp.txt $DEBUG_STD && eval cat .tmp/waybackurls_psub_tmp.txt $DEBUG_ERROR | unfurl --unique domains | anew -q .tmp/waybackurls_psub.txt- eval axiom-scan $list -m gau -o .tmp/gau_psub_tmp.txt $DEBUG_STD && eval cat .tmp/gau_psub_tmp.txt $DEBUG_ERROR | unfurl --unique domains | anew -q .tmp/gau_psub.txt- eval crobat -s $domain $DEBUG_ERROR | anew -q .tmp/crobat_psub.txt- if [ -s "${GITHUB_TOKENS}" ];then- if [ "$DEEP" = true ] ; then- eval github-subdomains -d $domain -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STD- else- eval github-subdomains -d $domain -k -q -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STD- fi- fi- eval curl -s "https://jldc.me/anubis/subdomains/${domain}" $DEBUG_ERROR | grep -Po "((http|https):\/\/)?(([\w.-]*)\.([\w]*)\.([A-z]))\w+" | sed '/^\./d' | anew -q .tmp/jldc_psub.txt- if echo $domain | grep -q ".mil$"; then- mildew- mv mildew.out .tmp/mildew.out- cat .tmp/mildew.out | grep ".$domain$" | anew -q .tmp/mil_psub.txt+ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; then+ start_subfunc "Running : Passive Subdomain Enumeration"+ eval axiom-scan $list -m subfinder -all -o .tmp/subfinder_psub.txt $DEBUG_STD+ eval axiom-scan $list -m assetfinder -o .tmp/assetfinder_psub.txt $DEBUG_STD+ eval axiom-scan $list -m amass -passive -o .tmp/amass_psub.txt $DEBUG_STD+ eval axiom-scan $list -m findomain -o .tmp/findomain_psub.txt $DEBUG_STD+ eval axiom-scan $list -m waybackurls -o .tmp/waybackurls_psub_tmp.txt $DEBUG_STD && eval cat .tmp/waybackurls_psub_tmp.txt $DEBUG_ERROR | unfurl --unique domains | anew -q .tmp/waybackurls_psub.txt+ eval axiom-scan $list -m gau -o .tmp/gau_psub_tmp.txt $DEBUG_STD && eval cat .tmp/gau_psub_tmp.txt $DEBUG_ERROR | unfurl --unique domains | anew -q .tmp/gau_psub.txt+ eval crobat -s $domain $DEBUG_ERROR | anew -q .tmp/crobat_psub.txt+ if [ -s "${GITHUB_TOKENS}" ]; then+ if [ "$DEEP" = true ]; then+ eval github-subdomains -d $domain -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STD+ else+ eval github-subdomains -d $domain -k -q -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STDfi- NUMOFLINES=$(eval cat .tmp/*_psub.txt $DEBUG_ERROR | sed "s/*.//" | anew .tmp/passive_subs.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (passive)" ${FUNCNAME[0]}- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fi+ eval curl -s "https://jldc.me/anubis/subdomains/${domain}" $DEBUG_ERROR | grep -Po "((http|https):\/\/)?(([\w.-]*)\.([\w]*)\.([A-z]))\w+" | sed '/^\./d' | anew -q .tmp/jldc_psub.txt+ if echo $domain | grep -q ".mil$"; then+ mildew+ mv mildew.out .tmp/mildew.out+ cat .tmp/mildew.out | grep ".$domain$" | anew -q .tmp/mil_psub.txt+ fi+ NUMOFLINES=$(eval cat .tmp/*_psub.txt $DEBUG_ERROR | sed "s/*.//" | anew .tmp/passive_subs.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (passive)" ${FUNCNAME[0]}+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi}function sub_crt(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBCRT" = true ]- then- start_subfunc "Running : Crtsh Subdomain Enumeration"- echo "python3 -u /home/op/recon/ctfr/ctfr.py -d ${domain} -o ${domain}_ctfr.txt; cat ${domain}_ctfr.txt" > .tmp/sub_ctrf_commands.txt- eval axiom-scan .tmp/sub_ctrf_commands.txt -m exec -o .tmp/crtsh_subs_tmp.txt $DEBUG_STD- eval curl "https://tls.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r .Results[] $DEBUG_ERROR | cut -d ',' -f3 | grep -F ".$domain" | anew -q .tmp/crtsh_subs.txt- eval curl "https://dns.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r '.FDNS_A'[],'.RDNS'[] $DEBUG_ERROR | cut -d ',' -f2 | grep -F ".$domain" | anew -q .tmp/crtsh_subs_tmp.txt- NUMOFLINES=$(eval cat .tmp/crtsh_subs_tmp.txt $DEBUG_ERROR | anew .tmp/crtsh_subs.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (cert transparency)" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBCRT" = true ]; then+ start_subfunc "Running : Crtsh Subdomain Enumeration"+ echo "python3 -u /home/op/recon/ctfr/ctfr.py -d ${domain} -o ${domain}_ctfr.txt; cat ${domain}_ctfr.txt" > .tmp/sub_ctrf_commands.txt+ eval axiom-scan .tmp/sub_ctrf_commands.txt -m exec -o .tmp/crtsh_subs_tmp.txt $DEBUG_STD+ eval curl "https://tls.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r .Results[] $DEBUG_ERROR | cut -d ',' -f3 | grep -F ".$domain" | anew -q .tmp/crtsh_subs.txt+ eval curl "https://dns.bufferover.run/dns?q=.${domain}" $DEBUG_ERROR | eval jq -r '.FDNS_A'[],'.RDNS'[] $DEBUG_ERROR | cut -d ',' -f2 | grep -F ".$domain" | anew -q .tmp/crtsh_subs_tmp.txt+ NUMOFLINES=$(eval cat .tmp/crtsh_subs_tmp.txt $DEBUG_ERROR | anew .tmp/crtsh_subs.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (cert transparency)" ${FUNCNAME[0]}+ else+ if [ "$SUBCRT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$SUBCRT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function sub_active(){- if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]- then- start_subfunc "Running : Active Subdomain Enumeration"- if [ -s "${inScope_file}" ]- then- cat ${inScope_file} .tmp/inscope_subs.txt- fi- cat .tmp/*_subs.txt | anew -q .tmp/subs_no_resolved.txt- deleteOutScoped $outOfScope_file .tmp/subs_no_resolved.txt- eval axiom-scan .tmp/subs_no_resolved.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/subdomains_tmp.txt $DEBUG_STD- echo $domain | eval dnsx -retry 3 -silent -r /home/op/recon/puredns/trusted.txt $DEBUG_ERROR | anew -q .tmp/subdomains_tmp.txt- NUMOFLINES=$(eval cat .tmp/subdomains_tmp.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (active resolution)" ${FUNCNAME[0]}- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; then+ start_subfunc "Running : Active Subdomain Enumeration"+ if [ -s "${inScope_file}" ]; then+ cat ${inScope_file} .tmp/inscope_subs.txt+ fi+ cat .tmp/*_subs.txt | anew -q .tmp/subs_no_resolved.txt+ deleteOutScoped $outOfScope_file .tmp/subs_no_resolved.txt+ eval axiom-scan .tmp/subs_no_resolved.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/subdomains_tmp.txt $DEBUG_STD+ echo $domain | eval dnsx -retry 3 -silent -r /home/op/recon/puredns/trusted.txt $DEBUG_ERROR | anew -q .tmp/subdomains_tmp.txt+ NUMOFLINES=$(eval cat .tmp/subdomains_tmp.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (active resolution)" ${FUNCNAME[0]}+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi}function sub_dns(){- if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]- then- start_subfunc "Running : DNS Subdomain Enumeration"- eval axiom-scan subdomains/subdomains.txt -m dnsx -retry 3 -a -aaaa -cname -ns -ptr -mx -soa -resp -o subdomains/subdomains_cname.txt $DEBUG_STD- cat subdomains/subdomains_cname.txt | cut -d '[' -f2 | sed 's/.$//' | grep ".$domain$" | anew -q .tmp/subdomains_dns.txt- eval axiom-scan .tmp/subdomains_dns.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/subdomains_dns_resolved.txt $DEBUG_STD- NUMOFLINES=$(eval cat .tmp/subdomains_dns_resolved.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (dns resolution)" ${FUNCNAME[0]}- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; then+ start_subfunc "Running : DNS Subdomain Enumeration"+ eval axiom-scan subdomains/subdomains.txt -m dnsx -retry 3 -a -aaaa -cname -ns -ptr -mx -soa -resp -o subdomains/subdomains_cname.txt $DEBUG_STD+ cat subdomains/subdomains_cname.txt | cut -d '[' -f2 | sed 's/.$//' | grep ".$domain$" | anew -q .tmp/subdomains_dns.txt+ eval axiom-scan .tmp/subdomains_dns.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/subdomains_dns_resolved.txt $DEBUG_STD+ NUMOFLINES=$(eval cat .tmp/subdomains_dns_resolved.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (dns resolution)" ${FUNCNAME[0]}+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi}function sub_brute(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBBRUTE" = true ]- then- start_subfunc "Running : Bruteforce Subdomain Enumeration"- if [ "$DEEP" = true ] ; then- eval axiom-scan $subs_wordlist_big -m puredns-single $domain -r /home/op/lists/resolvers.txt -o .tmp/subs_brute.txt $DEBUG_STD- else- eval axiom-scan $subs_wordlist -m puredns-single $domain -r /home/op/lists/resolvers.txt -o .tmp/subs_brute.txt $DEBUG_STD- fi- if [[ -s ".tmp/subs_brute.txt" ]]- then- eval axiom-scan .tmp/subs_brute.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/subs_brute_valid.txt $DEBUG_STD- fi- NUMOFLINES=$(eval cat .tmp/subs_brute_valid.txt $DEBUG_ERROR | sed "s/*.//" | grep ".$domain$" | anew subdomains/subdomains.txt | wc -l)- end_subfunc "${NUMOFLINES} new subs (bruteforce)" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBBRUTE" = true ]; then+ start_subfunc "Running : Bruteforce Subdomain Enumeration"+ if [ "$DEEP" = true ]; then+ eval axiom-scan $subs_wordlist_big -m puredns-single $domain -r /home/op/lists/resolvers.txt -o .tmp/subs_brute.txt $DEBUG_STDelse- if [ "$SUBBRUTE" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ eval axiom-scan $subs_wordlist -m puredns-single $domain -r /home/op/lists/resolvers.txt -o .tmp/subs_brute.txt $DEBUG_STD+ fi+ if [[ -s ".tmp/subs_brute.txt" ]]; then+ eval axiom-scan .tmp/subs_brute.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/subs_brute_valid.txt $DEBUG_STD+ fi+ NUMOFLINES=$(eval cat .tmp/subs_brute_valid.txt $DEBUG_ERROR | sed "s/*.//" | grep ".$domain$" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (bruteforce)" ${FUNCNAME[0]}+ else+ if [ "$SUBBRUTE" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -444,120 +427,109 @@ function sub_scraping(){}function sub_permut(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBPERMUTE" = true ]- then- start_subfunc "Running : Permutations Subdomain Enumeration"- if [ "$DEEP" = true ] ; then- eval axiom-scan subdomains/subdomains.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txt+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBPERMUTE" = true ]; then+ start_subfunc "Running : Permutations Subdomain Enumeration"+ if [ "$DEEP" = true ]; then+ eval axiom-scan subdomains/subdomains.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txt+ eval axiom-scan .tmp/DNScewl1.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute1_tmp.txt $DEBUG_STD+ eval cat .tmp/permute1_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1.txt+ eval axiom-scan .tmp/permute1.txt -m dnscewl -o .tmp/DNScewl2_.txt $DEBUG_STD && eval cat .tmp/DNScewl2_.txt $DEBUG_ERROR | grep ".$domain$" > .tmp/DNScewl2.txt+ eval axiom-scan .tmp/DNScewl2.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute2_tmp.txt $DEBUG_STD+ eval cat .tmp/permute2_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute2.txt+ eval cat .tmp/permute1.txt .tmp/permute2.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt+ else+ if [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 100 ]]; then+ eval axiom-scan .tmp/subs_no_resolved.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txteval axiom-scan .tmp/DNScewl1.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute1_tmp.txt $DEBUG_STDeval cat .tmp/permute1_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1.txteval axiom-scan .tmp/permute1.txt -m dnscewl -o .tmp/DNScewl2_.txt $DEBUG_STD && eval cat .tmp/DNScewl2_.txt $DEBUG_ERROR | grep ".$domain$" > .tmp/DNScewl2.txteval axiom-scan .tmp/DNScewl2.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute2_tmp.txt $DEBUG_STDeval cat .tmp/permute2_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute2.txteval cat .tmp/permute1.txt .tmp/permute2.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt+ elif [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 200 ]]; then+ eval axiom-scan .tmp/subs_no_resolved.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txt+ eval axiom-scan .tmp/DNScewl1.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute_tmp.txt $DEBUG_STD+ eval cat .tmp/permute_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txtelse- if [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 100 ]]- then- eval axiom-scan .tmp/subs_no_resolved.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txt+ if [[ $(cat subdomains/subdomains.txt | wc -l) -le 100 ]]; then+ eval axiom-scan subdomains/subdomains.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txteval axiom-scan .tmp/DNScewl1.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute1_tmp.txt $DEBUG_STDeval cat .tmp/permute1_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1.txteval axiom-scan .tmp/permute1.txt -m dnscewl -o .tmp/DNScewl2_.txt $DEBUG_STD && eval cat .tmp/DNScewl2_.txt $DEBUG_ERROR | grep ".$domain$" > .tmp/DNScewl2.txteval axiom-scan .tmp/DNScewl2.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute2_tmp.txt $DEBUG_STDeval cat .tmp/permute2_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute2.txteval cat .tmp/permute1.txt .tmp/permute2.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt- elif [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 200 ]]- then- eval axiom-scan .tmp/subs_no_resolved.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txt+ elif [[ $(cat subdomains/subdomains.txt | wc -l) -le 200 ]]; then+ eval axiom-scan subdomains/subdomains.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txteval axiom-scan .tmp/DNScewl1.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute_tmp.txt $DEBUG_STDeval cat .tmp/permute_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txtelse- if [[ $(cat subdomains/subdomains.txt | wc -l) -le 100 ]]- then- eval axiom-scan subdomains/subdomains.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txt- eval axiom-scan .tmp/DNScewl1.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute1_tmp.txt $DEBUG_STD- eval cat .tmp/permute1_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1.txt- eval axiom-scan .tmp/permute1.txt -m dnscewl -o .tmp/DNScewl2_.txt $DEBUG_STD && eval cat .tmp/DNScewl2_.txt $DEBUG_ERROR | grep ".$domain$" > .tmp/DNScewl2.txt- eval axiom-scan .tmp/DNScewl2.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute2_tmp.txt $DEBUG_STD- eval cat .tmp/permute2_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute2.txt- eval cat .tmp/permute1.txt .tmp/permute2.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt- elif [[ $(cat subdomains/subdomains.txt | wc -l) -le 200 ]]- then- eval axiom-scan subdomains/subdomains.txt -m dnscewl -o .tmp/DNScewl1_.txt $DEBUG_STD && cat .tmp/DNScewl1_.txt | grep ".$domain$" > .tmp/DNScewl1.txt- eval axiom-scan .tmp/DNScewl1.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute_tmp.txt $DEBUG_STD- eval cat .tmp/permute_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_subs.txt- else- printf "\n${bred} Skipping Permutations: Too Much Subdomains${reset}\n\n"- fi+ printf "\n${bred} Skipping Permutations: Too Much Subdomains${reset}\n\n"fifi- if [ -f ".tmp/permute_subs.txt" ]- then- deleteOutScoped $outOfScope_file .tmp/permute_subs.txt- NUMOFLINES=$(eval cat .tmp/permute_subs.txt $DEBUG_ERROR | grep ".$domain$" | anew subdomains/subdomains.txt | wc -l)- else- NUMOFLINES=0- fi- end_subfunc "${NUMOFLINES} new subs (permutations)" ${FUNCNAME[0]}+ fi+ if [ -f ".tmp/permute_subs.txt" ]; then+ deleteOutScoped $outOfScope_file .tmp/permute_subs.txt+ NUMOFLINES=$(eval cat .tmp/permute_subs.txt $DEBUG_ERROR | grep ".$domain$" | anew subdomains/subdomains.txt | wc -l)else- if [ "$SUBPERMUTE" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ NUMOFLINES=0+ fi+ end_subfunc "${NUMOFLINES} new subs (permutations)" ${FUNCNAME[0]}+ else+ if [ "$SUBPERMUTE" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function sub_recursive(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBRECURSIVE" = true ]- then- if [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 1000 ]]- then- start_subfunc "Running : Subdomains recursive search"- echo "" > .tmp/brute_recursive_wordlist.txt- for sub in $(cat subdomains/subdomains.txt); do- sed "s/$/.$sub/" $subs_wordlist >> .tmp/brute_recursive_wordlist.txt- done- eval axiom-scan .tmp/brute_recursive_wordlist.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/brute_recursive_result.txt $DEBUG_STD- cat .tmp/brute_recursive_result.txt | anew -q .tmp/brute_recursive.txt- eval axiom-scan .tmp/brute_recursive.txt -m dnscewl -o .tmp/DNScewl1_recursive_.txt $DEBUG_STD && eval cat .tmp/DNScewl1_recursive_.txt $DEBUG_ERROR | grep ".$domain$" > .tmp/DNScewl1_recursive.txt- eval axiom-scan .tmp/DNScewl1_recursive.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute1_recursive_tmp.txt $DEBUG_STD- eval cat .tmp/permute1_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1_recursive.txt- eval axiom-scan .tmp/permute1_recursive.txt -m dnscewl -o .tmp/DNScewl2_recursive_.txt $DEBUG_STD && eval cat .tmp/DNScewl2_recursive_.txt $DEBUG_ERROR | grep ".$domain$" > .tmp/DNScewl2_recursive.txt- eval axiom-scan .tmp/DNScewl2_recursive.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute2_recursive_tmp.txt $DEBUG_STD- eval cat .tmp/permute1_recursive.txt .tmp/permute2_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_recursive.txt-- NUMOFLINES=$(eval cat .tmp/permute_recursive.txt .tmp/brute_recursive.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)-- end_subfunc "${NUMOFLINES} new subs (recursive)" ${FUNCNAME[0]}- else- notification "Skipping Recursive: Too Much Subdomains" warn- fi+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBRECURSIVE" = true ]; then+ if [[ $(cat .tmp/subs_no_resolved.txt | wc -l) -le 1000 ]]; then+ start_subfunc "Running : Subdomains recursive search"+ echo "" > .tmp/brute_recursive_wordlist.txt+ for sub in $(cat subdomains/subdomains.txt); do+ sed "s/$/.$sub/" $subs_wordlist >> .tmp/brute_recursive_wordlist.txt+ done+ eval axiom-scan .tmp/brute_recursive_wordlist.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/brute_recursive_result.txt $DEBUG_STD+ cat .tmp/brute_recursive_result.txt | anew -q .tmp/brute_recursive.txt+ eval axiom-scan .tmp/brute_recursive.txt -m dnscewl -o .tmp/DNScewl1_recursive_.txt $DEBUG_STD && eval cat .tmp/DNScewl1_recursive_.txt $DEBUG_ERROR | grep ".$domain$" > .tmp/DNScewl1_recursive.txt+ eval axiom-scan .tmp/DNScewl1_recursive.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute1_recursive_tmp.txt $DEBUG_STD+ eval cat .tmp/permute1_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute1_recursive.txt+ eval axiom-scan .tmp/permute1_recursive.txt -m dnscewl -o .tmp/DNScewl2_recursive_.txt $DEBUG_STD && eval cat .tmp/DNScewl2_recursive_.txt $DEBUG_ERROR | grep ".$domain$" > .tmp/DNScewl2_recursive.txt+ eval axiom-scan .tmp/DNScewl2_recursive.txt -m puredns-resolve -r /home/op/lists/resolvers.txt -o .tmp/permute2_recursive_tmp.txt $DEBUG_STD+ eval cat .tmp/permute1_recursive.txt .tmp/permute2_recursive_tmp.txt $DEBUG_ERROR | anew -q .tmp/permute_recursive.txt+ NUMOFLINES=$(eval cat .tmp/permute_recursive.txt .tmp/brute_recursive.txt $DEBUG_ERROR | grep "\.$domain$\|^$domain$" | anew subdomains/subdomains.txt | wc -l)+ end_subfunc "${NUMOFLINES} new subs (recursive)" ${FUNCNAME[0]}else- if [ "$SUBRECURSIVE" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ notification "Skipping Recursive: Too Much Subdomains" warn+ fi+ else+ if [ "$SUBRECURSIVE" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function subtakeover(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBTAKEOVER" = true ]- then- start_func "Looking for possible subdomain takeover"- touch .tmp/tko.txt- eval axiom-scan webs/webs.txt -m nuclei -w /home/op/recon/nuclei/takeovers/ -o .tmp/tko.txt $DEBUG_STD- NUMOFLINES=$(eval cat .tmp/tko.txt $DEBUG_ERROR | anew webs/takeover.txt | wc -l)- if [ "$NUMOFLINES" -gt 0 ]; then- notification "${NUMOFLINES} new possible takeovers found" info- fi- end_func "Results are saved in webs/takeover.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SUBTAKEOVER" = true ]; then+ start_func "Looking for possible subdomain takeover"+ touch .tmp/tko.txt+ eval axiom-scan webs/webs.txt -m nuclei -w /home/op/recon/nuclei/takeovers/ -o .tmp/tko.txt $DEBUG_STD+ NUMOFLINES=$(eval cat .tmp/tko.txt $DEBUG_ERROR | anew webs/takeover.txt | wc -l)+ if [ "$NUMOFLINES" -gt 0 ]; then+ notification "${NUMOFLINES} new possible takeovers found" info+ fi+ end_func "Results are saved in webs/takeover.txt" ${FUNCNAME[0]}+ else+ if [ "$SUBTAKEOVER" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$SUBTAKEOVER" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -581,22 +553,21 @@ function zonetransfer(){}function s3buckets(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$S3BUCKETS" = true ]- then- start_func "AWS S3 buckets search"- eval s3scanner scan --buckets-file subdomains/subdomains.txt $DEBUG_ERROR | grep -iv "not_exist" | anew -q .tmp/s3buckets.txt- #eval axiom-scan subdomains/subdomains.txt -m s3scanner -o .tmp/s3buckets.txt $DEBUG_STD- NUMOFLINES=$(eval cat .tmp/s3buckets.txt $DEBUG_ERROR | anew subdomains/s3buckets.txt | wc -l)- if [ "$NUMOFLINES" -gt 0 ]; then- notification "${NUMOFLINES} new S3 buckets found" info- fi- end_func "Results are saved in subdomains/s3buckets.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$S3BUCKETS" = true ]; then+ start_func "AWS S3 buckets search"+ eval s3scanner scan --buckets-file subdomains/subdomains.txt $DEBUG_ERROR | grep -iv "not_exist" | anew -q .tmp/s3buckets.txt+ #eval axiom-scan subdomains/subdomains.txt -m s3scanner -o .tmp/s3buckets.txt $DEBUG_STD+ NUMOFLINES=$(eval cat .tmp/s3buckets.txt $DEBUG_ERROR | anew subdomains/s3buckets.txt | wc -l)+ if [ "$NUMOFLINES" -gt 0 ]; then+ notification "${NUMOFLINES} new S3 buckets found" info+ fi+ end_func "Results are saved in subdomains/s3buckets.txt" ${FUNCNAME[0]}+ else+ if [ "$S3BUCKETS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$S3BUCKETS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -605,73 +576,65 @@ function s3buckets(){###############################################################################################################function webprobe_simple(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBESIMPLE" = true ]- then- start_subfunc "Running : Http probing"-- if [ -s ".tmp/probed_tmp_scrap.txt" ]- then- mv .tmp/probed_tmp_scrap.txt .tmp/probed_tmp.txt- else- eval axiom-scan subdomains/subdomains.txt -m httpx -follow-host-redirects -random-agent -threads $HTTPX_THREADS -status-code -timeout 15 -silent -retries 2 -no-color -o .tmp/probed_tmp_.txt $DEBUG_STD && cat .tmp/probed_tmp_.txt | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt- fi- deleteOutScoped $outOfScope_file .tmp/probed_tmp.txt- NUMOFLINES=$(eval cat .tmp/probed_tmp.txt $DEBUG_ERROR | anew webs/webs.txt | wc -l)- end_subfunc "${NUMOFLINES} new websites resolved" ${FUNCNAME[0]}- if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/webs.txt| wc -l) -le 1500 ]]- then- notification "Sending websites to proxy" info- eval ffuf -mc all -w webs/webs.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD- fi+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBESIMPLE" = true ]; then+ start_subfunc "Running : Http probing"+ if [ -s ".tmp/probed_tmp_scrap.txt" ]; then+ mv .tmp/probed_tmp_scrap.txt .tmp/probed_tmp.txtelse- if [ "$WEBPROBESIMPLE" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ eval axiom-scan subdomains/subdomains.txt -m httpx -follow-host-redirects -random-agent -threads $HTTPX_THREADS -status-code -timeout 15 -silent -retries 2 -no-color -o .tmp/probed_tmp_.txt $DEBUG_STD && cat .tmp/probed_tmp_.txt | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt+ fi+ deleteOutScoped $outOfScope_file .tmp/probed_tmp.txt+ NUMOFLINES=$(eval cat .tmp/probed_tmp.txt $DEBUG_ERROR | anew webs/webs.txt | wc -l)+ end_subfunc "${NUMOFLINES} new websites resolved" ${FUNCNAME[0]}+ if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/webs.txt| wc -l) -le 1500 ]]; then+ notification "Sending websites to proxy" info+ eval ffuf -mc all -w webs/webs.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD+ fi+ else+ if [ "$WEBPROBESIMPLE" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function webprobe_full(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBEFULL" = true ]- then- start_func "Http probing non standard ports"- eval axiom-scan subdomains/subdomains.txt -m naabu -p $UNCOMMON_PORTS_WEB -o .tmp/nmap_uncommonweb.txt $DEBUG_STD && uncommon_ports_checked=$(cat .tmp/nmap_uncommonweb.txt | cut -d ':' -f2 | sort -u | sed -e 'H;${x;s/\n/,/g;s/^,//;p;};d')- if [ -n "$uncommon_ports_checked" ]- then- eval axiom-scan subdomains/subdomains.txt -m httpx -ports $uncommon_ports_checked -follow-host-redirects -random-agent -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -retries 2 -no-color -o .tmp/probed_uncommon_ports_tmp_.txt $DEBUG_STD && cat .tmp/probed_uncommon_ports_tmp_.txt | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_uncommon_ports_tmp.txt- fi- NUMOFLINES=$(eval cat .tmp/probed_uncommon_ports_tmp.txt $DEBUG_ERROR | anew webs/webs_uncommon_ports.txt | wc -l)- notification "Uncommon web ports: ${NUMOFLINES} new websites" good- eval cat webs/webs_uncommon_ports.txt $DEBUG_ERROR- end_func "Results are saved in webs/webs_uncommon_ports.txt" ${FUNCNAME[0]}- if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/webs_uncommon_ports.txt| wc -l) -le 1500 ]]- then- notification "Sending websites uncommon ports to proxy" info- eval ffuf -mc all -w webs/webs_uncommon_ports.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD- fi+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBEFULL" = true ]; then+ start_func "Http probing non standard ports"+ eval axiom-scan subdomains/subdomains.txt -m naabu -p $UNCOMMON_PORTS_WEB -o .tmp/nmap_uncommonweb.txt $DEBUG_STD && uncommon_ports_checked=$(cat .tmp/nmap_uncommonweb.txt | cut -d ':' -f2 | sort -u | sed -e 'H;${x;s/\n/,/g;s/^,//;p;};d')+ if [ -n "$uncommon_ports_checked" ]; then+ eval axiom-scan subdomains/subdomains.txt -m httpx -ports $uncommon_ports_checked -follow-host-redirects -random-agent -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -retries 2 -no-color -o .tmp/probed_uncommon_ports_tmp_.txt $DEBUG_STD && cat .tmp/probed_uncommon_ports_tmp_.txt | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_uncommon_ports_tmp.txt+ fi+ NUMOFLINES=$(eval cat .tmp/probed_uncommon_ports_tmp.txt $DEBUG_ERROR | anew webs/webs_uncommon_ports.txt | wc -l)+ notification "Uncommon web ports: ${NUMOFLINES} new websites" good+ eval cat webs/webs_uncommon_ports.txt $DEBUG_ERROR+ end_func "Results are saved in webs/webs_uncommon_ports.txt" ${FUNCNAME[0]}+ if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/webs_uncommon_ports.txt| wc -l) -le 1500 ]]; then+ notification "Sending websites uncommon ports to proxy" info+ eval ffuf -mc all -w webs/webs_uncommon_ports.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD+ fi+ else+ if [ "$WEBPROBEFULL" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$WEBPROBEFULL" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function screenshot(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBSCREENSHOT" = true ]- then- start_func "Web Screenshots"- eval cat webs/webs.txt webs/webs_uncommon_ports.txt $DEBUG_ERROR | anew -q .tmp/webs_screenshots.txt- eval axiom-scan .tmp/webs_screenshots.txt -m gowitness -o screenshots $DEBUG_STD- end_func "Results are saved in screenshots folder" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBSCREENSHOT" = true ]; then+ start_func "Web Screenshots"+ eval cat webs/webs.txt webs/webs_uncommon_ports.txt $DEBUG_ERROR | anew -q .tmp/webs_screenshots.txt+ eval axiom-scan .tmp/webs_screenshots.txt -m gowitness -o screenshots $DEBUG_STD+ end_func "Results are saved in screenshots folder" ${FUNCNAME[0]}+ else+ if [ "$WEBSCREENSHOT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$WEBSCREENSHOT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -680,80 +643,71 @@ function screenshot(){###############################################################################################################function favicon(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$FAVICON" = true ]- then- start_func "Favicon Ip Lookup"- cd $tools/fav-up- eval python3 favUp.py -w $domain -sc -o favicontest.json $DEBUG_STD- if [ -f "favicontest.json" ]- then- cat favicontest.json | eval jq -r '.found_ips' $DEBUG_ERROR | grep -v "not-found" > favicontest.txt- sed -i "s/|/\n/g" favicontest.txt- eval cat favicontest.txt $DEBUG_ERROR- eval mv favicontest.txt $dir/hosts/favicontest.txt $DEBUG_ERROR- eval rm favicontest.json $DEBUG_ERROR- fi- cd $dir- end_func "Results are saved in hosts/favicontest.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$FAVICON" = true ]; then+ start_func "Favicon Ip Lookup"+ cd $tools/fav-up+ eval python3 favUp.py -w $domain -sc -o favicontest.json $DEBUG_STD+ if [ -f "favicontest.json" ]; then+ cat favicontest.json | eval jq -r '.found_ips' $DEBUG_ERROR | grep -v "not-found" > favicontest.txt+ sed -i "s/|/\n/g" favicontest.txt+ eval cat favicontest.txt $DEBUG_ERROR+ eval mv favicontest.txt $dir/hosts/favicontest.txt $DEBUG_ERROR+ eval rm favicontest.json $DEBUG_ERROR+ fi+ cd $dir+ end_func "Results are saved in hosts/favicontest.txt" ${FUNCNAME[0]}+ else+ if [ "$FAVICON" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$FAVICON" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function portscan(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$PORTSCANNER" = true ]- then- start_func "Port scan"- for sub in $(cat subdomains/subdomains.txt); do- echo "$sub $(dig +short a $sub | tail -n1)" | anew -q .tmp/subs_ips.txt+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$PORTSCANNER" = true ]; then+ start_func "Port scan"+ for sub in $(cat subdomains/subdomains.txt); do+ echo "$sub $(dig +short a $sub | tail -n1)" | anew -q .tmp/subs_ips.txt+ done+ awk '{ print $2 " " $1}' .tmp/subs_ips.txt | sort -k2 -n | anew -q hosts/subs_ips_vhosts.txt+ eval cat hosts/subs_ips_vhosts.txt $DEBUG_ERROR | cut -d ' ' -f1 | egrep -iv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q hosts/ips.txt+ eval axiom-scan webs/webs.txt -m cf-check -o .tmp/ips_nowaf_.txt $DEBUG_STD && cat .tmp/ips_nowaf_.txt | egrep -iv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q .tmp/ips_nowaf.txt+ printf "${bblue}\n Resolved IP addresses (No WAF) ${reset}\n\n";+ eval cat .tmp/ips_nowaf.txt $DEBUG_ERROR | sort+ printf "${bblue}\n Scanning ports... ${reset}\n\n";+ if [ "$PORTSCAN_PASSIVE" = true ] && [ ! -f "hosts/portscan_passive.txt" ]; then+ for sub in $(cat hosts/ips.txt); do+ shodan host $sub 2>/dev/null >> hosts/portscan_passive.txt && echo -e "\n\n#######################################################################\n\n" >> hosts/portscan_passive.txtdone- awk '{ print $2 " " $1}' .tmp/subs_ips.txt | sort -k2 -n | anew -q hosts/subs_ips_vhosts.txt- eval cat hosts/subs_ips_vhosts.txt $DEBUG_ERROR | cut -d ' ' -f1 | egrep -iv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q hosts/ips.txt- eval axiom-scan webs/webs.txt -m cf-check -o .tmp/ips_nowaf_.txt $DEBUG_STD && cat .tmp/ips_nowaf_.txt | egrep -iv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q .tmp/ips_nowaf.txt- printf "${bblue}\n Resolved IP addresses (No WAF) ${reset}\n\n";- eval cat .tmp/ips_nowaf.txt $DEBUG_ERROR | sort-- printf "${bblue}\n Scanning ports... ${reset}\n\n";- if [ "$PORTSCAN_PASSIVE" = true ] && [ ! -f "hosts/portscan_passive.txt" ]- then- for sub in $(cat hosts/ips.txt); do- shodan host $sub 2>/dev/null >> hosts/portscan_passive.txt && echo -e "\n\n#######################################################################\n\n" >> hosts/portscan_passive.txt- done- fi-- if [ "$PORTSCAN_ACTIVE" = true ]- then- eval axiom-scan .tmp/ips_nowaf.txt -m nmapx --top-ports 1000 -sV -n -Pn --max-retries 2 -o hosts/portscan_active.txt $DEBUG_STD- fi-- end_func "Results are saved in hosts/portscan_[passive|active].txt" ${FUNCNAME[0]}+ fi+ if [ "$PORTSCAN_ACTIVE" = true ]; then+ eval axiom-scan .tmp/ips_nowaf.txt -m nmapx --top-ports 1000 -sV -n -Pn --max-retries 2 -o hosts/portscan_active.txt $DEBUG_STD+ fi+ end_func "Results are saved in hosts/portscan_[passive|active].txt" ${FUNCNAME[0]}+ else+ if [ "$PORTSCANNER" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$PORTSCANNER" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function cloudprovider(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CLOUD_IP" = true ]- then- start_func "Cloud provider check"- cd $tools/ip2provider- eval cat $dir/hosts/ips.txt | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | ./ip2provider.py | anew -q $dir/hosts/cloud_providers.txt $DEBUG_STD- cd $dir- end_func "Results are saved in hosts/cloud_providers.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CLOUD_IP" = true ]; then+ start_func "Cloud provider check"+ cd $tools/ip2provider+ eval cat $dir/hosts/ips.txt | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | ./ip2provider.py | anew -q $dir/hosts/cloud_providers.txt $DEBUG_STD+ cd $dir+ end_func "Results are saved in hosts/cloud_providers.txt" ${FUNCNAME[0]}+ else+ if [ "$CLOUD_IP" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$CLOUD_IP" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -762,47 +716,45 @@ function cloudprovider(){###############################################################################################################function waf_checks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WAF_DETECTION" = true ]- then- start_func "Website's WAF detection"- eval axiom-scan webs/webs.txt -m wafw00f -o .tmp/wafs.txt $DEBUG_STD- cat .tmp/wafs.txt | sed -e 's/^[ \t]*//' -e 's/ \+ /\t/g' -e '/(None)/d' | tr -s "\t" ";" > webs/webs_wafs.txt- NUMOFLINES=$(eval cat webs/webs_wafs.txt $DEBUG_ERROR | wc -l)- notification "${NUMOFLINES} websites protected by waf" info- end_func "Results are saved in webs/webs_wafs.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WAF_DETECTION" = true ]; then+ start_func "Website's WAF detection"+ eval axiom-scan webs/webs.txt -m wafw00f -o .tmp/wafs.txt $DEBUG_STD+ cat .tmp/wafs.txt | sed -e 's/^[ \t]*//' -e 's/ \+ /\t/g' -e '/(None)/d' | tr -s "\t" ";" > webs/webs_wafs.txt+ NUMOFLINES=$(eval cat webs/webs_wafs.txt $DEBUG_ERROR | wc -l)+ notification "${NUMOFLINES} websites protected by waf" info+ end_func "Results are saved in webs/webs_wafs.txt" ${FUNCNAME[0]}+ else+ if [ "$WAF" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$WAF" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function nuclei_check(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$NUCLEICHECK" = true ]- then- start_func "Templates based web scanner"- eval nuclei -update-templates $DEBUG_STD- mkdir -p nuclei_output- printf "${yellow}\n Running : Nuclei Info${reset}\n\n"- eval axiom-scan webs/webs.txt -m nuclei -severity info -r /home/op/recon/puredns/trusted.txt -o nuclei_output/info.txt $DEBUG_STD- printf "${yellow}\n\n Running : Nuclei Low${reset}\n\n"- eval axiom-scan webs/webs.txt -m nuclei -severity low -r /home/op/recon/puredns/trusted.txt -o nuclei_output/low.txt $DEBUG_STD- printf "${yellow}\n\n Running : Nuclei Medium${reset}\n\n"- eval axiom-scan webs/webs.txt -m nuclei -severity medium -r /home/op/recon/puredns/trusted.txt -o nuclei_output/medium.txt $DEBUG_STD- printf "${yellow}\n\n Running : Nuclei High${reset}\n\n"- eval axiom-scan webs/webs.txt -m nuclei -severity high -r /home/op/recon/puredns/trusted.txt -o nuclei_output/high.txt $DEBUG_STD- printf "${yellow}\n\n Running : Nuclei Critical${reset}\n\n"- eval axiom-scan webs/webs.txt -m nuclei -severity critical -r /home/op/recon/puredns/trusted.txt -o nuclei_output/critical.txt $DEBUG_STD- printf "\n\n"- end_func "Results are saved in nuclei_output folder" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$NUCLEICHECK" = true ]; then+ start_func "Templates based web scanner"+ eval nuclei -update-templates $DEBUG_STD+ mkdir -p nuclei_output+ printf "${yellow}\n Running : Nuclei Info${reset}\n\n"+ eval axiom-scan webs/webs.txt -m nuclei -severity info -r /home/op/recon/puredns/trusted.txt -o nuclei_output/info.txt $DEBUG_STD+ printf "${yellow}\n\n Running : Nuclei Low${reset}\n\n"+ eval axiom-scan webs/webs.txt -m nuclei -severity low -r /home/op/recon/puredns/trusted.txt -o nuclei_output/low.txt $DEBUG_STD+ printf "${yellow}\n\n Running : Nuclei Medium${reset}\n\n"+ eval axiom-scan webs/webs.txt -m nuclei -severity medium -r /home/op/recon/puredns/trusted.txt -o nuclei_output/medium.txt $DEBUG_STD+ printf "${yellow}\n\n Running : Nuclei High${reset}\n\n"+ eval axiom-scan webs/webs.txt -m nuclei -severity high -r /home/op/recon/puredns/trusted.txt -o nuclei_output/high.txt $DEBUG_STD+ printf "${yellow}\n\n Running : Nuclei Critical${reset}\n\n"+ eval axiom-scan webs/webs.txt -m nuclei -severity critical -r /home/op/recon/puredns/trusted.txt -o nuclei_output/critical.txt $DEBUG_STD+ printf "\n\n"+ end_func "Results are saved in nuclei_output folder" ${FUNCNAME[0]}+ else+ if [ "$NUCLEICHECK" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$NUCLEICHECK" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -848,7 +800,6 @@ function cms_scanner(){end_func "ERROR cmseek.py - investigate manually for $dir" ${FUNCNAME[0]}returnfi # otherwise Assume we have a successfully exited cmseek-for sub in $(cat webs/webs.txt); dosub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')cms_id=$(eval cat $tools/CMSeeK/Result/${sub_out}/cms.json $DEBUG_ERROR | jq -r '.cms_id')@@ -872,114 +823,106 @@ function cms_scanner(){}function params(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$PARAMS" = true ]- then- start_func "Parameter Discovery"- printf "${yellow}\n\n Running : Searching params with paramspider${reset}\n"- cat webs/webs.txt | sed -r "s/https?:\/\///" | anew -q .tmp/probed_nohttp.txt- eval axiom-scan .tmp/probed_nohttp.txt -m paramspider -l high -q --exclude eot,jpg,jpeg,gif,css,tif,tiff,png,ttf,otf,woff,woff2,ico,pdf,svg,txt,js -o output_paramspider $DEBUG_STD- eval cat output_paramspider/*.txt $DEBUG_ERROR | anew -q .tmp/param_tmp.txt- sed '/^FUZZ/d' -i .tmp/param_tmp.txt- eval rm -rf output_paramspider/ $DEBUG_ERROR- if [ "$DEEP" = true ] ; then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$PARAMS" = true ]; then+ start_func "Parameter Discovery"+ printf "${yellow}\n\n Running : Searching params with paramspider${reset}\n"+ cat webs/webs.txt | sed -r "s/https?:\/\///" | anew -q .tmp/probed_nohttp.txt+ eval axiom-scan .tmp/probed_nohttp.txt -m paramspider -l high -q --exclude eot,jpg,jpeg,gif,css,tif,tiff,png,ttf,otf,woff,woff2,ico,pdf,svg,txt,js -o output_paramspider $DEBUG_STD+ eval cat output_paramspider/*.txt $DEBUG_ERROR | anew -q .tmp/param_tmp.txt+ sed '/^FUZZ/d' -i .tmp/param_tmp.txt+ eval rm -rf output_paramspider/ $DEBUG_ERROR+ if [ "$DEEP" = true ] ; then+ printf "${yellow}\n\n Running : Checking ${domain} with Arjun${reset}\n"+ eval axiom-scan .tmp/param_tmp.txt -m arjun -t $ARJUN_THREADS -o webs/param.txt $DEBUG_STD+ else+ if [[ $(cat .tmp/param_tmp.txt | wc -l) -le 50 ]]; thenprintf "${yellow}\n\n Running : Checking ${domain} with Arjun${reset}\n"eval axiom-scan .tmp/param_tmp.txt -m arjun -t $ARJUN_THREADS -o webs/param.txt $DEBUG_STDelse- if [[ $(cat .tmp/param_tmp.txt | wc -l) -le 50 ]]- then- printf "${yellow}\n\n Running : Checking ${domain} with Arjun${reset}\n"- eval axiom-scan .tmp/param_tmp.txt -m arjun -t $ARJUN_THREADS -o webs/param.txt $DEBUG_STD- else- cp .tmp/param_tmp.txt webs/param.txt- fi+ cp .tmp/param_tmp.txt webs/param.txtfi- end_func "Results are saved in webs/param.txt" ${FUNCNAME[0]}+ fi+ end_func "Results are saved in webs/param.txt" ${FUNCNAME[0]}+ else+ if [ "$PARAMS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$PARAMS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function urlchecks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_CHECK" = true ]- then- start_func "URL Extraction"- mkdir -p js- eval axiom-scan webs/webs.txt -m waybackurls -o .tmp/url_extract_way_tmp.txt $DEBUG_STD && eval cat .tmp/url_extract_way_tmp.txt $DEBUG_ERROR | anew -q .tmp/url_extract_tmp.txt- eval axiom-scan webs/webs.txt -m gau -o .tmp/url_extract_gau_tmp.txt $DEBUG_STD && eval cat .tmp/url_extract_gau_tmp.txt $DEBUG_ERROR | anew -q .tmp/url_extract_tmp.txt- diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt) <(sort -u webs/webs.txt) | wc -l)- if [ $diff_webs != "0" ] || [ ! -s ".tmp/gospider.txt" ] ;- then- if [ "$DEEP" = true ] ; then- eval axiom-scan .tmp/probed_tmp_scrap.txt -m gospider --js -d 3 --sitemap --robots -w -r -o .tmp/gospider $DEBUG_STD- else- eval axiom-scan .tmp/probed_tmp_scrap.txt -m gospider --js -d 2 --sitemap --robots -w -r -o .tmp/gospider $DEBUG_STD- fi- cat .tmp/gospider/* | sed '/^.\{2048\}./d' | anew -q .tmp/gospider.txt- fi- cat .tmp/gospider.txt | egrep -o 'https?://[^ ]+' | sed 's/]$//' | grep ".$domain$" | anew -q .tmp/url_extract_tmp.txt- if [ -s "${GITHUB_TOKENS}" ]- then- eval github-endpoints -q -k -d $domain -t ${GITHUB_TOKENS} -o .tmp/github-endpoints.txt $DEBUG_STD- eval cat .tmp/github-endpoints.txt $DEBUG_ERROR | anew -q .tmp/url_extract_tmp.txt- fi- eval cat .tmp/url_extract_tmp.txt webs/param.txt $DEBUG_ERROR | grep "${domain}" | grep "=" | eval qsreplace -a $DEBUG_ERROR | egrep -iv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)$" | anew -q .tmp/url_extract_tmp2.txt- cat .tmp/url_extract_tmp.txt | grep "${domain}" | egrep -i "\.(js)" | anew -q js/url_extract_js.txt- eval uddup -u .tmp/url_extract_tmp2.txt -o .tmp/url_extract_uddup.txt $DEBUG_STD- NUMOFLINES=$(eval cat .tmp/url_extract_uddup.txt $DEBUG_ERROR | anew webs/url_extract.txt | wc -l)- notification "${NUMOFLINES} new urls with params" info- end_func "Results are saved in webs/url_extract.txt" ${FUNCNAME[0]}- if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/url_extract.txt | wc -l) -le 1500 ]]- then- notification "Sending urls to proxy" info- eval ffuf -mc all -w webs/url_extract.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_CHECK" = true ]; then+ start_func "URL Extraction"+ mkdir -p js+ eval axiom-scan webs/webs.txt -m waybackurls -o .tmp/url_extract_way_tmp.txt $DEBUG_STD && eval cat .tmp/url_extract_way_tmp.txt $DEBUG_ERROR | anew -q .tmp/url_extract_tmp.txt+ eval axiom-scan webs/webs.txt -m gau -o .tmp/url_extract_gau_tmp.txt $DEBUG_STD && eval cat .tmp/url_extract_gau_tmp.txt $DEBUG_ERROR | anew -q .tmp/url_extract_tmp.txt+ diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt) <(sort -u webs/webs.txt) | wc -l)+ if [ $diff_webs != "0" ] || [ ! -s ".tmp/gospider.txt" ]; then+ if [ "$DEEP" = true ]; then+ eval axiom-scan .tmp/probed_tmp_scrap.txt -m gospider --js -d 3 --sitemap --robots -w -r -o .tmp/gospider $DEBUG_STD+ else+ eval axiom-scan .tmp/probed_tmp_scrap.txt -m gospider --js -d 2 --sitemap --robots -w -r -o .tmp/gospider $DEBUG_STDfi- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ cat .tmp/gospider/* | sed '/^.\{2048\}./d' | anew -q .tmp/gospider.txt+ fi+ cat .tmp/gospider.txt | egrep -o 'https?://[^ ]+' | sed 's/]$//' | grep ".$domain$" | anew -q .tmp/url_extract_tmp.txt+ if [ -s "${GITHUB_TOKENS}" ]; then+ eval github-endpoints -q -k -d $domain -t ${GITHUB_TOKENS} -o .tmp/github-endpoints.txt $DEBUG_STD+ eval cat .tmp/github-endpoints.txt $DEBUG_ERROR | anew -q .tmp/url_extract_tmp.txt+ fi+ eval cat .tmp/url_extract_tmp.txt webs/param.txt $DEBUG_ERROR | grep "${domain}" | grep "=" | eval qsreplace -a $DEBUG_ERROR | egrep -iv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)$" | anew -q .tmp/url_extract_tmp2.txt+ cat .tmp/url_extract_tmp.txt | grep "${domain}" | egrep -i "\.(js)" | anew -q js/url_extract_js.txt+ eval uddup -u .tmp/url_extract_tmp2.txt -o .tmp/url_extract_uddup.txt $DEBUG_STD+ NUMOFLINES=$(eval cat .tmp/url_extract_uddup.txt $DEBUG_ERROR | anew webs/url_extract.txt | wc -l)+ notification "${NUMOFLINES} new urls with params" info+ end_func "Results are saved in webs/url_extract.txt" ${FUNCNAME[0]}+ if [ "$PROXY" = true ] && [ -n "$proxy_url" ] && [[ $(cat webs/url_extract.txt | wc -l) -le 1500 ]]; then+ notification "Sending urls to proxy" info+ eval ffuf -mc all -w webs/url_extract.txt -u FUZZ -replay-proxy $proxy_url $DEBUG_STD+ fi+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"fi}function url_gf(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_GF" = true ]- then- start_func "Vulnerable Pattern Search"- mkdir -p gf- gf xss webs/url_extract.txt | anew -q gf/xss.txt- gf ssti webs/url_extract.txt | anew -q gf/ssti.txt- gf ssrf webs/url_extract.txt | anew -q gf/ssrf.txt- gf sqli webs/url_extract.txt | anew -q gf/sqli.txt- gf redirect webs/url_extract.txt | anew -q gf/redirect.txt && cat gf/ssrf.txt | anew -q gf/redirect.txt- gf rce webs/url_extract.txt | anew -q gf/rce.txt- gf potential webs/url_extract.txt | cut -d ':' -f3-5 |anew -q gf/potential.txt- cat .tmp/url_extract_tmp.txt | egrep -iv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)$" | unfurl -u format %s://%d%p | anew -q gf/endpoints.txt- gf lfi webs/url_extract.txt | anew -q gf/lfi.txt- end_func "Results are saved in gf folder" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_GF" = true ]; then+ start_func "Vulnerable Pattern Search"+ mkdir -p gf+ gf xss webs/url_extract.txt | anew -q gf/xss.txt+ gf ssti webs/url_extract.txt | anew -q gf/ssti.txt+ gf ssrf webs/url_extract.txt | anew -q gf/ssrf.txt+ gf sqli webs/url_extract.txt | anew -q gf/sqli.txt+ gf redirect webs/url_extract.txt | anew -q gf/redirect.txt && cat gf/ssrf.txt | anew -q gf/redirect.txt+ gf rce webs/url_extract.txt | anew -q gf/rce.txt+ gf potential webs/url_extract.txt | cut -d ':' -f3-5 |anew -q gf/potential.txt+ cat .tmp/url_extract_tmp.txt | egrep -iv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)$" | unfurl -u format %s://%d%p | anew -q gf/endpoints.txt+ gf lfi webs/url_extract.txt | anew -q gf/lfi.txt+ end_func "Results are saved in gf folder" ${FUNCNAME[0]}+ else+ if [ "$URL_GF" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$URL_GF" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function url_ext(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_EXT" = true ]- then- ext=("7z" "achee" "action" "adr" "apk" "arj" "ascx" "asmx" "asp" "aspx" "axd" "backup" "bak" "bat" "bin" "bkf" "bkp" "bok" "cab" "cer" "cfg" "cfm" "cfml" "cgi" "cnf" "conf" "config" "cpl" "crt" "csr" "csv" "dat" "db" "dbf" "deb" "dmg" "dmp" "doc" "docx" "drv" "email" "eml" "emlx" "env" "exe" "gadget" "gz" "html" "ica" "inf" "ini" "iso" "jar" "java" "jhtml" "json" "jsp" "key" "log" "lst" "mai" "mbox" "mbx" "md" "mdb" "msg" "msi" "nsf" "ods" "oft" "old" "ora" "ost" "pac" "passwd" "pcf" "pdf" "pem" "pgp" "php" "php3" "php4" "php5" "phtm" "phtml" "pkg" "pl" "plist" "pst" "pwd" "py" "rar" "rb" "rdp" "reg" "rpm" "rtf" "sav" "sh" "shtm" "shtml" "skr" "sql" "swf" "sys" "tar" "tar.gz" "tmp" "toast" "tpl" "txt" "url" "vcd" "vcf" "wml" "wpd" "wsdl" "wsf" "xls" "xlsm" "xlsx" "xml" "xsd" "yaml" "yml" "z" "zip")- echo "" > webs/url_extract.txt- for t in "${ext[@]}"; do- NUMOFLINES=$(cat .tmp/url_extract_tmp.txt | egrep -i "\.(${t})($|\/|\?)" | sort -u | wc -l)- if [[ ${NUMOFLINES} -gt 0 ]]; then- echo -e "\n############################\n + ${t} + \n############################\n" >> webs/urls_by_ext.txt- cat .tmp/url_extract_tmp.txt | egrep -i "\.(${t})($|\/|\?)" | sort -u >> webs/urls_by_ext.txt- fi- done- end_func "Results are saved in webs/urls_by_ext.txt" ${FUNCNAME[0]}- else+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$URL_EXT" = true ]; then+ ext=("7z" "achee" "action" "adr" "apk" "arj" "ascx" "asmx" "asp" "aspx" "axd" "backup" "bak" "bat" "bin" "bkf" "bkp" "bok" "cab" "cer" "cfg" "cfm" "cfml" "cgi" "cnf" "conf" "config" "cpl" "crt" "csr" "csv" "dat" "db" "dbf" "deb" "dmg" "dmp" "doc" "docx" "drv" "email" "eml" "emlx" "env" "exe" "gadget" "gz" "html" "ica" "inf" "ini" "iso" "jar" "java" "jhtml" "json" "jsp" "key" "log" "lst" "mai" "mbox" "mbx" "md" "mdb" "msg" "msi" "nsf" "ods" "oft" "old" "ora" "ost" "pac" "passwd" "pcf" "pdf" "pem" "pgp" "php" "php3" "php4" "php5" "phtm" "phtml" "pkg" "pl" "plist" "pst" "pwd" "py" "rar" "rb" "rdp" "reg" "rpm" "rtf" "sav" "sh" "shtm" "shtml" "skr" "sql" "swf" "sys" "tar" "tar.gz" "tmp" "toast" "tpl" "txt" "url" "vcd" "vcf" "wml" "wpd" "wsdl" "wsf" "xls" "xlsm" "xlsx" "xml" "xsd" "yaml" "yml" "z" "zip")+ echo "" > webs/url_extract.txt+ for t in "${ext[@]}"; do+ NUMOFLINES=$(cat .tmp/url_extract_tmp.txt | egrep -i "\.(${t})($|\/|\?)" | sort -u | wc -l)+ if [[ ${NUMOFLINES} -gt 0 ]]; then+ echo -e "\n############################\n + ${t} + \n############################\n" >> webs/urls_by_ext.txt+ cat .tmp/url_extract_tmp.txt | egrep -i "\.(${t})($|\/|\?)" | sort -u >> webs/urls_by_ext.txt+ fi+ done+ end_func "Results are saved in webs/urls_by_ext.txt" ${FUNCNAME[0]}+ elseif [ "$URL_EXT" = false ]; thenprintf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else@@ -989,68 +932,60 @@ function url_ext(){}function jschecks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$JSCHECKS" = true ]- then- start_func "Javascript Scan"- if [ -s "js/url_extract_js.txt" ]- then- printf "${yellow} Running : Fetching Urls 1/5${reset}\n"- cat js/url_extract_js.txt | cut -d '?' -f 1 | grep -iE "\.js$" | grep "$domain$" | anew -q js/jsfile_links.txt- cat js/url_extract_js.txt | subjs | grep "$domain$" | anew -q js/jsfile_links.txt- printf "${yellow} Running : Resolving JS Urls 2/5${reset}\n"- eval axiom-scan js/jsfile_links.txt -m httpx -follow-redirects -random-agent -silent -timeout 15 -threads $HTTPX_THREADS -status-code -retries 2 -no-color -o .tmp/js_livelinks.txt $DEBUG_STD && cat .tmp/js_livelinks.txt | grep "[200]" | cut -d ' ' -f1 | anew -q js/js_livelinks.txt- printf "${yellow} Running : Gathering endpoints 3/5${reset}\n"- if [ -s "js/js_livelinks.txt" ]- then- interlace -tL js/js_livelinks.txt -threads 10 -c "python3 $tools/LinkFinder/linkfinder.py -d -i _target_ -o cli >> .tmp/js_endpoints.txt" &>/dev/null- fi- if [ -s ".tmp/js_endpoints.txt" ]- then- sed -i '/^\//!d' .tmp/js_endpoints.txt- cat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txt.txt- fi- printf "${yellow} Running : Gathering secrets 4/5${reset}\n"- if [ -s "js/js_livelinks.txt" ]- then- eval axiom-scan js/js_livelinks.txt -m nuclei -w /home/op/recon/nuclei/exposures/ -r /home/op/recon/puredns/trusted.txt -o js/js_secrets.txt $DEBUG_STD- fi- printf "${yellow} Running : Building wordlist 5/5${reset}\n"- if [ -s "js/js_livelinks.txt" ]- then- cat js/js_livelinks.txt | eval python3 $tools/getjswords.py $DEBUG_ERROR | anew -q webs/dict_words.txt- fi- end_func "Results are saved in js folder" ${FUNCNAME[0]}- else- end_func "No JS urls found, function skipped" ${FUNCNAME[0]}- fi+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$JSCHECKS" = true ]; then+ start_func "Javascript Scan"+ if [ -s "js/url_extract_js.txt" ]; then+ printf "${yellow} Running : Fetching Urls 1/5${reset}\n"+ cat js/url_extract_js.txt | cut -d '?' -f 1 | grep -iE "\.js$" | grep "$domain$" | anew -q js/jsfile_links.txt+ cat js/url_extract_js.txt | subjs | grep "$domain$" | anew -q js/jsfile_links.txt+ printf "${yellow} Running : Resolving JS Urls 2/5${reset}\n"+ eval axiom-scan js/jsfile_links.txt -m httpx -follow-redirects -random-agent -silent -timeout 15 -threads $HTTPX_THREADS -status-code -retries 2 -no-color -o .tmp/js_livelinks.txt $DEBUG_STD && cat .tmp/js_livelinks.txt | grep "[200]" | cut -d ' ' -f1 | anew -q js/js_livelinks.txt+ printf "${yellow} Running : Gathering endpoints 3/5${reset}\n"+ if [ -s "js/js_livelinks.txt" ]; then+ interlace -tL js/js_livelinks.txt -threads 10 -c "python3 $tools/LinkFinder/linkfinder.py -d -i _target_ -o cli >> .tmp/js_endpoints.txt" &>/dev/null+ fi+ if [ -s ".tmp/js_endpoints.txt" ]; then+ sed -i '/^\//!d' .tmp/js_endpoints.txt+ cat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txt.txt+ fi+ printf "${yellow} Running : Gathering secrets 4/5${reset}\n"+ if [ -s "js/js_livelinks.txt" ]; then+ eval axiom-scan js/js_livelinks.txt -m nuclei -w /home/op/recon/nuclei/exposures/ -r /home/op/recon/puredns/trusted.txt -o js/js_secrets.txt $DEBUG_STD+ fi+ printf "${yellow} Running : Building wordlist 5/5${reset}\n"+ if [ -s "js/js_livelinks.txt" ]; then+ cat js/js_livelinks.txt | eval python3 $tools/getjswords.py $DEBUG_ERROR | anew -q webs/dict_words.txt+ fi+ end_func "Results are saved in js folder" ${FUNCNAME[0]}else- if [ "$JSCHECKS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ end_func "No JS urls found, function skipped" ${FUNCNAME[0]}+ fi+ else+ if [ "$JSCHECKS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ else+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function wordlist_gen(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WORDLIST" = true ]- then- start_func "Wordlist generation"- cat .tmp/url_extract_tmp.txt | unfurl -u keys | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt- cat .tmp/url_extract_tmp.txt | unfurl -u values | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt- cat .tmp/url_extract_tmp.txt | tr "[:punct:]" "\n" | anew -q webs/dict_words.txt- if [ -s ".tmp/js_endpoints.txt" ]- then- cat .tmp/js_endpoints.txt | unfurl -u path | anew -q webs/dict_paths.txt- fi- cat .tmp/url_extract_tmp.txt | unfurl -u path | anew -q webs/dict_paths.txt- end_func "Results are saved in webs/dict_[words|paths].txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WORDLIST" = true ]; then+ start_func "Wordlist generation"+ cat .tmp/url_extract_tmp.txt | unfurl -u keys | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt+ cat .tmp/url_extract_tmp.txt | unfurl -u values | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt+ cat .tmp/url_extract_tmp.txt | tr "[:punct:]" "\n" | anew -q webs/dict_words.txt+ if [ -s ".tmp/js_endpoints.txt" ]; then+ cat .tmp/js_endpoints.txt | unfurl -u path | anew -q webs/dict_paths.txt+ fi+ cat .tmp/url_extract_tmp.txt | unfurl -u path | anew -q webs/dict_paths.txt+ end_func "Results are saved in webs/dict_[words|paths].txt" ${FUNCNAME[0]}+ else+ if [ "$WORDLIST" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$WORDLIST" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -1059,10 +994,10 @@ function wordlist_gen(){###############################################################################################################function brokenLinks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$BROKENLINKS" = true ] ; then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$BROKENLINKS" = true ]; thenstart_func "Broken links checks"if [ ! -s ".tmp/gospider.txt" ]; then- if [ "$DEEP" = true ] ; then+ if [ "$DEEP" = true ]; theneval axiom-scan .tmp/probed_tmp_scrap.txt -m gospider --js -d 3 --sitemap --robots -w -r -o .tmp/gospider $DEBUG_STDelseeval axiom-scan .tmp/probed_tmp_scrap.txt -m gospider --js -d 2 --sitemap --robots -w -r -o .tmp/gospider $DEBUG_STD@@ -1083,11 +1018,10 @@ function brokenLinks(){}function xss(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$XSS" = true ] && [ -s "gf/xss.txt" ]- then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$XSS" = true ] && [ -s "gf/xss.txt" ]; thenstart_func "XSS Analysis"cat gf/xss.txt | qsreplace FUZZ | Gxss -c 100 -p Xss | anew -q .tmp/xss_reflected.txt- if [ "$DEEP" = true ] ; then+ if [ "$DEEP" = true ]; thenif [ -n "$XSS_SERVER" ]; theneval axiom-scan .tmp/xss_reflected.txt -m dalfox --mass --mass-worker 100 --multicast --skip-bav -b ${XSS_SERVER} -w $DALFOX_THREADS -o vulns/xss.txt $DEBUG_STDelse@@ -1095,8 +1029,7 @@ function xss(){eval axiom-scan .tmp/xss_reflected.txt -m dalfox --mass --mass-worker 100 --multicast --skip-bav -w $DALFOX_THREADS -o vulns/xss.txt $DEBUG_STDfielse- if [[ $(cat .tmp/xss_reflected.txt | wc -l) -le 500 ]]- then+ if [[ $(cat .tmp/xss_reflected.txt | wc -l) -le 500 ]]; thenif [ -n "$XSS_SERVER" ]; theneval axiom-scan .tmp/xss_reflected.txt -m dalfox --mass --mass-worker 100 --multicast --skip-bav --skip-grepping --skip-mining-all --skip-mining-dict -b ${XSS_SERVER} -w $DALFOX_THREADS -o vulns/xss.txt $DEBUG_STDelse@@ -1120,59 +1053,55 @@ function xss(){}function cors(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CORS" = true ]- then- start_func "CORS Scan"- eval python3 $tools/Corsy/corsy.py -i webs/webs.txt > webs/cors.txt $DEBUG_STD- eval cat webs/cors.txt $DEBUG_ERROR- end_func "Results are saved in webs/cors.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CORS" = true ]; then+ start_func "CORS Scan"+ eval python3 $tools/Corsy/corsy.py -i webs/webs.txt > webs/cors.txt $DEBUG_STD+ eval cat webs/cors.txt $DEBUG_ERROR+ end_func "Results are saved in webs/cors.txt" ${FUNCNAME[0]}+ else+ if [ "$CORS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$CORS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function open_redirect(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$OPEN_REDIRECT" = true ] && [ -s "gf/redirect.txt" ]- then- start_func "Open redirects checks"- if [ "$DEEP" = true ] ; then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$OPEN_REDIRECT" = true ] && [ -s "gf/redirect.txt" ]; then+ start_func "Open redirects checks"+ if [ "$DEEP" = true ]; then+ cat gf/redirect.txt | qsreplace FUZZ | anew -q .tmp/tmp_redirect.txt+ eval python3 $tools/OpenRedireX/openredirex.py -l .tmp/tmp_redirect.txt --keyword FUZZ -p $tools/OpenRedireX/payloads.txt $DEBUG_ERROR | grep "^http" > vulns/redirect.txt+ sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" vulns/redirect.txt+ end_func "Results are saved in vulns/redirect.txt" ${FUNCNAME[0]}+ else+ if [[ $(cat gf/redirect.txt | wc -l) -le 1000 ]]; thencat gf/redirect.txt | qsreplace FUZZ | anew -q .tmp/tmp_redirect.txteval python3 $tools/OpenRedireX/openredirex.py -l .tmp/tmp_redirect.txt --keyword FUZZ -p $tools/OpenRedireX/payloads.txt $DEBUG_ERROR | grep "^http" > vulns/redirect.txtsed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" vulns/redirect.txtend_func "Results are saved in vulns/redirect.txt" ${FUNCNAME[0]}else- if [[ $(cat gf/redirect.txt | wc -l) -le 1000 ]]- then- cat gf/redirect.txt | qsreplace FUZZ | anew -q .tmp/tmp_redirect.txt- eval python3 $tools/OpenRedireX/openredirex.py -l .tmp/tmp_redirect.txt --keyword FUZZ -p $tools/OpenRedireX/payloads.txt $DEBUG_ERROR | grep "^http" > vulns/redirect.txt- sed -r -i "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" vulns/redirect.txt- end_func "Results are saved in vulns/redirect.txt" ${FUNCNAME[0]}- else- printf "${bred} Skipping Open redirects: Too Much URLs to test, try with --deep flag${reset}\n"- printf "${bgreen}#######################################################################${reset}\n"- fi+ printf "${bred} Skipping Open redirects: Too Much URLs to test, try with --deep flag${reset}\n"+ printf "${bgreen}#######################################################################${reset}\n"fi+ fi+ else+ if [ "$OPEN_REDIRECT" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ elif [ ! -s "gf/redirect.txt" ]; then+ printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to Open Redirect ${reset}\n\n"else- if [ "$OPEN_REDIRECT" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- elif [ ! -s "gf/redirect.txt" ]; then- printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to Open Redirect ${reset}\n\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function ssrf_checks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSRF_CHECKS" = true ] && [ -s "gf/ssrf.txt" ]- then+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSRF_CHECKS" = true ] && [ -s "gf/ssrf.txt" ]; thenif [ -n "$COLLAB_SERVER" ]; thenstart_func "SSRF checks"- if [ "$DEEP" = true ] ; then+ if [ "$DEEP" = true ]; thencat gf/ssrf.txt | qsreplace FUZZ | anew -q .tmp/tmp_ssrf.txtCOLLAB_SERVER_FIX=$(echo $COLLAB_SERVER | sed -r "s/https?:\/\///")echo $COLLAB_SERVER_FIX | anew -q .tmp/ssrf_server.txt@@ -1183,8 +1112,7 @@ function ssrf_checks(){eval python3 $tools/ssrf.py $dir/gf/ssrf.txt $COLLAB_SERVER_FIX $DEBUG_ERROR | anew -q vulns/ssrf.txtend_func "Results are saved in vulns/ssrf.txt" ${FUNCNAME[0]}else- if [[ $(cat gf/ssrf.txt | wc -l) -le 1000 ]]- then+ if [[ $(cat gf/ssrf.txt | wc -l) -le 1000 ]]; thencat gf/ssrf.txt | qsreplace FUZZ | anew -q .tmp/tmp_ssrf.txtCOLLAB_SERVER_FIX=$(echo $COLLAB_SERVER | sed -r "s/https?:\/\///")echo $COLLAB_SERVER_FIX | anew -q .tmp/ssrf_server.txt@@ -1215,123 +1143,116 @@ function ssrf_checks(){}function crlf_checks(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CRLF_CHECKS" = true ]- then- start_func "CRLF checks"- eval crlfuzz -l webs/webs.txt -o vulns/crlf.txt $DEBUG_STD- end_func "Results are saved in vulns/crlf.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$CRLF_CHECKS" = true ]; then+ start_func "CRLF checks"+ eval crlfuzz -l webs/webs.txt -o vulns/crlf.txt $DEBUG_STD+ end_func "Results are saved in vulns/crlf.txt" ${FUNCNAME[0]}+ else+ if [ "$CRLF_CHECKS" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$CRLF_CHECKS" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function lfi(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$LFI" = true ] && [ -s "gf/lfi.txt" ]- then- start_func "LFI checks"- cat gf/lfi.txt | qsreplace FUZZ | anew -q .tmp/tmp_lfi.txt- for url in $(cat .tmp/tmp_lfi.txt); do- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w $lfi_wordlist -u $url -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/lfi.txt- done- end_func "Results are saved in vulns/lfi.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$LFI" = true ] && [ -s "gf/lfi.txt" ]; then+ start_func "LFI checks"+ cat gf/lfi.txt | qsreplace FUZZ | anew -q .tmp/tmp_lfi.txt+ for url in $(cat .tmp/tmp_lfi.txt); do+ ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w $lfi_wordlist -u $url -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/lfi.txt+ done+ end_func "Results are saved in vulns/lfi.txt" ${FUNCNAME[0]}+ else+ if [ "$LFI" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ elif [ ! -s "gf/lfi.txt" ]; then+ printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to LFI ${reset}\n\n"else- if [ "$LFI" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- elif [ ! -s "gf/lfi.txt" ]; then- printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to LFI ${reset}\n\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function ssti(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSTI" = true ] && [ -s "gf/ssti.txt" ]- then- start_func "SSTI checks"- cat gf/ssti.txt | qsreplace "ssti{{7*7}}" | anew -q .tmp/ssti_fuzz.txt- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "ssti49" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt- cat gf/ssti.txt | qsreplace "{{''.class.mro[2].subclasses()[40]('/etc/passwd').read()}}" | anew -q .tmp/ssti_fuzz2.txt- ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt- end_func "Results are saved in vulns/ssti.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSTI" = true ] && [ -s "gf/ssti.txt" ]; then+ start_func "SSTI checks"+ cat gf/ssti.txt | qsreplace "ssti{{7*7}}" | anew -q .tmp/ssti_fuzz.txt+ ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "ssti49" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt+ cat gf/ssti.txt | qsreplace "{{''.class.mro[2].subclasses()[40]('/etc/passwd').read()}}" | anew -q .tmp/ssti_fuzz2.txt+ ffuf -v -mc 200 -t $FFUF_THREADS -H "${HEADER}" -w .tmp/ssti_fuzz.txt -u FUZZ -mr "root:" &>/dev/null | grep "URL" | sed 's/| URL | //' | anew -q vulns/ssti.txt+ end_func "Results are saved in vulns/ssti.txt" ${FUNCNAME[0]}+ else+ if [ "$SSTI" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ elif [ ! -s "gf/ssti.txt" ]; then+ printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SSTI ${reset}\n\n"else- if [ "$SSTI" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- elif [ ! -s "gf/ssti.txt" ]; then- printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SSTI ${reset}\n\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function sqli(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SQLI" = true ] && [ -s "gf/sqli.txt" ]- then- start_func "SQLi checks"- cat gf/sqli.txt | qsreplace FUZZ | anew -q .tmp/tmp_sqli.txt- interlace -tL .tmp/tmp_sqli.txt -threads 10 -c "python3 $tools/sqlmap/sqlmap.py -u _target_ -b --batch --disable-coloring --random-agent --output-dir=sqlmap" &>/dev/null- end_func "Results are saved in sqlmap folder" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SQLI" = true ] && [ -s "gf/sqli.txt" ]; then+ start_func "SQLi checks"+ cat gf/sqli.txt | qsreplace FUZZ | anew -q .tmp/tmp_sqli.txt+ interlace -tL .tmp/tmp_sqli.txt -threads 10 -c "python3 $tools/sqlmap/sqlmap.py -u _target_ -b --batch --disable-coloring --random-agent --output-dir=sqlmap" &>/dev/null+ end_func "Results are saved in sqlmap folder" ${FUNCNAME[0]}+ else+ if [ "$SQLI" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"+ elif [ ! -s "gf/sqli.txt" ]; then+ printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SQLi ${reset}\n\n"else- if [ "$SQLI" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- elif [ ! -s "gf/sqli.txt" ]; then- printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SQLi ${reset}\n\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function test_ssl(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$TEST_SSL" = true ]- then- start_func "SSL Test"- eval $tools/testssl.sh/testssl.sh --quiet --color 0 -U -iL hosts/ips.txt $DEBUG_ERROR > hosts/testssl.txt- end_func "Results are saved in hosts/testssl.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$TEST_SSL" = true ]; then+ start_func "SSL Test"+ eval $tools/testssl.sh/testssl.sh --quiet --color 0 -U -iL hosts/ips.txt $DEBUG_ERROR > hosts/testssl.txt+ end_func "Results are saved in hosts/testssl.txt" ${FUNCNAME[0]}+ else+ if [ "$TEST_SSL" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$TEST_SSL" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function spraying(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SPRAY" = true ]- then- start_func "Password spraying"- cd $tools/brutespray- eval python3 brutespray.py --file $dir/hosts/portscan_active.txt --threads $BRUTESPRAY_THREADS --hosts $BRUTESPRAY_CONCURRENCE -o $dir/hosts/brutespray.txt $DEBUG_STD- cd $dir- end_func "Results are saved in hosts/brutespray.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SPRAY" = true ]; then+ start_func "Password spraying"+ cd $tools/brutespray+ eval python3 brutespray.py --file $dir/hosts/portscan_active.txt --threads $BRUTESPRAY_THREADS --hosts $BRUTESPRAY_CONCURRENCE -o $dir/hosts/brutespray.txt $DEBUG_STD+ cd $dir+ end_func "Results are saved in hosts/brutespray.txt" ${FUNCNAME[0]}+ else+ if [ "$SPRAY" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$SPRAY" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}function 4xxbypass(){- if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$BYPASSER4XX" = true ]- then- start_func "403 bypass"- eval cat fuzzing/*.txt $DEBUG_ERROR | egrep '^4' | egrep -v '^404' | cut -d ' ' -f3 | dirdar -only-ok > .tmp/dirdar.txt- eval cat .tmp/dirdar.txt $DEBUG_ERROR | sed -e '1,12d' | sed '/^$/d' | anew -q vulns/4xxbypass.txt- end_func "Results are saved in vulns/4xxbypass.txt" ${FUNCNAME[0]}+ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$BYPASSER4XX" = true ]; then+ start_func "403 bypass"+ eval cat fuzzing/*.txt $DEBUG_ERROR | egrep '^4' | egrep -v '^404' | cut -d ' ' -f3 | dirdar -only-ok > .tmp/dirdar.txt+ eval cat .tmp/dirdar.txt $DEBUG_ERROR | sed -e '1,12d' | sed '/^$/d' | anew -q vulns/4xxbypass.txt+ end_func "Results are saved in vulns/4xxbypass.txt" ${FUNCNAME[0]}+ else+ if [ "$BYPASSER4XX" = false ]; then+ printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"else- if [ "$BYPASSER4XX" = false ]; then- printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"- else- printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"- fi+ printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n"+ fifi}@@ -1340,8 +1261,7 @@ function 4xxbypass(){###############################################################################################################function deleteOutScoped(){- if [ -z "$1" ]- then+ if [ -z "$1" ]; thencat $1 | while read outscopeddoif grep -q "^[*]" <<< $outscoped@@ -1370,8 +1290,7 @@ function getElapsedTime {function isAsciiText {IS_ASCII="False";- if [[ $(file $1 | grep -o 'ASCII text$') == "ASCII text" ]]- then+ if [[ $(file $1 | grep -o 'ASCII text$') == "ASCII text" ]]; thenIS_ASCII="True";elseIS_ASCII="False";@@ -1384,8 +1303,7 @@ function output(){}function notification(){- if [ -n "$1" ] && [ -n "$2" ]- then+ if [ -n "$1" ] && [ -n "$2" ]; thencase $2 ininfo)text="\n${bblue} ${1} ${reset}"@@ -1456,12 +1374,9 @@ function start(){echo "Recon succesfully started on $domain" | $NOTIFYtools_installed- if [ -z "$domain" ]- then- if [ -n "$list" ]- then- if [ -z "$domain" ]- then+ if [ -z "$domain" ]; then+ if [ -n "$list" ]; then+ if [ -z "$domain" ]; thendomain="Multi"dir=$SCRIPTPATH/Recon/$domaincalled_fn_dir=$dir/.called_fn@@ -1477,14 +1392,12 @@ function start(){called_fn_dir=$dir/.called_fnfi- if [ -z "$domain" ]- then+ if [ -z "$domain" ]; thennotification "\n\n${bred} No domain or list provided ${reset}\n\n" errorexitfi- if [ ! -d "$called_fn_dir" ]- then+ if [ ! -d "$called_fn_dir" ]; thenmkdir -p $called_fn_dirfi@@ -1496,8 +1409,7 @@ function start(){fimkdir -p .tmp osint subdomains webs hosts vulns- if [ -n "$findomain_virustotal_token" ]- then+ if [ -n "$findomain_virustotal_token" ]; thenVT_API_KEY=$findomain_virustotal_tokenfi@@ -1509,13 +1421,11 @@ function end(){find $dir -type f -empty | grep -v "called_fn" | xargs rm -f &>/dev/nullfind $dir -type d -empty | grep -v "called_fn" | xargs rm -rf &>/dev/null- if [ "$REMOVETMP" = true ]- then+ if [ "$REMOVETMP" = true ]; thenrm -rf $dir/.tmpfi- if [ -n "$dir_output" ]- then+ if [ -n "$dir_output" ]; thenoutputfinaldir=$dir_outputelse@@ -1670,8 +1580,8 @@ function multi_recon(){nuclei_checkfor domain in $targets; dodir=$workdir/targets/$domain- called_fn_dir=$dir/.called_fn- cd "$dir" || { echo "Failed to cd directory '$kdir' in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }+ called_fn_dir=$dir/.called_fn+ cd "$dir" || { echo "Failed to cd directory '$dir' in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }cms_scannerfuzzparams@@ -1681,7 +1591,6 @@ function multi_recon(){wordlist_gendone-cd "$workdir" || { echo "Failed to cd directory '$workdir' in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }dir=$workdirdomain=$multi@@ -1747,8 +1656,7 @@ bannercheck_version-if [ -z "$1" ]-then+if [ -z "$1" ]; thenhelptools_installedexit@@ -1775,16 +1683,14 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; do;;x ) outOfScope_file=$OPTARGisAsciiText $outOfScope_file- if [ "False" = "$IS_ASCII" ]- then+ if [ "False" = "$IS_ASCII" ]; thenprintf "\n\n${bred} Out of Scope file is not a text file${reset}\n\n"exitfi;;i ) inScope_file=$OPTARGisAsciiText $inScope_file- if [ "False" = "$IS_ASCII" ]- then+ if [ "False" = "$IS_ASCII" ]; thenprintf "\n\n${bred} In Scope file is not a text file${reset}\n\n"exitfi@@ -1792,13 +1698,11 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; do## MODES- r ) if [ -n "$multi" ]- then+ r ) if [ -n "$multi" ]; thenmulti_reconexitfi- if [ -n "$list" ]- then+ if [ -n "$list" ]; thenfor domain in $(cat $list); dostartrecon@@ -1811,8 +1715,7 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; dofiexit;;- s ) if [ -n "$list" ]- then+ s ) if [ -n "$list" ]; thenfor domain in $(cat $list); dosubs_menudone@@ -1821,8 +1724,7 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; dofiexit;;- a ) if [ -n "$list" ]- then+ a ) if [ -n "$list" ]; thenfor domain in $(cat $list); doalldone@@ -1832,8 +1734,7 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; doexit;;w ) start- if [ -n "$list" ]- then+ if [ -n "$list" ]; thenif [[ "$list" = /* ]]; thencp $list $dir/webs/webs.txtelse@@ -1866,8 +1767,7 @@ while getopts ":hd:-:l:m:x:i:varspxwo:" opt; doendexit;;- p ) if [ -n "$list" ]- then+ p ) if [ -n "$list" ]; thenfor domain in $(cat $list); dopassivedone