init commit

This commit is contained in:
2025-11-13 15:23:41 +00:00
commit 48755a8539
7 changed files with 1058 additions and 0 deletions

41
Dockerfile Normal file
View File

@@ -0,0 +1,41 @@
FROM python:3.11-slim
# Install system dependencies and masscan
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
build-essential \
libpcap-dev \
nmap \
&& rm -rf /var/lib/apt/lists/*
# Build and install masscan from source
RUN git clone https://github.com/robertdavidgraham/masscan /tmp/masscan && \
cd /tmp/masscan && \
make && \
make install && \
cd / && \
rm -rf /tmp/masscan
# Set working directory
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY src/ ./src/
# Create output directory
RUN mkdir -p /app/output
# Make scanner executable
RUN chmod +x /app/src/scanner.py
# Force Python unbuffered output
ENV PYTHONUNBUFFERED=1
# Set entry point with unbuffered Python
ENTRYPOINT ["python3", "-u", "/app/src/scanner.py"]
CMD ["--help"]