diff --git a/VERSION b/VERSION index 26c185e4..83d4cf8a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.17 +1.5.18 diff --git a/engines/nmap/Dockerfile b/engines/nmap/Dockerfile index abb43cb4..c674327b 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" +LABEL Name="Nmap\ \(Patrowl engine\)" Version="1.4.45" # Set the working directory RUN mkdir -p /opt/patrowl-engines/nmap @@ -21,24 +21,24 @@ COPY libs/ libs/ RUN apk add --update \ linux-headers \ libffi-dev \ - sudo \ + #sudo \ python3 \ python3-dev \ py3-pip \ build-base \ nmap \ nmap-scripts \ - && adduser -u 1000 -G wheel -D alpine \ + #&& adduser -u 1000 -G wheel -D alpine \ && rm -rf /var/cache/apk/* # nmap must be started with root -RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +#RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers RUN pip3 install --upgrade pip RUN pip3 install --trusted-host pypi.python.org -r requirements.txt # TCP port exposed by the container (NAT) EXPOSE 5001 -USER alpine +#USER alpine #Can't set properly env vars from Docker because it sets root env only # Run app when the container launches -CMD ["sudo", "gunicorn", "engine-nmap:app", "-b", "0.0.0.0:5001", "--access-logfile", "-", "-k", "gevent"] +CMD ["gunicorn", "engine-nmap:app", "-b", "0.0.0.0:5001", "--access-logfile", "-", "-k", "gevent"] diff --git a/engines/nmap/VERSION b/engines/nmap/VERSION index bbe563f6..db946b7c 100644 --- a/engines/nmap/VERSION +++ b/engines/nmap/VERSION @@ -1 +1 @@ -1.4.44 +1.4.45 diff --git a/engines/nmap/engine-nmap.py b/engines/nmap/engine-nmap.py index 07f4aa68..e4df5010 100644 --- a/engines/nmap/engine-nmap.py +++ b/engines/nmap/engine-nmap.py @@ -1240,8 +1240,8 @@ def page_not_found(e): @app.before_first_request def main(): - if os.getuid() != 0: - app.logger.error("Start the NMAP engine using root privileges !") + #if os.getuid() != 0: #run with root because of docker env vars scope + # app.logger.error("Start the NMAP engine using root privileges !") # sys.exit(-1) if not os.path.exists(f"{BASE_DIR}/results"): os.makedirs(f"{BASE_DIR}/results")