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:
parent
48666f1466
commit
0035f2ee64
14
msfcli
14
msfcli
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue