Skip to content

Commit b547f7f

Browse files
David MaloneyDavid Maloney
authored andcommitted
fix msfbasedir for go_pro
go_pro uses the wrong base director y for starting up metasploit pro when using the go_pro command this caused errors
1 parent f9b902c commit b547f7f

File tree

1 file changed

+2
-2
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+2
-2
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3006,7 +3006,7 @@ def launch_metasploit_browser
30063006
print_warning "to start Metasploit Community / Pro."
30073007
return false
30083008
end
3009-
svc_log = File.expand_path(File.join(msfbase_dir, ".." , "engine", "prosvc_stdout.log"))
3009+
svc_log = File.expand_path(File.join(ENV['METASPLOIT_ROOT'], "apps" , "pro", "engine", "prosvc_stdout.log"))
30103010
unless ::File.readable_real? svc_log
30113011
print_error "Unable to access log file: #{svc_log}"
30123012
return false
@@ -3041,7 +3041,7 @@ def launch_metasploit_browser
30413041
end
30423042

30433043
def start_metasploit_service
3044-
cmd = File.expand_path(File.join(msfbase_dir, '..', '..', '..', 'scripts', 'start.sh'))
3044+
cmd = File.expand_path(File.join(ENV['METASPLOIT_ROOT'], 'scripts', 'start.sh'))
30453045
return unless ::File.executable_real? cmd
30463046
%x{#{cmd}}.each_line do |line|
30473047
print_status line.chomp

0 commit comments

Comments
 (0)