Permalink
Browse files

Merge remote-tracking branch 'todb-r7/msfconsole-svn-warn' into rapid7

  • Loading branch information...
2 parents c423ad2 + eb6a6c1 commit e4e9a94329eea3a365f895f780d8afd1031b14f9 @egypt egypt committed Feb 21, 2013
Showing with 29 additions and 6 deletions.
  1. +22 −2 msfconsole
  2. +7 −4 msfupdate
View
@@ -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,26 @@ 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-03-15 (March 15, 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 on"
+ $stdout.puts "[*] TCP port 9418 (git), 22 (ssh) or 443 (https), depending on the"
+ $stdout.puts "[*] protocol used to clone Metasploit Framework (usually, git protocol)."
+end
+
+if is_svn
+ print_deprecation_warning
+end
+
+
class OptsConsole
#
# Return a hash describing the options.
View
@@ -57,10 +57,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)

0 comments on commit e4e9a94

Please sign in to comment.