Skip to content

Commit c9f7cc3

Browse files
authored
Merge pull request #153 from projectdiscovery/dev
v1.0.2 Release
2 parents 53bacf6 + 5fc442a commit c9f7cc3

File tree

15 files changed

+178
-274
lines changed

15 files changed

+178
-274
lines changed

.github/workflows/codeql-analysis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727

2828
# Initializes the CodeQL tools for scanning.
2929
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@v1
30+
uses: github/codeql-action/init@v2
3131
with:
3232
languages: ${{ matrix.language }}
3333

3434
- name: Autobuild
35-
uses: github/codeql-action/autobuild@v1
35+
uses: github/codeql-action/autobuild@v2
3636

3737
- name: Perform CodeQL Analysis
38-
uses: github/codeql-action/analyze@v1
38+
uses: github/codeql-action/analyze@v2

.github/workflows/dockerhub-push.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Git Checkout
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
1616

1717
- name: Get Github tag
1818
id: meta
1919
run: |
2020
echo "::set-output name=tag::$(curl --silent "https://api.github.com/repos/projectdiscovery/notify/releases/latest" | jq -r .tag_name)"
2121
- name: Set up QEMU
22-
uses: docker/setup-qemu-action@v1
22+
uses: docker/setup-qemu-action@v2
2323

2424
- name: Set up Docker Buildx
25-
uses: docker/setup-buildx-action@v1
25+
uses: docker/setup-buildx-action@v2
2626

2727
- name: Login to DockerHub
28-
uses: docker/login-action@v1
28+
uses: docker/login-action@v2
2929
with:
3030
username: ${{ secrets.DOCKER_USERNAME }}
3131
password: ${{ secrets.DOCKER_TOKEN }}
3232

3333
- name: Build and push
34-
uses: docker/build-push-action@v2
34+
uses: docker/build-push-action@v3
3535
with:
3636
context: .
3737
platforms: linux/amd64,linux/arm64,linux/arm

.github/workflows/lint-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414
- name: Run golangci-lint
15-
uses: golangci/golangci-lint-action@v3
15+
uses: golangci/golangci-lint-action@v3.2.0
1616
with:
1717
version: latest
1818
args: --timeout 5m

.github/workflows/release-binary.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
env:
2424
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2525
name: "Create release on GitHub"
26-
uses: goreleaser/goreleaser-action@v2
26+
uses: goreleaser/goreleaser-action@v3
2727
with:
2828
args: "release --rm-dist"
2929
version: latest

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18-alpine as build-env
1+
FROM golang:1.18.3-alpine as build-env
22
RUN go install -v github.com/projectdiscovery/notify/cmd/notify@latest
33

44
FROM alpine:latest

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ This will display help for the tool. Here are all the switches it supports.
5959
| `-v` | Show Verbose output | `notify -v` |
6060
| `-no-color` | Don't Use colors in output | `notify -nc` |
6161
| `-data` | File path to read data from | `notify -i test.txt` |
62-
| `-bulk` | Read and send data in bulk from file. | `notify -bulk` |
62+
| `-bulk` | Read and send data in bulk | `notify -bulk` |
6363
| `-char-limit` | Character limit for message (default 4000) | `notify -cl 2000` |
6464
| `-provider-config` | provider config path | `notify -pc provider.yaml` |
6565
| `-provider` | provider to send the notification to (optional) | `notify -p slack,telegram` |
@@ -127,6 +127,7 @@ smtp:
127127
smtp_cc:
128128
129129
smtp_format: "{{data}}"
130+
subject: "Email subject"
130131

131132
custom:
132133
- id: webhook
@@ -207,8 +208,7 @@ Notify flags can be configured at default config (`$HOME/.config/notify/config.y
207208

208209
## Notes
209210
- As default notify sends notification line by line
210-
- **bulk** flag is supported with data flag.
211-
- stdin/pipe input doesn't support **bulk** posting.
211+
- Use `-bulk` to send notification as entire message/s (messages might be chunked)
212212

213213
## References
214214

@@ -217,4 +217,4 @@ Notify flags can be configured at default config (`$HOME/.config/notify/config.y
217217
- [Creating Telegram bot](https://core.telegram.org/bots#3-how-do-i-create-a-bot)
218218
- [Creating Pushover Token](https://github.com/containrrr/shoutrrr/blob/main/docs/services/pushover.md)
219219

220-
Notify is made with 🖤 by the [projectdiscovery](https://projectdiscovery.io) team.
220+
Notify is made with 🖤 by the [projectdiscovery](https://projectdiscovery.io) team.

cmd/notify/notify.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ func readConfig() {
5454
set.StringVarP(&options.Data, "data", "i", "", "input file to send for notify")
5555
set.NormalizedStringSliceVarP(&options.Providers, "provider", "p", []string{}, "provider to send the notification to (optional)")
5656
set.NormalizedStringSliceVar(&options.IDs, "id", []string{}, "id to send the notification to (optional)")
57-
set.IntVarP(&options.RateLimit, "rate-limit", "rl", 0, "maximum number of HTTP requests to send per second")
58-
set.BoolVar(&options.Bulk, "bulk", false, "enable bulk processing (supported with file input")
57+
set.IntVarP(&options.RateLimit, "rate-limit", "rl", 1, "maximum number of HTTP requests to send per second")
58+
set.BoolVar(&options.Bulk, "bulk", false, "enable bulk processing")
5959
set.IntVarP(&options.CharLimit, "char-limit", "cl", 4000, "max character limit per message")
6060
set.StringVarP(&options.MessageFormat, "msg-format", "mf", "{{data}}", "add custom formatting to message")
6161
set.BoolVar(&options.Silent, "silent", false, "enable silent mode")

go.mod

+10-19
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,32 @@ go 1.17
44

55
require (
66
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
7-
github.com/containrrr/shoutrrr v0.4.5-0.20210707101419-8018a476b557
7+
github.com/containrrr/shoutrrr v0.4.5-0.20220522113502-c91dc3cf1279
88
github.com/json-iterator/go v1.1.12
99
github.com/oriser/regroup v0.0.0-20210730155327-fca8d7531263
1010
github.com/pkg/errors v0.9.1
11+
github.com/projectdiscovery/fileutil v0.0.0-20220510111557-fba17e05663f
1112
github.com/projectdiscovery/goflags v0.0.7
1213
github.com/projectdiscovery/gologger v1.1.4
13-
go.uber.org/multierr v1.7.0
14-
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
14+
go.uber.org/multierr v1.8.0
15+
go.uber.org/ratelimit v0.2.0
1516
gopkg.in/yaml.v2 v2.4.0
1617
)
1718

1819
require (
20+
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
21+
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
1922
github.com/cnf/structhash v0.0.0-20201127153200-e1b16c1ebc08 // indirect
20-
github.com/fatih/color v1.12.0 // indirect
21-
github.com/fsnotify/fsnotify v1.4.9 // indirect
22-
github.com/golang/protobuf v1.4.3 // indirect
23-
github.com/google/go-cmp v0.5.4 // indirect
24-
github.com/google/uuid v1.2.0 // indirect
25-
github.com/klauspost/compress v1.13.1 // indirect
23+
github.com/fatih/color v1.10.0 // indirect
2624
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
2725
github.com/mattn/go-colorable v0.1.8 // indirect
28-
github.com/mattn/go-isatty v0.0.13 // indirect
26+
github.com/mattn/go-isatty v0.0.12 // indirect
2927
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3028
github.com/modern-go/reflect2 v1.0.2 // indirect
31-
github.com/nxadm/tail v1.4.8 // indirect
32-
github.com/onsi/ginkgo v1.16.4 // indirect
33-
github.com/onsi/gomega v1.10.5 // indirect
34-
github.com/projectdiscovery/stringsutil v0.0.0-20210804142656-fd3c28dbaafe // indirect
29+
github.com/projectdiscovery/stringsutil v0.0.0-20220422150559-b54fb5dc6833 // indirect
3530
go.uber.org/atomic v1.7.0 // indirect
3631
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
3732
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
38-
golang.org/x/text v0.3.6 // indirect
39-
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
4033
google.golang.org/protobuf v1.25.0 // indirect
41-
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
42-
gosrc.io/xmpp v0.5.1 // indirect
43-
nhooyr.io/websocket v1.8.7 // indirect
34+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
4435
)

0 commit comments

Comments
 (0)