From 437aa331270deac7ef2eec06381b35aeda6ad461 Mon Sep 17 00:00:00 2001 From: defparam Date: Tue, 16 Jul 2024 15:46:26 -0400 Subject: [PATCH] couple fixes, added nuclei --- Dockerfile | 2 +- app/main.py | 5 +++-- app/static/index.html | 2 +- build.sh | 4 ++-- tools/install_tools.sh | 39 +++++++++++++++++++++++++++++++++++++-- tools/nuclei | 23 +++++++++++++++++++++++ 6 files changed, 67 insertions(+), 8 deletions(-) create mode 100755 tools/nuclei diff --git a/Dockerfile b/Dockerfile index be630e6..ecd52b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use the official Python image from the Docker Hub -FROM python:3.12-slim +FROM --platform=linux/amd64 python:3.12-slim # Set environment variables to avoid interactive prompts during package installation ENV DEBIAN_FRONTEND=noninteractive diff --git a/app/main.py b/app/main.py index a7888a1..1c13de4 100644 --- a/app/main.py +++ b/app/main.py @@ -13,8 +13,9 @@ import shlex app = FastAPI() -# get a list of every file (not directory) in the tools directory -tools = [f for f in os.listdir("tools") if os.path.isfile(os.path.join("tools", f))] +# get a list of every file (not directory) with +x set in the tools directory +tools = [f for f in os.listdir("tools") if os.path.isfile(os.path.join("tools", f)) and os.access(os.path.join("tools", f), os.X_OK)] + # write it to a json file at the root of the static directory with open("/tmp/tools.json", "w") as f: json.dump(tools, f) diff --git a/app/static/index.html b/app/static/index.html index 1f1eba6..d5e186b 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -4,7 +4,7 @@ - Lemma + Lemma Web Terminal