Skip to content

Commit

Permalink
Merge pull request #428 from Patrowl/develop
Browse files Browse the repository at this point in the history
1.5.16
  • Loading branch information
sebastien-powl committed Dec 1, 2023
2 parents e66993d + c1a71ed commit 6bdad87
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.15
1.5.16
2 changes: 1 addition & 1 deletion engines/nmap/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"

# Set the working directory
RUN mkdir -p /opt/patrowl-engines/nmap
Expand Down
2 changes: 1 addition & 1 deletion engines/nmap/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.43
1.4.44
7 changes: 5 additions & 2 deletions engines/nmap/engine-nmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
Expand Down Expand Up @@ -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})

Expand Down Expand Up @@ -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)


Expand Down

0 comments on commit 6bdad87

Please sign in to comment.