From 24a4211bb98fb114f7c9fd32c0d9823b259a44dd Mon Sep 17 00:00:00 2001 From: Rich Whitcroft Date: Tue, 14 Feb 2017 22:08:49 -0500 Subject: [PATCH] fix upload when dest not specified --- .../meterpreter/ui/console/command_dispatcher/stdapi/fs.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb index 4fdd0e0a23..5d47b0159d 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb @@ -756,7 +756,11 @@ class Console::CommandDispatcher::Stdapi::Fs # Source and destination will be the same src_items << last if src_items.empty? - dest = last + if args.size == 1 + dest = last.split(/(\/|\\)/).last + else + dest = last + end # Go through each source item and upload them src_items.each { |src|