Remove need for expand_path in this module; normalize handles it now

bug/bundler_fix
Jon Hart 2016-05-24 13:30:12 -07:00
parent 3df4c38e82
commit 48c25dd863
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 2 additions and 2 deletions

View File

@ -90,12 +90,12 @@ class MetasploitModule < Msf::Auxiliary
keyfile = datastore['SSH_KEYFILE_B64'].unpack("m*").first
elsif file.kind_of? Array
keyfile = ''
file.map { |f| ::File.expand_path(f) }.each do |dir_entry|
file.each do |dir_entry|
next unless ::File.readable? dir_entry
keyfile << ::File.open(dir_entry, "rb") {|f| f.read(f.stat.size)}
end
else
keyfile = ::File.open(::File.expand_path(file), "rb") {|f| f.read(f.stat.size)}
keyfile = ::File.open(file, "rb") {|f| f.read(f.stat.size)}
end
keys = []
this_key = []