Skip to content

Commit

Permalink
Merge pull request #122 from projectdiscovery/go_install
Browse files Browse the repository at this point in the history
chore: Version updates
  • Loading branch information
ehsandeep authored Apr 21, 2022
2 parents 5f88b1e + f28a38f commit 53bacf6
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.15
go-version: 1.18

- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Test
run: go test .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 5m
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
steps:
-
name: "Check out code"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: "Set up Go"
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
-
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM golang:1.17.3-alpine as build-env
RUN GO111MODULE=on go get -v github.com/projectdiscovery/notify/cmd/notify
FROM golang:1.18-alpine as build-env
RUN go install -v github.com/projectdiscovery/notify/cmd/notify@latest

FROM alpine:latest
COPY --from=build-env /go/bin/notify /usr/local/bin/notify
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<img src="static/notify-logo.png" alt="notify" width="200px"></a>
<img src="static/notify-logo.png" alt="notify" width="200px">
<br>
</h1>

Expand Down Expand Up @@ -28,7 +28,7 @@
Notify is a Go-based assistance package that enables you to stream the output of several tools (or read from a file) and publish it to a variety of supported platforms.

<h1 align="left">
<img src="static/notify-httpx.png" alt="notify-httpx" width="700px"></a>
<img src="static/notify-httpx.png" alt="notify-httpx" width="700px">
<br>
</h1>

Expand All @@ -51,20 +51,20 @@ notify -h

This will display help for the tool. Here are all the switches it supports.

| Flag | Description | Example |
|------------------|----------------------------------------------------|----------------------------|
| -config | Notify configuration file | notify -config config.yaml |
| -silent | Don't print the banner | notify -silent |
| -version | Show version of notify | notify -version |
| -v | Show Verbose output | notify -v |
| -no-color | Don't Use colors in output | notify -nc |
| -data | File path to read data from | notify -i test.txt |
| -bulk | Read and send data in bulk from file. | notify -bulk |
| -char-limit | Character limit for message (default 4000) | notify -cl 2000 |
| -provider-config | provider config path | notify -pc provider.yaml |
| -provider | provider to send the notification to (optional) | notify -p slack,telegram |
| -id | id to send the notification to (optional) | notify -id recon,scans |
| -rate-limit | maximum number of HTTP requests to send per second | notify -rl 1 |
| Flag | Description | Example |
|--------------------|----------------------------------------------------|------------------------------|
| `-config` | Notify configuration file | `notify -config config.yaml` |
| `-silent` | Don't print the banner | `notify -silent` |
| `-version` | Show version of notify | `notify -version` |
| `-v` | Show Verbose output | `notify -v` |
| `-no-color` | Don't Use colors in output | `notify -nc` |
| `-data` | File path to read data from | `notify -i test.txt` |
| `-bulk` | Read and send data in bulk from file. | `notify -bulk` |
| `-char-limit` | Character limit for message (default 4000) | `notify -cl 2000` |
| `-provider-config` | provider config path | `notify -pc provider.yaml` |
| `-provider` | provider to send the notification to (optional) | `notify -p slack,telegram` |
| `-id` | id to send the notification to (optional) | `notify -id recon,scans` |
| `-rate-limit` | maximum number of HTTP requests to send per second | `notify -rl 1` |


# Notify Installation
Expand Down Expand Up @@ -150,7 +150,7 @@ subfinder -d hackerone.com | notify

<h1 align="left">
<img width="365" alt="notify-subfinder" src="https://user-images.githubusercontent.com/8293321/130240854-e3031bc6-ecc8-47f8-9654-4c58e09cc622.png">

</h1>

### Send notification using output file

Expand Down Expand Up @@ -195,7 +195,7 @@ subfinder -d intigriti.com | httpx | nuclei -tags exposure -o output.txt; notify

The tool tries to use the default provider config (`$HOME/.config/notify/provider-config.yaml`), it can also be specified via CLI by using **provider-config** flag.

To run the tool with custom providers config, just use the following command.
To run the tool with custom provider config, just use the following command.

```sh
notify -provider-config providers.yaml
Expand Down
34 changes: 25 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
module github.com/projectdiscovery/notify

go 1.15
go 1.17

require (
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
github.com/containrrr/shoutrrr v0.4.5-0.20210707101419-8018a476b557
github.com/json-iterator/go v1.1.12
github.com/oriser/regroup v0.0.0-20210730155327-fca8d7531263
github.com/pkg/errors v0.9.1
github.com/projectdiscovery/goflags v0.0.7
github.com/projectdiscovery/gologger v1.1.4
go.uber.org/multierr v1.7.0
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/cnf/structhash v0.0.0-20201127153200-e1b16c1ebc08 // indirect
github.com/fatih/color v1.12.0 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/google/go-cmp v0.5.4 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/json-iterator/go v1.1.12
github.com/klauspost/compress v1.13.1 // indirect
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.13 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/onsi/ginkgo v1.16.4 // indirect
github.com/onsi/gomega v1.10.5 // indirect
github.com/oriser/regroup v0.0.0-20210730155327-fca8d7531263
github.com/pkg/errors v0.9.1
github.com/projectdiscovery/goflags v0.0.7
github.com/projectdiscovery/gologger v1.1.4
go.uber.org/multierr v1.7.0
github.com/projectdiscovery/stringsutil v0.0.0-20210804142656-fd3c28dbaafe // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
golang.org/x/text v0.3.6 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/yaml.v2 v2.4.0
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gosrc.io/xmpp v0.5.1 // indirect
nhooyr.io/websocket v1.8.7 // indirect
)
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ github.com/go-interpreter/wagon v0.6.0/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
Expand Down

0 comments on commit 53bacf6

Please sign in to comment.