2009-11-12 05:30:58 +00:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
|
|
|
File.umask(0022)
|
|
|
|
|
|
|
|
msf3 = '/msf3'
|
2009-11-12 06:18:32 +00:00
|
|
|
if ! File.directory?(msf3)
|
|
|
|
puts "[*] This Metasploit Framework installation is corrupted."
|
|
|
|
exit(1)
|
2009-11-12 05:30:58 +00:00
|
|
|
end
|
2009-11-12 06:18:32 +00:00
|
|
|
|
2009-11-12 05:30:58 +00:00
|
|
|
Dir.chdir(msf3)
|
2009-11-12 06:18:32 +00:00
|
|
|
|
|
|
|
begin
|
2009-11-12 07:02:40 +00:00
|
|
|
fd = File.open("/bin/bash", "a")
|
|
|
|
fd.close
|
2009-11-12 06:18:32 +00:00
|
|
|
rescue ::Exception
|
|
|
|
puts "[*] Error: msfupdate must be run as an administrative user"
|
2009-11-12 06:38:03 +00:00
|
|
|
sleep(30)
|
2009-11-12 06:18:32 +00:00
|
|
|
exit(1)
|
|
|
|
end
|
|
|
|
|
2009-11-12 05:30:58 +00:00
|
|
|
puts "[*] Updating the Metasploit Framework..."
|
|
|
|
puts ""
|
|
|
|
|
|
|
|
system("svn update")
|
2009-11-12 06:18:32 +00:00
|
|
|
|
2009-11-12 05:30:58 +00:00
|
|
|
puts ""
|
2009-11-12 07:13:09 +00:00
|
|
|
puts "[*] Update complete"
|
2009-11-12 06:18:32 +00:00
|
|
|
|
2009-11-12 06:38:03 +00:00
|
|
|
sleep(10)
|
2009-11-12 06:18:32 +00:00
|
|
|
exit(0)
|
|
|
|
|