-
Notifications
You must be signed in to change notification settings - Fork 61
feat: add telegram/mattermost notif + auto relaunch #61
base: main
Are you sure you want to change the base?
Conversation
Thank you @jychp, great job |
I just add Mattermost notification |
Wow, this is awesome! Thanks for putting this together, I will review it ASAP and get this merged in! Can you rebase to the HEAD commit on |
Rebase done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested telegram and delay features, both are working fine! 👍🏼
I'd suggest only some minor changes on config.yaml.
From telegram_apikey
and telegram_chatid
to just apikey
and chatid
.
These modifications should also be done in notification manager.
The better way to do this is to rework configuration: dest1:
type: slack
slack:
url: xxx
# telegram:
# apikey: xx
# chatid: xx
# other_tool:
# key1: xx
dest2:
type: telegram
# slack:
# url: xxx
telegram:
apikey: xx
chatid: xx
# other_tool:
# key1: xx This could allow to rewrite Manager in a more generic way: MAPPING = {'telegram': TelegramNotification, ...}
if not MAPPING[params['type']].send_new_victim_notification(victim, params.get(params['type'], {}):
logging.error(f"Failed to send new victim notification to {params['type']} \"{dest}\"") |
Tested telegram and work perfect! |
Sorry for the delay on this, I have been busy moving and haven't been able to work on this. Glad some other people have tested the Telegram stuff, that's great! Has anyone else tested the Mattermost one? |
Describe the changes
Related issue(s)
#42
How was it tested?
Tested with Telegram/Mattermost notification with fresh DB