Skip to content

Commit 92e1604

Browse files
committed
Merge branch 'master' of github.com:rapid7/metasploit-framework
2 parents 6f50410 + f74d306 commit 92e1604

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

msfgui

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@
88
# $Revision$
99
#
1010

11+
msfbase = __FILE__
12+
while File.symlink?(msfbase)
13+
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
14+
end
15+
16+
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
17+
require 'fastlib'
18+
require 'msfenv'
19+
1120
begin
1221
require 'msgpack'
1322
rescue LoadError
1423
raise LoadError, "Missing msgpack gem, try 'gem install msgpack' to use MSFGui"
1524
end
1625

17-
msfbase = __FILE__
18-
while File.symlink?(msfbase)
19-
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
20-
end
21-
2226
if RUBY_PLATFORM =~ /mswin|mingw/i
2327
exec "javaw -jar #{File.dirname(msfbase)}/data/gui/msfgui.jar"
2428
else

0 commit comments

Comments
 (0)