Method: Rex::Script::Base#initialize

Defined in:
lib/rex/script/base.rb

#initialize(client, path) ⇒ Base

Returns a new instance of Base.



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/rex/script/base.rb', line 19

def initialize(client, path)
  self.client    = client
  self.framework = client.framework
  self.path      = path
  self.sink      = OutputSink.new

  if(client.framework.db and client.framework.db.active)
    self.workspace = client.framework.db.find_workspace( client.workspace.to_s ) || client.framework.db.workspace
  end

  # Convenience aliases
  self.session   = self.client
end