Land #11603, Fail nicely when load aggregator.

master
Jeffrey Martin 2019-03-25 23:20:49 -05:00
commit 582f86b75c
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
1 changed files with 9 additions and 1 deletions

View File

@ -5,7 +5,6 @@
#
# $Revision$
#
require "metasploit/aggregator"
module Msf
Aggregator_yaml = "#{Msf::Config.get_config_root}/aggregator.yaml" # location of the aggregator.yml containing saved aggregator creds
@ -499,6 +498,15 @@ module Msf
def initialize(framework, opts)
super
#
# Require the metasploit/aggregator gem, but fail nicely if it's not there.
#
begin
require "metasploit/aggregator"
rescue LoadError
raise "WARNING: metasploit/aggregator is not avaiable for now."
end
add_console_dispatcher(AggregatorCommandDispatcher)
print_status("Aggregator interaction has been enabled")
end