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

20 lines
387 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'
client = DemoClient.new(host, port).client
pid = client.sys.process['calc.exe']
puts "before migrate: my pid is #{client.sys.process.getpid}"
client.core.migrate(pid)
puts "after migrate: my pid is #{client.sys.process.getpid}"
while (1)
select nil, nil, nil, 5
end