Files
SneakyScan/Dockerfile
Phillip Tarrant 61cc24f8d2 Add webpage screenshot capture with Playwright
Implements automated screenshot capture for all discovered HTTP/HTTPS services using Playwright with headless Chromium. Screenshots are saved as PNG files and referenced in JSON reports.

Features:
- Separate ScreenshotCapture module for code organization
- Viewport screenshots (1280x720) with 15-second timeout
- Graceful handling of self-signed certificates
- Browser reuse for optimal performance
- Screenshots stored in timestamped directories
- Comprehensive documentation in README.md and new CLAUDE.md

Technical changes:
- Added src/screenshot_capture.py: Screenshot capture module with context manager pattern
- Updated src/scanner.py: Integrated screenshot capture into HTTP/HTTPS analysis phase
- Updated Dockerfile: Added Chromium and Playwright browser installation
- Updated requirements.txt: Added playwright==1.40.0
- Added CLAUDE.md: Developer documentation and implementation guide
- Updated README.md: Enhanced features section, added screenshot details and troubleshooting
- Updated .gitignore: Ignore entire output/ directory including screenshots

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 00:57:36 +00:00

48 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/
# 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"]