Skip to content

Commit 5bd38af

Browse files
author
Rich Whitcroft
committed
fix rm to handle multiple files
1 parent 082ebe2 commit 5bd38af

File tree

1 file changed

+3
-3
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,15 @@ def cmd_checksum_tabs(str, words)
309309
end
310310

311311
#
312-
# Delete the specified file.
312+
# Delete the specified file(s).
313313
#
314314
def cmd_rm(*args)
315315
if (args.length == 0)
316-
print_line("Usage: rm file")
316+
print_line("Usage: rm file1 [file2...]")
317317
return true
318318
end
319319

320-
client.fs.file.rm(args[0])
320+
args.each { |f| client.fs.file.rm(f) }
321321

322322
return true
323323
end

0 commit comments

Comments
 (0)