Merge pull request #1452 from Und3rf10w/pushover

Add Pushover notification channel
This commit is contained in:
Brendan Coles
2017-10-15 21:44:57 +11:00
committed by GitHub
3 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
require 'rushover'
module BeEF
module Extension
module Notifications
module Channels
class Pushover
def initialize(message)
@config = BeEF::Core::Configuration.instance
# Configure the Pushover Client
client = Rushover::Client.new(@config.get('beef.extension.notifications.pushover.app_key'))
client.notify(@config.get('beef.extension.notifications.pushover.user_key'), message)
end
end
end
end
end
end

View File

@@ -23,3 +23,9 @@ beef:
to_address: receipient_email_address
smtp_host: 127.0.0.1
smtp_port: 25
# Make sure you do 'gem install rushover' before enabling this feature.
pushover:
enable: false
user_key: pushover_user_key
app_key: pushover_api_key

View File

@@ -6,6 +6,7 @@
require 'extensions/notifications/channels/tweet'
require 'extensions/notifications/channels/email'
require 'extensions/notifications/channels/pushover'
module BeEF
module Extension
@@ -39,6 +40,10 @@ module Notifications
to_address = @config.get('beef.extension.notifications.email.to_address')
BeEF::Extension::Notifications::Channels::Email.new(to_address,message)
end
if @config.get('beef.extension.notifications.pushover.enable') == true
BeEF::Extension::Notifications::Channels::Pushover.new(message)
end
end
end