Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions DOCKER_BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ This guide explains how to build the subScraper Docker container on macOS for mu

## What's New

**Kali Linux Base Image**: The Docker image now uses Kali Linux Rolling as the base, providing a comprehensive security-focused environment with pre-installed tools.

**Persistent Completed Job Reports**: As of the latest version, completed scan reports now persist in the dashboard and across container restarts. All job history is stored in `recon_data/completed_jobs.json` and automatically loaded on startup.

**Custom Workflows**: Create and manage custom reconnaissance workflows with built-in tools or custom commands.

## Prerequisites

1. **Install Docker Desktop for Mac**
Expand Down Expand Up @@ -43,8 +47,8 @@ docker build -t subscraper:latest .
To build a multi-platform image that works on different architectures:

```bash
# Build for multiple platforms and push to a registry
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \
# Build for multiple platforms (amd64, arm64) and push to a registry
docker buildx build --platform linux/amd64,linux/arm64 \
-t yourusername/subscraper:latest \
--push .

Expand Down
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
# Multi-platform Dockerfile for subScraper reconnaissance tool
# Supports linux/amd64, linux/arm64, linux/arm/v7
# Uses Kali Linux base image with pre-installed security tools
# Supports linux/amd64, linux/arm64

FROM --platform=$BUILDPLATFORM python:3.11-slim AS base
FROM kalilinux/kali-rolling AS base

# Set environment variables
ENV PYTHONUNBUFFERED=1 \
DEBIAN_FRONTEND=noninteractive \
GO_VERSION=1.21.5

# Install system dependencies
# Update and install base dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
curl \
wget \
git \
build-essential \
libssl-dev \
ca-certificates \
unzip \
&& rm -rf /var/lib/apt/lists/*

# Install Go (required for many recon tools)
ARG TARGETARCH
RUN case ${TARGETARCH} in \
"amd64") GO_ARCH="amd64" ;; \
"arm64") GO_ARCH="arm64" ;; \
"arm") GO_ARCH="armv6l" ;; \
*) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
*) GO_ARCH="amd64" ;; \
esac && \
wget -q https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \
tar -C /usr/local -xzf go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \
Expand Down Expand Up @@ -57,7 +60,6 @@ RUN go install -v github.com/sensepost/gowitness@latest
RUN case ${TARGETARCH} in \
"amd64") FINDOMAIN_ARCH="x86_64" ;; \
"arm64") FINDOMAIN_ARCH="aarch64" ;; \
"arm") FINDOMAIN_ARCH="armv7" ;; \
*) FINDOMAIN_ARCH="x86_64" ;; \
esac && \
wget -q "https://github.com/Findomain/Findomain/releases/latest/download/findomain-linux-${FINDOMAIN_ARCH}.zip" -O findomain.zip && \
Expand All @@ -66,8 +68,8 @@ RUN case ${TARGETARCH} in \
mv findomain /usr/local/bin/ && \
rm findomain.zip || echo "Findomain installation skipped for ${TARGETARCH}"

# Install Python-based tools
RUN pip install --no-cache-dir sublist3r nikto-parser
# Install Python-based tools and psutil for system monitoring
RUN pip3 install --no-cache-dir --break-system-packages sublist3r nikto-parser psutil

# Install nikto (Perl-based)
RUN apt-get update && apt-get install -y nikto && rm -rf /var/lib/apt/lists/*
Expand Down
10 changes: 10 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ python3 -m pytest test_main.py::TestFilterLogic -v

# Test API endpoints only
python3 -m pytest test_main.py::TestAPIEndpoints -v

# Test workflow functionality only
python3 -m pytest test_main.py::TestWorkflows -v
```

### Run specific test:
Expand Down Expand Up @@ -78,6 +81,13 @@ The test suite covers:
- **Error detection**: Validates rate limit error identification
- **Data sanitization**: Tests input cleaning and normalization

### 7. Workflow Management (`TestWorkflows`)
- **Default workflow creation**: Ensures default workflow is auto-created
- **Workflow CRUD operations**: Tests create, read, update, delete
- **Default workflow protection**: Validates default cannot be deleted
- **Workflow selection**: Tests workflow assignment to jobs
- **API endpoint structure**: Validates workflow API responses

## Test Results Interpretation

### Success Output
Expand Down
Loading