Skip to content

Commit e4e9a94

Browse files
committed
Merge remote-tracking branch 'todb-r7/msfconsole-svn-warn' into rapid7
2 parents c423ad2 + eb6a6c1 commit e4e9a94

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

msfconsole

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ while File.symlink?(msfbase)
1414
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
1515
end
1616

17+
@msfbase_dir = File.expand_path(File.dirname(msfbase))
18+
1719
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
1820
require 'fastlib'
1921
require 'msfenv'
2022

21-
22-
2323
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
2424

2525
require 'optparse'
@@ -30,6 +30,26 @@ if(RUBY_PLATFORM =~ /mswin32/)
3030
$stderr.puts " be handled correctly. Please install Cygwin or use Linux in VMWare.\n\n"
3131
end
3232

33+
def is_svn
34+
File.directory?(File.join(@msfbase_dir, ".svn"))
35+
end
36+
37+
def print_deprecation_warning
38+
$stdout.puts ""
39+
$stdout.puts "[*] Deprecation Note: After 2013-03-15 (March 15, 2013), Metasploit"
40+
$stdout.puts "[*] source checkouts will NO LONGER update over SVN, but will be using"
41+
$stdout.puts "[*] GitHub exclusively. You should either download a new Metasploit"
42+
$stdout.puts "[*] installer, or use a git clone of Metasploit Framework before"
43+
$stdout.puts "[*] then. You will also need outbound access to github.com on"
44+
$stdout.puts "[*] TCP port 9418 (git), 22 (ssh) or 443 (https), depending on the"
45+
$stdout.puts "[*] protocol used to clone Metasploit Framework (usually, git protocol)."
46+
end
47+
48+
if is_svn
49+
print_deprecation_warning
50+
end
51+
52+
3353
class OptsConsole
3454
#
3555
# Return a hash describing the options.

msfupdate

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,13 @@ def add_git_upstream
5757
end
5858

5959
def print_deprecation_warning
60-
$stdout.puts "[*] Deprecation Note: The next version of Metasploit will"
61-
$stdout.puts "[*] update over the git protocol, which requires outbound"
62-
$stdout.puts "[*] access to github.com:9418/TCP."
63-
$stdout.puts "[*] Please adjust your egress firewall rules accordingly."
60+
$stdout.puts ""
61+
$stdout.puts "[*] Deprecation Note: After 2013-02-28 (February 28, 2013), Metasploit"
62+
$stdout.puts "[*] source checkouts will NO LONGER update over SVN, but will be using"
63+
$stdout.puts "[*] GitHub exclusively. You should either download a new Metasploit"
64+
$stdout.puts "[*] installer, or use a git clone of Metasploit Framework before"
65+
$stdout.puts "[*] then. You will also need outbound access to github.com:9418/TCP."
66+
$stdout.puts ""
6467
end
6568

6669
def maybe_wait_and_exit(exit_code=0)

0 commit comments

Comments
 (0)