1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00
metasploit-framework/dev/meterpreter/demo_mirror_dir.rb

17 lines
324 B
Ruby
Raw Normal View History

#!/usr/bin/ruby -I. -I../../lib
require 'DemoClient'
host = ARGV[0] || '127.0.0.1'
port = ARGV[1] || '12345'
src_dir = ARGV[2] || "%WINDIR%\\inf"
dst_dir = ARGV[3] || "/tmp/mirror_demo"
client = DemoClient.new(host, port).client
begin
Dir.mkdir(dst_dir)
rescue
end
client.fs.dir.download(dst_dir, src_dir, true)