Skip to content

Commit 022ab74

Browse files
author
Brent Cook
committed
See rapid7#7089, add some stray fixups
2 parents 60e728e + 6686e91 commit 022ab74

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def Dir.download(dst, src, opts, force = true, glob = nil, &stat)
203203
tries_cnt = 0
204204
if opts
205205
timestamp = opts["timestamp"]
206-
recursive = true if opts["recursive"]
206+
recursive = true if opts["recursive"]
207207
continue = true if opts["continue"]
208208
tries = true if opts["tries"]
209209
tries_no = opts["tries_no"]

lib/rex/post/meterpreter/ui/console/command_dispatcher/extapi/clipboard.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ def download_file( dest_folder, source )
377377

378378
if stat.directory?
379379
client.fs.dir.download( dest, source, {"recursive" => true}, true ) { |step, src, dst|
380-
# client.fs.dir.download( dest, source, true, true ) { |step, src, dst|
381380
print_line( "#{step.ljust(11)} : #{src} -> #{dst}" )
382381
client.framework.events.on_session_download( client, src, dest ) if msf_loaded?
383382
}

lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Console::CommandDispatcher::Stdapi::Fs
2525
@@download_opts = Rex::Parser::Arguments.new(
2626
"-h" => [ false, "Help banner." ],
2727
"-c" => [ false, "Resume getting a partially-downloaded file." ],
28-
"-l" => [ true, "Set the limit of retries (0 unlimits)." ],
28+
"-l" => [ true, "Set the limit of retries (0 unlimits)." ],
2929
"-r" => [ false, "Download recursively." ],
3030
"-t" => [ false, "Timestamp downloaded files." ])
3131
#
@@ -39,7 +39,7 @@ class Console::CommandDispatcher::Stdapi::Fs
3939
#
4040
@@ls_opts = Rex::Parser::Arguments.new(
4141
"-h" => [ false, "Help banner." ],
42-
"-S" => [ true, "Search string." ],
42+
"-S" => [ true, "Search string." ],
4343
"-t" => [ false, "Sort by time" ],
4444
"-s" => [ false, "Sort by size" ],
4545
"-r" => [ false, "Reverse sort order" ],
@@ -66,7 +66,7 @@ def commands
6666
'mkdir' => 'Make directory',
6767
'pwd' => 'Print working directory',
6868
'rm' => 'Delete the specified file',
69-
'mv' => 'Move source to destination',
69+
'mv' => 'Move source to destination',
7070
'rmdir' => 'Remove directory',
7171
'search' => 'Search for files',
7272
'upload' => 'Upload a file or directory',
@@ -341,7 +341,7 @@ def cmd_download(*args)
341341
continue = false
342342
tries = false
343343
tries_no = 0
344-
opts = {}
344+
opts = {}
345345

346346
@@download_opts.parse(args) { |opt, idx, val|
347347
case opt
@@ -408,7 +408,6 @@ def cmd_download(*args)
408408
dest_path = src_path.tr(src_separator, ::File::SEPARATOR)
409409

410410
client.fs.file.download(dest_path, src_path, opts) do |step, src, dst|
411-
puts step
412411
print_status("#{step.ljust(11)}: #{src} -> #{dst}")
413412
client.framework.events.on_session_download(client, src, dest) if msf_loaded?
414413
end

0 commit comments

Comments
 (0)