File tree Expand file tree Collapse file tree 2 files changed +75
-0
lines changed
cybersecurity/offensive/information-gathering Expand file tree Collapse file tree 2 files changed +75
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM golang:1-bookworm AS build
2+
3+ # Install build dependencies
4+ RUN apt-get update && apt-get install -y \
5+ git \
6+ npm \
7+ && rm -rf /var/lib/apt/lists/*
8+
9+ # Clone and build gowitness
10+ RUN git clone https://github.com/sensepost/gowitness.git /src
11+ WORKDIR /src
12+
13+ # Build frontend and backend
14+ RUN cd web/ui && \
15+ npm install && \
16+ npm run build && \
17+ cd ../..
18+
19+ RUN go install github.com/swaggo/swag/cmd/swag@latest && \
20+ swag i --exclude ./web/ui --output web/docs && \
21+ CGO_ENABLED=0 go build -v -trimpath -ldflags="-s -w" -o gowitness
22+
23+ FROM debian:bookworm-slim
24+
25+ # Install Chromium and other dependencies
26+ RUN apt-get update && apt-get install -y \
27+ ca-certificates \
28+ chromium \
29+ chromium-driver \
30+ dumb-init \
31+ && rm -rf /var/lib/apt/lists/*
32+
33+ # Copy built binary from build stage
34+ COPY --from=build /src/gowitness /usr/local/bin/gowitness
35+
36+ # Set Chrome path for gowitness
37+ ENV CHROME_PATH=/usr/bin/chromium
38+
39+ VOLUME ["/screenshots" ]
40+ WORKDIR /screenshots
41+
42+ ENTRYPOINT ["dumb-init" , "--" , "gowitness" ]
Original file line number Diff line number Diff line change 1+ description : >
2+ Gowitness is a website screenshot utility written in Go that uses Chrome's rendering engine to capture web interface screenshots during reconnaissance.
3+
4+ functions :
5+ gowitness_single :
6+ description : Capture a screenshot of a single URL.
7+ parameters :
8+ target :
9+ type : string
10+ description : The URL to capture.
11+ examples :
12+ - https://example.com
13+
14+ container :
15+ platform : linux/amd64
16+ build :
17+ path : ${cwd}/gowitness.Dockerfile
18+ name : gowitness_local
19+ args :
20+ - --net=host
21+ volumes :
22+ - ${cwd}/screenshots:/screenshots
23+
24+ cmdline :
25+ - gowitness
26+ - scan
27+ - single
28+ - --url
29+ - ${target}
30+ - --screenshot-path
31+ - /screenshots
32+ - --write-jsonl
33+ - --write-screenshots
You can’t perform that action at this time.
0 commit comments