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 deploy errors

six2dez39a4a17dc2dc
diff --git a/install.sh b/install.sh
index 5d30b78..25d01d8 100755
--- a/install.sh
+++ b/install.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+# shellcheck disable=SC2154,SC2034
# Safer bash defaults
set -o pipefail
@@ -19,6 +20,7 @@ if [[ ! -f $CONFIG_FILE ]]; then
exit 1
fi
+# shellcheck source=./reconftw.cfg
source "$CONFIG_FILE"
# Initialize variables
@@ -570,10 +572,11 @@ function check_updates() {
printf "%bRunning: Looking for new reconFTW version%b\n" "$bblue" "$reset"
if { [[ -n $TIMEOUT_CMD ]] && $TIMEOUT_CMD 10 git fetch; } || git fetch; then
+ local BRANCH
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "HEAD")
HEADHASH=$(git rev-parse HEAD 2>/dev/null || true)
# Skip auto-update if no upstream (detached HEAD or no tracking branch)
- if ! git rev-parse --abbrev-ref --symbolic-full-name @{u} >/dev/null 2>&1; then
+ if ! git rev-parse --abbrev-ref --symbolic-full-name '@{u}' >/dev/null 2>&1; then
printf "%bNo upstream configured (detached HEAD). Skipping auto-update.%b\n" "$yellow" "$reset"
return 0
fi
@@ -860,7 +863,9 @@ function install_yum() {
fi
# Ensure pipx uses the selected python3
- export PIPX_DEFAULT_PYTHON="$(command -v python3 || echo python3)"
+ local pipx_python
+ pipx_python="$(command -v python3 || echo python3)"
+ export PIPX_DEFAULT_PYTHON="$pipx_python"
# Ensure pipx is present even on older EL (install via pip if the rpm doesn't exist)
if ! command -v pipx &>/dev/null; then
diff --git a/lib/parallel.sh b/lib/parallel.sh
index 894d154..a9067cd 100644
--- a/lib/parallel.sh
+++ b/lib/parallel.sh
@@ -184,11 +184,13 @@ parallel_batch() {
# Usage: wait_for_jobs [timeout_seconds]
wait_for_jobs() {
local timeout="${1:-0}"
- local start_time=$(date +%s)
+ local start_time
+ start_time=$(date +%s)
while jobs -p | grep -q .; do
if ((timeout > 0)); then
- local elapsed=$(($(date +%s) - start_time))
+ local elapsed
+ elapsed=$(($(date +%s) - start_time))
if ((elapsed >= timeout)); then
printf "%b[!] Timeout reached, killing remaining jobs%b\n" "${bred:-}" "${reset:-}" >&2
jobs -p | xargs -r kill 2>/dev/null || true
diff --git a/modules/core.sh b/modules/core.sh
index f53cd7a..5548087 100644
--- a/modules/core.sh
+++ b/modules/core.sh
@@ -940,13 +940,8 @@ function zipSnedOutputFolder {
}
function isAsciiText {
- # shellcheck disable=SC2034 # IS_ASCII used by callers
- IS_ASCII="False"
- if [[ $(file "$1" | grep -o 'ASCII text$') == "ASCII text" ]]; then
- IS_ASCII="True"
- else
- IS_ASCII="False"
- fi
+ # shellcheck disable=SC2034 # IS_ASCII is consumed by callers after invoking this helper
+ IS_ASCII=$([[ $(file "$1" | grep -o 'ASCII text$') == "ASCII text" ]] && echo "True" || echo "False")
}
function output() {
@@ -1128,8 +1123,6 @@ function maybe_update_nuclei() {
}
# Plugin framework
-# shellcheck disable=SC2034 # PLUGINS_LOADED used for state tracking
-PLUGINS_LOADED=false
function plugins_load() {
local plugdir="${SCRIPTPATH}/plugins"
if [[ -d $plugdir ]]; then
@@ -1138,7 +1131,6 @@ function plugins_load() {
[[ -f $f ]] && source "$f" || true
done
fi
- PLUGINS_LOADED=true
}
function plugins_emit() {
diff --git a/modules/modes.sh b/modules/modes.sh
index 2ff8889..c0e9b21 100644
--- a/modules/modes.sh
+++ b/modules/modes.sh
@@ -345,14 +345,21 @@ function passive() {
metadata
apileaks
third_party_misconfigs
- # shellcheck disable=SC2034 # These flags control module behavior
+ # shellcheck disable=SC2034 # These globals are consumed by downstream module functions
SUBNOERROR=false
+ # shellcheck disable=SC2034
SUBANALYTICS=false
+ # shellcheck disable=SC2034
SUBBRUTE=false
+ # shellcheck disable=SC2034
SUBSCRAPING=false
+ # shellcheck disable=SC2034
SUBPERMUTE=false
+ # shellcheck disable=SC2034
SUBREGEXPERMUTE=false
+ # shellcheck disable=SC2034
SUB_RECURSIVE_BRUTE=false
+ # shellcheck disable=SC2034
WEBPROBESIMPLE=false
if [[ $AXIOM == true ]]; then
axiom_launch
@@ -1089,8 +1096,10 @@ function monitor_mode() {
MONITOR_MAX_CYCLES=0
fi
+ # shellcheck disable=SC2034 # Used by downstream execution functions in monitor cycles
INCREMENTAL_MODE=true
QUICK_RESCAN=true
+ # shellcheck disable=SC2034 # Used by downstream execution functions in monitor cycles
DIFF=true
local interval_sec=$((MONITOR_INTERVAL_MIN * 60))
local cycle=0
diff --git a/modules/web.sh b/modules/web.sh
index 4f7f1ee..f4a35ce 100644
--- a/modules/web.sh
+++ b/modules/web.sh
@@ -879,6 +879,7 @@ function grpc_reflection() {
local targets=()
# shellcheck disable=SC2207 # Word splitting intended for array population
[[ -s $ips_file ]] && targets+=($(cat "$ips_file"))
+ # shellcheck disable=SC2207 # Word splitting intended for array population
[[ -s "hosts/ips_v6.txt" ]] && targets+=($(cat "hosts/ips_v6.txt"))
printf "%s\n" "${targets[@]}" | sort -u >.tmp/grpc_ips.txt
if [[ -s .tmp/grpc_ips.txt ]]; then