recon-pipeline/scripts/setup.sh
2026-05-11 10:03:09 +07:00

36 lines
1.4 KiB
Bash
Executable file

#!/usr/bin/env bash
# ═══════════════════════════════════════════════════════════════════════════
# setup.sh — Install recon tools in Jenkins container
# Run this inside the Jenkins container or add to your Containerfile
# ═══════════════════════════════════════════════════════════════════════════
set -euo pipefail
GO_VERSION="1.22.3"
TOOLS=(
"github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest"
"github.com/projectdiscovery/httpx/cmd/httpx@latest"
"github.com/projectdiscovery/dnsx/cmd/dnsx@latest"
"github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest"
)
echo "[*] Installing Go $GO_VERSION..."
curl -sL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xz
export PATH=$PATH:/usr/local/go/bin
export GOPATH=/root/go
export PATH=$PATH:$GOPATH/bin
echo "[*] Installing tools..."
for tool in "${TOOLS[@]}"; do
echo "$tool"
go install "$tool"
done
echo "[*] Updating nuclei templates..."
nuclei -update-templates -silent || true
echo ""
echo "[*] Done. Versions:"
subfinder -version 2>&1 | head -1
httpx -version 2>&1 | head -1
dnsx -version 2>&1 | head -1
nuclei -version 2>&1 | head -1