Skip to content

Commit

Permalink
Update the deprecation note, add to msfconsole
Browse files Browse the repository at this point in the history
This will cause msfconsole to throw a warning as well as msfupdate.

The deadline for action is also set at the end of February.
  • Loading branch information
todb committed Jan 24, 2013
1 parent ee2fed8 commit 17dad0e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
22 changes: 20 additions & 2 deletions msfconsole
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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.
Expand Down
11 changes: 7 additions & 4 deletions msfupdate
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 17dad0e

Please sign in to comment.