Class: RubySMB::Dcerpc::Winreg::EnumKeyResponse

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

Overview

This class represents a BaseRegEnumKey Response Packet as defined in 3.1.5.10 BaseRegEnumKey (Opnum 9)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#opnumObject (readonly)

Returns the value of attribute opnum.



8
9
10
# File 'lib/ruby_smb/dcerpc/winreg/enum_key_response.rb', line 8

def opnum
  @opnum
end

Instance Method Details

#initialize_instanceObject



19
20
21
22
# File 'lib/ruby_smb/dcerpc/winreg/enum_key_response.rb', line 19

def initialize_instance
  super
  @opnum = REG_ENUM_KEY
end

#pad_length1Object

Determines the correct length for the padding in front of

lp_class. It should always force a 4-byte alignment.



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

def pad_length1
  offset = (lp_name.abs_offset + lp_name.to_binary_s.length) % 4
  (4 - offset) % 4
end

#pad_length2Object

Determines the correct length for the padding in front of

lpft_last_write_time. It should always force a 4-byte alignment.



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

def pad_length2
  offset = (lp_class.abs_offset + lp_class.to_binary_s.length) % 4
  (4 - offset) % 4
end