Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM golang:1-bookworm AS build

# Install build dependencies
RUN apt-get update && apt-get install -y \
git \
npm \
&& rm -rf /var/lib/apt/lists/*

# Clone and build gowitness
RUN git clone https://github.com/sensepost/gowitness.git /src
WORKDIR /src

# Build frontend and backend
RUN cd web/ui && \
npm install && \
npm run build && \
cd ../..

RUN go install github.com/swaggo/swag/cmd/swag@latest && \
swag i --exclude ./web/ui --output web/docs && \
CGO_ENABLED=0 go build -v -trimpath -ldflags="-s -w" -o gowitness

FROM debian:bookworm-slim

# Install Chromium and other dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
chromium \
chromium-driver \
dumb-init \
&& rm -rf /var/lib/apt/lists/*

# Copy built binary from build stage
COPY --from=build /src/gowitness /usr/local/bin/gowitness

# Set Chrome path for gowitness
ENV CHROME_PATH=/usr/bin/chromium

VOLUME ["/screenshots"]
WORKDIR /screenshots

ENTRYPOINT ["dumb-init", "--", "gowitness"]
33 changes: 33 additions & 0 deletions cybersecurity/offensive/information-gathering/gowitness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
description: >
Gowitness is a website screenshot utility written in Go that uses Chrome's rendering engine to capture web interface screenshots during reconnaissance.

functions:
gowitness_single:
description: Capture a screenshot of a single URL.
parameters:
target:
type: string
description: The URL to capture.
examples:
- https://example.com

container:
platform: linux/amd64
build:
path: ${cwd}/gowitness.Dockerfile
name: gowitness_local
args:
- --net=host
volumes:
- ${cwd}/screenshots:/screenshots

cmdline:
- gowitness
- scan
- single
- --url
- ${target}
- --screenshot-path
- /screenshots
- --write-jsonl
- --write-screenshots
Loading