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

Prolly last UI redesign

six2dez05f548c7c9f6
diff --git a/lib/common.sh b/lib/common.sh
index 4bbb2a1..f0756ca 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -83,12 +83,51 @@ count_lines_stdin() {
# Output Primitives
###############################################################################
+# Generic message with [LEVEL] prefix (INFO/WARN/FAIL/OK)
+# Usage: _print_msg WARN "something happened"
+_print_msg() {
+ [[ "${OUTPUT_VERBOSITY:-1}" -lt 1 ]] && return 0
+ local level="$1"
+ shift
+ local msg="$*"
+ local color
+
+ case "$level" in
+ OK|SUCCESS) color="${bgreen:-}" ;;
+ WARN) color="${yellow:-}" ;;
+ FAIL|ERROR) color="${bred:-}" ;;
+ INFO) color="${bblue:-}" ;;
+ *) color="${bblue:-}" ;;
+ esac
+
+ printf "%b[%s]%b %s\n" "$color" "$level" "${reset:-}" "$msg"
+}
+
+# Module start message with timestamp
+# Usage: _print_module_start "OSINT"
+_print_module_start() {
+ [[ "${OUTPUT_VERBOSITY:-1}" -lt 1 ]] && return 0
+ local title="${1^^}"
+ local ts
+ ts=$(date +'%Y-%m-%d %H:%M:%S')
+ printf "\n%b── %s %s%b\n" "${bgreen:-}" "$title" "──────────────────────────────────────────────────────────────" "${reset:-}"
+ _print_msg "INFO" "${title} started at ${ts}"
+}
+
+# Module end message with timestamp
+# Usage: _print_module_end "OSINT"
+_print_module_end() {
+ [[ "${OUTPUT_VERBOSITY:-1}" -lt 1 ]] && return 0
+ local title="${1^^}"
+ local ts
+ ts=$(date +'%Y-%m-%d %H:%M:%S')
+ _print_msg "INFO" "${title} completed at ${ts}"
+}
+
# Section header for major phases (OSINT, Subdomains, Web, Vulns, etc.)
# Usage: _print_section "OSINT"
_print_section() {
- [[ "${OUTPUT_VERBOSITY:-1}" -lt 1 ]] && return 0
- local title="${1^^}"
- printf "\n%b── %s %s%b\n" "${bgreen:-}" "$title" "──────────────────────────────────────────────────────────────" "${reset:-}" | cut -c 1-64
+ _print_module_start "$1"
}
# Compact status line with dot-fill and right-aligned detail
@@ -141,7 +180,7 @@ _print_status() {
# Usage: _print_error "something failed"
_print_error() {
local msg="$1"
- printf "%b[%s] ERROR: %s%b\n" "${bred:-}" "$(date +'%Y-%m-%d %H:%M:%S')" "$msg" "${reset:-}" >&2
+ printf "%b[FAIL]%b %s\n" "${bred:-}" "${reset:-}" "$msg" >&2
}
# Thin decorative rule (replaces heavy ###...### separators)
diff --git a/lib/ui.sh b/lib/ui.sh
index 2575b98..c85c37a 100644
--- a/lib/ui.sh
+++ b/lib/ui.sh
@@ -187,6 +187,7 @@ ui_module_end() {
files_list="${files_list%, }"
printf " %bOutput:%b %s\n\n" "${bblue:-}" "${reset:-}" "$files_list"
fi
+ _print_module_end "$module"
}
ui_json_escape() {
diff --git a/modules/core.sh b/modules/core.sh
index 566a9e4..eeca3dc 100644
--- a/modules/core.sh
+++ b/modules/core.sh
@@ -976,37 +976,23 @@ function notification() {
else
NOTIFY=""
fi
- # Always set current_date so start_func/end_func have it
- if [[ -z $3 ]]; then
- current_date=$(date +'%Y-%m-%d %H:%M:%S')
- else
- current_date="$3"
- fi
-
+ local level="INFO"
case $2 in
- info)
- text="\n${bblue}[$current_date] ${1} ${reset}"
- ;;
- warn)
- text="\n${yellow}[$current_date] ${1} ${reset}"
- ;;
- error)
- text="\n${bred}[$current_date] ${1} ${reset}"
- ;;
- good)
- text="\n${bgreen}[$current_date] ${1} ${reset}"
- ;;
+ info) level="INFO" ;;
+ warn) level="WARN" ;;
+ error) level="FAIL" ;;
+ good) level="OK" ;;
esac
-
+
if declare -F ui_log_jsonl >/dev/null 2>&1; then
- local level="INFO"
+ local ui_level="INFO"
case "$2" in
- info) level="INFO" ;;
- warn) level="WARN" ;;
- error) level="ERROR" ;;
- good) level="SUCCESS" ;;
+ info) ui_level="INFO" ;;
+ warn) ui_level="WARN" ;;
+ error) ui_level="ERROR" ;;
+ good) ui_level="SUCCESS" ;;
esac
- ui_log_jsonl "$level" "${FUNCNAME[1]:-main}" "$1"
+ ui_log_jsonl "$ui_level" "${FUNCNAME[1]:-main}" "$1"
fi
# Quiet mode (OUTPUT_VERBOSITY==0): only print errors to terminal
@@ -1022,20 +1008,18 @@ function notification() {
if [[ "$should_print" != true ]]; then
# Still send to notify if enabled, just skip terminal print
if [[ -n $NOTIFY ]]; then
- clean_text=$(printf "%b" "${text} - ${domain}" | sed 's/\x1B\[[0-9;]*[JKmsu]//g')
- printf "%s" "${clean_text}" | $NOTIFY >/dev/null 2>&1
+ printf "%s" "[${level}] ${1} - ${domain}" | $NOTIFY >/dev/null 2>&1
fi
return 0
fi
-
+
# Print to terminal
- printf "${text}\n"
-
+ _print_msg "$level" "$1"
+
# Send to notify if notifications are enabled
if [[ -n $NOTIFY ]]; then
# Remove color codes for the notification
- clean_text=$(printf "%b" "${text} - ${domain}" | sed 's/\x1B\[[0-9;]*[JKmsu]//g')
- printf "%s" "${clean_text}" | $NOTIFY >/dev/null 2>&1
+ printf "%s" "[${level}] ${1} - ${domain}" | $NOTIFY >/dev/null 2>&1
fi
fi
}
@@ -1073,18 +1057,18 @@ function sendToNotify {
return 0
fi
if grep -q '^ telegram\|^telegram\|^ telegram' $NOTIFY_CONFIG; then
- notification "[$(date +'%Y-%m-%d %H:%M:%S')] Sending ${domain} data over Telegram" info
+ notification "Sending ${domain} data over Telegram" info
telegram_chat_id=$(sed -n '/^telegram:/,/^[^ ]/p' ${NOTIFY_CONFIG} | sed -n 's/^[ ]*telegram_chat_id:[ ]*"\([^"]*\)".*/\1/p')
telegram_key=$(sed -n '/^telegram:/,/^[^ ]/p' ${NOTIFY_CONFIG} | sed -n 's/^[ ]*telegram_api_key:[ ]*"\([^"]*\)".*/\1/p')
curl -F "chat_id=${telegram_chat_id}" -F "document=@${1}" https://api.telegram.org/bot${telegram_key}/sendDocument 2>>"$LOGFILE" >/dev/null
fi
if grep -q '^ discord\|^discord\|^ discord' $NOTIFY_CONFIG; then
- notification "[$(date +'%Y-%m-%d %H:%M:%S')] Sending ${domain} data over Discord" info
+ notification "Sending ${domain} data over Discord" info
discord_url=$(sed -n '/^discord:/,/^[^ ]/p' ${NOTIFY_CONFIG} | sed -n 's/^[ ]*discord_webhook_url:[ ]*"\([^"]*\)".*/\1/p')
curl -v -i -H "Accept: application/json" -H "Content-Type: multipart/form-data" -X POST -F 'payload_json={"username": "test", "content": "hello"}' -F file1=@${1} $discord_url 2>>"$LOGFILE" >/dev/null
fi
if [[ -n $slack_channel ]] && [[ -n $slack_auth ]]; then
- notification "[$(date +'%Y-%m-%d %H:%M:%S')] Sending ${domain} data over Slack" info
+ notification "Sending ${domain} data over Slack" info
curl -F file=@${1} -F "initial_comment=reconftw zip file" -F channels=${slack_channel} -H "Authorization: Bearer ${slack_auth}" https://slack.com/api/files.upload 2>>"$LOGFILE" >/dev/null
fi
fi
@@ -1098,6 +1082,9 @@ function start_func() {
if declare -F ui_log_jsonl >/dev/null 2>&1; then
ui_log_jsonl "INFO" "${1}" "Function started" "description=${2}"
fi
+ if [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]]; then
+ _print_msg "INFO" "Running ${1}..."
+ fi
}
function end_func() {
@@ -1172,6 +1159,9 @@ function start_subfunc() {
if declare -F ui_log_jsonl >/dev/null 2>&1; then
ui_log_jsonl "INFO" "${1}" "Subfunction started" "description=${2}"
fi
+ if [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]]; then
+ _print_msg "INFO" "Running ${1}..."
+ fi
}
function end_subfunc() {
@@ -1180,7 +1170,8 @@ function end_subfunc() {
getElapsedTime "$start_sub" "$end_sub"
local duration=$((end_sub - start_sub))
if [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]]; then
- _print_status OK " ${2}" "${duration}s"
+ local status="${3:-OK}"
+ _print_status "$status" " ${2}" "${duration}s"
fi
echo "[$current_date] End subfunction: ${1} " >>"${LOGFILE}"
log_json "SUCCESS" "${2}" "Subfunction completed" "runtime=${runtime}" "duration_sec=${duration}"
@@ -1188,7 +1179,12 @@ function end_subfunc() {
ui_log_jsonl "SUCCESS" "${2}" "Subfunction completed" "runtime=${runtime}" "duration_sec=${duration}"
fi
if declare -F ui_count_inc >/dev/null 2>&1; then
- ui_count_inc OK
+ case "${3:-OK}" in
+ WARN) ui_count_inc WARN ;;
+ FAIL) ui_count_inc FAIL ;;
+ SKIP) ui_count_inc SKIP ;;
+ *) ui_count_inc OK ;;
+ esac
fi
}
@@ -1411,6 +1407,11 @@ function write_perf_summary() {
fi
}
+# Strip control characters except tabs/newlines (pre-jq sanitation)
+sanitize_control_chars() {
+ LC_ALL=C tr -d '\000-\010\013\014\016-\037'
+}
+
# Generate consolidated JSON + HTML report for the current scan.
# Outputs:
# - report/report.json
@@ -1458,9 +1459,11 @@ function generate_consolidated_report() {
# Timeline from structured log (preferred) or fallback from text log.
if [[ -n "${STRUCTURED_LOG_FILE:-}" ]] && [[ -s "${STRUCTURED_LOG_FILE}" ]] && command -v jq >/dev/null 2>&1; then
timeline_json=$(tail -n 80 "${STRUCTURED_LOG_FILE}" \
+ | sanitize_control_chars \
| jq -s 'map({timestamp:(.timestamp // ""), level:(.level // "INFO"), function:(.function // "unknown"), message:(.message // "")})')
elif [[ -s "${LOGFILE:-}" ]] && command -v jq >/dev/null 2>&1; then
timeline_json=$(tail -n 80 "${LOGFILE}" \
+ | sanitize_control_chars \
| awk -F'] ' '{
ts=$1; gsub(/^\[/,"",ts);
msg=$2;
diff --git a/modules/modes.sh b/modules/modes.sh
index 3f6be45..5acd2a0 100644
--- a/modules/modes.sh
+++ b/modules/modes.sh
@@ -143,7 +143,7 @@ function start() {
function end() {
if [[ $opt_ai ]]; then
- notification "[$(date +'%Y-%m-%d %H:%M:%S')] Sending ${domain} data to AI" info
+ notification "Sending ${domain} data to AI" info
mkdir -p "${dir}/ai_result" 2>>"${LOGFILE}"
local ai_script ai_prompts_file ai_venv_python ai_python ai_json_output ai_redact_flag ai_pull_flag ai_strict_flag
local -a ai_cmd
@@ -410,6 +410,8 @@ function passive() {
_print_section "Web Detection"
+ webprobe_simple
+ webprobe_full
favicon
cdnprovider
# shellcheck disable=SC2034 # PORTSCAN_ACTIVE controls scan behavior
@@ -639,7 +641,6 @@ function recon() {
_print_section "Subdomains"
subdomains_full
- webprobe_full
subtakeover
remove_big_files
s3buckets
@@ -649,6 +650,8 @@ function recon() {
progress_module "Subdomains"
_print_section "Web Detection"
+ webprobe_simple
+ webprobe_full
if [[ "${PARALLEL_MODE:-true}" == "true" ]] && declare -f parallel_funcs &>/dev/null; then
parallel_funcs 3 screenshot cdnprovider portscan
@@ -830,6 +833,7 @@ function multi_recon() {
exit 1
}
subdomains_full
+ webprobe_simple
webprobe_full
subtakeover
remove_big_files
@@ -1015,14 +1019,17 @@ function subs_menu() {
_print_section "Subdomains"
subdomains_full
- webprobe_full
subtakeover
remove_big_files
- screenshot
- # virtualhosts
zonetransfer
s3buckets
+ _print_section "Web Detection"
+ webprobe_simple
+ webprobe_full
+ screenshot
+ # virtualhosts
+
if [[ $AXIOM == true ]]; then
axiom_shutdown
fi
@@ -1033,6 +1040,8 @@ function subs_menu() {
function webs_menu() {
_print_section "Web Detection"
+ webprobe_simple
+ webprobe_full
subtakeover
remove_big_files
screenshot
@@ -1071,16 +1080,19 @@ function zen_menu() {
_print_section "Subdomains"
subdomains_full
- webprobe_full
subtakeover
remove_big_files
s3buckets
- _print_section "Web Analysis"
-
+ _print_section "Web Detection"
+ webprobe_simple
+ webprobe_full
screenshot
# virtualhosts
cdnprovider
+
+ _print_section "Web Analysis"
+
waf_checks
nuclei_check
graphql_scan
diff --git a/modules/osint.sh b/modules/osint.sh
index 9513e7c..66dd34f 100644
--- a/modules/osint.sh
+++ b/modules/osint.sh
@@ -20,7 +20,7 @@ function google_dorks() {
if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $GOOGLE_DORKS == true ]] && [[ $OSINT == true ]]; then
start_func "${FUNCNAME[0]}" "Running: Google Dorks in process"
- if ! "${tools}/dorks_hunter/venv/bin/python3" "${tools}/dorks_hunter/dorks_hunter.py" -d "$domain" -o "osint/dorks.txt" 2>>"$LOGFILE"; then
+ if ! "${tools}/dorks_hunter/venv/bin/python3" "${tools}/dorks_hunter/dorks_hunter.py" -d "$domain" -o "osint/dorks.txt" 2>>"$LOGFILE" >/dev/null; then
_print_error "dorks_hunter command failed"
fi
end_func "Results are saved in $domain/osint/dorks.txt" "${FUNCNAME[0]}"
@@ -162,7 +162,9 @@ function metadata() {
_print_error "Failed to change directory to ${tools}/metagoofil in ${FUNCNAME[0]} at line ${LINENO}"
return 1
}
- "${tools}/metagoofil/venv/bin/python3" "${tools}/metagoofil/metagoofil.py" -d "${domain}" -t pdf,docx,xlsx -l 10 -w -o "${dir}/.tmp/metagoofil_${domain}/" 2>>"${LOGFILE}" >/dev/null
+ if ! "${tools}/metagoofil/venv/bin/python3" "${tools}/metagoofil/metagoofil.py" -d "${domain}" -t pdf,docx,xlsx -l 10 -w -o "${dir}/.tmp/metagoofil_${domain}/" 2>>"${LOGFILE}" >/dev/null; then
+ log_note "metadata: metagoofil failed; skipping metadata extraction" "${FUNCNAME[0]}" "${LINENO}"
+ fi
popd >/dev/null || {
_print_error "Failed to return to the previous directory in ${FUNCNAME[0]} at line ${LINENO}"
return 1
@@ -233,7 +235,8 @@ function apileaks() {
swagger_rc=${PIPESTATUS[0]:-0} # ignore grep exit code (no matches is fine)
} || true
if ((swagger_rc != 0)); then
- printf "%b[%s] SwaggerSpy failed (exit %s), continuing without swagger results.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$swagger_rc" "$reset" | tee -a "$LOGFILE" >/dev/null
+ _print_msg WARN "SwaggerSpy failed (exit ${swagger_rc}), continuing without swagger results."
+ log_note "SwaggerSpy failed (exit ${swagger_rc}), continuing without swagger results." "${FUNCNAME[0]}" "${LINENO}"
fi
# Return to the previous directory
@@ -253,11 +256,11 @@ function apileaks() {
end_func "Results are saved in $domain/osint/[postman_leaks_trufflehog.json, swagger_leaks_trufflehog.json]" "${FUNCNAME[0]}"
else
if [[ $API_LEAKS == false ]] || [[ $OSINT == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
return
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s %b\n\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -302,11 +305,11 @@ function emails() {
end_func "Results are saved in $domain/osint/emails.txt and passwords.txt" "${FUNCNAME[0]}"
else
if [[ $EMAILS == false ]] || [[ $OSINT == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
return
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -333,13 +336,11 @@ function domain_info() {
else
if [[ $DOMAIN_INFO == false ]] || [[ $OSINT == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
return
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -381,13 +382,11 @@ function third_party_misconfigs() {
else
if [[ $THIRD_PARTIES == false ]] || [[ $OSINT == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
return
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -423,13 +422,11 @@ function spoof() {
else
if [[ $SPOOF == false ]] || [[ $OSINT == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
return
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -452,11 +449,11 @@ function mail_hygiene() {
end_func "Results are saved in $domain/osint/mail_hygiene.txt" "${FUNCNAME[0]}"
else
if [[ $MAIL_HYGIENE == false ]] || [[ $OSINT == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
return
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s %b\n\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -474,11 +471,11 @@ function cloud_enum_scan() {
end_func "Results are saved in $domain/osint/cloud_enum.txt" "${FUNCNAME[0]}"
else
if [[ $CLOUD_ENUM == false ]] || [[ $OSINT == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
return
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s %b\n\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -515,19 +512,16 @@ function ip_info() {
end_func "Results are saved in ${domain}/osint/ip_[domain_relations|whois|location].txt" "${FUNCNAME[0]}"
else
- printf "\n%s[%s] WHOISXML_API variable is not defined. Skipping function.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset"
+ _print_msg WARN "WHOISXML_API variable is not defined. Skipping function."
fi
else
if [[ $IP_INFO == false ]] || [[ $OSINT == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or configuration settings."
elif ! [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
return
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
diff --git a/modules/subdomains.sh b/modules/subdomains.sh
index 0a30a8c..c9c124a 100644
--- a/modules/subdomains.sh
+++ b/modules/subdomains.sh
@@ -365,11 +365,10 @@ _subdomains_finalize() {
# Display results
TOTAL_SUBS=$(sed '/^$/d' "subdomains/subdomains.txt" 2>/dev/null | wc -l | tr -d ' ')
- TOTAL_WEBS=$(sed '/^$/d' "webs/webs.txt" 2>/dev/null | wc -l | tr -d ' ')
if [[ "${OUTPUT_VERBOSITY:-1}" -ge 1 ]]; then
_print_status OK "subdomains_full"
- printf " Total: %s subdomains | %s webs\n" "$TOTAL_SUBS" "$TOTAL_WEBS"
+ printf " Total: %s subdomains\n" "$TOTAL_SUBS"
if [[ -s "subdomains/subdomains.txt" ]]; then
sort -o "subdomains/subdomains.txt" "subdomains/subdomains.txt"
@@ -389,9 +388,6 @@ _subdomains_finalize() {
done < "subdomains/subdomains.txt"
fi
- if [[ -s "webs/webs.txt" ]]; then
- sort -o "webs/webs.txt" "webs/webs.txt"
- fi
fi
# Emit plugin event
@@ -433,9 +429,6 @@ function subdomains_full() {
# Enumerate
_subdomains_enumerate "$parallel_flag"
- # Web probing
- webprobe_simple || printf "%b[!] webprobe_simple failed%b\n" "$bred" "$reset"
-
# Finalize
_subdomains_finalize
}
@@ -447,34 +440,28 @@ function sub_asn() {
start_subfunc "${FUNCNAME[0]}" "Running: ASN Enumeration"
# Discover ASN/CIDR metadata for the current target domain.
+ local asn_json pdcp_key asn_rc asn_status
if command -v asnmap &>/dev/null; then
- local asn_json pdcp_key timeout_tool asn_rc
asn_json=".tmp/asnmap_${domain}.json"
pdcp_key="${PDCP_API_KEY:-}"
asn_rc=0
+ asn_status="OK"
: >"$asn_json"
if [[ -z "${pdcp_key//[[:space:]]/}" ]]; then
- printf "%b[%s] ASN_ENUM enabled but PDCP_API_KEY is not set. Skipping asnmap ASN enumeration.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset" | tee -a "$LOGFILE"
+ _print_msg WARN "ASN_ENUM enabled but PDCP_API_KEY is not set. Skipping asnmap ASN enumeration."
+ log_note "ASN_ENUM enabled but PDCP_API_KEY is not set. Skipping asnmap ASN enumeration." "${FUNCNAME[0]}" "${LINENO}"
+ asn_status="WARN"
else
- if command -v timeout >/dev/null 2>&1; then
- timeout_tool="timeout"
- elif command -v gtimeout >/dev/null 2>&1; then
- timeout_tool="gtimeout"
- else
- timeout_tool=""
- printf "%b[%s] timeout/gtimeout not found; running asnmap without timeout guard.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset" | tee -a "$LOGFILE"
- fi
-
- if [[ -n "$timeout_tool" ]]; then
- if PDCP_API_KEY="$pdcp_key" "$timeout_tool" 120 asnmap -d "$domain" -silent -j 2>>"$LOGFILE" >"$asn_json"; then
+ if [[ -n "${TIMEOUT_CMD:-}" ]]; then
+ if PDCP_API_KEY="$pdcp_key" "$TIMEOUT_CMD" -k 10 120 asnmap -d "$domain" -silent -j 2>>"$LOGFILE" >"$asn_json"; then
asn_rc=0
else
asn_rc=$?
fi
else
+ _print_msg WARN "timeout/gtimeout not found; running asnmap without timeout guard."
+ log_note "timeout/gtimeout not found; running asnmap without timeout guard." "${FUNCNAME[0]}" "${LINENO}"
if PDCP_API_KEY="$pdcp_key" asnmap -d "$domain" -silent -j 2>>"$LOGFILE" >"$asn_json"; then
asn_rc=0
else
@@ -497,8 +484,7 @@ function sub_asn() {
cidr_count=$(wc -l <.tmp/asn_cidrs.txt 2>/dev/null | tr -d ' ')
asn_count=$(wc -l <.tmp/asn_numbers.txt 2>/dev/null | tr -d ' ')
- printf "%b[%s] ASN enumeration found %s ASNs and %s CIDR ranges%b\n" \
- "$bblue" "$(date +'%Y-%m-%d %H:%M:%S')" "${asn_count:-0}" "${cidr_count:-0}" "$reset"
+ _print_msg INFO "ASN enumeration found ${asn_count:-0} ASNs and ${cidr_count:-0} CIDR ranges"
# Optional: if asnmap yields discovered domains, feed them into subdomain pipeline.
jq -r '.domains[]? // empty' "$asn_json" \
@@ -508,27 +494,30 @@ function sub_asn() {
| sort -u \
| anew -q .tmp/subs_no_resolved.txt
if [[ -s .tmp/subs_no_resolved.txt ]]; then
- printf "%b[%s] ASN sources added %s in-scope domains%b\n" \
- "$bblue" "$(date +'%Y-%m-%d %H:%M:%S')" "$(wc -l <.tmp/subs_no_resolved.txt | tr -d ' ')" "$reset"
+ _print_msg INFO "ASN sources added $(wc -l <.tmp/subs_no_resolved.txt | tr -d ' ') in-scope domains"
fi
- elif [[ $asn_rc -eq 124 ]]; then
- printf "%b[%s] asnmap timed out after 120s. Skipping ASN output for %s.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$domain" "$reset" | tee -a "$LOGFILE"
+ elif [[ $asn_rc -eq 124 || $asn_rc -eq 137 ]]; then
+ _print_msg WARN "asnmap timed out after 120s. Skipping ASN output for ${domain}."
+ log_note "asnmap timed out after 120s. Skipping ASN output for ${domain}." "${FUNCNAME[0]}" "${LINENO}"
+ asn_status="WARN"
else
- printf "%b[%s] asnmap failed (exit %s). Skipping ASN output for %s.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${asn_rc:-1}" "$domain" "$reset" | tee -a "$LOGFILE"
+ _print_msg FAIL "asnmap failed (exit ${asn_rc:-1}). Skipping ASN output for ${domain}."
+ log_note "asnmap failed (exit ${asn_rc:-1}). Skipping ASN output for ${domain}." "${FUNCNAME[0]}" "${LINENO}"
+ asn_status="FAIL"
fi
fi
else
- printf "%b[!] asnmap not installed, skipping ASN enumeration%b\n" "$bred" "$reset" | tee -a "$LOGFILE"
+ _print_msg WARN "asnmap not installed, skipping ASN enumeration"
+ log_note "asnmap not installed, skipping ASN enumeration" "${FUNCNAME[0]}" "${LINENO}"
+ asn_status="WARN"
fi
- end_subfunc "${FUNCNAME[0]}" "${FUNCNAME[0]}"
+ end_subfunc "${FUNCNAME[0]}" "${FUNCNAME[0]}" "${asn_status:-OK}"
else
if [[ $ASN_ENUM == false ]]; then
- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped due to configuration settings.${reset}\n"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
else
- printf "${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} already processed. To force, delete:\n $called_fn_dir/.${FUNCNAME[0]}${reset}\n\n"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -573,9 +562,9 @@ function sub_passive() {
else
if [[ $SUBPASSIVE == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or configuration settings.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or configuration settings."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -645,11 +634,9 @@ function sub_crt() {
end_subfunc "${NUMOFLINES} new subs (cert transparency)" "${FUNCNAME[0]}"
else
if [[ $SUBCRT == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -725,9 +712,7 @@ function sub_active() {
end_subfunc "${NUMOFLINES} subs DNS resolved from passive" "${FUNCNAME[0]}"
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" \
- "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
}
@@ -797,9 +782,7 @@ function sub_tls() {
end_subfunc "${NUMOFLINES} new subs (tls active enum)" "${FUNCNAME[0]}"
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" \
- "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
}
@@ -847,18 +830,14 @@ function sub_noerror() {
end_subfunc "${NUMOFLINES} new subs (DNS noerror)" "${FUNCNAME[0]}"
else
- printf "\n%s[%s] Detected DNSSEC black lies, skipping this technique.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset"
+ _print_msg WARN "Detected DNSSEC black lies, skipping this technique."
fi
else
if [[ $SUBNOERROR == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" \
- "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -925,8 +904,8 @@ function sub_dns() {
| grep -aEiv "^(127|10|169\.254|172\.1[6-9]|172\.2[0-9]|172\.3[0-1]|192\.168)\." \
| grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | sort -u | anew -q hosts/ips.txt
else
- printf "%b[%s] No DNS IP pairs found in sub_dns; skipping hosts/ips enrichment.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset" | tee -a "$LOGFILE"
+ _print_msg WARN "No DNS IP pairs found in sub_dns; skipping hosts/ips enrichment."
+ log_note "No DNS IP pairs found in sub_dns; skipping hosts/ips enrichment." "${FUNCNAME[0]}" "${LINENO}"
fi
if [[ $INSCOPE == true ]]; then
@@ -944,14 +923,13 @@ function sub_dns() {
fi
else
NUMOFLINES=0
- printf "%b[%s] No DNS-resolved subdomains produced by sub_dns; continuing.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset" | tee -a "$LOGFILE"
+ _print_msg WARN "No DNS-resolved subdomains produced by sub_dns; continuing."
+ log_note "No DNS-resolved subdomains produced by sub_dns; continuing." "${FUNCNAME[0]}" "${LINENO}"
fi
end_subfunc "${NUMOFLINES} new subs (dns resolution)" "${FUNCNAME[0]}"
else
- printf "\n%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
}
@@ -1021,12 +999,9 @@ function sub_brute() {
else
if [[ $SUBBRUTE == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" \
- "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1196,12 +1171,9 @@ function sub_scraping() {
else
if [[ $SUBSCRAPING == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" \
- "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1272,11 +1244,9 @@ function sub_analytics() {
else
if [[ $SUBANALYTICS == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -1411,12 +1381,9 @@ function sub_permut() {
else
if [[ $SUBPERMUTE == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" \
- "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1504,11 +1471,9 @@ function sub_regex_permut() {
else
if [[ $SUBREGEXPERMUTE == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1577,11 +1542,9 @@ function sub_ia_permut() {
else
if [[ $SUBIAPERMUTE == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1671,14 +1634,11 @@ function sub_recursive_passive() {
else
if [[ $SUB_RECURSIVE_PASSIVE == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
elif [[ ! -s "subdomains/subdomains.txt" ]]; then
- printf "\n%s[%s] No subdomains to process.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset"
+ _print_msg WARN "No subdomains to process."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1856,15 +1816,11 @@ function sub_recursive_brute() {
else
if [[ $SUB_RECURSIVE_BRUTE == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
elif [[ ! -s "subdomains/subdomains.txt" ]]; then
- printf "\n%s[%s] No subdomains to process.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset"
+ _print_msg WARN "No subdomains to process."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" \
- "$called_fn_dir" "/.${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -1950,11 +1906,9 @@ function subtakeover() {
else
if [[ $SUBTAKEOVER == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s %b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1994,14 +1948,11 @@ function zonetransfer() {
else
if [[ $ZONETRANSFER == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
- printf "\n%s[%s] Domain is an IP address; skipping zone transfer.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset"
+ _print_msg WARN "Domain is an IP address; skipping zone transfer."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -2076,8 +2027,8 @@ function s3buckets() {
if [[ -f "$permutation_file" ]]; then
PERMUTATION_FLAG="-p"
else
- printf "%b[%s] CloudHunter permutations file not found (%s); continuing without permutations.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$permutation_file" "$reset" | tee -a "$LOGFILE"
+ _print_msg WARN "CloudHunter permutations file not found (${permutation_file}); continuing without permutations."
+ log_note "CloudHunter permutations file not found (${permutation_file}); continuing without permutations." "${FUNCNAME[0]}" "${LINENO}"
permutation_file=""
PERMUTATION_FLAG=""
fi
@@ -2114,10 +2065,10 @@ function s3buckets() {
return 1
fi
if [[ -n "$permutation_file" ]]; then
- if ! "${tools}/CloudHunter/venv/bin/python3" ./cloudhunter.py "$PERMUTATION_FLAG" "$permutation_file" -r ./resolvers.txt -t 50 "$domain"; then
+ if ! PYTHONWARNINGS=ignore "${tools}/CloudHunter/venv/bin/python3" -W ignore ./cloudhunter.py "$PERMUTATION_FLAG" "$permutation_file" -r ./resolvers.txt -t 50 "$domain"; then
printf "%b[!] CloudHunter command failed for domain %s.%b\n" "$bred" "$domain" "$reset"
fi
- elif ! "${tools}/CloudHunter/venv/bin/python3" ./cloudhunter.py -r ./resolvers.txt -t 50 "$domain"; then
+ elif ! PYTHONWARNINGS=ignore "${tools}/CloudHunter/venv/bin/python3" -W ignore ./cloudhunter.py -r ./resolvers.txt -t 50 "$domain"; then
printf "%b[!] CloudHunter command failed for domain %s.%b\n" "$bred" "$domain" "$reset"
fi
) >>"$dir/subdomains/cloudhunter_open_buckets.txt" 2>>"$LOGFILE"
@@ -2177,12 +2128,12 @@ function s3buckets() {
end_func "Results are saved in subdomains/s3buckets.txt, subdomains/cloud_assets.txt, subdomains/s3buckets_trufflehog.txt, and subdomains/cloudhunter_buckets_trufflehog.txt" "${FUNCNAME[0]}"
else
if [[ $S3BUCKETS == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
- printf "\n%s[%s] Domain is an IP address; skipping S3 buckets search.%b\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset"
+ _print_msg WARN "Domain is an IP address; skipping S3 buckets search."
return 0
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -2238,7 +2189,7 @@ function cloud_extra_providers() {
append_assets_from_file cloud asset subdomains/cloud_extra.txt
end_func "Results are saved in subdomains/cloud_extra.txt" "${FUNCNAME[0]}"
else
- printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped or already processed.${reset}\n"
+ _print_msg WARN "${FUNCNAME[0]} skipped or already processed."
fi
}
@@ -2296,11 +2247,9 @@ function geo_info() {
end_func "Results are saved in hosts/ipinfo.txt" "${FUNCNAME[0]}"
else
if [[ $GEO_INFO == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
diff --git a/modules/vulns.sh b/modules/vulns.sh
index 9db2b83..15decc3 100644
--- a/modules/vulns.sh
+++ b/modules/vulns.sh
@@ -23,7 +23,7 @@ function xss() {
# Process gf/xss.txt with qsreplace and Gxss
if [[ -s "gf/xss.txt" ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: XSS Payload Generation${reset}\n\n"
+ _print_msg INFO "Running: XSS Payload Generation"
qsreplace FUZZ <"gf/xss.txt" | sed '/FUZZ/!d' | Gxss -c 100 -p Xss | qsreplace FUZZ | sed '/FUZZ/!d' \
| anew -q ".tmp/xss_reflected.txt"
fi
@@ -40,13 +40,13 @@ function xss() {
if [[ -n $XSS_SERVER ]]; then
OPTIONS="-b ${XSS_SERVER} -w $DALFOX_THREADS"
else
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] No XSS_SERVER defined, blind XSS skipped\n\n"
+ _print_msg WARN "No XSS_SERVER defined, blind XSS skipped"
OPTIONS="-w $DALFOX_THREADS"
fi
# Run Dalfox with Katana output
if [[ -s ".tmp/xss_reflected.txt" ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Dalfox with Katana${reset}\n\n"
+ _print_msg INFO "Running: Dalfox with Katana"
run_command dalfox pipe --silence --no-color --no-spinner --only-poc r --ignore-return 302,404,403 --skip-bav $OPTIONS -d "$DEPTH" <".tmp/xss_reflected.txt" 2>>"$LOGFILE" |
anew -q "vulns/xss.txt"
fi
@@ -65,13 +65,13 @@ function xss() {
if [[ -n $XSS_SERVER ]]; then
OPTIONS="-b ${XSS_SERVER} -w $DALFOX_THREADS"
else
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] No XSS_SERVER defined, blind XSS skipped\n\n"
+ _print_msg WARN "No XSS_SERVER defined, blind XSS skipped"
OPTIONS="-w $DALFOX_THREADS"
fi
# Run Dalfox with Axiom-scan output
if [[ -s ".tmp/xss_reflected.txt" ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Dalfox with Axiom${reset}\n\n"
+ _print_msg INFO "Running: Dalfox with Axiom"
axiom-scan ".tmp/xss_reflected.txt" -m dalfox --skip-bav $OPTIONS -d "$DEPTH" -o "vulns/xss.txt" $AXIOM_ARGS 2>>"$LOGFILE" >/dev/null
fi
fi
@@ -108,7 +108,7 @@ function cors() {
# Proceed only if webs_all.txt exists and is non-empty
if [[ -s "webs/webs_all.txt" ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Corsy for CORS Scan${reset}\n\n"
+ _print_msg INFO "Running: Corsy for CORS Scan"
"${tools}/Corsy/venv/bin/python3" "${tools}/Corsy/corsy.py" -i "webs/webs_all.txt" -o "vulns/cors.txt" 2>>"$LOGFILE" >/dev/null
else
end_func "No webs/webs_all.txt file found, CORS Scan skipped." "${FUNCNAME[0]}"
@@ -145,7 +145,7 @@ function open_redirect() {
URL_COUNT=$(wc -l <"gf/redirect.txt")
if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Open Redirects Payload Generation${reset}\n\n"
+ _print_msg INFO "Running: Open Redirects Payload Generation"
# Process redirect.txt with qsreplace and filter lines containing 'FUZZ'
qsreplace FUZZ <"gf/redirect.txt" | sed '/FUZZ/!d' | anew -q ".tmp/tmp_redirect.txt"
@@ -204,7 +204,7 @@ function ssrf_checks() {
URL_COUNT=$(wc -l <"gf/ssrf.txt")
if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: SSRF Payload Generation${reset}\n\n"
+ _print_msg INFO "Running: SSRF Payload Generation"
# Generate temporary SSRF payloads
qsreplace "$COLLAB_SERVER_FIX" <"gf/ssrf.txt" | anew -q ".tmp/tmp_ssrf.txt"
@@ -212,16 +212,16 @@ function ssrf_checks() {
qsreplace "$COLLAB_SERVER_URL" <"gf/ssrf.txt" | anew -q ".tmp/tmp_ssrf.txt"
# Run FFUF to find requested URLs
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: FFUF for SSRF Requested URLs${reset}\n\n"
+ _print_msg INFO "Running: FFUF for SSRF Requested URLs"
run_command ffuf -v -H "${HEADER}" -t "$FFUF_THREADS" -rate "$FFUF_RATELIMIT" -w ".tmp/tmp_ssrf.txt" -u "FUZZ" 2>/dev/null \
| anew -q "vulns/ssrf_requested.txt"
# Run FFUF with header injection for SSRF
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: FFUF for SSRF Requested Headers with COLLAB_SERVER_FIX${reset}\n\n"
+ _print_msg INFO "Running: FFUF for SSRF Requested Headers with COLLAB_SERVER_FIX"
run_command ffuf -v -w ".tmp/tmp_ssrf.txt:W1,${tools}/headers_inject.txt:W2" -H "${HEADER}" -H "W2: ${COLLAB_SERVER_FIX}" -t "$FFUF_THREADS" \
-rate "$FFUF_RATELIMIT" -u "W1" 2>/dev/null | anew -q "vulns/ssrf_requested_headers.txt"
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: FFUF for SSRF Requested Headers with COLLAB_SERVER_URL${reset}\n\n"
+ _print_msg INFO "Running: FFUF for SSRF Requested Headers with COLLAB_SERVER_URL"
run_command ffuf -v -w ".tmp/tmp_ssrf.txt:W1,${tools}/headers_inject.txt:W2" -H "${HEADER}" -H "W2: ${COLLAB_SERVER_URL}" -t "$FFUF_THREADS" \
-rate "$FFUF_RATELIMIT" -u "W1" 2>/dev/null | anew -q "vulns/ssrf_requested_headers.txt"
@@ -282,7 +282,7 @@ function crlf_checks() {
URL_COUNT=$(wc -l <"webs/webs_all.txt")
if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: CRLF Fuzzing${reset}\n\n"
+ _print_msg INFO "Running: CRLF Fuzzing"
# Run CRLFuzz
crlfuzz -l "webs/webs_all.txt" -o "vulns/crlf.txt" 2>>"$LOGFILE" >/dev/null
@@ -317,7 +317,7 @@ function lfi() {
# Ensure gf/lfi.txt is not empty
if [[ -s "gf/lfi.txt" ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: LFI Payload Generation${reset}\n\n"
+ _print_msg INFO "Running: LFI Payload Generation"
# Process lfi.txt with qsreplace and filter lines containing 'FUZZ'
qsreplace "FUZZ" <"gf/lfi.txt" | sed '/FUZZ/!d' | anew -q ".tmp/tmp_lfi.txt"
@@ -326,7 +326,7 @@ function lfi() {
URL_COUNT=$(wc -l <".tmp/tmp_lfi.txt")
if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: LFI Fuzzing with FFUF${reset}\n\n"
+ _print_msg INFO "Running: LFI Fuzzing with FFUF"
# Use Interlace to parallelize FFUF scanning
interlace -tL ".tmp/tmp_lfi.txt" -threads "$INTERLACE_THREADS" -c "ffuf -v -r -t ${FFUF_THREADS} -rate ${FFUF_RATELIMIT} -H \"${HEADER}\" -w \"${lfi_wordlist}\" -u \"_target_\" -mr \"root:\" " 2>>"$LOGFILE" \
@@ -366,7 +366,7 @@ function ssti() {
# Ensure gf/ssti.txt is not empty
if [[ -s "gf/ssti.txt" ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: SSTI Payload Generation${reset}\n\n"
+ _print_msg INFO "Running: SSTI Payload Generation"
# Process ssti.txt with qsreplace and filter lines containing 'FUZZ'
qsreplace "FUZZ" <"gf/ssti.txt" | sed '/FUZZ/!d' | anew -q ".tmp/tmp_ssti.txt"
@@ -375,7 +375,7 @@ function ssti() {
URL_COUNT=$(wc -l <".tmp/tmp_ssti.txt")
if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: SSTI Fuzzing with FFUF${reset}\n\n"
+ _print_msg INFO "Running: SSTI Fuzzing with FFUF"
# Use Interlace to parallelize FFUF scanning
interlace -tL ".tmp/tmp_ssti.txt" -threads "$INTERLACE_THREADS" -c "ffuf -v -r -t ${FFUF_THREADS} -rate ${FFUF_RATELIMIT} -H \"${HEADER}\" -w \"${ssti_wordlist}\" -u \"_target_\" -mr \"ssti49\"" 2>>"$LOGFILE" \
@@ -415,7 +415,7 @@ function sqli() {
# Ensure gf/sqli.txt is not empty
if [[ -s "gf/sqli.txt" ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: SQLi Payload Generation${reset}\n\n"
+ _print_msg INFO "Running: SQLi Payload Generation"
# Process sqli.txt with qsreplace and filter lines containing 'FUZZ'
qsreplace "FUZZ" <"gf/sqli.txt" | sed '/FUZZ/!d' | anew -q ".tmp/tmp_sqli.txt"
@@ -426,13 +426,13 @@ function sqli() {
# Check if SQLMAP is enabled and run SQLMap
if [[ $SQLMAP == true ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: SQLMap for SQLi Checks${reset}\n\n"
+ _print_msg INFO "Running: SQLMap for SQLi Checks"
run_command python3 "${tools}/sqlmap/sqlmap.py" -m ".tmp/tmp_sqli.txt" -b -o --smart \
--batch --disable-coloring --random-agent --output-dir="vulns/sqlmap" 2>>"$LOGFILE" >/dev/null
fi
# Check if GHAURI is enabled and run Ghauri
if [[ $GHAURI == true ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Ghauri for SQLi Checks${reset}\n\n"
+ _print_msg INFO "Running: Ghauri for SQLi Checks"
interlace -tL ".tmp/tmp_sqli.txt" -threads "$INTERLACE_THREADS" -c "ghauri -u _target_ --batch -H \"${HEADER}\" --force-ssl >> vulns/ghauri_log.txt" 2>>"$LOGFILE" >/dev/null
fi
@@ -473,7 +473,7 @@ function test_ssl() {
fi
# Run testssl.sh
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: SSL Test with testssl.sh${reset}\n\n"
+ _print_msg INFO "Running: SSL Test with testssl.sh"
"${tools}/testssl.sh/testssl.sh" --quiet --color 0 -U -iL "$dir/hosts/ips.txt" 2>>"$LOGFILE" >"vulns/testssl.txt"
end_func "Results are saved in vulns/testssl.txt" "${FUNCNAME[0]}"
@@ -509,7 +509,7 @@ function spraying() {
return 1
fi
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Password Spraying with BruteSpray${reset}\n\n"
+ _print_msg INFO "Running: Password Spraying with BruteSpray"
# Run BruteSpray for password spraying
brutespray -f "$dir/hosts/portscan_active.gnmap" -T "$BRUTESPRAY_CONCURRENCE" -o "$dir/vulns/brutespray" 2>>"$LOGFILE" >/dev/null
@@ -542,7 +542,7 @@ function command_injection() {
# Ensure gf/rce.txt is not empty and process it
if [[ -s "gf/rce.txt" ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Command Injection Payload Generation${reset}\n\n"
+ _print_msg INFO "Running: Command Injection Payload Generation"
# Process rce.txt with qsreplace and filter lines containing 'FUZZ'
qsreplace "FUZZ" <"gf/rce.txt" | sed '/FUZZ/!d' | anew -q ".tmp/tmp_rce.txt"
@@ -553,7 +553,7 @@ function command_injection() {
# Run Commix if enabled
if [[ $COMMIX == true ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Commix for Command Injection Checks${reset}\n\n"
+ _print_msg INFO "Running: Commix for Command Injection Checks"
run_command commix --batch -m ".tmp/tmp_rce.txt" --output-dir "vulns/command_injection" 2>>"$LOGFILE" >/dev/null
fi
@@ -590,7 +590,7 @@ function 4xxbypass() {
&& ! [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Extract relevant URLs starting with 4xx but not 404
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: 403 Bypass${reset}\n\n"
+ _print_msg INFO "Running: 403 Bypass"
grep -E '^4' "fuzzing/fuzzing_full.txt" 2>/dev/null | grep -Ev '^404' | awk '{print $3}' | anew -q ".tmp/403test.txt"
# Count the number of URLs to process
@@ -658,7 +658,7 @@ function prototype_pollution() {
# Ensure fuzzing_full.txt exists and has content
if [[ -s "webs/url_extract_nodupes.txt" ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Prototype Pollution Mapping${reset}\n\n"
+ _print_msg INFO "Running: Prototype Pollution Mapping"
# Process URL list with ppmap and save results
ppmap <"webs/url_extract_nodupes.txt" >".tmp/prototype_pollution.txt" 2>>"$LOGFILE"
@@ -712,7 +712,7 @@ function smuggling() {
URL_COUNT=$(wc -l <"webs/webs_all.txt")
if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: HTTP Request Smuggling Checks${reset}\n\n"
+ _print_msg INFO "Running: HTTP Request Smuggling Checks"
# Run smugglex on the list of URLs
cat "$dir/webs/webs_all.txt" | smugglex -f plain -o "$dir/.tmp/smuggling.txt" 2>>"$LOGFILE" >/dev/null
@@ -762,7 +762,7 @@ function webcache() {
URL_COUNT=$(wc -l <"webs/webs_all.txt")
if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Web Cache Poisoning Checks${reset}\n\n"
+ _print_msg INFO "Running: Web Cache Poisoning Checks"
# Navigate to Web-Cache-Vulnerability-Scanner tool directory
if ! pushd "${tools}/Web-Cache-Vulnerability-Scanner" >/dev/null; then
@@ -824,7 +824,7 @@ function fuzzparams() {
#cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null
if [[ $AXIOM != true ]]; then
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Nuclei Setup and Execution${reset}\n\n"
+ _print_msg INFO "Running: Nuclei Setup and Execution"
# Update Nuclei once per run
maybe_update_nuclei
@@ -835,7 +835,7 @@ function fuzzparams() {
else
- printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Axiom with Nuclei${reset}\n\n"
+ _print_msg INFO "Running: Axiom with Nuclei"
run_command axiom-scan webs/url_extract_nodupes.txt -m nuclei \
-dast -nh -rl "$NUCLEI_RATELIMIT" \
diff --git a/modules/web.sh b/modules/web.sh
index 6595344..923d59d 100644
--- a/modules/web.sh
+++ b/modules/web.sh
@@ -75,6 +75,32 @@ _send_to_proxy() {
fi
}
+# Display summary of discovered webs
+print_webs_summary() {
+ [[ "${OUTPUT_VERBOSITY:-1}" -lt 1 ]] && return 0
+ local webs_file="webs/webs_all.txt"
+ [[ -s "$webs_file" ]] || webs_file="webs/webs.txt"
+ [[ -s "$webs_file" ]] || return 0
+
+ sort -u "$webs_file" -o "$webs_file" 2>/dev/null || true
+ local web_count shown max_show
+ web_count=$(wc -l <"$webs_file" | tr -d ' ')
+ max_show=10
+ [[ "${OUTPUT_VERBOSITY:-1}" -ge 2 ]] && max_show=$web_count
+
+ printf " Total: %s webs\n" "$web_count"
+ shown=0
+ while IFS= read -r web; do
+ shown=$((shown + 1))
+ if [[ $shown -le $max_show ]]; then
+ printf " %s\n" "$web"
+ else
+ printf " ... and %d more (see %s)\n" "$((web_count - max_show))" "$webs_file"
+ break
+ fi
+ done <"$webs_file"
+}
+
###############################################################################
# Main Web Functions
###############################################################################
@@ -252,6 +278,7 @@ function webprobe_full() {
fi
fi
end_func "Results are saved in $domain/webs/webs_uncommon_ports.txt" "${FUNCNAME[0]}"
+ print_webs_summary
else
if [[ $WEBPROBEFULL == false ]]; then
pt_msg_warn "${FUNCNAME[0]} skipped due to configuration"
@@ -328,9 +355,9 @@ function virtualhosts() {
else
if [[ $VIRTUALHOSTS == false ]]; then
- printf "\n%s[%s] %s skipped in this mode or defined in reconftw.cfg %s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg."
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s %s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -360,7 +387,15 @@ function favicon() {
fi
# Run the favicon IP lookup tool
- timeout 10m "${tools}/fav-up/venv/bin/python3" "${tools}/fav-up/favUp.py" -w "$domain" -sc -o favicontest.json 2>>"$LOGFILE" >/dev/null
+ if [[ -n "${TIMEOUT_CMD:-}" ]]; then
+ if ! "$TIMEOUT_CMD" -k 10s 10m "${tools}/fav-up/venv/bin/python3" "${tools}/fav-up/favUp.py" -w "$domain" -sc -o favicontest.json 2>>"$LOGFILE" >/dev/null; then
+ log_note "favicon: fav-up failed or timed out; skipping" "${FUNCNAME[0]}" "${LINENO}"
+ fi
+ else
+ if ! "${tools}/fav-up/venv/bin/python3" "${tools}/fav-up/favUp.py" -w "$domain" -sc -o favicontest.json 2>>"$LOGFILE" >/dev/null; then
+ log_note "favicon: fav-up failed; skipping" "${FUNCNAME[0]}" "${LINENO}"
+ fi
+ fi
# Process the results if favicontest.json exists and is not empty
if [[ -s "favicontest.json" ]]; then
@@ -387,12 +422,12 @@ function favicon() {
else
if [[ $FAVICON == false ]]; then
- printf "\n%s[%s] %s skipped due to configuration settings.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Domain is an IP, do nothing
return
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -445,15 +480,15 @@ function portscan() {
ips_nocdn_count=$(sort -u ".tmp/ips_nocdn.txt" | wc -l | tr -d ' ')
fi
- printf "%b\n[%s] Resolved IP addresses (No CDN): %s%b\n" "$bblue" "$(date +'%Y-%m-%d %H:%M:%S')" "$ips_nocdn_count" "$reset"
+ _print_msg INFO "Resolved IP addresses (No CDN): ${ips_nocdn_count}"
if ((ips_nocdn_count > 0)); then
sort -u ".tmp/ips_nocdn.txt"
else
- printf "None\n"
+ printf " None\n"
fi
printf "\n"
- printf "%b\n[%s] Scanning ports...%b\n\n" "$bblue" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset"
+ _print_msg INFO "Scanning ports..."
ips_file="${dir}/hosts/ips.txt"
@@ -557,11 +592,9 @@ function portscan() {
else
if [[ $PORTSCANNER == false ]]; then
- printf "\n%b[%s] %s skipped due to mode or defined in reconftw.cfg.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to mode or defined in reconftw.cfg."
else
- printf "%b[%s] %s has already been processed. To force execution, delete:\n %s/.%s%b\n\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" ".${FUNCNAME[0]}" "$reset"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -597,12 +630,12 @@ function cdnprovider() {
else
if [[ $CDN_IP == false ]]; then
- printf "\n%s[%s] %s skipped due to configuration settings.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Domain is an IP, do nothing
return
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -725,7 +758,7 @@ _nuclei_scan_local() {
IFS=',' read -ra severity_array <<<"$NUCLEI_SEVERITY"
for crit in "${severity_array[@]}"; do
- printf "%s\n[%s] Running: Nuclei Severity: %s %s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "$crit" "${reset}"
+ _print_msg INFO "Running: Nuclei Severity: ${crit}"
# Non-WAF at default rate
if [[ -s "$NOWAF_LIST" ]]; then
run_command nuclei -l "$NOWAF_LIST" -severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 "${NUCLEI_EXTRA_ARGS}" -t "${NUCLEI_TEMPLATES_PATH}" -j -o "nuclei_output/${crit}_json.txt" 2>>"$LOGFILE" >/dev/null
@@ -748,7 +781,7 @@ _nuclei_scan_axiom() {
IFS=',' read -ra severity_array <<<"$NUCLEI_SEVERITY"
for crit in "${severity_array[@]}"; do
- printf "%s\n[%s] Running: Axiom Nuclei Severity: %s. Check results in nuclei_output folder.%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "$crit" "${reset}"
+ _print_msg INFO "Running: Axiom Nuclei Severity: ${crit}. Check results in nuclei_output folder."
run_command axiom-scan .tmp/webs_subs.txt -m nuclei \
--nuclei-templates "$NUCLEI_TEMPLATES_PATH" \
-severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" \
@@ -848,8 +881,8 @@ function graphql_scan() {
if [[ -s nuclei_output/graphql_json.txt ]]; then
jq -r '["[" + .["template-id"] + "] [" + .info.severity + "] " + (.["matched-at"] // .host)] | .[]' nuclei_output/graphql_json.txt >nuclei_output/graphql.txt
else
- printf "%b[%s] No graphql-detect findings in nuclei_check outputs; skipping GraphQL deep checks.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset" | tee -a "$LOGFILE"
+ _print_msg WARN "No graphql-detect findings in nuclei_check outputs; skipping GraphQL deep checks."
+ log_note "No graphql-detect findings in nuclei_check outputs; skipping GraphQL deep checks." "${FUNCNAME[0]}" "${LINENO}"
fi
# Optionally run GQLSpection on endpoints discovered by nuclei_check (graphql-detect)
@@ -864,9 +897,9 @@ function graphql_scan() {
end_func "Results are saved in nuclei_output/graphql* and vulns/graphql" "${FUNCNAME[0]}"
else
if [[ $GRAPHQL_CHECK == false ]]; then
- printf "\n%s[%s] %s skipped due to configuration settings.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -888,9 +921,9 @@ function param_discovery() {
end_func "Results are saved in webs/params_discovered.txt" "${FUNCNAME[0]}"
else
if [[ $PARAM_DISCOVERY == false ]]; then
- printf "\n%s[%s] %s skipped due to configuration settings.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -919,9 +952,9 @@ function grpc_reflection() {
end_func "Results are saved in hosts/grpc_reflection.txt" "${FUNCNAME[0]}"
else
if [[ $GRPC_SCAN == false ]]; then
- printf "\n%s[%s] %s skipped due to configuration settings.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
}
@@ -1062,12 +1095,12 @@ function iishortname() {
else
# Handle cases where IIS_SHORTNAME is false or the function has already been processed
if [[ $IIS_SHORTNAME == false ]]; then
- printf "\n%s[%s] %s skipped due to configuration settings.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Domain is an IP address; skip the function
return
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1125,7 +1158,7 @@ function cms_scanner() {
log_note "cms_scanner: detected CMSeeK index corruption, repairing index and retrying once" "${FUNCNAME[0]}" "${LINENO}"
find "${tools}/CMSeeK/Result" -type f -name "*.json" -size 0 -delete 2>>"$LOGFILE" || true
if [[ -f "${tools}/CMSeeK/cmseekdb/createindex.py" ]]; then
- "${tools}/CMSeeK/venv/bin/python3" "${tools}/CMSeeK/cmseekdb/createindex.py" &>>"$LOGFILE" || true
+ (cd "${tools}/CMSeeK" && "${tools}/CMSeeK/venv/bin/python3" cmseekdb/createindex.py) &>>"$LOGFILE" || true
fi
if ! "${cmseek_cmd[@]}" &>>"$LOGFILE"; then
exit_status=$?
@@ -1191,13 +1224,23 @@ function urlchecks() {
if [[ -s "webs/webs_all.txt" ]]; then
if [[ $URL_CHECK_PASSIVE == true ]]; then
- urlfinder -d "$domain" -all -o .tmp/url_extract_tmp.txt 2>>"$LOGFILE" >/dev/null
+ if [[ -s ".tmp/url_extract_tmp.txt" ]]; then
+ log_note "urlchecks: reusing urlfinder output from sub_scraping" "${FUNCNAME[0]}" "${LINENO}"
+ else
+ : >.tmp/url_extract_tmp.txt
+ urlfinder -d "$domain" -all -o .tmp/url_extract_tmp.txt 2>>"$LOGFILE" >/dev/null
+ fi
if command -v waymore &>/dev/null; then
- if ! "$TIMEOUT_CMD" "${WAYMORE_TIMEOUT:-30m}" waymore -i "$domain" -mode U -oU .tmp/waymore_urls.txt 2>>"$LOGFILE" >/dev/null; then
- log_note "urlchecks: waymore failed or timed out; continuing with other passive sources" "${FUNCNAME[0]}" "${LINENO}"
- fi
- if [[ -s ".tmp/waymore_urls.txt" ]]; then
- cat .tmp/waymore_urls.txt | anew -q .tmp/url_extract_tmp.txt || true
+ if [[ -s ".tmp/waymore_urls_subs.txt" ]]; then
+ log_note "urlchecks: reusing waymore output from sub_scraping" "${FUNCNAME[0]}" "${LINENO}"
+ cat .tmp/waymore_urls_subs.txt | anew -q .tmp/url_extract_tmp.txt || true
+ else
+ if ! "$TIMEOUT_CMD" "${WAYMORE_TIMEOUT:-30m}" waymore -i "$domain" -mode U -oU .tmp/waymore_urls.txt 2>>"$LOGFILE" >/dev/null; then
+ log_note "urlchecks: waymore failed or timed out; continuing with other passive sources" "${FUNCNAME[0]}" "${LINENO}"
+ fi
+ if [[ -s ".tmp/waymore_urls.txt" ]]; then
+ cat .tmp/waymore_urls.txt | anew -q .tmp/url_extract_tmp.txt || true
+ fi
fi
else
log_note "urlchecks: waymore not found; skipping passive waymore collection" "${FUNCNAME[0]}" "${LINENO}"
@@ -1329,8 +1372,8 @@ function urlchecks() {
ffuf -mc all -w webs/url_extract.txt -u FUZZ -replay-proxy "$proxy_url" 2>>"$LOGFILE" >/dev/null
fi
else
- printf "%b[%s] No URL extraction output generated; skipping p1radup/proxy replay.%b\n" \
- "$yellow" "$(date +'%Y-%m-%d %H:%M:%S')" "$reset" | tee -a "$LOGFILE"
+ _print_msg WARN "No URL extraction output generated; skipping p1radup/proxy replay."
+ log_note "No URL extraction output generated; skipping p1radup/proxy replay." "${FUNCNAME[0]}" "${LINENO}"
fi
fi
fi
@@ -1375,7 +1418,7 @@ function url_gf() {
# Iterate over GF patterns and process each
for pattern in "${!gf_patterns[@]}"; do
output_file="${gf_patterns[$pattern]}"
- printf "%s\n[%s] Running: GF Pattern '%s'%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "$pattern" "${reset}"
+ _print_msg INFO "Running: GF Pattern '${pattern}'"
if [[ $pattern == "potential" ]]; then
# Special handling for 'potential' pattern
gf "$pattern" "webs/url_extract.txt" | cut -d ':' -f3-5 | anew -q "$output_file"
@@ -1390,7 +1433,7 @@ function url_gf() {
# Process endpoints extraction
if [[ -s ".tmp/url_extract_tmp.txt" ]]; then
- printf "%s\n[%s] Extracting endpoints...%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${reset}"
+ _print_msg INFO "Extracting endpoints..."
grep -aEiv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)$" ".tmp/url_extract_tmp.txt" \
| unfurl -u format '%s://%d%p' 2>>"$LOGFILE" | anew -q "gf/endpoints.txt"
fi
@@ -1404,12 +1447,12 @@ function url_gf() {
else
# Handle cases where URL_GF is false or the function has already been processed
if [[ $URL_GF == false ]]; then
- printf "\n%s[%s] %s skipped due to configuration settings.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Domain is an IP address; skip the function
return
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1468,12 +1511,12 @@ function url_ext() {
else
# Handle cases where URL_EXT is false or function already processed
if [[ $URL_EXT == false ]]; then
- printf "\n%s[%s] %s skipped in this mode or defined in reconftw.cfg %s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Domain is an IP address; skip the function
return
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1671,7 +1714,7 @@ function websocket_checks() {
fi
end_func "Results are saved in vulns/websocket_misconfig.txt" "${FUNCNAME[0]}"
else
- printf "\n%s[%s] %s skipped or already processed.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped or already processed."
fi
}
@@ -1698,7 +1741,7 @@ function wordlist_gen() {
| sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' \
| anew -q webs/dict_values.txt
- printf "%s\n[%s] Extracting words...%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${reset}"
+ _print_msg INFO "Extracting words..."
tr "[:punct:]" "\n" <".tmp/url_extract_tmp.txt" | anew -q "webs/dict_words.txt"
fi
@@ -1707,12 +1750,12 @@ function wordlist_gen() {
else
# Handle cases where WORDLIST is false or function already processed
if [[ $WORDLIST == false ]]; then
- printf "\n%s[%s] %s skipped in this mode or defined in reconftw.cfg %s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Domain is an IP address; skip the function
return
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1740,7 +1783,7 @@ function wordlist_gen_roboxtractor() {
# Proceed only if webs_all.txt exists and is non-empty
if [[ -s "webs/webs_all.txt" ]]; then
# Extract URLs using roboxtractor and append unique entries to robots_wordlist.txt
- printf "%s\n[%s] Running: Roboxtractor for Robots Wordlist%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${reset}"
+ _print_msg INFO "Running: Roboxtractor for Robots Wordlist"
roboxtractor -m 1 -wb <"webs/webs_all.txt" 2>>"$LOGFILE" | anew -q "webs/robots_wordlist.txt"
else
end_func "No webs/webs_all.txt file found, Robots Wordlist generation skipped." "${FUNCNAME[0]}"
@@ -1758,12 +1801,12 @@ function wordlist_gen_roboxtractor() {
else
# Handle cases where ROBOTSWORDLIST is false or function already processed
if [[ $ROBOTSWORDLIST == false ]]; then
- printf "\n%s[%s] %s skipped due to configuration settings.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Domain is an IP address; skip the function
return
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi
@@ -1796,12 +1839,12 @@ function password_dict() {
else
# Handle cases where PASSWORD_DICT is false or function already processed
if [[ $PASSWORD_DICT == false ]]; then
- printf "\n%s[%s] %s skipped due to configuration settings.%s\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} skipped due to configuration settings."
elif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Domain is an IP address; skip the function
return
else
- printf "%s[%s] %s has already been processed. To force execution, delete:\n %s/.%s%s\n\n" "${yellow}" "$(date +'%Y-%m-%d %H:%M:%S')" "${FUNCNAME[0]}" "$called_fn_dir" "${FUNCNAME[0]}" "${reset}"
+ _print_msg WARN "${FUNCNAME[0]} already processed. To force execution, delete ${called_fn_dir}/.${FUNCNAME[0]}"
fi
fi