update go-pot to latest master

tweaking
This commit is contained in:
t3chn0m4g3
2024-11-29 14:44:23 +01:00
parent 8282084d49
commit ef8e71007c
8 changed files with 46 additions and 60 deletions

View File

@ -3,18 +3,18 @@ RUN <<EOF
apk -U add git
mkdir -p /opt
cd /opt
git clone https://github.com/t3chn0m4g3/go-pot
git clone https://github.com/ryanolee/go-pot
cd go-pot
git checkout fbb3e66e454e5f6092b4294a52e2cfa44e5b7259
EOF
WORKDIR /opt/go-pot
#
RUN go get github.com/ua-parser/uap-go/uaparser
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -o /opt/go-pot/go-pot
#
FROM scratch
#
COPY --from=builder /opt/go-pot/go-pot /opt/go-pot/go-pot
COPY --from=builder /opt/go-pot/config.yml /opt/go-pot/config.yml
COPY dist/config.yml /opt/go-pot/config.yml
#
STOPSIGNAL SIGINT
USER 2000:2000

View File

@ -1,21 +0,0 @@
FROM golang:1.23-alpine AS builder
RUN <<EOF
apk -U add git
mkdir -p /opt
cd /opt
git clone https://github.com/ryanolee/go-pot
EOF
WORKDIR /opt/go-pot
#
RUN CGO_ENABLED=0 GOOS=linux go build -o /opt/go-pot/go-pot
#
FROM scratch
#
COPY --from=builder /opt/go-pot/go-pot /opt/go-pot/go-pot
COPY dist/config.yml /opt/go-pot/config.yml
#
STOPSIGNAL SIGINT
USER 2000:2000
WORKDIR /opt/go-pot
CMD ["start", "--host", "0.0.0.0", "--config-file", "config.yml"]
ENTRYPOINT ["./go-pot"]

View File

@ -56,8 +56,7 @@ server:
# - device_brand: The type of device of the client (Inferred from the user agent)
# - phase: "start" or "end" depending on the phase of the request
# - duration: The duration of the request in milliseconds (Only available as a part of the end phase of a request)
#fields: "src_ip,method,path,qs,duration"
fields: "timestamp,id,status,src_ip,method,path,qs,dest_port,type,host,user_agent,browser,browser_version,os,os_version,device,device_brand,phase,duration"
fields_to_log: "timestamp,id,status,src_ip,method,path,qs,dest_port,type,host,user_agent,browser,browser_version,os,os_version,device,device_brand,phase,duration"
# Configuration for logging related settings for go-pot
logging: