Land #10422, conditionally require in msfdb_ws
Dependency loading requirements for msfdb_ws were causing a long wait time for the help option.GSoC/Meterpreter_Web_Console
commit
e1e9d6e9ca
11
msfdb_ws
11
msfdb_ws
|
@ -3,10 +3,6 @@
|
|||
#
|
||||
# Starts the HTTP DB Service interface
|
||||
|
||||
|
||||
require 'pathname'
|
||||
require Pathname.new(__FILE__).realpath.expand_path.parent.join('config', 'boot')
|
||||
require 'msf/core/db_manager/http/http_db_manager_service'
|
||||
require 'optparse'
|
||||
|
||||
class HelpError < StandardError; end
|
||||
|
@ -17,6 +13,12 @@ class SwitchError < StandardError
|
|||
end
|
||||
end
|
||||
|
||||
def require_deps
|
||||
require 'pathname'
|
||||
require Pathname.new(__FILE__).realpath.expand_path.parent.join('config', 'boot')
|
||||
require 'msf/core/db_manager/http/http_db_manager_service'
|
||||
end
|
||||
|
||||
def parse_args(args)
|
||||
opts = {}
|
||||
opt = OptionParser.new
|
||||
|
@ -71,6 +73,7 @@ end
|
|||
begin
|
||||
opts = parse_args(ARGV)
|
||||
raise SwitchError.new("certificate file must be specified when using -s") if opts[:ssl] && (opts[:ssl_cert].nil?)
|
||||
require_deps
|
||||
HttpDBManagerService.new.start(:Port => opts[:port],
|
||||
:Host => opts[:interface],
|
||||
:ssl => opts[:ssl],
|
||||
|
|
Loading…
Reference in New Issue