Shuffled methods around

bug/bundler_fix
Tod Beardsley 2013-02-24 09:33:15 -06:00
parent 8caedd4290
commit 8010cdbd8b
1 changed files with 17 additions and 13 deletions

View File

@ -2613,19 +2613,26 @@ class Core
end end
def cmd_go_pro(*args) def cmd_go_pro(*args)
@@go_pro_opts.parse(args) do |opt, idx, val|
case opt
when "-h"
cmd_go_pro_help
return false
end
end
unless is_apt unless is_apt
print_line " This command is only available on deb package installations," print_line " This command is only available on deb package installations,"
print_line " such as Kali Linux." print_line " such as Kali Linux."
return false return false
end end
unless is_metasploit_debian_package_installed unless is_metasploit_debian_package_installed
print_warning "You needs to install the 'metasploit' package first." print_warning "You need to install the 'metasploit' package first."
print_warning "Type 'apt-get install metasploit' to do this now, then exit" print_warning "Type 'apt-get install -y metasploit' to do this now, then exit"
print_warning "and restart msfconsole to try again." print_warning "and restart msfconsole to try again."
return false return false
end end
# If I've gotten this far, I know that this is apt-installed # If I've gotten this far, I know that this is apt-installed, the
# and the packages I need are here. # metasploit package is here, and I'm ready to rock.
if is_metasploit_service_running if is_metasploit_service_running
launch_metasploit_browser launch_metasploit_browser
else else
@ -2638,16 +2645,15 @@ class Core
print_error "Metasploit services aren't running. Type 'service start metasploit' and try again." print_error "Metasploit services aren't running. Type 'service start metasploit' and try again."
end end
end end
@@go_pro_opts.parse(args) do |opt, idx, val|
case opt
when "-h"
cmd_go_pro_help
return false
end
end
return true return true
end end
protected
#
# Go_pro methods -- these are used to start and connect to the
# web UI.
def launch_metasploit_browser def launch_metasploit_browser
cmd = "/usr/bin/xdg-open" cmd = "/usr/bin/xdg-open"
return unless ::File.executable_real? cmd return unless ::File.executable_real? cmd
@ -2709,8 +2715,6 @@ class Core
File.exists?(File.expand_path(File.join(msfbase_dir, '.apt'))) File.exists?(File.expand_path(File.join(msfbase_dir, '.apt')))
end end
protected
# #
# Module list enumeration # Module list enumeration
# #