-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,561 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
FROM golang:1.19.2-alpine as build-env | ||
RUN go install -v github.com/projectdiscovery/notify/cmd/notify@latest | ||
# Base | ||
FROM golang:1.20.3-alpine AS builder | ||
RUN apk add --no-cache build-base | ||
WORKDIR /app | ||
COPY . /app | ||
RUN go mod download | ||
RUN go build ./cmd/notify | ||
|
||
FROM alpine:latest | ||
COPY --from=build-env /go/bin/notify /usr/local/bin/notify | ||
# Release | ||
FROM alpine:3.17.3 | ||
RUN apk -U upgrade --no-cache \ | ||
&& apk add --no-cache bind-tools ca-certificates | ||
COPY --from=builder /app/notify /usr/local/bin/ | ||
|
||
ENTRYPOINT ["notify"] | ||
ENTRYPOINT ["notify"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,24 +52,25 @@ notify -h | |
|
||
This will display help for the tool. Here are all the switches it supports. | ||
|
||
| Flag | Description | Example | | ||
|--------------------|----------------------------------------------------|---------------------------------------| | ||
| `-bulk` | enable bulk processing | `notify -bulk` | | ||
| `-char-limit` | max character limit per message (default 4000) | `notify -cl 2000` | | ||
| `-config` | notify configuration file | `notify -config config.yaml` | | ||
| `-data` | input file to send for notify | `notify -i test.txt` | | ||
| `-delay` | delay in seconds between each notification | `notify -d 2` | | ||
| `-id` | id to send the notification to (optional) | `notify -id recon,scans` | | ||
| `-msg-format` | add custom formatting to message | `notify -mf Hey {{data}}` | | ||
| `-no-color` | disable colors in output | `notify -nc` | | ||
| `-provider-config` | provider config path | `notify -pc provider.yaml` | | ||
| `-provider` | provider to send the notification to (optional) | `notify -p slack,telegram` | | ||
| `-proxy` | http proxy to use with notify | `notify -proxy http://127.0.0.1:8080` | | ||
| `-rate-limit` | maximum number of HTTP requests to send per second | `notify -rl 1` | | ||
| `-silent` | enable silent mode | `notify -silent` | | ||
| `-verbose` | enable verbose mode | `notify -verbose` | | ||
| `-version` | display version | `notify -version` | | ||
|
||
| Flag | Description | Example | | ||
|-------------------------|----------------------------------------------------|---------------------------------------| | ||
| `-bulk` | enable bulk processing | `notify -bulk` | | ||
| `-char-limit` | max character limit per message (default 4000) | `notify -cl 2000` | | ||
| `-config` | notify configuration file | `notify -config config.yaml` | | ||
| `-data` | input file to send for notify | `notify -i test.txt` | | ||
| `-delay` | delay in seconds between each notification | `notify -d 2` | | ||
| `-id` | id to send the notification to (optional) | `notify -id recon,scans` | | ||
| `-msg-format` | add custom formatting to message | `notify -mf Hey {{data}}` | | ||
| `-no-color` | disable colors in output | `notify -nc` | | ||
| `-provider-config` | provider config path | `notify -pc provider.yaml` | | ||
| `-provider` | provider to send the notification to (optional) | `notify -p slack,telegram` | | ||
| `-proxy` | http proxy to use with notify | `notify -proxy http://127.0.0.1:8080` | | ||
| `-rate-limit` | maximum number of HTTP requests to send per second | `notify -rl 1` | | ||
| `-silent` | enable silent mode | `notify -silent` | | ||
| `-verbose` | enable verbose mode | `notify -verbose` | | ||
| `-version` | display version | `notify -version` | | ||
| `-update` | updates to latest version | `notify -update` | | ||
| `-disable-update-check` | disables automatic update check | `notify -duc` | | ||
|
||
# Notify Installation | ||
|
||
|
@@ -133,6 +134,8 @@ smtp: | |
- [email protected] | ||
smtp_format: "{{data}}" | ||
subject: "Email subject" | ||
smtp_html: false | ||
smtp_disable_starttls: false | ||
|
||
googlechat: | ||
- id: "gc" | ||
|
@@ -154,6 +157,24 @@ custom: | |
custom_headers: | ||
Content-Type: application/json | ||
X-Api-Key: XXXXX | ||
|
||
custom: | ||
- id: webhookJson | ||
custom_webhook_url: http://host/api/webhook | ||
custom_method: GET | ||
custom_format: '{"text":{{dataJsonString}} }' | ||
custom_headers: | ||
Content-Type: application/json | ||
X-Api-Key: XXXXX | ||
|
||
custom: | ||
- id: webhook | ||
custom_webhook_url: http://host/api/webhook | ||
custom_method: GET | ||
custom_sprig: '{"text":"{{ .url }}"}' | ||
custom_headers: | ||
Content-Type: application/json | ||
X-Api-Key: XXXXX | ||
``` | ||
# Running Notify | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,80 @@ | ||
module github.com/projectdiscovery/notify | ||
|
||
go 1.17 | ||
go 1.19 | ||
|
||
require ( | ||
github.com/Masterminds/sprig v2.22.0+incompatible | ||
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d | ||
github.com/containrrr/shoutrrr v0.6.1 | ||
github.com/containrrr/shoutrrr v0.7.1 | ||
github.com/json-iterator/go v1.1.12 | ||
github.com/logrusorgru/aurora v2.0.3+incompatible | ||
github.com/oriser/regroup v0.0.0-20210730155327-fca8d7531263 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/projectdiscovery/fileutil v0.0.0-20220705195237-01becc2a8963 | ||
github.com/projectdiscovery/goflags v0.1.0 | ||
github.com/projectdiscovery/gologger v1.1.4 | ||
github.com/projectdiscovery/sliceutil v0.0.0-20220625085859-c3a4ecb669f4 | ||
go.uber.org/multierr v1.8.0 | ||
github.com/projectdiscovery/goflags v0.1.8 | ||
github.com/projectdiscovery/gologger v1.1.10 | ||
github.com/projectdiscovery/utils v0.0.32 | ||
go.uber.org/multierr v1.11.0 | ||
go.uber.org/ratelimit v0.2.0 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
gopkg.in/yaml.v3 v3.0.1 | ||
) | ||
|
||
require ( | ||
aead.dev/minisign v0.2.0 // indirect | ||
github.com/Masterminds/goutils v1.1.1 // indirect | ||
github.com/Masterminds/semver v1.5.0 // indirect | ||
github.com/Masterminds/semver/v3 v3.2.1 // indirect | ||
github.com/VividCortex/ewma v1.2.0 // indirect | ||
github.com/alecthomas/chroma v0.10.0 // indirect | ||
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect | ||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect | ||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect | ||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | ||
github.com/aymerick/douceur v0.2.0 // indirect | ||
github.com/charmbracelet/glamour v0.6.0 // indirect | ||
github.com/cheggaaa/pb/v3 v3.1.2 // indirect | ||
github.com/cnf/structhash v0.0.0-20201127153200-e1b16c1ebc08 // indirect | ||
github.com/fatih/color v1.10.0 // indirect | ||
github.com/dlclark/regexp2 v1.10.0 // indirect | ||
github.com/dsnet/compress v0.0.1 // indirect | ||
github.com/fatih/color v1.15.0 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/golang/snappy v0.0.4 // indirect | ||
github.com/google/go-github/v30 v30.1.0 // indirect | ||
github.com/google/go-querystring v1.1.0 // indirect | ||
github.com/google/uuid v1.3.0 // indirect | ||
github.com/gorilla/css v1.0.0 // indirect | ||
github.com/mattn/go-colorable v0.1.8 // indirect | ||
github.com/mattn/go-isatty v0.0.12 // indirect | ||
github.com/microcosm-cc/bluemonday v1.0.20 // indirect | ||
github.com/huandu/xstrings v1.4.0 // indirect | ||
github.com/imdario/mergo v0.3.15 // indirect | ||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect | ||
github.com/mattn/go-colorable v0.1.13 // indirect | ||
github.com/mattn/go-isatty v0.0.18 // indirect | ||
github.com/mattn/go-runewidth v0.0.14 // indirect | ||
github.com/mholt/archiver v3.1.1+incompatible // indirect | ||
github.com/microcosm-cc/bluemonday v1.0.23 // indirect | ||
github.com/miekg/dns v1.1.54 // indirect | ||
github.com/minio/selfupdate v0.6.0 // indirect | ||
github.com/mitchellh/copystructure v1.2.0 // indirect | ||
github.com/mitchellh/reflectwalk v1.0.2 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/projectdiscovery/stringsutil v0.0.1 // indirect | ||
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect | ||
go.uber.org/atomic v1.7.0 // indirect | ||
golang.org/x/net v0.7.0 // indirect | ||
golang.org/x/sys v0.5.0 // indirect | ||
google.golang.org/protobuf v1.25.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
github.com/muesli/reflow v0.3.0 // indirect | ||
github.com/muesli/termenv v0.15.1 // indirect | ||
github.com/nwaples/rardecode v1.1.3 // indirect | ||
github.com/olekukonko/tablewriter v0.0.5 // indirect | ||
github.com/pierrec/lz4 v2.6.1+incompatible // indirect | ||
github.com/projectdiscovery/blackrock v0.0.1 // indirect | ||
github.com/rivo/uniseg v0.4.4 // indirect | ||
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect | ||
github.com/ulikunitz/xz v0.5.11 // indirect | ||
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect | ||
github.com/yuin/goldmark v1.5.4 // indirect | ||
github.com/yuin/goldmark-emoji v1.0.1 // indirect | ||
golang.org/x/crypto v0.9.0 // indirect | ||
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect | ||
golang.org/x/mod v0.10.0 // indirect | ||
golang.org/x/net v0.10.0 // indirect | ||
golang.org/x/oauth2 v0.8.0 // indirect | ||
golang.org/x/sys v0.8.0 // indirect | ||
golang.org/x/tools v0.9.1 // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
gopkg.in/djherbis/times.v1 v1.3.0 // indirect | ||
) |
Oops, something went wrong.