mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-05 14:57:30 +01:00
20 lines
329 B
Ruby
20 lines
329 B
Ruby
|
#!/usr/bin/ruby -I../../lib
|
||
|
|
||
|
require 'Rex/Post'
|
||
|
|
||
|
class DemoClient
|
||
|
|
||
|
def initialize(host, port)
|
||
|
self.sock = TCPSocket.new(host, port)
|
||
|
self.client = Rex::Post::Meterpreter::Client.new(sock)
|
||
|
|
||
|
self.client.core.use('Module' => 'Stdapi')
|
||
|
end
|
||
|
|
||
|
attr_reader :client
|
||
|
protected
|
||
|
attr_accessor :sock
|
||
|
attr_writer :client
|
||
|
|
||
|
end
|