Speed up msfcli help

If the user only wants to see help, then no point to load things
that will actually never be used by msfcli.  Only rex is needed.
This commit is contained in:
sinn3r 2013-07-22 23:26:44 -05:00
parent 48666f1466
commit 0035f2ee64
1 changed files with 6 additions and 8 deletions

14
msfcli
View File

@ -16,15 +16,7 @@ while File.symlink?(msfbase)
end
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
require 'fastlib'
require 'msfenv'
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
require 'rex'
require 'msf/ui'
require 'msf/base'
Indent = ' '
@ -61,6 +53,12 @@ module_class = "exploit"
if(exploit_name == "-h")
usage()
else
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
require 'fastlib'
require 'msfenv'
require 'msf/ui'
require 'msf/base'
end
# Initialize the simplified framework instance.