From 21c7fbe1065e9711bff34428867f12468a2908b5 Mon Sep 17 00:00:00 2001 From: n0mad1k Date: Sun, 12 Apr 2026 07:04:30 -0400 Subject: [PATCH] Remove duplicate nuclei UA header from trashpanda; make UA configurable via env var --- modules/attack-box/files/recon_automation.sh | 2 +- modules/attack-box/files/trashpanda.py | 2 +- modules/attack-box/files/web_enum_automation.sh | 2 +- tools/redteam/trashpanda/trashpanda.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/attack-box/files/recon_automation.sh b/modules/attack-box/files/recon_automation.sh index 5936fda..59f8807 100644 --- a/modules/attack-box/files/recon_automation.sh +++ b/modules/attack-box/files/recon_automation.sh @@ -79,7 +79,7 @@ done < live_subdomains.txt # Vulnerability scanning with Nuclei echo -e "${GREEN}[+] Phase 7: Vulnerability Scanning${NC}" -log_and_run "Running Nuclei" "nuclei -l live_subdomains.txt -H 'User-Agent: homelab-security-scan/nuclei' -t ~/nuclei-templates/ -o nuclei_results.txt" +log_and_run "Running Nuclei" "nuclei -l live_subdomains.txt -H 'User-Agent: ${NUCLEI_UA:-homelab-security-scan/nuclei}' -t ~/nuclei-templates/ -o nuclei_results.txt" # Summary echo -e "${GREEN}[+] Reconnaissance Complete!${NC}" diff --git a/modules/attack-box/files/trashpanda.py b/modules/attack-box/files/trashpanda.py index 8bbcf2a..bd0f852 100644 --- a/modules/attack-box/files/trashpanda.py +++ b/modules/attack-box/files/trashpanda.py @@ -2665,7 +2665,7 @@ def run_enhanced_web_enumeration(base_dir, targets, stealth=False, debug=False): f"gobuster dir -u {base_url}/ -w /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt -x txt,html,php,asp,aspx,jsp -t 50", f"hydra -L /usr/share/seclists/Usernames/top-usernames-shortlist.txt -P /usr/share/seclists/Passwords/darkweb2017-top100.txt {ip} http-post-form '/login.php:username=^USER^&password=^PASS^:invalid'", f"sqlmap -u '{base_url}/?id=1' --batch --banner", - f"nuclei -u {base_url} -H 'User-Agent: homelab-security-scan/nuclei' -t /root/nuclei-templates/" + f"nuclei -u {base_url} -t /root/nuclei-templates/" ] add_manual_command(base_dir, f"Web Service {base_url}", manual_commands) diff --git a/modules/attack-box/files/web_enum_automation.sh b/modules/attack-box/files/web_enum_automation.sh index 6bb78c9..d90cabb 100644 --- a/modules/attack-box/files/web_enum_automation.sh +++ b/modules/attack-box/files/web_enum_automation.sh @@ -91,7 +91,7 @@ log_and_run "Nikto scan" "nikto -h $TARGET_URL -o nikto_results.txt" # Nuclei web templates if command -v nuclei &> /dev/null; then - log_and_run "Nuclei web vulnerability scan" "nuclei -u $TARGET_URL -H 'User-Agent: homelab-security-scan/nuclei' -t ~/nuclei-templates/http/ -o nuclei_web_results.txt" + log_and_run "Nuclei web vulnerability scan" "nuclei -u $TARGET_URL -H 'User-Agent: ${NUCLEI_UA:-homelab-security-scan/nuclei}' -t ~/nuclei-templates/http/ -o nuclei_web_results.txt" fi # SSL/TLS testing (for HTTPS) diff --git a/tools/redteam/trashpanda/trashpanda.py b/tools/redteam/trashpanda/trashpanda.py index 9864951..d98bf0a 100644 --- a/tools/redteam/trashpanda/trashpanda.py +++ b/tools/redteam/trashpanda/trashpanda.py @@ -2672,7 +2672,7 @@ def run_enhanced_web_enumeration(base_dir, targets, stealth=False, debug=False): f"gobuster dir -u {base_url}/ -w /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt -x txt,html,php,asp,aspx,jsp -t 50", f"hydra -L /usr/share/seclists/Usernames/top-usernames-shortlist.txt -P /usr/share/seclists/Passwords/darkweb2017-top100.txt {ip} http-post-form '/login.php:username=^USER^&password=^PASS^:invalid'", f"sqlmap -u '{base_url}/?id=1' --batch --banner", - f"nuclei -u {base_url} -H 'User-Agent: homelab-security-scan/nuclei' -t /root/nuclei-templates/" + f"nuclei -u {base_url} -t /root/nuclei-templates/" ] add_manual_command(base_dir, f"Web Service {base_url}", manual_commands)