Skip to content

Commit

Permalink
Process.spawn instead of system
Browse files Browse the repository at this point in the history
  • Loading branch information
todb committed Feb 26, 2013
1 parent 8cff88e commit 08275e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/msf/ui/console/command_dispatcher/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2653,7 +2653,9 @@ def cmd_go_pro(*args)
#
# Go_pro methods -- these are used to start and connect to
# Metasploit Community / Pro.
#

# Note that this presumes a default port.
def launch_metasploit_browser
cmd = "/usr/bin/xdg-open"
unless ::File.executable_real? cmd
Expand All @@ -2677,7 +2679,8 @@ def launch_metasploit_browser
print_good "If this is your first time connecting, you will be presented with"
print_good "a self-signed certificate warning. Accept it to create a new user."
select(nil,nil,nil,7)
system(cmd, "https://localhost:3790")
browser_pid = ::Process.spawn(cmd, "https://localhost:3790")
::Process.detach(browser_pid)
elsif timeout >= 200 # 200 * 3 seconds is 10 minutes and that is tons of time.
print_line
print_warning "For some reason, Community / Pro didn't start in a timely fashion."
Expand Down

0 comments on commit 08275e8

Please sign in to comment.