Fail nicely when load aggregator.
parent
af941b7541
commit
3ff7a4a639
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue