From b80343817ce30e9d92f17ec347bb577847720a55 Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Sat, 23 Feb 2013 09:48:18 -0600 Subject: [PATCH] Skeleton for acutally go_pro'ing --- lib/msf/ui/console/command_dispatcher/core.rb | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index 24cfebf867..e80b3ffdd5 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -365,7 +365,7 @@ class Core "Using notepad to track pentests? Have Metasploit Pro report on hosts,\nservices, sessions and evidence -- type ‘go_pro’ to launch it now.", "Tired of typing ‘set RHOSTS’? Click & pwn with Metasploit Pro\n-- type ‘go_pro’ to launch it now." ] - banner << content.sample + banner << content.sample # Ruby 1.9-ism! banner << "\n\n" end @@ -2614,10 +2614,25 @@ class Core def cmd_go_pro(*args) unless is_apt - print_line " This command is only available on apt-based installations," + print_line " This command is only available on deb package installations," print_line " such as Kali Linux." return false end + unless metasploit_debian_package_installed + print_warning " You will want to install the 'metasploit' package first." + print_warning " Type 'apt-get install metasploit' to do this now." + return false + end + # If I've gotten this far, I know that this is apt-installed + # and the packages I need are here. + if metasploit_service_running + print_good " Metasploit services are running, launching a browser..." + launch_metasploit_browser + else + print_warning " Starting the Metasploit services. This will take a few minutes." + start_metasploit_service + launch_metasploit_browser + end @@go_pro_opts.parse(args) do |opt, idx, val| case opt when "-h" @@ -2628,6 +2643,18 @@ class Core return true end + def launch_metasploit_browser + end + + def start_metasploit_service + end + + def metasploit_service_running + end + + def metasploit_debian_package_installed + end + # Determines if this is an apt-based install def is_apt File.exists?(File.expand_path(File.join(msfbase_dir, '.apt')))