When not a meterpreter session, split dir/ls output to match meterpreter entries output

bug/bundler_fix
Jon Hart 2014-11-17 09:10:03 -08:00
parent d5afb2b766
commit 98db8b5ad9
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 2 additions and 2 deletions

View File

@ -36,9 +36,9 @@ module Msf::Post::File
return session.fs.dir.entries(where)
else
if session.platform =~ /win/
return session.shell_command_token("dir #{where}")
return session.shell_command_token("dir #{where}").split(/[\r\n]+/)
else
return session.shell_command_token("ls #{where}")
return session.shell_command_token("ls #{where}").split(/[\r\n]+/)
end
end
end