Skip to content

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

Better output

six2dezc556a4450689
diff --git a/lib/common.sh b/lib/common.sh
index 6882761..c60556f 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -147,6 +147,7 @@ count_lines_stdin() {
# Usage: format_duration 83
format_duration() {
local input="${1:-0}"
+ [[ "$input" == "--" ]] && { printf "%s" "--"; return 0; }
if [[ "$input" =~ [a-zA-Z] ]] && ! [[ "$input" =~ ^[0-9]+$ ]]; then
printf "%s" "$input"
return 0
@@ -248,9 +249,9 @@ print_notice() {
local level="$1" module="$2" message="$3"
[[ -z "$module" ]] && module="notice"
if [[ "$level" == "FAIL" ]] && [[ "${OUTPUT_VERBOSITY:-1}" -lt 1 ]]; then
- (OUTPUT_VERBOSITY=1; print_task "$level" "$module" "0" "$message")
+ (OUTPUT_VERBOSITY=1; print_task "$level" "$module" "--" "$message")
else
- print_task "$level" "$module" "0" "$message"
+ print_task "$level" "$module" "--" "$message"
fi
}
diff --git a/lib/parallel.sh b/lib/parallel.sh
index 64f71d0..fe02681 100644
--- a/lib/parallel.sh
+++ b/lib/parallel.sh
@@ -383,9 +383,12 @@ parallel_funcs() {
local job_start_ts
job_start_ts=$(date +%s)
- # Run function in background subshell
+ # Run function in background subshell; write end timestamp after completion
(
- "$func"
+ local _rc=0
+ "$func" || _rc=$?
+ date +%s >"${log_file%.log}.endts"
+ exit "$_rc"
) >"$log_file" 2>&1 &
batch_pids+=("$!")
batch_funcs+=("$func")
@@ -458,8 +461,14 @@ parallel_funcs() {
else
rc=$?
fi
- local job_end_ts
- job_end_ts=$(date +%s)
+ local job_end_ts endts_file
+ endts_file="${batch_logs[$idx]%.log}.endts"
+ if [[ -f "$endts_file" ]]; then
+ job_end_ts=$(< "$endts_file")
+ rm -f "$endts_file" 2>/dev/null || true
+ else
+ job_end_ts=$(date +%s)
+ fi
_parallel_emit_job_output "${batch_funcs[$idx]}" "${batch_logs[$idx]}" "$rc" "${batch_starts[$idx]}" "$job_end_ts"
case "${_PARALLEL_LAST_BADGE:-OK}" in
OK) ((batch_ok++)) || true ;;
@@ -556,8 +565,14 @@ parallel_funcs() {
else
rc=$?
fi
- local job_end_ts
- job_end_ts=$(date +%s)
+ local job_end_ts endts_file
+ endts_file="${batch_logs[$idx]%.log}.endts"
+ if [[ -f "$endts_file" ]]; then
+ job_end_ts=$(< "$endts_file")
+ rm -f "$endts_file" 2>/dev/null || true
+ else
+ job_end_ts=$(date +%s)
+ fi
_parallel_emit_job_output "${batch_funcs[$idx]}" "${batch_logs[$idx]}" "$rc" "${batch_starts[$idx]}" "$job_end_ts"
case "${_PARALLEL_LAST_BADGE:-OK}" in
OK) ((batch_ok++)) || true ;;
@@ -720,22 +735,44 @@ parallel_postactive_enum() {
parallel_funcs "${PAR_SUB_POST_ACTIVE_GROUP_SIZE:-2}" "${funcs[@]}"
}
-# Run brute force enumeration (typically sequential due to resource usage)
+# Run brute force enumeration sequentially (resource usage and shared artifacts)
# Usage: parallel_brute_enum
parallel_brute_enum() {
local funcs=(
"sub_brute"
"sub_permut"
"sub_regex_permut"
+ "sub_ia_permut"
)
-
- # Brute force is resource intensive, run with limit of 2
+
+ # Kept for compatibility with existing helper-based orchestrators.
+ # Brute force/permutation stages should not run concurrently.
if [[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]]; then
- printf "%b[*] Running brute force enumeration (limited parallelism)%b\n" \
+ printf "%b[*] Running brute force enumeration sequentially%b\n" \
"${bblue:-}" "${reset:-}"
fi
- parallel_funcs "${PAR_SUB_BRUTE_GROUP_SIZE:-2}" "${funcs[@]}"
+ local func rc failed=0
+ for func in "${funcs[@]}"; do
+ if ! declare -f "$func" >/dev/null 2>&1; then
+ print_warnf "Function %s not found, skipping" "$func"
+ continue
+ fi
+
+ "$func"
+ rc=$?
+ if ((rc > 0)); then
+ if [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then
+ print_warnf "Brute phase function %s failed (rc=%d); continuing" "$func" "$rc"
+ ((failed++)) || true
+ else
+ print_errorf "Brute phase function %s failed (rc=%d)" "$func" "$rc"
+ return 1
+ fi
+ fi
+ done
+
+ return "$failed"
}
###############################################################################
@@ -849,7 +886,7 @@ parallel_subdomains_full() {
# Phase 3: Post-active (parallel - requires resolved subdomains)
parallel_postactive_enum
- # Phase 4: Brute force (limited parallel due to resource usage)
+ # Phase 4: Brute force (sequential due to resource usage and shared files)
if [[ ${SUBBRUTE:-false} == true ]] || [[ ${SUBPERMUTE:-false} == true ]]; then
parallel_brute_enum
fi
diff --git a/modules/axiom.sh b/modules/axiom.sh
index 5fcc166..617a6b6 100644
--- a/modules/axiom.sh
+++ b/modules/axiom.sh
@@ -102,7 +102,7 @@ function axiom_launch() {
NUMOFNODES=$(timeout 30 axiom-ls 2>>"$LOGFILE" | grep -c "$AXIOM_FLEET_NAME" || true)
if [[ $NUMOFNODES -ge $AXIOM_FLEET_COUNT ]]; then
axiom-select "$AXIOM_FLEET_NAME*" 2>>"$LOGFILE" >/dev/null
- end_func "Axiom fleet $AXIOM_FLEET_NAME already has $NUMOFNODES instances" info
+ end_func "" "${FUNCNAME[0]}"
else
if [[ $NUMOFNODES -eq 0 ]]; then
startcount=$AXIOM_FLEET_COUNT
@@ -122,7 +122,7 @@ function axiom_launch() {
fi
NUMOFNODES=$(timeout 30 axiom-ls 2>>"$LOGFILE" | grep -c "$AXIOM_FLEET_NAME" || true)
- end_func "Axiom fleet $AXIOM_FLEET_NAME launched $NUMOFNODES instances" info
+ end_func "" "${FUNCNAME[0]}"
fi
fi
}
@@ -141,13 +141,16 @@ function axiom_shutdown() {
}
function axiom_selected() {
+ start_func "${FUNCNAME[0]}" "Checking Axiom connectivity"
if [[ ! $(axiom-ls 2>>"${LOGFILE:-/dev/null}" | tail -n +2 | sed '$ d' | wc -l) -gt 0 ]]; then
+ end_func "No axiom instances running" "${FUNCNAME[0]}" warn
notification "No axiom instances running ${reset}\n\n" error
exit
fi
if [[ ! $(cat ~/.axiom/selected.conf | sed '/^\s*$/d' | wc -l) -gt 0 ]]; then
+ end_func "No axiom instances selected" "${FUNCNAME[0]}" warn
notification "No axiom instances selected ${reset}\n\n" error
exit
fi
@@ -196,4 +199,5 @@ function axiom_selected() {
AXIOM=false
fi
fi
+ end_func "" "${FUNCNAME[0]}"
}
diff --git a/modules/core.sh b/modules/core.sh
index 5ec61c1..3cc8811 100644
--- a/modules/core.sh
+++ b/modules/core.sh
@@ -1317,7 +1317,7 @@ function end_subfunc() {
fi
if [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]]; then
- _print_status "$badge" " ${2}" "${duration}s"
+ _print_status "$badge" "${2}" "${duration}s"
if [[ -n "$reason_code" ]] && { [[ "$badge" != "CACHE" ]] || [[ "${SHOW_CACHE:-false}" == "true" ]]; }; then
printf " reason: %s\n" "$reason_code"
fi
diff --git a/modules/modes.sh b/modules/modes.sh
index 51d1c21..c7aa255 100644
--- a/modules/modes.sh
+++ b/modules/modes.sh
@@ -672,7 +672,7 @@ function recon() {
zonetransfer
fi
- ui_module_end "OSINT" "osint/dorks.txt" "osint/emails.txt" "osint/domain_info.txt"
+ ui_module_end "OSINT" "osint/"
progress_module "OSINT"
if [[ $AXIOM == true ]]; then
@@ -687,7 +687,7 @@ function recon() {
remove_big_files
s3buckets
- ui_module_end "Subdomains" "subdomains/subdomains.txt" "webs/webs.txt"
+ ui_module_end "Subdomains" "subdomains/" "webs/"
progress_module "Subdomains"
_print_section "Web Detection"
@@ -715,7 +715,7 @@ function recon() {
geo_info
fi
- ui_module_end "Web Detection" "hosts/ips.txt" "hosts/cdn_providers.txt"
+ ui_module_end "Web Detection" "hosts/"
progress_module "Web Detection"
# Quick-rescan gating
diff --git a/modules/subdomains.sh b/modules/subdomains.sh
index 55b3616..3a08e9a 100644
--- a/modules/subdomains.sh
+++ b/modules/subdomains.sh
@@ -274,42 +274,53 @@ _subdomains_enumerate() {
fi
fi
- # Phase 3: Dependent active enrichment (runs after sub_active is ready)
- parallel_funcs "${PAR_SUB_DEP_ACTIVE_GROUP_SIZE:-3}" sub_noerror sub_dns
- local sub_g3_rc=$?
- if ((sub_g3_rc > 0)); then
- if [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then
- notification "Parallel subdomain dependent active phase completed with ${sub_g3_rc} warning(s); continuing" warn
- else
- notification "Parallel subdomain batch failed (dependent active)" error
- return 1
+ # Phase 3: Brute force — sequential (resource-intensive, shared artifacts)
+ # Respect CONTINUE_ON_TOOL_ERROR semantics even in sequential mode.
+ local sub_g3_rc=0
+ local -a sub_g3_funcs=(
+ sub_brute
+ sub_permut
+ sub_regex_permut
+ sub_ia_permut
+ )
+ local sub_g3_fn
+ for sub_g3_fn in "${sub_g3_funcs[@]}"; do
+ "$sub_g3_fn"
+ sub_g3_rc=$?
+ if ((sub_g3_rc > 0)); then
+ if [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then
+ notification "Subdomain brute phase: ${sub_g3_fn} failed (rc=${sub_g3_rc}); continuing" warn
+ else
+ notification "Subdomain brute phase failed (${sub_g3_fn}, rc=${sub_g3_rc})" error
+ return 1
+ fi
fi
- fi
+ done
- # Phase 4: Post-active analysis (depends on active/enrichment results)
- parallel_funcs "${PAR_SUB_POST_ACTIVE_GROUP_SIZE:-2}" sub_tls sub_analytics
+ # Phase 4: Dependent active enrichment (runs after sub_active is ready)
+ parallel_funcs "${PAR_SUB_DEP_ACTIVE_GROUP_SIZE:-3}" sub_noerror sub_dns
local sub_g4_rc=$?
if ((sub_g4_rc > 0)); then
if [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then
- notification "Parallel subdomain post-active phase completed with ${sub_g4_rc} warning(s); continuing" warn
+ notification "Parallel subdomain dependent active phase completed with ${sub_g4_rc} warning(s); continuing" warn
else
- notification "Parallel subdomain batch failed (post-active)" error
+ notification "Parallel subdomain batch failed (dependent active)" error
return 1
fi
fi
-
- # Phase 5: Brute force (limited parallelism - resource intensive)
- parallel_funcs "${PAR_SUB_BRUTE_GROUP_SIZE:-2}" sub_brute sub_permut sub_regex_permut sub_ia_permut
+
+ # Phase 5: Post-active analysis (depends on active/enrichment results)
+ parallel_funcs "${PAR_SUB_POST_ACTIVE_GROUP_SIZE:-2}" sub_tls sub_analytics
local sub_g5_rc=$?
if ((sub_g5_rc > 0)); then
if [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then
- notification "Parallel subdomain bruteforce/permutations phase completed with ${sub_g5_rc} warning(s); continuing" warn
+ notification "Parallel subdomain post-active phase completed with ${sub_g5_rc} warning(s); continuing" warn
else
- notification "Parallel subdomain batch failed (bruteforce/permutations)" error
+ notification "Parallel subdomain batch failed (post-active)" error
return 1
fi
fi
-
+
# Phase 6: Recursive and scraping (sequential - depends on previous results)
sub_recursive_passive
sub_recursive_brute
@@ -358,8 +369,8 @@ _subdomains_finalize() {
TOTAL_SUBS=$(sed '/^$/d' "subdomains/subdomains.txt" 2>/dev/null | wc -l | tr -d ' ')
if [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]]; then
- _print_status OK "subdomains_full" "${TOTAL_SUBS} found -> subdomains/subdomains.txt"
- print_artifacts "subdomains/subdomains.txt"
+ _print_status OK "subdomains_full" "0s"
+ print_artifacts "${TOTAL_SUBS} found -> subdomains/subdomains.txt"
fi
# Emit plugin event
@@ -926,6 +937,7 @@ function sub_brute() {
if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $SUBBRUTE == true ]]; then
start_subfunc "${FUNCNAME[0]}" "Running: Bruteforce Subdomain Enumeration"
+ print_notice RUN "sub_brute" "bruteforcing subdomains"
if [[ $AXIOM != true ]]; then
@@ -1282,6 +1294,7 @@ function sub_permut() {
if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $SUBPERMUTE == true ]]; then
start_subfunc "${FUNCNAME[0]}" "Running: Permutations Subdomain Enumeration"
+ print_notice RUN "sub_permut" "generating permutations"
# If in multi mode and subdomains.txt doesn't exist, create it with the domain
if [[ -n $multi ]] && [[ ! -f "$dir/subdomains/subdomains.txt" ]]; then
@@ -1936,6 +1949,7 @@ function s3buckets() {
# Check if the function should run
if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $S3BUCKETS == true ]] && ! [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
start_func "${FUNCNAME[0]}" "AWS S3 buckets search"
+ print_notice RUN "s3buckets" "scanning S3 buckets"
# If in multi mode and subdomains.txt doesn't exist, create it
if [[ -n $multi ]] && [[ ! -f "$dir/subdomains/subdomains.txt" ]]; then
diff --git a/reconftw.cfg b/reconftw.cfg
index a26c8be..000689f 100644
--- a/reconftw.cfg
+++ b/reconftw.cfg
@@ -290,7 +290,7 @@ PAR_OSINT_GROUP2_SIZE=5
PAR_SUB_PASSIVE_GROUP_SIZE=4
PAR_SUB_DEP_ACTIVE_GROUP_SIZE=3
PAR_SUB_POST_ACTIVE_GROUP_SIZE=2
-PAR_SUB_BRUTE_GROUP_SIZE=2
+PAR_SUB_BRUTE_GROUP_SIZE=2 # Legacy/no-op for brute phase (now forced sequential); kept for backward compatibility.
PAR_WEB_DETECT_GROUP_SIZE=3
PAR_VULNS_GROUP1_SIZE=4
PAR_VULNS_GROUP2_SIZE=4