fixed disabling of notifications extension
This commit is contained in:
@@ -24,7 +24,10 @@ module Core
|
||||
# Constructor
|
||||
def initialize
|
||||
@logs = BeEF::Core::Models::Log
|
||||
@notifications = BeEF::Extension::Notifications::Notifications
|
||||
@config = BeEF::Core::Configuration.instance
|
||||
|
||||
# if notifications are enabled create a new instance
|
||||
@notifications = BeEF::Extension::Notifications::Notifications unless @config.get('beef.extension.notifications.enable') == false
|
||||
end
|
||||
|
||||
# Registers a new event in the logs
|
||||
@@ -48,7 +51,9 @@ module Core
|
||||
@logs.new(:type => "#{from}", :event => "#{event}", :date => time_now, :hooked_browser_id => hb).save
|
||||
|
||||
# if notifications are enabled send the info there too
|
||||
@notifications.new(from, event, time_now, hb)
|
||||
if @notifications
|
||||
@notifications.new(from, event, time_now, hb)
|
||||
end
|
||||
|
||||
# return
|
||||
true
|
||||
|
||||
Binary file not shown.
@@ -16,19 +16,18 @@
|
||||
beef:
|
||||
extension:
|
||||
notifications:
|
||||
enable: true
|
||||
enable: false
|
||||
name: Notifications
|
||||
twitter:
|
||||
enable: false
|
||||
consumer_key: consumer_key
|
||||
consumer_secret: consumer_secret
|
||||
oauth_token: oauth_token_for_this_app
|
||||
oauth_token_secret: oauth_token_secret_for_this_app
|
||||
target_username: twitter_handle_to_receive_tweet
|
||||
consumer_key: app_consumer_key
|
||||
consumer_secret: app_consumer_secret
|
||||
oauth_token: your_oauth_token_for_this_app
|
||||
oauth_token_secret: your_oauth_token_secret_for_this_app
|
||||
target_username:
|
||||
email:
|
||||
enable: false
|
||||
from_address: your_email_address
|
||||
to_address: where_to_send_notification
|
||||
from_address: sender_email_address
|
||||
to_address: receipient_email_address
|
||||
smtp_host: 127.0.0.1
|
||||
smtp_port: 25
|
||||
smtp_tls_enable: false
|
||||
|
||||
Reference in New Issue
Block a user