Files
metasploit-gs/msfupdate
T
James Lee 606b8e68b6 add svn repo cert fingerprints. hopefully fixes some update problems on installations before this change went into the installers (3.7.2)
git-svn-id: file:///home/svn/framework3/trunk@13043 4d416f70-5f16-0410-b530-b9f4589650da
2011-06-27 20:30:44 +00:00

41 lines
887 B
Ruby
Executable File

#!/usr/bin/env ruby
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
end
Dir.chdir(File.dirname(msfbase))
$stderr.puts "[*]"
$stderr.puts "[*] Attempting to update the Metasploit Framework..."
$stderr.puts "[*]"
$stderr.puts ""
wait = (ARGV.shift.to_s == "wait")
have_configdir = false
ARGV.each do |arg|
next unless arg =~ /--config-dir/
have_configdir = true
end
unless have_configdir
configdir = File.join(File.dirname(msfbase), "data", "svn")
# Spaces in the directory should be fine since this whole thing is passed
# as a single argument via the multi-arg syntax for system() below.
ARGV.push("--config-dir=#{configdir}")
end
system("svn", "cleanup")
system("svn", "update", *ARGV)
if wait
$stderr.puts ""
$stderr.puts "[*] Please hit enter to exit"
$stderr.puts ""
$stdin.readline
end