Make msfdb_ws help fast like msfvenom's

GSoC/Meterpreter_Web_Console
William Vu 2018-08-04 17:56:23 -05:00
parent 329f58ac21
commit 57d89aa077
1 changed files with 7 additions and 4 deletions

View File

@ -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],