Tiny helper for publishing notifications on different platforms:
- #slack
- Amazon SNS
- Microsoft Teams
- Custom Webhooks
nmap -p80,443 scanme.nmap.org | notifier -b
You can install the pre-compiled binary in several different ways
brew tap hupe1980/notifier
brew install notifier
sudo snap install notifier
scoop bucket add notifier https://github.com/hupe1980/notifier-bucket.git
scoop install notifier
Download the .deb, .rpm or .apk from the releases page and install them with the appropriate tools.
Download the pre-compiled binaries from the releases page and copy to the desired location.
Usage:
notifier [filename] [flags]
Examples:
nmap -p80,443 scanme.nmap.org | notifier -b
Flags:
-b, --bulk enable bulk processing
-c, --config string path to notifier configuration file (default: $HOME/.config/notifier/config.yaml)
-e, --extra stringArray additional informations for use in the template (key=value)
-h, --help help for notifier
-p, --provider stringArray provider to send the notification to
--proxy string proxy url
--rate-limit int maximum number of HTTP requests per second
-v, --version version for notifier
The default config file must be created at $HOME/.config/notifier/config.yaml and can have the following contents:
proxy: http://proxy.org
rateLimit: 5
providers:
webhook:
- id: webhook
url: https://webhook.org
method: POST
template: '{{ .Message }}'
headers:
Content-Type: application/json
X-Api-Key: 4711
slack:
- id: slack
webhookUrl: https://hooks.slack.com/services/xxx
template: '{{ .Message }}'
teams:
- id: teams
webhookUrl: https://outlook.office.com/webhook/xxx
template: '{{ .Message }}'
sns:
- id: sns
region: us-east-1
profile: notifier
topicArn: arn:aws:sns:us-east-1:123456789012:MyTopic
notifier
uses {{ .Message }}
as the default template. You can customize the template with the following placeholders:
- {{ .Message }}
- {{ .Username }}
- {{ .Hostname }}