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
Fixed tests dry-run
six2dez906b8f4a8770
diff --git a/modules/osint.sh b/modules/osint.shindex 2af52a8..c5e65dc 100644--- a/modules/osint.sh+++ b/modules/osint.sh@@ -140,7 +140,7 @@ function github_repos() {local titus_opts=""[[ "${SECRETS_SCAN_GIT_HISTORY:-false}" == "true" ]] && titus_opts="${titus_opts} --git"[[ "${SECRETS_VALIDATE:-false}" == "true" ]] && titus_opts="${titus_opts} --validate"- if ! interlace -tL .tmp/github_repos_folders.txt -threads "$INTERLACE_THREADS" -c "\"${titus_bin}\" scan --format json ${titus_opts} .tmp/github_repos/_target_ > .tmp/github/titus__cleantarget_.json" 2>>"$LOGFILE" >/dev/null; then+ if ! run_command interlace -tL .tmp/github_repos_folders.txt -threads "$INTERLACE_THREADS" -c "\"${titus_bin}\" scan --format json ${titus_opts} .tmp/github_repos/_target_ > .tmp/github/titus__cleantarget_.json" 2>>"$LOGFILE" >/dev/null; then_print_error "interlace titus command failed"return 1fi@@ -153,7 +153,7 @@ function github_repos() {filocal np_scan_opts=""[[ "${SECRETS_SCAN_GIT_HISTORY:-false}" == "true" ]] && np_scan_opts="--git-history"- if ! interlace -tL .tmp/github_repos_folders.txt -threads "$INTERLACE_THREADS" -c "noseyparker scan ${np_scan_opts} --datastore .tmp/github/np_ds__cleantarget_ .tmp/github_repos/_target_ >/dev/null 2>>${LOGFILE}; noseyparker report --datastore .tmp/github/np_ds__cleantarget_ --format json > .tmp/github/nosey__cleantarget_.json" 2>>"$LOGFILE" >/dev/null; then+ if ! run_command interlace -tL .tmp/github_repos_folders.txt -threads "$INTERLACE_THREADS" -c "noseyparker scan ${np_scan_opts} --datastore .tmp/github/np_ds__cleantarget_ .tmp/github_repos/_target_ >/dev/null 2>>${LOGFILE}; noseyparker report --datastore .tmp/github/np_ds__cleantarget_ --format json > .tmp/github/nosey__cleantarget_.json" 2>>"$LOGFILE" >/dev/null; then_print_error "interlace noseyparker command failed"return 1fi@@ -168,7 +168,7 @@ function github_repos() {local titus_opts=""[[ "${SECRETS_SCAN_GIT_HISTORY:-false}" == "true" ]] && titus_opts="${titus_opts} --git"[[ "${SECRETS_VALIDATE:-false}" == "true" ]] && titus_opts="${titus_opts} --validate"- if ! interlace -tL .tmp/github_repos_folders.txt -threads "$INTERLACE_THREADS" -c "\"${titus_bin}\" scan --format json ${titus_opts} .tmp/github_repos/_target_ > .tmp/github/titus__cleantarget_.json" 2>>"$LOGFILE" >/dev/null; then+ if ! run_command interlace -tL .tmp/github_repos_folders.txt -threads "$INTERLACE_THREADS" -c "\"${titus_bin}\" scan --format json ${titus_opts} .tmp/github_repos/_target_ > .tmp/github/titus__cleantarget_.json" 2>>"$LOGFILE" >/dev/null; then_print_error "interlace titus command failed"return 1fi@@ -177,7 +177,7 @@ function github_repos() {# Keep trufflehog enrichment (all engines).if [[ -s ".tmp/company_repos_url.txt" ]]; then- if ! interlace -tL .tmp/company_repos_url.txt -threads "$INTERLACE_THREADS" -c "trufflehog git _target_ -j 2>&1 | jq -c > _output_/_cleantarget_" -o .tmp/github/ 2>>"$LOGFILE" >/dev/null; then+ if ! run_command interlace -tL .tmp/company_repos_url.txt -threads "$INTERLACE_THREADS" -c "trufflehog git _target_ -j 2>&1 | jq -c > _output_/_cleantarget_" -o .tmp/github/ 2>>"$LOGFILE" >/dev/null; then_print_error "interlace trufflehog command failed"return 1fidiff --git a/modules/subdomains.sh b/modules/subdomains.shindex fe65b9a..9363eea 100644--- a/modules/subdomains.sh+++ b/modules/subdomains.sh@@ -675,7 +675,7 @@ function sub_active() {fi# Add the domain itself to the list if it resolves- echo "$domain" | dnsx -retry 3 -silent -r "$resolvers_trusted" \+ echo "$domain" | run_command dnsx -retry 3 -silent -r "$resolvers_trusted" \2>>"$LOGFILE" | anew -q .tmp/subdomains_tmp.txt# If INSCOPE is true, check inscope@@ -729,7 +729,7 @@ function sub_tls() {if [[ $DEEP == true ]]; thenif [[ $AXIOM != true ]]; then- cat subdomains/subdomains.txt | tlsx -san -cn -silent -ro -c "$TLSX_THREADS" \+ cat subdomains/subdomains.txt | run_command tlsx -san -cn -silent -ro -c "$TLSX_THREADS" \-p "$TLS_PORTS" -o .tmp/subdomains_tlsx.txt 2>>"$LOGFILE" >/dev/nullelserun_command axiom-scan subdomains/subdomains.txt -m tlsx \@@ -738,7 +738,7 @@ function sub_tls() {fielseif [[ $AXIOM != true ]]; then- cat subdomains/subdomains.txt | tlsx -san -cn -silent -ro -c "$TLSX_THREADS" >.tmp/subdomains_tlsx.txt 2>>"$LOGFILE"+ cat subdomains/subdomains.txt | run_command tlsx -san -cn -silent -ro -c "$TLSX_THREADS" >.tmp/subdomains_tlsx.txt 2>>"$LOGFILE"elserun_command axiom-scan subdomains/subdomains.txt -m tlsx \-san -cn -silent -ro -c "$TLSX_THREADS" \@@ -797,7 +797,7 @@ function sub_noerror() {# Check for DNSSEC black liesrandom_subdomain="${RANDOM}thistotallynotexist${RANDOM}.$domain"- dns_response=$(echo "$random_subdomain" | dnsx -r "$resolvers" -rcode noerror,nxdomain -retry 3 -silent 2>>"$LOGFILE" | cut -d' ' -f2)+ dns_response=$(echo "$random_subdomain" | run_command dnsx -r "$resolvers" -rcode noerror,nxdomain -retry 3 -silent 2>>"$LOGFILE" | cut -d' ' -f2)if [[ $dns_response == "[NXDOMAIN]" ]]; then@@ -1017,7 +1017,7 @@ function sub_ptr_cidrs() {# Expand CIDRs to IPs with safety limitlocal max_ips="${PTR_SWEEP_MAX_IPS:-50000}": >.tmp/ptr_ips_expanded.txt- mapcidr -silent <hosts/asn_cidrs.txt 2>>"$LOGFILE" \+ run_command mapcidr -silent <hosts/asn_cidrs.txt 2>>"$LOGFILE" \| head -n "$max_ips" >.tmp/ptr_ips_expanded.txt || truelocal expanded_count@@ -1177,7 +1177,7 @@ function sub_scraping() {subdomains_count=$(wc -l <"$dir/subdomains/subdomains.txt")if [[ $subdomains_count -le $DEEP_LIMIT ]] || [[ $DEEP == true ]]; then- urlfinder -d $domain -all -o .tmp/url_extract_tmp.txt 2>>"$LOGFILE" >/dev/null+ run_command urlfinder -d $domain -all -o .tmp/url_extract_tmp.txt 2>>"$LOGFILE" >/dev/nullif [[ -s ".tmp/url_extract_tmp.txt" ]]; thencat .tmp/url_extract_tmp.txt | grep -a "$domain" \@@ -1187,7 +1187,7 @@ function sub_scraping() {if command -v waymore &>/dev/null; thenprint_notice RUN "sub_scraping" "collecting passive URLs"- if ! "$TIMEOUT_CMD" "${WAYMORE_TIMEOUT:-30m}" waymore -i "$domain" -mode U -oU .tmp/waymore_urls_subs.txt 2>>"$LOGFILE" >/dev/null; then+ if ! run_command "$TIMEOUT_CMD" "${WAYMORE_TIMEOUT:-30m}" waymore -i "$domain" -mode U -oU .tmp/waymore_urls_subs.txt 2>>"$LOGFILE" >/dev/null; thenlog_note "sub_scraping: waymore failed or timed out; continuing" "${FUNCNAME[0]}" "${LINENO}"fiif [[ -s ".tmp/waymore_urls_subs.txt" ]]; then@@ -1797,7 +1797,7 @@ function sub_recursive_passive() {# Passive recursiveif [[ -s "subdomains/subdomains.txt" ]]; then- dsieve -if subdomains/subdomains.txt -f 3 -top "$DEEP_RECURSIVE_PASSIVE" >.tmp/subdomains_recurs_top.txt+ run_command dsieve -if subdomains/subdomains.txt -f 3 -top "$DEEP_RECURSIVE_PASSIVE" >.tmp/subdomains_recurs_top.txtfiif [[ $AXIOM != true ]]; then@@ -1889,7 +1889,7 @@ function sub_recursive_brute() {if [[ $subdomain_count -le $DEEP_LIMIT ]]; then# Generate top subdomains if not already doneif [[ ! -s ".tmp/subdomains_recurs_top.txt" ]]; then- dsieve -if subdomains/subdomains.txt -f 3 -top "$DEEP_RECURSIVE_PASSIVE" >.tmp/subdomains_recurs_top.txt+ run_command dsieve -if subdomains/subdomains.txt -f 3 -top "$DEEP_RECURSIVE_PASSIVE" >.tmp/subdomains_recurs_top.txtfifor subdomain_top in $(cat .tmp/subdomains_recurs_top.txt); dodiff --git a/modules/web.sh b/modules/web.shindex b8d5b9a..849b09c 100644--- a/modules/web.sh+++ b/modules/web.sh@@ -359,7 +359,7 @@ function virtualhosts() {# Proceed only if input files existif [[ -s "subdomains/subdomains.txt" ]] && [[ -s "hosts/ips.txt" ]]; then- VhostFinder -ips hosts/ips.txt -wordlist subdomains/subdomains.txt -verify | grep "+" | anew -q "$dir/webs/virtualhosts.txt"+ run_command VhostFinder -ips hosts/ips.txt -wordlist subdomains/subdomains.txt -verify | grep "+" | anew -q "$dir/webs/virtualhosts.txt"fi# Optionally send to proxy if conditions are met@@ -626,7 +626,7 @@ function portscan() {# Check for CDN providersif [[ ! -s "hosts/cdn_providers.txt" ]]; thenif [[ -s "hosts/ips.txt" ]]; then- cat hosts/ips.txt | cdncheck -silent -resp -cdn -waf -nc 2>/dev/null | anew -q hosts/cdn_providers.txt || true+ cat hosts/ips.txt | run_command cdncheck -silent -resp -cdn -waf -nc 2>/dev/null | anew -q hosts/cdn_providers.txt || truefifi@@ -2215,7 +2215,7 @@ function jschecks() {[[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]] && printf "%bRunning: Fetching URLs 1/6%b\n" "$yellow" "$reset"if [[ $AXIOM != true ]]; then- subjs -ua "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" -c 40 <.tmp/url_extract_js.txt \+ run_command subjs -ua "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" -c 40 <.tmp/url_extract_js.txt \| grep -F "$domain" \| grep -aEo 'https?://[^ ]+' | anew -q .tmp/subjslinks.txt || trueelse