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
feat(02-03): add tools.lock manifest and wire install_tools() to consume it
six2dez833ce946df6b
diff --git a/install.sh b/install.shindex c186792..d2f54b4 100755--- a/install.sh+++ b/install.sh@@ -519,15 +519,43 @@ function install_tools() {export GOFLAGS="-mod=mod"export GO111MODULE="on"+ # Load optional tool pins from ./tools.lock (D-12 / SEC-04).+ # Each line: <binary>=<module>@<version>. Comments (#) and blank lines ignored.+ # If a tool listed here is also in $gotools, the lock entry wins; otherwise+ # `go install @latest` is used. Errors loading tools.lock are non-fatal.+ declare -A pinned_tools=()+ local _lockfile="${SCRIPTPATH:-$(pwd)}/tools.lock"+ if [[ -f "$_lockfile" ]]; then+ local _key _val+ while IFS='=' read -r _key _val; do+ # Strip surrounding whitespace; skip blanks/comments+ _key="${_key#"${_key%%[![:space:]]*}"}"+ _key="${_key%"${_key##*[![:space:]]}"}"+ [[ -z "$_key" || "$_key" == \#* ]] && continue+ _val="${_val#"${_val%%[![:space:]]*}"}"+ _val="${_val%"${_val##*[![:space:]]}"}"+ [[ -z "$_val" ]] && continue+ pinned_tools["$_key"]="$_val"+ done < "$_lockfile"+ msg_ok "Loaded ${#pinned_tools[@]} pin(s) from tools.lock"+ fi+local go_step=0local failed_tools=()local total_go=${#gotools[@]}local go_ok=0 go_skip=0 go_fail=0for gotool in "${!gotools[@]}"; do((++go_step))+ # Pinned version wins; otherwise fall through to @latest.+ local _module_at_version+ if [[ -n "${pinned_tools[$gotool]:-}" ]]; then+ _module_at_version="${pinned_tools[$gotool]}"+ else+ _module_at_version="${gotools[$gotool]}@latest"+ fi# Always run go install so already-present binaries also get updated.# argv form (not bash -lc) so arr values are data, not shell syntax.- if q go install -v "${gotools[$gotool]}@latest"; then+ if q go install -v "$_module_at_version"; then((++go_ok))msg_ok "[$go_step/$total_go] ${gotool} installed"elsediff --git a/tools.lock b/tools.locknew file mode 100644index 0000000..68976a1--- /dev/null+++ b/tools.lock@@ -0,0 +1,12 @@+# tools.lock — pinned Go tool versions for stability-critical tools.+# Format: <binary>=<go-module>@<version>+# - Comment lines start with '#'+# - Blank lines tolerated+# - Tools not listed here fall through to `go install <module>@latest` in install.sh+# - Update by running `go install <module>@latest` once and recording the resolved tag++nuclei=github.com/projectdiscovery/nuclei/v3/cmd/[email protected]+httpx=github.com/projectdiscovery/httpx/cmd/[email protected]+ffuf=github.com/ffuf/ffuf/[email protected]+puredns=github.com/d3mondev/puredns/[email protected]+subfinder=github.com/projectdiscovery/subfinder/v2/cmd/[email protected]