Class: RubySMB::Dcerpc::Winreg::OpenRootKeyRequest

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/ruby_smb/dcerpc/winreg/open_root_key_request.rb

Overview

This class is a generic class that represents OpenXXX Request packet, used to open one of the root keys, as defined in: 3.1.5.1 OpenClassesRoot (Opnum 0) 3.1.5.2 OpenCurrentUser (Opnum 1) 3.1.5.3 OpenLocalMachine (Opnum 2) 3.1.5.4 OpenPerformanceData (Opnum 3) 3.1.5.5 OpenUsers (Opnum 4) 3.1.5.25 OpenCurrentConfig (Opnum 27) 3.1.5.28 OpenPerformanceText (Opnum 32) 3.1.5.29 OpenPerformanceNlsText (Opnum 33) The structure is define by the value of the #opnum parameter e.g. (OpenLocalMachine): OpenRootKeyRequest.new(opnum: RubySMB::Dcerpc::Winreg::OPEN_HKLM)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#opnumObject (readonly)

Returns the value of attribute opnum.



26
27
28
# File 'lib/ruby_smb/dcerpc/winreg/open_root_key_request.rb', line 26

def opnum
  @opnum
end

Instance Method Details

#initialize_instanceObject



32
33
34
35
36
37
# File 'lib/ruby_smb/dcerpc/winreg/open_root_key_request.rb', line 32

def initialize_instance
  super
  @opnum = get_parameter(:opnum) if has_parameter?(:opnum)
  self.server_name = :null
  self.sam_desired.maximum_allowed = 1 unless [OPEN_HKPD, OPEN_HKPT, OPEN_HKPN].include?(@opnum)
end