Load environment before starting msfgui
msfgui checks for the msgpack gem before spinning up, however if this gem is installed in lib/gemcache it will not be found. This commit loads the normal msf environment, including lib/gemcache if applicable, before starting msfgui.bug/bundler_fix
parent
b190342e3f
commit
da70074184
14
msfgui
14
msfgui
|
@ -8,17 +8,21 @@
|
|||
# $Revision$
|
||||
#
|
||||
|
||||
msfbase = __FILE__
|
||||
while File.symlink?(msfbase)
|
||||
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
|
||||
end
|
||||
|
||||
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
|
||||
require 'fastlib'
|
||||
require 'msfenv'
|
||||
|
||||
begin
|
||||
require 'msgpack'
|
||||
rescue LoadError
|
||||
raise LoadError, "Missing msgpack gem, try 'gem install msgpack' to use MSFGui"
|
||||
end
|
||||
|
||||
msfbase = __FILE__
|
||||
while File.symlink?(msfbase)
|
||||
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
|
||||
end
|
||||
|
||||
if RUBY_PLATFORM =~ /mswin|mingw/i
|
||||
exec "javaw -jar #{File.dirname(msfbase)}/data/gui/msfgui.jar"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue