File tree Expand file tree Collapse file tree 2 files changed +29
-6
lines changed Expand file tree Collapse file tree 2 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ while File.symlink?(msfbase)
14
14
msfbase = File . expand_path ( File . readlink ( msfbase ) , File . dirname ( msfbase ) )
15
15
end
16
16
17
+ @msfbase_dir = File . expand_path ( File . dirname ( msfbase ) )
18
+
17
19
$:. unshift ( File . expand_path ( File . join ( File . dirname ( msfbase ) , 'lib' ) ) )
18
20
require 'fastlib'
19
21
require 'msfenv'
20
22
21
-
22
-
23
23
$:. unshift ( ENV [ 'MSF_LOCAL_LIB' ] ) if ENV [ 'MSF_LOCAL_LIB' ]
24
24
25
25
require 'optparse'
@@ -30,6 +30,26 @@ if(RUBY_PLATFORM =~ /mswin32/)
30
30
$stderr. puts " be handled correctly. Please install Cygwin or use Linux in VMWare.\n \n "
31
31
end
32
32
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
+
33
53
class OptsConsole
34
54
#
35
55
# Return a hash describing the options.
Original file line number Diff line number Diff line change @@ -57,10 +57,13 @@ def add_git_upstream
57
57
end
58
58
59
59
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 ""
64
67
end
65
68
66
69
def maybe_wait_and_exit ( exit_code = 0 )
You can’t perform that action at this time.
0 commit comments