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
Fixes
six2dez64a898a70d4b
diff --git a/modules/core.sh b/modules/core.shindex 3cc8811..1052efa 100644--- a/modules/core.sh+++ b/modules/core.sh@@ -1594,8 +1594,8 @@ function generate_consolidated_report() {# Top assets from hotlist (if present)if [[ -s hotlist.txt ]] && command -v jq >/dev/null 2>&1; thentop_assets_json=$(head -n "${HOTLIST_TOP:-50}" hotlist.txt \- | awk '{score=$1;$1=""; sub(/^ /,"",$0); printf "{\"asset\":\"%s\",\"score\":%s}\n",$0,score}' \- | jq -s '.')+ | awk '{score=$1; $1=""; sub(/^ /,"",$0); print score "\t" $0}' \+ | jq -Rn '[inputs | split("\t") | {asset: .[1], score: (.[0] | tonumber? // 0)}]')elsetop_assets_json="[]"fi@@ -1611,10 +1611,10 @@ function generate_consolidated_report() {| awk -F'] ' '{ts=$1; gsub(/^\[/,"",ts);msg=$2;- if (msg ~ /Start function:/) { print "{\"timestamp\":\"" ts "\",\"level\":\"INFO\",\"function\":\"" msg "\",\"message\":\"started\"}" }- else if (msg ~ /End function:/) { print "{\"timestamp\":\"" ts "\",\"level\":\"SUCCESS\",\"function\":\"" msg "\",\"message\":\"completed\"}" }+ if (msg ~ /Start function:/) { print ts "\tINFO\t" msg "\tstarted" }+ else if (msg ~ /End function:/) { print ts "\tSUCCESS\t" msg "\tcompleted" }}' \- | jq -s '.')+ | jq -Rn '[inputs | split("\t") | {timestamp: .[0], level: .[1], function: .[2], message: .[3]}]')elsetimeline_json="[]"fidiff --git a/modules/utils.sh b/modules/utils.shindex c5b417b..9d13728 100644--- a/modules/utils.sh+++ b/modules/utils.sh@@ -617,6 +617,19 @@ function sanitize_ip() {return 0}+# Sanitize a single entry from a -l list file.+# Detects IP/CIDR vs domain and applies the appropriate sanitizer.+# Outputs the sanitized value; returns 1 if the entry is invalid.+# Usage: domain=$(_sanitize_list_entry "$raw") || continue+_sanitize_list_entry() {+ local raw="$1"+ if [[ "$raw" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+(/[0-9]+)?$ ]]; then+ sanitize_ip "$raw"+ else+ sanitize_domain "$raw"+ fi+}+###################################################################################################################################################### SECURITY CHECKS ######################################################################################################################################################################diff --git a/modules/web.sh b/modules/web.shindex daa2886..b8c8133 100644--- a/modules/web.sh+++ b/modules/web.sh@@ -130,7 +130,7 @@ function webprobe_simple() {local probe_first_line probe_is_jsonprobe_first_line="$(awk 'NF {print; exit}' .tmp/web_full_info_probe.txt 2>/dev/null || true)"probe_is_json=false- [[ "$probe_first_line" =~ ^[[:space:]]*\\{ ]] && probe_is_json=true+ [[ "$probe_first_line" =~ ^[[:space:]]*\{ ]] && probe_is_json=true# Always start fresh for this run (used by urlchecks diff too).: >.tmp/probed_tmp.txt 2>/dev/null || true@@ -141,7 +141,7 @@ function webprobe_simple() {if ! cat .tmp/web_full_info_probe.txt .tmp/web_full_info.txt 2>>"$LOGFILE" \| jq -cs 'unique_by(.input)[]' 2>>"$LOGFILE" >webs/web_full_info.txt; thenlog_note "webprobe_simple: failed to merge httpx JSON; falling back to probe-only" "${FUNCNAME[0]}" "${LINENO}"- awk 'match($0, /^[[:space:]]*\\{/) {print}' .tmp/web_full_info_probe.txt >.tmp/web_full_info_merge_input.jsonl 2>/dev/null || true+ awk 'match($0, /^[[:space:]]*\{/) {print}' .tmp/web_full_info_probe.txt >.tmp/web_full_info_merge_input.jsonl 2>/dev/null || trueif [[ -s ".tmp/web_full_info_merge_input.jsonl" ]]; thenjq -cs 'unique_by(.input)[]' .tmp/web_full_info_merge_input.jsonl 2>>"$LOGFILE" >webs/web_full_info.txt || : >webs/web_full_info.txtelse@@ -2007,7 +2007,7 @@ function wordlist_gen() {start_func "${FUNCNAME[0]}" "Wordlist Generation"- [[ -s ".tmp/url_extract_tmp.txt" ]] && cat webs/url_extract.txt | anew -q .tmp/url_extract_tmp.txt || true+ [[ -s ".tmp/url_extract_tmp.txt" ]] && [[ -s "webs/url_extract.txt" ]] && cat webs/url_extract.txt | anew -q .tmp/url_extract_tmp.txt || true# Ensure url_extract_tmp.txt exists and is not emptyif [[ -s ".tmp/url_extract_tmp.txt" ]]; then# Define patterns for keys and valuesdiff --git a/reconftw.sh b/reconftw.shindex b8c75aa..2996573 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -162,6 +162,7 @@ while true; dofiwhile IFS= read -r t; do[[ -z "$t" ]] && continue+ t=$(_sanitize_list_entry "$t") || continueipcidr_target "$t" "$list"done <"$list"shift 2@@ -621,6 +622,7 @@ case $opt_mode insed_i 's/\r$//' "$flist"while IFS= read -r domain <&3; do[[ -z "$domain" ]] && continue+ domain=$(_sanitize_list_entry "$domain") || continuestartreconend@@ -642,6 +644,7 @@ case $opt_mode insed_i 's/\r$//' "$flist"while IFS= read -r domain <&3; do[[ -z "$domain" ]] && continue+ domain=$(_sanitize_list_entry "$domain") || continuesubs_menudone 3<"$flist"else@@ -656,6 +659,7 @@ case $opt_mode insed_i 's/\r$//' "$flist"while IFS= read -r domain <&3; do[[ -z "$domain" ]] && continue+ domain=$(_sanitize_list_entry "$domain") || continuepassivedone 3<"$flist"else@@ -671,6 +675,7 @@ case $opt_mode insed_i 's/\r$//' "$flist"while IFS= read -r domain <&3; do[[ -z "$domain" ]] && continue+ domain=$(_sanitize_list_entry "$domain") || continuealldone 3<"$flist"else@@ -702,6 +707,7 @@ case $opt_mode insed_i 's/\r$//' "$flist"while IFS= read -r domain <&3; do[[ -z "$domain" ]] && continue+ domain=$(_sanitize_list_entry "$domain") || continuestartosintend@@ -720,6 +726,7 @@ case $opt_mode insed_i 's/\r$//' "$flist"while IFS= read -r domain <&3; do[[ -z "$domain" ]] && continue+ domain=$(_sanitize_list_entry "$domain") || continuezen_menudone 3<"$flist"else