forked from The-XSS-Rat/subScraper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
105 lines (85 loc) · 3.57 KB
/
Copy pathDockerfile
File metadata and controls
105 lines (85 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Multi-platform Dockerfile for subScraper reconnaissance tool
# Supports linux/amd64, linux/arm64, linux/arm/v7
FROM --platform=$BUILDPLATFORM python:3.11-slim AS base
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=utf-8 \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
DEBIAN_FRONTEND=noninteractive \
GO_VERSION=1.21.5
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
unzip \
build-essential \
libssl-dev \
ca-certificates \
&& 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 ;; \
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 && \
rm go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}" \
GOPATH="/root/go" \
GOBIN="/root/go/bin"
ENV PATH="${GOBIN}:${PATH}"
# Install reconnaissance tools using Go
RUN go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest && \
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest && \
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest && \
go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest && \
go install -v github.com/tomnomnom/assetfinder@latest && \
go install -v github.com/tomnomnom/waybackurls@latest && \
go install -v github.com/lc/gau/v2/cmd/gau@latest && \
go install -v github.com/gwen001/github-subdomains@latest && \
go install -v github.com/owasp-amass/amass/v4/...@latest
# Install ffuf
RUN go install -v github.com/ffuf/ffuf/v2@latest
# Install gowitness for screenshots
RUN go install -v github.com/sensepost/gowitness@latest
# Install findomain (binary release)
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 && \
unzip -q findomain.zip && \
chmod +x findomain && \
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 psutil
# Install nikto (Perl-based)
RUN apt-get update && apt-get install -y nikto && rm -rf /var/lib/apt/lists/*
# Install nmap
RUN apt-get update && apt-get install -y nmap && rm -rf /var/lib/apt/lists/*
# Create working directory
WORKDIR /app
# Copy application files
COPY main.py /app/
# Create data directory
# Stores all app data: SQLite DB, screenshots, backups, history
RUN mkdir -p /app/recon_data
# Declare volume for persistent data
# Mount to preserve data across restarts:
# docker run -v $(pwd)/recon_data:/app/recon_data ...
VOLUME ["/app/recon_data"]
# Expose web interface port
EXPOSE 8342
# Health check — waits up to 60s for first startup (tool verification takes time)
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=5 \
CMD curl -sf http://localhost:8342/login | grep -q 'html' || exit 1
# Launch web server — skip interactive setup wizard (configure via web UI)
CMD ["python3", "main.py", "--host", "0.0.0.0", "--port", "8342", "--skip-setup"]