Class: Msf::Modules::External::RbBridge

Inherits:
Bridge
  • Object
show all
Defined in:
lib/msf/core/modules/external/bridge.rb

Constant Summary

Constants inherited from Bridge

Bridge::LOADERS

Instance Attribute Summary

Attributes inherited from Bridge

#buf, #cmd, #env, #exit_status, #framework, #ios, #messages, #path, #read_thread, #running, #wait_thread

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Bridge

#cleanup, #close, #exec, #handle_exception, #harvest_process, #next_message, open, #send, #success?, #threadme, #write_message

Constructor Details

#initialize(module_path, framework: nil) ⇒ RbBridge

Returns a new instance of RbBridge.



201
202
203
204
205
# File 'lib/msf/core/modules/external/bridge.rb', line 201

def initialize(module_path, framework: nil)
  super
  ruby_path = File.expand_path('../ruby', __FILE__)
  self.cmd = [[Gem.ruby, 'ruby'], "-I#{ruby_path}", self.path]
end

Class Method Details

.applies?(module_name) ⇒ Boolean

Returns:

  • (Boolean)


197
198
199
# File 'lib/msf/core/modules/external/bridge.rb', line 197

def self.applies?(module_name)
  module_name.match? /\.rb$/
end