2005-04-10 09:20:47 +00:00
|
|
|
#!/usr/bin/ruby
|
|
|
|
|
|
|
|
require 'Rex/Post/Meterpreter/Extension'
|
|
|
|
require 'Rex/Post/Meterpreter/Extensions/Stdapi/Process'
|
2005-04-10 10:31:38 +00:00
|
|
|
require 'Rex/Post/Meterpreter/Extensions/Stdapi/Registry'
|
2005-04-10 09:20:47 +00:00
|
|
|
|
|
|
|
module Rex
|
|
|
|
module Post
|
|
|
|
module Meterpreter
|
|
|
|
module Extensions
|
|
|
|
module Stdapi
|
|
|
|
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# Stdapi
|
|
|
|
# ------
|
|
|
|
#
|
|
|
|
# Standard ruby interface to remote entities
|
|
|
|
#
|
|
|
|
###
|
|
|
|
class Stdapi < Extension
|
|
|
|
def initialize(client)
|
|
|
|
super(client, 'stdapi')
|
2005-04-10 17:08:27 +00:00
|
|
|
|
|
|
|
# Alias the following things on the client object so that they
|
|
|
|
# can be directly referenced
|
|
|
|
client.register_extension_alias('process', self.process)
|
|
|
|
client.register_extension_alias('registry', self.registry)
|
2005-04-10 09:20:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def brand(klass)
|
|
|
|
klass = klass.dup
|
|
|
|
klass.client = self.client
|
|
|
|
return klass
|
|
|
|
end
|
|
|
|
|
|
|
|
def process
|
|
|
|
brand(Rex::Post::Meterpreter::Extensions::Stdapi::Process)
|
|
|
|
end
|
2005-04-10 10:31:38 +00:00
|
|
|
|
|
|
|
def registry
|
|
|
|
brand(Rex::Post::Meterpreter::Extensions::Stdapi::Registry)
|
|
|
|
end
|
2005-04-10 09:20:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end; end; end; end; end
|