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, #harvest_process, #next_message, open, #send, #success?, #threadme, #write_message

Constructor Details

#initialize(module_path, framework: nil) ⇒ RbBridge

Returns a new instance of RbBridge.


186
187
188
189
190
# File 'lib/msf/core/modules/external/bridge.rb', line 186

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)

182
183
184
# File 'lib/msf/core/modules/external/bridge.rb', line 182

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