Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BountyStrike/Emissary
Send notifications on different channels such as Slack, Telegram, Discord etc.
https://github.com/BountyStrike/Emissary
bugbounty golang notification
Last synced: about 2 months ago
JSON representation
Send notifications on different channels such as Slack, Telegram, Discord etc.
- Host: GitHub
- URL: https://github.com/BountyStrike/Emissary
- Owner: BountyStrike
- License: mit
- Created: 2020-01-04T01:42:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-25T11:47:24.000Z (over 1 year ago)
- Last Synced: 2024-08-03T14:06:34.714Z (5 months ago)
- Topics: bugbounty, golang, notification
- Language: Go
- Homepage:
- Size: 300 KB
- Stars: 39
- Watchers: 3
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- WebHackersWeapons - Emissary
README
Emissary
Send notifications via different channels such as Slack, Telegram or Teams in your bug bounty flow.
## Motivation
The idea is to hook Emissary into https://github.com/BountyStrike/Bountystrike-sh which will notify me on Telegram when new domains have been found.## Usage
```
$ emissary
Send data through chat channels. Made by @dubs3c.Usage:
emissary [options] [message]Options:
-ch, --channel Specify a custom channel you have defined emissary.ini
-in, --inline Specify channel directly in the commandline
-m, --message Message to send
-h, --header Custom header
-si, --stdin Get message from stdin
-e, --email Send via Email
-txt, --text Specify the field that contains the message. Default is 'message'
-d, --data Specify additional data in json format that should be sent
-r, --rows Max rows/lines to send, 0 for unlimited. Default 20
-v, --version Show versionExamples:
emissary --channel Telegram --message "Hello telegram"
cat domins.txt | emissary -ch Slack --stdin --header "New subdomains from Google!"
emissary -ch Discord -ch Telegram -m "Your message"
emissary -in "webhook:=https://api.telegram.org/botxxxxx/sendMessage§data:={'chat_id': 'xxxx'}" -in "webhook:=https://hooks.slack.com/services/xxxxx" -m "Hack the planet!"
```### Create ~/.config/emissary.ini with the following:
```
[Telegram]
webhook=https://api.telegram.org/botxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sendMessage
textField=text
data={"chat_id": "xxxxxx"}[Slack]
webhook=https://hooks.slack.com/services/xxxxxxxxxx/xxxxxxxxxx/xxxxxxxxxx[Teams]
webhook=https://outlook.office.com/webhook/xxxxxxxxxxxxxxxxxxxxx[Email]
username=
password=
recipient=
server=smtp.gmail.com
port=587
subject="New domains found!"
```
*When using gmail, you need to activate less secure apps on your account: [https://myaccount.google.com/lesssecureapps](https://myaccount.google.com/lesssecureapps)*Now you can start using emissary :)
### Custom Webhooks
It's possible to add your own channels as well, adding Discord as a custom channel looks like this:
```
[Discord]
webhook=https://discord.com/api/webhooks/xxxxxxxxxxxxxxxxxxxxxxxxxx
textField=content
```And can be executed with `emissary --channel Discord -m "It works!!!"`.
The following fields can be used for a given channel:
| field | description |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| webhook | The actual webhook to send data to |
| textField | Some API's have a specific json key where the message goes, here you can define that. Default key is `text`, e.g. `{"text": "Your message"}`. |
| data | If you want to send additional data, you can specify that here as a json formatted string, e.g. `data={"someKey": "someValue", "otherKey": "otherValue"}`. |### Pipe data via stdin:
```
$ cat domains.txt | emissary -ch telegram --stdin
```### Specify a message as an argument:
```
$ emissary -ch telegram --message "This is a very cool message"
```### Send to multiple channels:
```
$ cat domains.txt | emissary -ch telegram -ch slack -si
```### Send only 10 lines:
```
$ cat domains.txt | emissary -ch telegram -si --rows 10
```### Send everything from the file:
```
$ cat domains.txt | emissary -ch telegram -si -r 0
```Emissary will only send 20 rows by default, this is to protect against accidentally sending a gazillion domains :) It can be overwritten with `--rows 0` which means unlimited rows.
### Multiple inline webhooks
It's possible use multiple webhooks directly on the command line without specifying them in `config.ini`.
The following command will send `Hack the planet` to Telegram and Slack:
```
emissary -in "webhook:=https://api.telegram.org/botxxxxx/sendMessage§data:={'chat_id': 'xxxx'}" -in "webhook:=https://hooks.slack.com/services/xxxxx" -m "Hack the planet!"
```The same fields in `config.ini` are used inline as well. They can be used like so:
- `webhook:=`
- `textField:=`
- `data:=`The character `§` is used as a delimiter between each field.
## Contributing
Any feedback or ideas are welcome! Want to improve something? Create a pull request!1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D