From 220cb06ae0997efef70db7aa6bac18eb657c2fa4 Mon Sep 17 00:00:00 2001 From: MrMatch246 Date: Tue, 12 Aug 2025 17:18:59 +0200 Subject: [PATCH] added nuclei --- README.md | 2 +- autorecon/default-plugins/nuclei.py | 36 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 autorecon/default-plugins/nuclei.py diff --git a/README.md b/README.md index 74ade16..c88e90f 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ whatweb On Kali Linux, you can ensure these are all installed using the following commands: ```bash -sudo apt install seclists curl dnsrecon enum4linux feroxbuster gobuster impacket-scripts nbtscan nikto nmap onesixtyone oscanner redis-tools smbclient smbmap snmp sslscan sipvicious tnscmd10g whatweb +sudo apt install seclists curl dnsrecon enum4linux feroxbuster gobuster impacket-scripts nbtscan nuclei nikto nmap onesixtyone oscanner redis-tools smbclient smbmap snmp sslscan sipvicious tnscmd10g whatweb ``` ### Installation Method #1: pipx (Recommended) diff --git a/autorecon/default-plugins/nuclei.py b/autorecon/default-plugins/nuclei.py new file mode 100644 index 0000000..7d99198 --- /dev/null +++ b/autorecon/default-plugins/nuclei.py @@ -0,0 +1,36 @@ +from autorecon.plugins import ServiceScan +from shutil import which + + +class Nuclei(ServiceScan): + def __init__(self): + super().__init__() + self.name = "nuclei" + self.tags = ["default", "safe", "long"] + + self.cmd = 'nuclei -disable-update-check -no-color -target {address}:{port} -scan-all-ips -o "{scandir}/{protocol}_{port}_nuclei.txt"' + + def configure(self): + self.match_all_service_names(True) + self.add_pattern( + r"(.*\[(critical|high)\].*)", + description="Nuclei {match2} finding: {match1}", + ) + + def check(self): + if which("nuclei") is None: + self.error( + "The program nuclei could not be found. Make sure it is installed. (On Kali, run: sudo apt install nuclei)" + ) + return False + + async def run(self, service): + if service.target.ipversion == "IPv4": + await service.execute(self.cmd) + + def manual(self, service, plugin_was_run): + if service.target.ipversion == "IPv4" and not plugin_was_run: + service.add_manual_command( + f"({self.name}) Fast and customizable vulnerability scanner based on simple YAML based DSL:", + self.cmd, + ) \ No newline at end of file