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
sed fix from deleteoutofscope
six2dez3944873e5fa8
diff --git a/reconftw.sh b/reconftw.shindex 6ac3c9a..3e5ba2d 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -345,11 +345,11 @@ function subdomains_full(){webprobe_simpleif [ -s "subdomains/subdomains.txt" ]; then- deleteOutScoped $outOfScope_file subdomains/subdomains.txt+ [ -s "$outOfScope_file" ] && deleteOutScoped $outOfScope_file subdomains/subdomains.txtNUMOFLINES_subs=$(cat subdomains/subdomains.txt 2>>"$LOGFILE" | anew .tmp/subdomains_old.txt | sed '/^$/d' | wc -l)fiif [ -s "webs/webs.txt" ]; then- deleteOutScoped $outOfScope_file webs/webs.txt+ [ -s "$outOfScope_file" ] && deleteOutScoped $outOfScope_file webs/webs.txtNUMOFLINES_probed=$(cat webs/webs.txt 2>>"$LOGFILE" | anew .tmp/probed_old.txt | sed '/^$/d' | wc -l)fiprintf "${bblue}\n Total subdomains: ${reset}\n\n"@@ -421,7 +421,7 @@ function sub_active(){if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; thenstart_subfunc ${FUNCNAME[0]} "Running : Active Subdomain Enumeration"find .tmp -type f -iname "*_subs.txt" -exec cat {} + | anew -q .tmp/subs_no_resolved.txt- deleteOutScoped $outOfScope_file .tmp/subs_no_resolved.txt+ [ -s "$outOfScope_file" ] && deleteOutScoped $outOfScope_file .tmp/subs_no_resolved.txtif [ ! "$AXIOM" = true ]; thenresolvers_update_quick_local[ -s ".tmp/subs_no_resolved.txt" ] && 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 --wildcard-tests $PUREDNS_WILDCARDTEST_LIMIT --wildcard-batch $PUREDNS_WILDCARDBATCH_LIMIT &>/dev/null@@ -652,7 +652,7 @@ function sub_permut(){cat .tmp/permute1.txt .tmp/permute2.txt 2>>"$LOGFILE" | anew -q .tmp/permute_subs.txtif [ -s ".tmp/permute_subs.txt" ]; then- deleteOutScoped $outOfScope_file .tmp/permute_subs.txt+ [ -s "$outOfScope_file" ] && deleteOutScoped $outOfScope_file .tmp/permute_subs.txt[[ "$INSCOPE" = true ]] && check_inscope .tmp/permute_subs.txt 2>>"$LOGFILE" &>/dev/nullNUMOFLINES=$(cat .tmp/permute_subs.txt 2>>"$LOGFILE" | grep ".$domain$" | anew subdomains/subdomains.txt | sed '/^$/d' | wc -l)else@@ -684,7 +684,7 @@ function sub_regex_permut(){fiif [ -s ".tmp/regulator.txt" ]; then- deleteOutScoped $outOfScope_file .tmp/regulator.txt+ [ -s "$outOfScope_file" ] && deleteOutScoped $outOfScope_file .tmp/regulator.txt[[ "$INSCOPE" = true ]] && check_inscope .tmp/regulator.txt 2>>"$LOGFILE" &>/dev/nullNUMOFLINES=$(cat .tmp/regulator.txt 2>>"$LOGFILE" | grep ".$domain$" | anew subdomains/subdomains.txt | sed '/^$/d' | wc -l)else@@ -909,7 +909,7 @@ function webprobe_simple(){ficat .tmp/web_full_info.txt .tmp/web_full_info_probe.txt webs/web_full_info.txt 2>>"$LOGFILE" | jq -s 'try .' | jq 'try unique_by(.input)' | jq 'try .[]' 2>>"$LOGFILE" > webs/web_full_info.txtcat webs/web_full_info.txt | jq -r 'try .url' 2>/dev/null | grep "$domain" | sed "s/*.//" | anew -q .tmp/probed_tmp.txt- deleteOutScoped $outOfScope_file .tmp/probed_tmp.txt+ [ -s "$outOfScope_file" ] && deleteOutScoped $outOfScope_file .tmp/probed_tmp.txtNUMOFLINES=$(cat .tmp/probed_tmp.txt 2>>"$LOGFILE" | anew webs/webs.txt | sed '/^$/d' | wc -l)cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txtend_subfunc "${NUMOFLINES} new websites resolved" ${FUNCNAME[0]}@@ -1930,6 +1930,8 @@ function webcache(){###############################################################################################################function deleteOutScoped(){+ echo "$1"+ echo "$2"if [ -f "$1" ]; thencat $1 | while read outscopeddo