diff --git a/msfconsole b/msfconsole index ea8add619e2e..8c4c718c9a32 100755 --- a/msfconsole +++ b/msfconsole @@ -14,12 +14,12 @@ while File.symlink?(msfbase) msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase)) end +@msfbase_dir = File.expand_path(File.dirname(msfbase)) + $:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib'))) require 'fastlib' require 'msfenv' - - $:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB'] require 'optparse' @@ -30,6 +30,24 @@ if(RUBY_PLATFORM =~ /mswin32/) $stderr.puts " be handled correctly. Please install Cygwin or use Linux in VMWare.\n\n" end +def is_svn + File.directory?(File.join(@msfbase_dir, ".svn")) +end + +def print_deprecation_warning + $stdout.puts "" + $stdout.puts "[*] Deprecation Note: After 2013-02-28 (February 28, 2013), Metasploit" + $stdout.puts "[*] source checkouts will NO LONGER update over SVN, but will be using" + $stdout.puts "[*] GitHub exclusively. You should either download a new Metasploit" + $stdout.puts "[*] installer, or use a git clone of Metasploit Framework before" + $stdout.puts "[*] then. You will also need outbound access to github.com:9418/TCP." +end + +if is_svn + print_deprecation_warning +end + + class OptsConsole # # Return a hash describing the options. diff --git a/msfupdate b/msfupdate index 058fd8f51eaa..13e9cf8e77f8 100755 --- a/msfupdate +++ b/msfupdate @@ -53,10 +53,13 @@ def add_git_upstream end def print_deprecation_warning - $stdout.puts "[*] Deprecation Note: The next version of Metasploit will" - $stdout.puts "[*] update over the git protocol, which requires outbound" - $stdout.puts "[*] access to github.com:9418/TCP." - $stdout.puts "[*] Please adjust your egress firewall rules accordingly." + $stdout.puts "" + $stdout.puts "[*] Deprecation Note: After 2013-02-28 (February 28, 2013), Metasploit" + $stdout.puts "[*] source checkouts will NO LONGER update over SVN, but will be using" + $stdout.puts "[*] GitHub exclusively. You should either download a new Metasploit" + $stdout.puts "[*] installer, or use a git clone of Metasploit Framework before" + $stdout.puts "[*] then. You will also need outbound access to github.com:9418/TCP." + $stdout.puts "" end def maybe_wait_and_exit(exit_code=0)