Class: Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::LibraryWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/post/meterpreter/extensions/stdapi/railgun/library_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(library, client) ⇒ LibraryWrapper

Returns a new instance of LibraryWrapper.



12
13
14
15
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_wrapper.rb', line 12

def initialize(library, client)
  @_library    = library
  @_client = client
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args) ⇒ Object



24
25
26
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_wrapper.rb', line 24

def method_missing(sym, *args)
  _library.call_function(sym, args, _client)
end

Instance Attribute Details

#_clientObject (readonly)

Returns the value of attribute _client.



10
11
12
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_wrapper.rb', line 10

def _client
  @_client
end

#_libraryObject (readonly)

Returns the value of attribute _library.



10
11
12
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_wrapper.rb', line 10

def _library
  @_library
end

Instance Method Details

#functionsObject

For backwards compatibility. People check if functions are added this way XXX: Deprecate this



19
20
21
22
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/library_wrapper.rb', line 19

def functions
  # warn 'Depricated.'
  _library.functions
end