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

Fixes newlines log

six2dezc03866abc60f
diff --git a/lib/common.sh b/lib/common.sh
index 8de5f59..2ef2c21 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -146,6 +146,8 @@ record_incident() {
local level="$1" module="$2" reason="$3"
[[ -z "$module" ]] && return 0
[[ -z "$reason" ]] && return 0
+ reason=${reason//\\n/ }
+ reason=${reason//$'\n'/ }
INCIDENTS_LEVELS+=("$level")
INCIDENTS_ITEMS+=("${module} — ${reason}")
}
@@ -159,7 +161,7 @@ print_incidents() {
for i in "${!INCIDENTS_ITEMS[@]}"; do
printf "%d. %s\n" "$((i + 1))" "${INCIDENTS_ITEMS[$i]}"
done
- if [[ -n "$debug_log" ]]; then
+ if [[ -n "$debug_log" ]] && [[ -s "$debug_log" ]]; then
printf "Debug log: %s\n" "$debug_log"
fi
printf "\n"
diff --git a/modules/axiom.sh b/modules/axiom.sh
index ddae7ec..fd11077 100644
--- a/modules/axiom.sh
+++ b/modules/axiom.sh
@@ -18,7 +18,7 @@ function resolvers_update() {
if [[ $generate_resolvers == true ]]; then
if [[ $AXIOM != true ]]; then
if [[ ! -s $resolvers ]] || [[ $(find "$resolvers" -mtime +1 -print) ]]; then
- notification "Resolvers seem older than 1 day\n Generating custom resolvers..." warn
+ notification "Resolvers seem older than 1 day. Generating custom resolvers..." warn
{
rm -f -- "$resolvers"
dnsvalidator -tL https://public-dns.info/nameservers.txt -threads "$DNSVALIDATOR_THREADS" -o "$resolvers" >/dev/null
@@ -31,7 +31,7 @@ function resolvers_update() {
notification "Updated\n" good
fi
else
- notification "Checking resolvers lists...\n Accurate resolvers are the key to great results\n This may take around 10 minutes if it's not updated" warn
+ notification "Checking resolvers lists. Accurate resolvers are key to good results. This may take around 10 minutes if outdated." warn
axiom-exec "([[ \$(find \"${AXIOM_RESOLVERS_PATH}\" -mtime +1 -print) ]] || [[ \$(wc -l < \"${AXIOM_RESOLVERS_PATH}\") -le 40 ]]) && dnsvalidator -tL https://public-dns.info/nameservers.txt -threads 200 -o ${AXIOM_RESOLVERS_PATH}" &>/dev/null
axiom-exec "wget -q -O - ${resolvers_url} > ${AXIOM_RESOLVERS_PATH}" 2>>"$LOGFILE" >/dev/null
axiom-exec "wget -q -O - ${resolvers_trusted_url} > ${AXIOM_RESOLVERS_TRUSTED_PATH}" 2>>"$LOGFILE" >/dev/null
@@ -41,7 +41,7 @@ function resolvers_update() {
else
if [[ ! -s $resolvers ]] || [[ $(find "$resolvers" -mtime +1 -print) ]]; then
- notification "Resolvers seem older than 1 day\n Downloading new resolvers..." warn
+ notification "Resolvers seem older than 1 day. Downloading new resolvers..." warn
cached_download_typed "${resolvers_url}" "$resolvers" "resolvers.txt" "resolvers"
cached_download_typed "${resolvers_trusted_url}" "$resolvers_trusted" "resolvers_trusted.txt" "resolvers"
notification "Resolvers updated\n" good