Class: Msf::RPC::RPC_Base

Inherits:
Object
  • Object
show all
Defined in:
lib/msf/core/rpc/v10/rpc_base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service) ⇒ RPC_Base

Returns a new instance of RPC_Base


8
9
10
11
12
13
# File 'lib/msf/core/rpc/v10/rpc_base.rb', line 8

def initialize(service)
  self.service   = service
  self.framework = service.framework
  self.tokens    = service.tokens
  self.users     = service.users
end

Instance Attribute Details

#frameworkObject

Returns the value of attribute framework


6
7
8
# File 'lib/msf/core/rpc/v10/rpc_base.rb', line 6

def framework
  @framework
end

#serviceObject

Returns the value of attribute service


6
7
8
# File 'lib/msf/core/rpc/v10/rpc_base.rb', line 6

def service
  @service
end

#tokensObject

Returns the value of attribute tokens


6
7
8
# File 'lib/msf/core/rpc/v10/rpc_base.rb', line 6

def tokens
  @tokens
end

#usersObject

Returns the value of attribute users


6
7
8
# File 'lib/msf/core/rpc/v10/rpc_base.rb', line 6

def users
  @users
end

Instance Method Details

#error(code, message) ⇒ Object


15
16
17
# File 'lib/msf/core/rpc/v10/rpc_base.rb', line 15

def error(code, message)
  raise Msf::RPC::Exception.new(code, message)
end