mirror of https://github.com/Mickhat/lemma.git
couple fixes, added nuclei
This commit is contained in:
parent
67b33b786d
commit
437aa33127
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
4
build.sh
4
build.sh
|
|
@ -68,8 +68,8 @@ function lambda_timeout() {
|
|||
function lambda_memory() {
|
||||
local choice
|
||||
while true; do
|
||||
read -p "Choose lambda memory limit (multiples of 64, 128-10240 MB) [default: 256]: " choice
|
||||
choice=${choice:-256}
|
||||
read -p "Choose lambda memory limit (multiples of 64, 128-10240 MB) [default: 1024]: " choice
|
||||
choice=${choice:-1024}
|
||||
|
||||
if [[ "$choice" =~ ^[0-9]+$ ]] && [ "$choice" -ge 128 ] && [ "$choice" -le 10240 ] && [ "$(($choice % 64))" -eq 0 ]; then
|
||||
# return the choice
|
||||
|
|
|
|||
|
|
@ -37,30 +37,47 @@ if [ "$arch" == "x86_64" ]; then
|
|||
wget https://github.com/ffuf/ffuf/releases/download/v2.1.0/ffuf_2.1.0_linux_amd64.tar.gz -O $tmpdir/ffuf.tar.gz > /dev/null 2>&1
|
||||
tar -xvf $tmpdir/ffuf.tar.gz -C $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/ffuf ./app/tools/bin/
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing httpx..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/projectdiscovery/httpx/releases/download/v1.6.5/httpx_1.6.5_linux_amd64.zip -O $tmpdir/httpx.zip > /dev/null 2>&1
|
||||
unzip $tmpdir/httpx.zip -d $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/httpx ./app/tools
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing gau..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/lc/gau/releases/download/v2.2.3/gau_2.2.3_linux_amd64.tar.gz -O $tmpdir/gau.tar.gz > /dev/null 2>&1
|
||||
tar -xvf $tmpdir/gau.tar.gz -C $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/gau ./app/tools/bin/
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing subfinder..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/projectdiscovery/subfinder/releases/download/v2.6.6/subfinder_2.6.6_linux_amd64.zip -O $tmpdir/subfinder.zip > /dev/null 2>&1
|
||||
unzip $tmpdir/subfinder.zip -d $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/subfinder ./app/tools
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing dnsx..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/projectdiscovery/dnsx/releases/download/v1.2.1/dnsx_1.2.1_linux_amd64.zip -O $tmpdir/dnsx.zip > /dev/null 2>&1
|
||||
unzip $tmpdir/dnsx.zip -d $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/dnsx ./app/tools
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing nuclei..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/projectdiscovery/nuclei/releases/download/v3.2.9/nuclei_3.2.9_linux_amd64.zip -O $tmpdir/nuclei.zip > /dev/null 2>&1
|
||||
unzip $tmpdir/nuclei.zip -d $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/nuclei ./app/tools/bin
|
||||
rm -rf $tmpdir
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
wget http://ftp.us.debian.org/debian/pool/main/b/busybox/busybox_1.30.1-4_amd64.deb -O $tmpdir/busybox.deb > /dev/null 2>&1
|
||||
dpkg -x $tmpdir/busybox.deb $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/bin/busybox ./app/tools/bin/
|
||||
|
||||
elif [ "$arch" == "arm64" ]; then
|
||||
|
||||
|
|
@ -69,35 +86,53 @@ elif [ "$arch" == "arm64" ]; then
|
|||
wget https://github.com/ffuf/ffuf/releases/download/v2.1.0/ffuf_2.1.0_linux_arm64.tar.gz -O $tmpdir/ffuf.tar.gz > /dev/null 2>&1
|
||||
tar -xvf $tmpdir/ffuf.tar.gz -C $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/ffuf ./app/tools/bin/
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing httpx..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/projectdiscovery/httpx/releases/download/v1.6.5/httpx_1.6.5_linux_arm64.zip -O $tmpdir/httpx.zip > /dev/null 2>&1
|
||||
unzip $tmpdir/httpx.zip -d $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/httpx ./app/tools
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing gau..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/lc/gau/releases/download/v2.2.3/gau_2.2.3_linux_arm64.tar.gz -O $tmpdir/gau.tar.gz > /dev/null 2>&1
|
||||
tar -xvf $tmpdir/gau.tar.gz -C $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/gau ./app/tools/bin/
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing subfinder..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/projectdiscovery/subfinder/releases/download/v2.6.6/subfinder_2.6.6_linux_arm64.zip -O $tmpdir/subfinder.zip > /dev/null 2>&1
|
||||
unzip $tmpdir/subfinder.zip -d $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/subfinder ./app/tools
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing dnsx..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/projectdiscovery/dnsx/releases/download/v1.2.1/dnsx_1.2.1_linux_arm64.zip -O $tmpdir/dnsx.zip > /dev/null 2>&1
|
||||
unzip $tmpdir/dnsx.zip -d $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/dnsx ./app/tools
|
||||
rm -rf $tmpdir
|
||||
|
||||
echo "Installing nuclei..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/projectdiscovery/nuclei/releases/download/v3.2.9/nuclei_3.2.9_linux_arm64.zip -O $tmpdir/nuclei.zip > /dev/null 2>&1
|
||||
unzip $tmpdir/nuclei.zip -d $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/nuclei ./app/tools/bin
|
||||
rm -rf $tmpdir
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
wget http://ftp.us.debian.org/debian/pool/main/b/busybox/busybox_1.30.1-4_arm64.deb -O $tmpdir/busybox.deb > /dev/null 2>&1
|
||||
dpkg -x $tmpdir/busybox.deb $tmpdir > /dev/null 2>&1
|
||||
mv $tmpdir/bin/busybox ./app/tools/bin/
|
||||
|
||||
fi
|
||||
|
||||
echo "Installing smuggler..."
|
||||
git clone https://github.com/defparam/smuggler ./app/tools/bin/smuggler > /dev/null 2>&1
|
||||
echo "Installing nuclei-templates..."
|
||||
tmpdir=$(mktemp -d)
|
||||
wget https://github.com/projectdiscovery/nuclei-templates/archive/refs/tags/v9.9.1.zip -O ./app/tools/config/nuclei-templates.zip > /dev/null 2>&1
|
||||
|
||||
|
||||
echo "Installing SecLists's common.txt wordlist..."
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
# Disable download from the default nuclei-templates project
|
||||
export DISABLE_NUCLEI_TEMPLATES_PUBLIC_DOWNLOAD=true
|
||||
|
||||
# Disable download from public / private GitHub project(s)
|
||||
export DISABLE_NUCLEI_TEMPLATES_GITHUB_DOWNLOAD=true
|
||||
|
||||
# Disable download from public / private GitLab project(s)
|
||||
export DISABLE_NUCLEI_TEMPLATES_GITLAB_DOWNLOAD=true
|
||||
|
||||
# Disable download from public / private AWS Bucket(s)
|
||||
export DISABLE_NUCLEI_TEMPLATES_AWS_DOWNLOAD=true
|
||||
|
||||
# Disable download from public / private Azure Blob Storage
|
||||
export DISABLE_NUCLEI_TEMPLATES_AZURE_DOWNLOAD=true
|
||||
|
||||
$DIR/bin/busybox unzip -d /tmp $DIR/config/nuclei-templates.zip > /dev/null 2>&1
|
||||
|
||||
# This will create a /tmp/nuclei-templates-X.X.X directory, change it to /tmp/nuclei-templates
|
||||
mv /tmp/nuclei-templates-* /tmp/nuclei-templates > /dev/null 2>&1
|
||||
$DIR/bin/nuclei $@
|
||||
Loading…
Reference in New Issue