From 57d89aa077bb999007822ac111f1a695a6236d31 Mon Sep 17 00:00:00 2001 From: William Vu Date: Sat, 4 Aug 2018 17:56:23 -0500 Subject: [PATCH] Make msfdb_ws help fast like msfvenom's --- msfdb_ws | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/msfdb_ws b/msfdb_ws index d44dfe1ada..2970082216 100755 --- a/msfdb_ws +++ b/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],