Skip to content

Commit 6fd82ad

Browse files
author
Brent Cook
committed
add cp / copy commands
from @sempervictus
1 parent 282c7eb commit 6fd82ad

File tree

1 file changed

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

1 file changed

+14
-2
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,27 @@ def cmd_mv(*args)
243243
print_line("Usage: mv oldfile newfile")
244244
return true
245245
end
246-
247246
client.fs.file.mv(args[0],args[1])
248-
249247
return true
250248
end
251249

252250
alias :cmd_move :cmd_mv
253251
alias :cmd_rename :cmd_mv
254252

253+
#
254+
# Move source to destination
255+
#
256+
def cmd_cp(*args)
257+
if (args.length < 2)
258+
print_line("Usage: cp oldfile newfile")
259+
return true
260+
end
261+
client.fs.file.cp(args[0],args[1])
262+
return true
263+
end
264+
265+
alias :cmd_copy :cmd_cp
266+
255267

256268
def cmd_download_help
257269
print_line("Usage: download [options] src1 src2 src3 ... destination")

0 commit comments

Comments
 (0)