Merge pull request #1452 from Und3rf10w/pushover
Add Pushover notification channel
This commit is contained in:
22
extensions/notifications/channels/pushover.rb
Normal file
22
extensions/notifications/channels/pushover.rb
Normal 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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user