Implements automatic generation of JSON, HTML, and ZIP outputs after every scan, with all files sharing the same timestamp for easy correlation. Features: - Automatic HTML report generation after every scan - ZIP archive creation containing JSON, HTML, and all screenshots - Unified timestamp across all outputs (JSON, HTML, ZIP, screenshots) - Graceful error handling (scan continues if HTML/ZIP generation fails) - Email-ready ZIP archives for easy sharing Technical changes: - Fixed timestamp mismatch between scan() and save_report() - Added generate_outputs() method to SneakyScanner class - scan() now returns (report, timestamp) tuple - save_report() accepts timestamp parameter instead of generating new one - main() updated to call generate_outputs() for all output formats - Added zipfile import and HTMLReportGenerator import - Dockerfile updated to copy templates/ directory Output structure: - scan_report_YYYYMMDD_HHMMSS.json (JSON report) - scan_report_YYYYMMDD_HHMMSS.html (HTML report) - scan_report_YYYYMMDD_HHMMSS.zip (archive with JSON, HTML, screenshots) - scan_report_YYYYMMDD_HHMMSS_screenshots/ (screenshots directory) Documentation updated: - README.md: Updated Output Format, Features, Quick Start sections - CLAUDE.md: Updated Core Components, Scan Workflow, Key Design Decisions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
49 lines
1.1 KiB
Docker
49 lines
1.1 KiB
Docker
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 \
|
|
chromium \
|
|
chromium-driver \
|
|
&& 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
|
|
|
|
# Install Playwright browsers (Chromium only)
|
|
# Note: We skip --with-deps since we already installed system chromium and dependencies above
|
|
RUN playwright install chromium
|
|
|
|
# Copy application code
|
|
COPY src/ ./src/
|
|
COPY templates/ ./templates/
|
|
|
|
# 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"]
|