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
Removed parallelism and added more error control
six2dezaa042760eb03
diff --git a/reconftw.sh b/reconftw.shindex 4fbfe7b..1e73bfc 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -320,27 +320,26 @@ function sub_passive(){if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]thenstart_subfunc "Running : Passive Subdomain Enumeration"- eval subfinder -d $domain -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 &- eval crobat -s $domain $DEBUG_ERROR | anew -q .tmp/crobat_psub.txt &+ eval subfinder -d $domain -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+ eval crobat -s $domain $DEBUG_ERROR | anew -q .tmp/crobat_psub.txtif [ -s "${GITHUB_TOKENS}" ];thenif [ "$DEEP" = true ] ; then- eval github-subdomains -d $domain -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STD &+ eval github-subdomains -d $domain -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STDelse- eval github-subdomains -d $domain -k -q -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STD &+ eval github-subdomains -d $domain -k -q -t $GITHUB_TOKENS -o .tmp/github_subdomains_psub.txt $DEBUG_STDfifi- 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 &- 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 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+ 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.txtif echo $domain | grep -q ".mil$"; thenmildewmv mildew.out .tmp/mildew.outcat .tmp/mildew.out | grep ".$domain$" | anew -q .tmp/mil_psub.txtfi- wait $(jobs -rp)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@@ -571,7 +570,10 @@ function zonetransfer(){thenstart_func "Zone transfer check"eval python3 $tools/dnsrecon/dnsrecon.py -d $domain -a -j subdomains/zonetransfer.json $DEBUG_STD- if grep -q "\"zone_transfer\"\: \"success\"" subdomains/zonetransfer.json ; then notification "Zone transfer found on ${domain}!" info; fi+ if [ -s "subdomains/zonetransfer.json" ]+ then+ if grep -q "\"zone_transfer\"\: \"success\"" subdomains/zonetransfer.json ; then notification "Zone transfer found on ${domain}!" info; fi+ fiend_func "Results are saved in subdomains/zonetransfer.txt" ${FUNCNAME[0]}elseif [ "$ZONETRANSFER" = false ]; then@@ -988,14 +990,20 @@ function jschecks(){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.txtprintf "${yellow} Running : Gathering endpoints 3/5${reset}\n"- 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+ 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+ fiif [ -s ".tmp/js_endpoints.txt" ]theneval sed -i '/^\//!d' .tmp/js_endpoints.txt $DEBUG_STDcat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txt.txtfiprintf "${yellow} Running : Gathering secrets 4/5${reset}\n"- cat js/js_livelinks.txt | eval nuclei -silent -t ~/nuclei-templates/exposures/ -r $resolvers_trusted -o js/js_secrets.txt $DEBUG_STD+ 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+ fiprintf "${yellow} Running : Building wordlist 5/5${reset}\n"if [ -s "js/js_livelinks.txt" ]thendiff --git a/reconftw_axiom.sh b/reconftw_axiom.shindex 920dfc7..ad2fd2a 100755--- a/reconftw_axiom.sh+++ b/reconftw_axiom.sh@@ -320,13 +320,13 @@ function sub_passive(){if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]thenstart_subfunc "Running : Passive Subdomain Enumeration"- echo "/home/op/go/bin/subfinder -d ${domain}" > .tmp/sub_passive_commands.txt- echo "/home/op/go/bin/assetfinder --subs-only ${domain}" >> .tmp/sub_passive_commands.txt- echo "amass enum -passive -d ${domain}" >> .tmp/sub_passive_commands.txt- echo "/usr/bin/findomain --quiet -t ${domain}" >> .tmp/sub_passive_commands.txt- echo "timeout 10m /home/op/go/bin/waybackurls ${domain} | /home/op/go/bin/unfurl --unique domains" >> .tmp/sub_passive_commands.txt- echo "timeout 10m /home/op/go/bin/gau ${domain} | /home/op/go/bin/unfurl --unique domains" >> .tmp/sub_passive_commands.txt- eval axiom-scan .tmp/sub_passive_commands.txt -m exec -o .tmp/axiom_psub.txt $DEBUG_STD++ eval axiom-scan $list -m subfinder -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 -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.txteval crobat -s $domain $DEBUG_ERROR | anew -q .tmp/crobat_psub.txtif [ -s "${GITHUB_TOKENS}" ];thenif [ "$DEEP" = true ] ; then@@ -572,7 +572,10 @@ function zonetransfer(){thenstart_func "Zone transfer check"eval python3 $tools/dnsrecon/dnsrecon.py -d $domain -a -j subdomains/zonetransfer.json $DEBUG_STD- if grep -q "\"zone_transfer\"\: \"success\"" subdomains/zonetransfer.json ; then notification "Zone transfer found on ${domain}!" info; fi+ if [ -s "subdomains/zonetransfer.json" ]+ then+ if grep -q "\"zone_transfer\"\: \"success\"" subdomains/zonetransfer.json ; then notification "Zone transfer found on ${domain}!" info; fi+ fiend_func "Results are saved in subdomains/zonetransfer.txt" ${FUNCNAME[0]}elseif [ "$ZONETRANSFER" = false ]; then@@ -969,14 +972,20 @@ function jschecks(){printf "${yellow} Running : Resolving JS Urls 2/5${reset}\n"eval axiom-scan js/jsfile_links.txt -m httpx -follow-host-redirects -random-agent -status-code -threads $HTTPX_THREADS -timeout 15 -silent -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.txtprintf "${yellow} Running : Gathering endpoints 3/5${reset}\n"- 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+ 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+ fiif [ -s ".tmp/js_endpoints.txt" ]theneval sed -i '/^\//!d' .tmp/js_endpoints.txt $DEBUG_STDcat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txt.txtfiprintf "${yellow} Running : Gathering secrets 4/5${reset}\n"- eval axiom-scan js/js_livelinks.txt -m nuclei -wL /home/op/recon/nuclei/nuclei-templates/exposed-tokens/ -r $resolvers_trusted -o nuclei_js/js_secrets.txt $DEBUG_STD+ if [ -s "js/js_livelinks.txt" ]+ then+ eval axiom-scan js/js_livelinks.txt -m nuclei -wL /home/op/recon/nuclei/nuclei-templates/exposed-tokens/ -r $resolvers_trusted -o nuclei_js/js_secrets.txt $DEBUG_STD+ fiprintf "${yellow} Running : Building wordlist 5/5${reset}\n"if [ -s "js/js_livelinks.txt" ]then