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
Clearing output
six2dez8421e5d43dff
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7e91ee6..ceeefd1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -158,6 +158,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Parallel job output now strips ANSI/control sequences before replaying tail/full logs, reducing report/export parser issues.- Function/subfunction end log timestamps now use real end times (not reused start timestamps).- Added heartbeat progress lines for long-running phases (`nuclei`, `ffuf/interlace`, `cmseek`, and selected passive collectors) to avoid "stuck" perception.+- Added `run_with_heartbeat_shell` for complex shell/redirection cases to keep heartbeat coverage in long-running URL collection paths.+- Skip/cache output now includes explicit reason hints (`config`, `noinput`, `cache`) while preserving existing summary counters.+- Parallel UI now defaults to a cleaner mode with aggregated progress snapshots (`X/Y`, `%`, elapsed, ETA) and reduced process-noise.+- In clean parallel UI mode, `Queue` lines are suppressed when pending count is `0` to keep terminal output compact.+- Added configurable parallel UX and sizing knobs in `reconftw.cfg` (`PARALLEL_UI_MODE`, progress visibility toggles, and per-group parallel sizes).+- Parallel batch summaries now include completion ratio (`completed/total`) to make long blocks easier to track.**Parallel Execution and Status Reporting**- Parallel aggregation now preserves per-function final badges (`OK/WARN/FAIL/SKIP/CACHE`) from module functions/subfunctions instead of inferring only from process exit code.diff --git a/lib/common.sh b/lib/common.shindex 73f231b..2647fa9 100644--- a/lib/common.sh+++ b/lib/common.sh@@ -355,6 +355,7 @@ skip_notification() {local func_name="${FUNCNAME[1]:-unknown}"local reason="${1:-mode or configuration settings}"local badge="SKIP"+ local reason_code="config"case "$reason" indisabled)@@ -363,11 +364,21 @@ skip_notification() {processed)reason="already processed"badge="CACHE"+ reason_code="cache"+ ;;+ noinput)+ reason="missing required input data"+ reason_code="noinput";;esacif [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]]; then_print_status "$badge" "$func_name" "0s"+ if [[ "$badge" == "SKIP" ]]; then+ printf " reason: %s\n" "$reason_code"+ elif [[ "$badge" == "CACHE" ]] && [[ "${SHOW_CACHE:-false}" == "true" ]]; then+ printf " reason: %s\n" "$reason_code"+ fiif [[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]]; thenif [[ "$badge" == "CACHE" ]]; then_print_msg INFO "${func_name} already processed. To force re-run, delete: ${called_fn_dir:-.}/.${func_name}"@@ -379,6 +390,7 @@ skip_notification() {# Emit skip marker for parent process (parallel mode)if [[ -n "${called_fn_dir:-}" ]]; then+ printf "%s\n" "$reason_code" >"${called_fn_dir}/.status_reason_${func_name}" 2>/dev/null || trueif [[ "$badge" == "CACHE" ]]; then: >"${called_fn_dir}/.cache_${func_name}" 2>/dev/null || trueelse@@ -504,6 +516,17 @@ run_with_heartbeat() {wait "$cmd_pid"}+# Shell-string variant for commands that require complex redirections.+# Usage: run_with_heartbeat_shell "label" "command string"+run_with_heartbeat_shell() {+ local label="${1:-task}"+ local shell_cmd="${2:-}"+ if [[ -z "$shell_cmd" ]]; then+ return 1+ fi+ run_with_heartbeat "$label" /bin/bash -lc "$shell_cmd"+}+# Execute command and capture line count result with validation# Usage: NUMOFLINES=$(safe_count "command | pipeline")# Always returns a valid number (0 on failure)diff --git a/lib/parallel.sh b/lib/parallel.shindex 23946b3..533b8a7 100644--- a/lib/parallel.sh+++ b/lib/parallel.sh@@ -13,11 +13,46 @@ declare -r _PARALLEL_SH_LOADED=1# Default maximum concurrent jobs (can be overridden)PARALLEL_MAX_JOBS="${PARALLEL_MAX_JOBS:-4}"PARALLEL_HEARTBEAT_SECONDS="${PARALLEL_HEARTBEAT_SECONDS:-20}"+PARALLEL_UI_MODE="${PARALLEL_UI_MODE:-clean}"+PARALLEL_PROGRESS_SHOW_ETA="${PARALLEL_PROGRESS_SHOW_ETA:-true}"+PARALLEL_PROGRESS_SHOW_ACTIVE="${PARALLEL_PROGRESS_SHOW_ACTIVE:-true}"+PARALLEL_PROGRESS_COMPACT_ACTIVE_MAX="${PARALLEL_PROGRESS_COMPACT_ACTIVE_MAX:-4}"+PARALLEL_TRACE_SLOW_SECONDS="${PARALLEL_TRACE_SLOW_SECONDS:-30}"# Track running PIDs for cleanupdeclare -a _PARALLEL_PIDS=()_PARALLEL_LAST_BADGE=""+_parallel_get_ui_mode() {+ case "${PARALLEL_UI_MODE:-clean}" in+ clean|balanced|trace) printf "%s" "${PARALLEL_UI_MODE:-clean}" ;;+ *) printf "clean" ;;+ esac+}++_parallel_should_show_started() {+ local mode+ mode=$(_parallel_get_ui_mode)+ [[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]] && [[ "$mode" == "trace" ]]+}++_parallel_should_show_finished() {+ local rc="${1:-0}" duration="${2:-0}" badge="${3:-OK}"+ local mode+ mode=$(_parallel_get_ui_mode)+ [[ "${OUTPUT_VERBOSITY:-1}" -lt 2 ]] && return 1+ case "$mode" in+ trace) return 0 ;;+ balanced)+ if [[ "$rc" -ne 0 ]] || [[ "$badge" == "WARN" ]] || [[ "$badge" == "FAIL" ]] || ((duration >= PARALLEL_TRACE_SLOW_SECONDS)); then+ return 0+ fi+ return 1+ ;;+ *) return 1 ;;+ esac+}+_parallel_effective_max_jobs() {local requested="${1:-$PARALLEL_MAX_JOBS}"local pressure="${PARALLEL_PRESSURE_LEVEL:-normal}"@@ -53,12 +88,51 @@ _parallel_snapshot() {local active_list="$1"local done_list="$2"local queue_count="$3"+ local done_count="${4:-0}"+ local total_count="${5:-0}"+ local elapsed_batch="${6:-0}"[[ "${OUTPUT_VERBOSITY:-1}" -lt 1 ]] && return 0- local active_fmt done_fmt- active_fmt=$(_parallel_compact_list "$active_list" 6)- done_fmt=$(_parallel_compact_list "$done_list" 6)- printf "Active: %s\n" "$active_fmt"- printf "Done: %s | Queue: %s pending\n" "$done_fmt" "$queue_count"++ local mode active_max active_fmt done_fmt progress_pct eta="-"+ mode=$(_parallel_get_ui_mode)+ active_max="${PARALLEL_PROGRESS_COMPACT_ACTIVE_MAX:-4}"+ active_fmt=$(_parallel_compact_list "$active_list" "$active_max")+ done_fmt=$(_parallel_compact_list "$done_list" "$active_max")++ if ((total_count > 0)); then+ progress_pct=$((done_count * 100 / total_count))+ else+ progress_pct=0+ fi++ if [[ "${PARALLEL_PROGRESS_SHOW_ETA:-true}" == "true" ]] && ((done_count > 0)) && ((total_count > done_count)); then+ local avg remaining eta_seconds+ avg=$((elapsed_batch / done_count))+ remaining=$((total_count - done_count))+ eta_seconds=$((avg * remaining))+ eta=$(format_duration "$eta_seconds")+ elif [[ "${PARALLEL_PROGRESS_SHOW_ETA:-true}" == "true" ]] && ((total_count > done_count)); then+ eta="calculating..."+ fi++ printf "Progress: %d/%d (%d%%) | elapsed %s" \+ "$done_count" "$total_count" "$progress_pct" "$(format_duration "$elapsed_batch")"+ if [[ "${PARALLEL_PROGRESS_SHOW_ETA:-true}" == "true" ]]; then+ printf " | ETA ~%s" "$eta"+ fi+ printf "\n"++ if [[ "${PARALLEL_PROGRESS_SHOW_ACTIVE:-true}" == "true" ]] && [[ "$active_fmt" != "none" || "$mode" == "trace" ]]; then+ printf "Active: %s\n" "$active_fmt"+ fi++ if [[ "$mode" == "trace" ]]; then+ printf "Done: %s | Queue: %s pending\n" "$done_fmt" "$queue_count"+ else+ if [[ "$mode" != "clean" ]] || ((queue_count > 0)); then+ printf "Queue: %s pending\n" "$queue_count"+ fi+ fi}###############################################################################@@ -80,18 +154,23 @@ _parallel_emit_job_output() {local skip_marker=""local cache_marker=""local status_marker=""+ local reason_marker=""if [[ -n "${called_fn_dir:-}" ]]; thenskip_marker="${called_fn_dir}/.skip_${func_name}"cache_marker="${called_fn_dir}/.cache_${func_name}"status_marker="${called_fn_dir}/.status_${func_name}"+ reason_marker="${called_fn_dir}/.status_reason_${func_name}"filocal badge=""+ local reason_code=""if [[ -n "$cache_marker" && -f "$cache_marker" ]]; thenbadge="CACHE"+ reason_code="cache"rm -f "$cache_marker" 2>/dev/null || trueelif [[ -n "$skip_marker" && -f "$skip_marker" ]]; thenbadge="SKIP"+ reason_code="config"rm -f "$skip_marker" 2>/dev/null || trueelif [[ -n "$status_marker" && -f "$status_marker" ]]; thenbadge=$(head -n 1 "$status_marker" 2>/dev/null | tr -d '\r\n' | tr '[:lower:]' '[:upper:]')@@ -113,6 +192,10 @@ _parallel_emit_job_output() {badge="FAIL"fifi+ if [[ -n "$reason_marker" && -f "$reason_marker" ]]; then+ reason_code=$(head -n 1 "$reason_marker" 2>/dev/null | tr -d '\r\n' | tr '[:upper:]' '[:lower:]')+ rm -f "$reason_marker" 2>/dev/null || true+ fi_PARALLEL_LAST_BADGE="$badge"# In quiet mode (OUTPUT_VERBOSITY==0), only show failures@@ -139,6 +222,9 @@ _parallel_emit_job_output() {printf " %s\n" "$line"donefi+ if [[ -n "$reason_code" ]] && { [[ "$badge" == "SKIP" ]] || { [[ "$badge" == "CACHE" ]] && [[ "${SHOW_CACHE:-false}" == "true" ]]; }; }; then+ printf " reason: %s\n" "$reason_code"+ fi;;tail)local show_lines="$tail_lines"@@ -154,6 +240,9 @@ _parallel_emit_job_output() {if [[ -s "$log_file" ]]; thentail -n "$show_lines" "$log_file" | strip_ansi_streamfi+ if [[ -n "$reason_code" ]] && { [[ "$badge" == "SKIP" ]] || { [[ "$badge" == "CACHE" ]] && [[ "${SHOW_CACHE:-false}" == "true" ]]; }; }; then+ printf " reason: %s\n" "$reason_code"+ fi;;full)if [[ "$_force_print" == true ]]; then@@ -167,6 +256,9 @@ _parallel_emit_job_output() {if [[ -s "$log_file" ]]; thencat "$log_file" | strip_ansi_streamfi+ if [[ -n "$reason_code" ]] && { [[ "$badge" == "SKIP" ]] || { [[ "$badge" == "CACHE" ]] && [[ "${SHOW_CACHE:-false}" == "true" ]]; }; }; then+ printf " reason: %s\n" "$reason_code"+ fi;;esac}@@ -180,6 +272,8 @@ _parallel_batch_summary() {local skip="$4"local cache="$5"local batch_start="$6"+ local completed="${7:-0}"+ local total="${8:-0}"local batch_endbatch_end=$(date +%s)local elapsed=$((batch_end - batch_start))@@ -190,10 +284,10 @@ _parallel_batch_summary() {[[ "${PARALLEL_LOG_MODE:-summary}" == "summary" ]] && [[ "${OUTPUT_VERBOSITY:-1}" -lt 2 ]] && return 0if declare -F ui_batch_end >/dev/null 2>&1; then- ui_batch_end "$ok" "$warn" "$fail" "$elapsed" "$skip" "$cache"+ ui_batch_end "$ok" "$warn" "$fail" "$elapsed" "$skip" "$cache" "$completed" "$total"else- printf " --- batch: ok:%d warn:%d fail:%d skip:%d cache:%d, %ds elapsed ---\n" \- "$ok" "$warn" "$fail" "$skip" "$cache" "$elapsed"+ printf " --- batch: ok:%d warn:%d fail:%d skip:%d cache:%d, %d/%d completed, %ds elapsed ---\n" \+ "$ok" "$warn" "$fail" "$skip" "$cache" "$completed" "$total" "$elapsed"fi}@@ -269,7 +363,7 @@ parallel_funcs() {if ((${#batch_pids[@]} == 0)); thenif declare -F ui_batch_start >/dev/null 2>&1; then# Skip batch envelope in summary mode at normal verbosity - individual status lines suffice- if [[ "${PARALLEL_LOG_MODE:-summary}" != "summary" ]] || [[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]]; then+ if [[ "$(_parallel_get_ui_mode)" != "clean" ]] && { [[ "${PARALLEL_LOG_MODE:-summary}" != "summary" ]] || [[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]]; }; thenui_batch_start "$batch_label" "$max_jobs"fifi@@ -290,7 +384,7 @@ parallel_funcs() {queued_count=$((queued_count + 1))# Log if verbose (OUTPUT_VERBOSITY >= 2)- if [[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]]; then+ if _parallel_should_show_started; thenprintf "%b[*] Started %s (PID: %d)%b\n" "${cyan:-}" "$func" "${batch_pids[${#batch_pids[@]}-1]}" "${reset:-}"fi@@ -307,16 +401,17 @@ parallel_funcs() {fidonelocal queue_count=$((total_funcs - queued_count))- _parallel_snapshot "$active_list" "$done_list" "$queue_count"+ _parallel_snapshot "$active_list" "$done_list" "$queue_count" "0" "${#batch_pids[@]}" "0"fi# Heartbeat while long-running jobs are executing, to avoid "stuck" perception.local hb="${PARALLEL_HEARTBEAT_SECONDS:-20}"if [[ "${PARALLEL_MODE:-true}" == "true" ]] && [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]] && [[ "$hb" =~ ^[0-9]+$ ]] && ((hb > 0)); then- local last_hb now alive hb_active_list job_dur dur_fmt queue_count+ local last_hb now alive hb_active_list job_dur dur_fmt queue_count batch_elapsed hb_done_countlast_hb=$(date +%s)while :; doalive=0+ hb_done_count=0hb_active_list=""now=$(date +%s)for idx in "${!batch_pids[@]}"; do@@ -329,12 +424,15 @@ parallel_funcs() {elsehb_active_list="${hb_active_list}, ${batch_funcs[$idx]} ${dur_fmt}"fi+ else+ hb_done_count=$((hb_done_count + 1))fidone((alive == 0)) && breakif ((now - last_hb >= hb)); thenqueue_count=$((total_funcs - queued_count))- _parallel_snapshot "${hb_active_list:-none}" "$done_list" "$queue_count"+ batch_elapsed=$((now - batch_start_ts))+ _parallel_snapshot "${hb_active_list:-none}" "$done_list" "$queue_count" "$hb_done_count" "${#batch_pids[@]}" "$batch_elapsed"last_hb=$nowfisleep 1@@ -368,15 +466,17 @@ parallel_funcs() {elsedone_list="${done_list}, ${batch_funcs[$idx]} ${dur_fmt}"fi- if [[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]]; then+ if _parallel_should_show_finished "$rc" "$job_dur" "${_PARALLEL_LAST_BADGE:-OK}"; thenprintf "%b[*] Finished %s (PID: %s, rc=%s)%b\n" "${cyan:-}" "${batch_funcs[$idx]}" "${batch_pids[$idx]}" "$rc" "${reset:-}"firm -f "${batch_logs[$idx]}" 2>/dev/null || truedone- _parallel_batch_summary "$batch_ok" "$batch_warn" "$batch_fail" "$batch_skip" "$batch_cache" "$batch_start_ts"+ _parallel_batch_summary "$batch_ok" "$batch_warn" "$batch_fail" "$batch_skip" "$batch_cache" "$batch_start_ts" "${#batch_pids[@]}" "${#batch_pids[@]}"if [[ "${PARALLEL_MODE:-true}" == "true" ]]; thenlocal queue_count=$((total_funcs - queued_count))- _parallel_snapshot "none" "$done_list" "$queue_count"+ local now_ts+ now_ts=$(date +%s)+ _parallel_snapshot "none" "$done_list" "$queue_count" "${#batch_pids[@]}" "${#batch_pids[@]}" "$((now_ts - batch_start_ts))"fibatch_pids=()batch_funcs=()@@ -399,15 +499,16 @@ parallel_funcs() {fidonelocal queue_count=$((total_funcs - queued_count))- _parallel_snapshot "$active_list" "$done_list" "$queue_count"+ _parallel_snapshot "$active_list" "$done_list" "$queue_count" "0" "${#batch_pids[@]}" "0"filocal hb="${PARALLEL_HEARTBEAT_SECONDS:-20}"if [[ "${PARALLEL_MODE:-true}" == "true" ]] && [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]] && [[ "$hb" =~ ^[0-9]+$ ]] && ((hb > 0)); then- local last_hb now alive hb_active_list job_dur dur_fmt queue_count+ local last_hb now alive hb_active_list job_dur dur_fmt queue_count batch_elapsed hb_done_countlast_hb=$(date +%s)while :; doalive=0+ hb_done_count=0hb_active_list=""now=$(date +%s)for idx in "${!batch_pids[@]}"; do@@ -420,12 +521,15 @@ parallel_funcs() {elsehb_active_list="${hb_active_list}, ${batch_funcs[$idx]} ${dur_fmt}"fi+ else+ hb_done_count=$((hb_done_count + 1))fidone((alive == 0)) && breakif ((now - last_hb >= hb)); thenqueue_count=$((total_funcs - queued_count))- _parallel_snapshot "${hb_active_list:-none}" "$done_list" "$queue_count"+ batch_elapsed=$((now - batch_start_ts))+ _parallel_snapshot "${hb_active_list:-none}" "$done_list" "$queue_count" "$hb_done_count" "${#batch_pids[@]}" "$batch_elapsed"last_hb=$nowfisleep 1@@ -459,14 +563,16 @@ parallel_funcs() {elsedone_list="${done_list}, ${batch_funcs[$idx]} ${dur_fmt}"fi- if [[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]]; then+ if _parallel_should_show_finished "$rc" "$job_dur" "${_PARALLEL_LAST_BADGE:-OK}"; thenprintf "%b[*] Finished %s (PID: %s, rc=%s)%b\n" "${cyan:-}" "${batch_funcs[$idx]}" "${batch_pids[$idx]}" "$rc" "${reset:-}"firm -f "${batch_logs[$idx]}" 2>/dev/null || truedone- _parallel_batch_summary "$batch_ok" "$batch_warn" "$batch_fail" "$batch_skip" "$batch_cache" "$batch_start_ts"+ _parallel_batch_summary "$batch_ok" "$batch_warn" "$batch_fail" "$batch_skip" "$batch_cache" "$batch_start_ts" "${#batch_pids[@]}" "${#batch_pids[@]}"if [[ "${PARALLEL_MODE:-true}" == "true" ]]; then- _parallel_snapshot "none" "$done_list" "0"+ local now_ts+ now_ts=$(date +%s)+ _parallel_snapshot "none" "$done_list" "0" "${#batch_pids[@]}" "${#batch_pids[@]}" "$((now_ts - batch_start_ts))"fifirmdir "$parallel_log_root" 2>/dev/null || true@@ -563,7 +669,7 @@ parallel_passive_enum() {"${bblue:-}" "${#funcs[@]}" "${reset:-}"fi- parallel_funcs 2 "${funcs[@]}"+ parallel_funcs "${PAR_SUB_PASSIVE_GROUP_SIZE:-2}" "${funcs[@]}"}# Run active subdomain enumeration in parallel@@ -581,7 +687,7 @@ parallel_active_enum() {"${bblue:-}" "${#funcs[@]}" "${reset:-}"fi- parallel_funcs 3 "${funcs[@]}"+ parallel_funcs "${PAR_SUB_DEP_ACTIVE_GROUP_SIZE:-3}" "${funcs[@]}"}# Run post-active subdomain enumeration in parallel@@ -598,7 +704,7 @@ parallel_postactive_enum() {"${bblue:-}" "${#funcs[@]}" "${reset:-}"fi- parallel_funcs 2 "${funcs[@]}"+ parallel_funcs "${PAR_SUB_POST_ACTIVE_GROUP_SIZE:-2}" "${funcs[@]}"}# Run brute force enumeration (typically sequential due to resource usage)@@ -616,7 +722,7 @@ parallel_brute_enum() {"${bblue:-}" "${reset:-}"fi- parallel_funcs 2 "${funcs[@]}"+ parallel_funcs "${PAR_SUB_BRUTE_GROUP_SIZE:-2}" "${funcs[@]}"}###############################################################################@@ -638,7 +744,7 @@ parallel_web_vulns() {"${bblue:-}" "${#funcs[@]}" "${reset:-}"fi- parallel_funcs 4 "${funcs[@]}"+ parallel_funcs "${PAR_VULNS_GROUP1_SIZE:-4}" "${funcs[@]}"}# Run injection vulnerability checks in parallel@@ -656,7 +762,7 @@ parallel_injection_vulns() {"${bblue:-}" "${#funcs[@]}" "${reset:-}"fi- parallel_funcs 4 "${funcs[@]}"+ parallel_funcs "${PAR_VULNS_GROUP2_SIZE:-4}" "${funcs[@]}"}# Run server-side vulnerability checks in parallel@@ -673,7 +779,7 @@ parallel_server_vulns() {"${bblue:-}" "${#funcs[@]}" "${reset:-}"fi- parallel_funcs 3 "${funcs[@]}"+ parallel_funcs "${PAR_VULNS_GROUP3_SIZE:-3}" "${funcs[@]}"}###############################################################################@@ -696,7 +802,7 @@ parallel_osint() {"${bblue:-}" "${#funcs[@]}" "${reset:-}"fi- parallel_funcs 4 "${funcs[@]}"+ parallel_funcs "${PAR_OSINT_GROUP1_SIZE:-4}" "${funcs[@]}"}###############################################################################diff --git a/lib/ui.sh b/lib/ui.shindex d5ba27a..5fc4e52 100644--- a/lib/ui.sh+++ b/lib/ui.sh@@ -158,8 +158,9 @@ ui_batch_row() {ui_batch_end() {local ok="$1" warn="$2" fail="$3" elapsed="$4"local skip="${5:-0}" cache="${6:-0}"- printf " %b── ok:%d warn:%d fail:%d skip:%d cache:%d │ %ds elapsed ──%b\n" \- "${bgreen:-}" "$ok" "$warn" "$fail" "$skip" "$cache" "$elapsed" "${reset:-}"+ local completed="${7:-0}" total="${8:-0}"+ printf " %b── ok:%d warn:%d fail:%d skip:%d cache:%d │ %d/%d completed │ %ds elapsed ──%b\n" \+ "${bgreen:-}" "$ok" "$warn" "$fail" "$skip" "$cache" "$completed" "$total" "$elapsed" "${reset:-}"}ui_summary() {diff --git a/modules/core.sh b/modules/core.shindex 8cf9e51..43e452c 100644--- a/modules/core.sh+++ b/modules/core.sh@@ -1106,7 +1106,7 @@ function end_func() {# - end_func "msg" warnif [[ -n "$status" ]]; thencase "$status" in- info|warn|error|good|OK|WARN|FAIL|SKIP)+ info|warn|error|good|OK|WARN|FAIL|SKIP|SKIP_CONFIG|SKIP_NOINPUT|CACHE_HIT);; # keep as-is*)status="OK"@@ -1114,7 +1114,7 @@ function end_func() {esacelsecase "$fn" in- info|warn|error|good|OK|WARN|FAIL|SKIP)+ info|warn|error|good|OK|WARN|FAIL|SKIP|SKIP_CONFIG|SKIP_NOINPUT|CACHE_HIT)status="$fn"fn="${FUNCNAME[1]:-unknown}";;@@ -1133,21 +1133,44 @@ function end_func() {end_date=$(date +'%Y-%m-%d %H:%M:%S')echo "[$end_date] End function: ${fn} " >>"${LOGFILE}"local badge="OK"+ local reason_code=""case "$status" ininfo|INFO) badge="INFO" ;;warn|WARN) badge="WARN" ;;error|ERROR) badge="FAIL" ;;good|SUCCESS) badge="OK" ;;OK|WARN|FAIL|SKIP|CACHE) badge="$status" ;;+ SKIP_CONFIG) badge="SKIP"; reason_code="config" ;;+ SKIP_NOINPUT) badge="SKIP"; reason_code="noinput" ;;+ CACHE_HIT) badge="CACHE"; reason_code="cache" ;;esac+ # Auto-normalize common "no input" skip patterns when caller didn't set explicit status.+ if [[ "$badge" == "OK" ]] && [[ -n "$message" ]]; then+ local msg_lc+ msg_lc=$(printf "%s" "$message" | tr '[:upper:]' '[:lower:]')+ if [[ "$msg_lc" == no\ * ]] && [[ "$msg_lc" == *"skip"* ]]; then+ badge="SKIP"+ reason_code="noinput"+ elif [[ "$msg_lc" == *"missing url candidates"* ]]; then+ badge="SKIP"+ reason_code="noinput"+ fi+ fi+# Persist per-function final status for parallel aggregator.if [[ -n "${called_fn_dir:-}" ]]; thenprintf "%s\n" "$badge" >"${called_fn_dir}/.status_${fn}" 2>/dev/null || true+ if [[ -n "$reason_code" ]]; then+ printf "%s\n" "$reason_code" >"${called_fn_dir}/.status_reason_${fn}" 2>/dev/null || true+ fifiif [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]]; then_print_status "$badge" "${fn}" "${duration}s"+ if [[ -n "$reason_code" ]] && { [[ "$badge" != "CACHE" ]] || [[ "${SHOW_CACHE:-false}" == "true" ]]; }; then+ printf " reason: %s\n" "$reason_code"+ fi# Show detail line for non-OK statuses when message is presentif [[ -n "$message" ]] && [[ "$badge" != "OK" && "$badge" != "INFO" ]]; thenprintf " %s\n" "$message"@@ -1183,14 +1206,27 @@ function end_subfunc() {getElapsedTime "$start_sub" "$end_sub"local duration=$((end_sub - start_sub))local status="${3:-OK}"+ local badge="$status"+ local reason_code=""+ case "$status" in+ SKIP_CONFIG) badge="SKIP"; reason_code="config" ;;+ SKIP_NOINPUT) badge="SKIP"; reason_code="noinput" ;;+ CACHE_HIT) badge="CACHE"; reason_code="cache" ;;+ esac# Persist per-subfunction final status for parallel aggregator.if [[ -n "${called_fn_dir:-}" ]]; then- printf "%s\n" "$status" >"${called_fn_dir}/.status_${2}" 2>/dev/null || true+ printf "%s\n" "$badge" >"${called_fn_dir}/.status_${2}" 2>/dev/null || true+ if [[ -n "$reason_code" ]]; then+ printf "%s\n" "$reason_code" >"${called_fn_dir}/.status_reason_${2}" 2>/dev/null || true+ fifiif [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]]; then- _print_status "$status" " ${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"+ fifilocal end_sub_dateend_sub_date=$(date +'%Y-%m-%d %H:%M:%S')diff --git a/modules/modes.sh b/modules/modes.shindex 3f51041..8277d8f 100644--- a/modules/modes.sh+++ b/modules/modes.sh@@ -484,7 +484,7 @@ function vulns() {if [[ "${PARALLEL_MODE:-true}" == "true" ]] && declare -f parallel_funcs &>/dev/null; then# Parallel execution - group independent checks[[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]] && printf "%b[*] Running vulnerability checks in parallel mode%b\n" "$bblue" "$reset"- parallel_funcs 4 cors open_redirect crlf_checks xss+ parallel_funcs "${PAR_VULNS_GROUP1_SIZE:-4}" cors open_redirect crlf_checks xsslocal vulns_g1_rc=$?if ((vulns_g1_rc > 0)); thenif [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then@@ -495,7 +495,7 @@ function vulns() {return 1fifi- parallel_funcs 4 ssrf_checks lfi ssti sqli+ parallel_funcs "${PAR_VULNS_GROUP2_SIZE:-4}" ssrf_checks lfi ssti sqlilocal vulns_g2_rc=$?if ((vulns_g2_rc > 0)); thenif [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then@@ -506,7 +506,7 @@ function vulns() {return 1fifi- parallel_funcs 3 command_injection prototype_pollution smuggling+ parallel_funcs "${PAR_VULNS_GROUP3_SIZE:-3}" command_injection prototype_pollution smugglinglocal vulns_g3_rc=$?if ((vulns_g3_rc > 0)); thenif [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then@@ -517,7 +517,7 @@ function vulns() {return 1fifi- parallel_funcs 3 webcache spraying brokenLinks+ parallel_funcs "${PAR_VULNS_GROUP4_SIZE:-3}" webcache spraying brokenLinkslocal vulns_g4_rc=$?if ((vulns_g4_rc > 0)); thenif [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then@@ -639,14 +639,14 @@ function recon() {if [[ "${PARALLEL_MODE:-true}" == "true" ]] && declare -f parallel_funcs &>/dev/null; then# Group 1: balanced with third_party_misconfigs (slow) alongside fast ones- parallel_funcs 5 domain_info ip_info emails google_dorks third_party_misconfigs+ parallel_funcs "${PAR_OSINT_GROUP1_SIZE:-5}" domain_info ip_info emails google_dorks third_party_misconfigslocal osint_g1_rc=$?if ((osint_g1_rc > 0)); thenRECON_PARTIAL_RUN=trueRECON_OSINT_PARALLEL_FAILURES=$((RECON_OSINT_PARALLEL_FAILURES + osint_g1_rc))fi# Group 2: remaining OSINT + zonetransfer + favicon (were sequential, now parallel)- parallel_funcs 5 github_repos metadata apileaks zonetransfer favicon+ parallel_funcs "${PAR_OSINT_GROUP2_SIZE:-5}" github_repos metadata apileaks zonetransfer faviconlocal osint_g2_rc=$?if ((osint_g2_rc > 0)); thenRECON_PARTIAL_RUN=true@@ -690,7 +690,7 @@ function recon() {webprobe_fullif [[ "${PARALLEL_MODE:-true}" == "true" ]] && declare -f parallel_funcs &>/dev/null; then- parallel_funcs 3 screenshot cdnprovider portscan+ parallel_funcs "${PAR_WEB_DETECT_GROUP_SIZE:-3}" screenshot cdnprovider portscanlocal webhost_rc=$?if ((webhost_rc > 0)); thenif [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; thendiff --git a/modules/subdomains.sh b/modules/subdomains.shindex 3fa9999..e76edf2 100644--- a/modules/subdomains.sh+++ b/modules/subdomains.sh@@ -254,7 +254,7 @@ _subdomains_enumerate() {sub_asn# Phase 1: Passive sources (all can run in parallel)- parallel_funcs 4 sub_passive sub_crt+ parallel_funcs "${PAR_SUB_PASSIVE_GROUP_SIZE:-4}" sub_passive sub_crtlocal sub_g1_rc=$?if ((sub_g1_rc > 0)); thenif [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then@@ -278,7 +278,7 @@ _subdomains_enumerate() {fi# Phase 3: Dependent active enrichment (runs after sub_active is ready)- parallel_funcs 3 sub_noerror sub_dns+ parallel_funcs "${PAR_SUB_DEP_ACTIVE_GROUP_SIZE:-3}" sub_noerror sub_dnslocal sub_g3_rc=$?if ((sub_g3_rc > 0)); thenif [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then@@ -290,7 +290,7 @@ _subdomains_enumerate() {fi# Phase 4: Post-active analysis (depends on active/enrichment results)- parallel_funcs 2 sub_tls sub_analytics+ parallel_funcs "${PAR_SUB_POST_ACTIVE_GROUP_SIZE:-2}" sub_tls sub_analyticslocal sub_g4_rc=$?if ((sub_g4_rc > 0)); thenif [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then@@ -302,7 +302,7 @@ _subdomains_enumerate() {fi# Phase 5: Brute force (limited parallelism - resource intensive)- parallel_funcs 2 sub_brute sub_permut sub_regex_permut sub_ia_permut+ parallel_funcs "${PAR_SUB_BRUTE_GROUP_SIZE:-2}" sub_brute sub_permut sub_regex_permut sub_ia_permutlocal sub_g5_rc=$?if ((sub_g5_rc > 0)); thenif [[ "${CONTINUE_ON_TOOL_ERROR:-true}" == "true" ]]; then@@ -380,6 +380,7 @@ _subdomains_finalize() {# Incremental modeincremental_diff "subdomains" "subdomains/subdomains.txt" "subdomains/subdomains_new.txt"incremental_save "subdomains" "subdomains/subdomains.txt"+ ensure_dirs webs .tmp subdomainsif [[ -s "webs/webs.txt" ]]; thenincremental_diff "webs" "webs/webs.txt" "webs/webs_new.txt"incremental_save "webs" "webs/webs.txt"diff --git a/modules/web.sh b/modules/web.shindex 3629c4d..582d629 100644--- a/modules/web.sh+++ b/modules/web.sh@@ -1030,7 +1030,7 @@ function fuzz() {_fuzz_merge_resultsend_func "Results are saved in $domain/fuzzing/*subdomain*.txt" "${FUNCNAME[0]}"else- end_func "No $domain/webs/webs_all.txt file found, fuzzing skipped " "${FUNCNAME[0]}"+ end_func "No $domain/webs/webs_all.txt file found, fuzzing skipped " "${FUNCNAME[0]}" "SKIP_NOINPUT"fielse@@ -1124,7 +1124,7 @@ function cms_scanner() {# Ensure webs_all.txt existsif [[ ! -s "webs/webs_all.txt" ]]; then- end_func "No webs/webs_all.txt file found, cms scanner skipped." "${FUNCNAME[0]}"+ end_func "No webs/webs_all.txt file found, cms scanner skipped." "${FUNCNAME[0]}" "SKIP_NOINPUT"returnfi@@ -1261,9 +1261,9 @@ function urlchecks() {fielseif [[ $DEEP == true ]]; then- run_command "$katana_timeout_cmd" 4h katana -silent -list .tmp/katana_targets_normal.txt -jc -kf all -c "$KATANA_THREADS" -d 3 -fs rdn >>.tmp/katana.txt 2>>"$LOGFILE"+ run_with_heartbeat_shell "katana normal targets (deep)" "$katana_timeout_cmd 4h katana -silent -list .tmp/katana_targets_normal.txt -jc -kf all -c $KATANA_THREADS -d 3 -fs rdn >> .tmp/katana.txt 2>> \"$LOGFILE\""else- run_command "$katana_timeout_cmd" 3h katana -silent -list .tmp/katana_targets_normal.txt -jc -kf all -c "$KATANA_THREADS" -d 2 -fs rdn >>.tmp/katana.txt 2>>"$LOGFILE"+ run_with_heartbeat_shell "katana normal targets" "$katana_timeout_cmd 3h katana -silent -list .tmp/katana_targets_normal.txt -jc -kf all -c $KATANA_THREADS -d 2 -fs rdn >> .tmp/katana.txt 2>> \"$LOGFILE\""fififi@@ -1281,9 +1281,9 @@ function urlchecks() {fielseif [[ $DEEP == true ]]; then- run_command "$katana_timeout_cmd" 4h katana -silent -list .tmp/katana_targets_slow.txt -jc -kf all -c "$slow_c" -d 3 -fs rdn >>.tmp/katana.txt 2>>"$LOGFILE"+ run_with_heartbeat_shell "katana slow targets (deep)" "$katana_timeout_cmd 4h katana -silent -list .tmp/katana_targets_slow.txt -jc -kf all -c $slow_c -d 3 -fs rdn >> .tmp/katana.txt 2>> \"$LOGFILE\""else- run_command "$katana_timeout_cmd" 3h katana -silent -list .tmp/katana_targets_slow.txt -jc -kf all -c "$slow_c" -d 2 -fs rdn >>.tmp/katana.txt 2>>"$LOGFILE"+ run_with_heartbeat_shell "katana slow targets" "$katana_timeout_cmd 3h katana -silent -list .tmp/katana_targets_slow.txt -jc -kf all -c $slow_c -d 2 -fs rdn >> .tmp/katana.txt 2>> \"$LOGFILE\""fififi@@ -1357,7 +1357,11 @@ function urlchecks() {end_message="No web targets available for URL extraction."_print_msg WARN "No web targets available for URL extraction."fi- end_func "${end_message}" "${FUNCNAME[0]}"+ if [[ "$end_message" == No\ * ]]; then+ end_func "${end_message}" "${FUNCNAME[0]}" "SKIP_NOINPUT"+ else+ end_func "${end_message}" "${FUNCNAME[0]}"+ fielseif [[ $URL_CHECK == false ]]; thenpt_msg_warn "${FUNCNAME[0]} skipped due to configuration"diff --git a/reconftw.cfg b/reconftw.cfgindex a9fccf5..f636a1d 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -216,6 +216,24 @@ PERF_PROFILE="balanced" # Performance profile: low|balanced|maxCONTINUE_ON_TOOL_ERROR=true # Continue recon when a tool/module fails in parallel batches (set false for fail-fast).PARALLEL_LOG_MODE="summary" # Parallel output mode: summary (compact) | tail (last N lines) | full (cat all)PARALLEL_TAIL_LINES=20 # Number of tail lines shown per job in 'tail' mode (doubled on failure)+PARALLEL_UI_MODE="clean" # Parallel terminal UX: clean | balanced | trace+PARALLEL_PROGRESS_SHOW_ETA=true # Show ETA estimate in parallel snapshots+PARALLEL_PROGRESS_SHOW_ACTIVE=true # Show active tasks list in parallel snapshots+PARALLEL_PROGRESS_COMPACT_ACTIVE_MAX=4 # Max active/done items shown before compacting with "+N more"+PARALLEL_TRACE_SLOW_SECONDS=30 # In balanced mode, show finished-line for jobs slower than this threshold++# Parallel batch sizing per module group (effective concurrency is still capped by PARALLEL_MAX_JOBS and backpressure)+PAR_OSINT_GROUP1_SIZE=5+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_WEB_DETECT_GROUP_SIZE=3+PAR_VULNS_GROUP1_SIZE=4+PAR_VULNS_GROUP2_SIZE=4+PAR_VULNS_GROUP3_SIZE=3+PAR_VULNS_GROUP4_SIZE=3# Terminal output verbosityOUTPUT_VERBOSITY=1 # 0=quiet (errors+final summary only), 1=normal (default), 2=verbose (PIDs, full parallel output, timestamps)