diff --git a/core/main/logger.rb b/core/main/logger.rb index dbbb376c2..623b17ba1 100644 --- a/core/main/logger.rb +++ b/core/main/logger.rb @@ -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 diff --git a/extensions/metasploit/.rpcclient.rb.swp b/extensions/metasploit/.rpcclient.rb.swp deleted file mode 100644 index 9449db264..000000000 Binary files a/extensions/metasploit/.rpcclient.rb.swp and /dev/null differ diff --git a/extensions/notifications/config.yaml b/extensions/notifications/config.yaml index bac1a0318..925921522 100644 --- a/extensions/notifications/config.yaml +++ b/extensions/notifications/config.yaml @@ -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