From f47c42bc4dc273b4e6f5c7e5c522a43d06b10276 Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 30 Nov 2023 16:48:19 +0100 Subject: [PATCH 1/3] Fix status on NMAP ARS-201 --- engines/nmap/engine-nmap.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engines/nmap/engine-nmap.py b/engines/nmap/engine-nmap.py index 663af193..07f4aa68 100644 --- a/engines/nmap/engine-nmap.py +++ b/engines/nmap/engine-nmap.py @@ -448,6 +448,10 @@ def scan_status(scan_id): res.update({"status": "error", "reason": "todo"}) return jsonify(res), 503 + # Fix when a scan is started but the thread has not been created yet + if this.scans[scan_id]["status"] == "STARTED": + res.update({"status": "SCANNING"}) + proc = this.scans[scan_id]["proc"] if not hasattr(proc, "pid"): res.update({"status": "ERROR", "reason": "No PID found"}) @@ -505,8 +509,6 @@ def status(): res = {"page": "status"} this.scanner["status"] = "READY" - res.update({"status": this.scanner["status"]}) - # display info on the scanner res.update({"scanner": this.scanner}) @@ -537,6 +539,7 @@ def status(): app.logger.error("NMAP engine not found (%s)", this.scanner["path"]) this.scanner["status"] = "ERROR" + res.update({"status": this.scanner["status"]}) return jsonify(res) From 15ca4a60e2201783ac6fc92a04d8f358e34caa0a Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 30 Nov 2023 16:50:03 +0100 Subject: [PATCH 2/3] Updated nmap --- VERSION | 2 +- engines/nmap/Dockerfile | 2 +- engines/nmap/VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index f6ed4357..d5a3c99d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.15 +1.5.16-rc1 diff --git a/engines/nmap/Dockerfile b/engines/nmap/Dockerfile index 20ce5ea3..a6912e94 100644 --- a/engines/nmap/Dockerfile +++ b/engines/nmap/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:3.16.3 -LABEL Name="Nmap\ \(Patrowl engine\)" Version="1.4.43" +LABEL Name="Nmap\ \(Patrowl engine\)" Version="1.4.44-rc1" # Set the working directory RUN mkdir -p /opt/patrowl-engines/nmap diff --git a/engines/nmap/VERSION b/engines/nmap/VERSION index e0e2952f..68b2fca8 100644 --- a/engines/nmap/VERSION +++ b/engines/nmap/VERSION @@ -1 +1 @@ -1.4.43 +1.4.44-rc1 From c1a71ed23d806aa858370795284017647c3ba28a Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 1 Dec 2023 16:26:44 +0100 Subject: [PATCH 3/3] 1.5.16 Updated NMAP --- VERSION | 2 +- engines/nmap/Dockerfile | 2 +- engines/nmap/VERSION | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index d5a3c99d..0ed06108 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.16-rc1 +1.5.16 diff --git a/engines/nmap/Dockerfile b/engines/nmap/Dockerfile index a6912e94..abb43cb4 100644 --- a/engines/nmap/Dockerfile +++ b/engines/nmap/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:3.16.3 -LABEL Name="Nmap\ \(Patrowl engine\)" Version="1.4.44-rc1" +LABEL Name="Nmap\ \(Patrowl engine\)" Version="1.4.44" # Set the working directory RUN mkdir -p /opt/patrowl-engines/nmap diff --git a/engines/nmap/VERSION b/engines/nmap/VERSION index 68b2fca8..bbe563f6 100644 --- a/engines/nmap/VERSION +++ b/engines/nmap/VERSION @@ -1 +1 @@ -1.4.44-rc1 +1.4.44