class RubySMB::Dcerpc::Winreg::QueryInfoKeyResponse

This class represents a BaseRegQueryInfoKey Response Packet as defined in [3.1.5.16 BaseRegQueryInfoKey (Opnum 16)](docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rrp/a886ba66-5c7b-4331-bacd-7c77edc95d85)

Attributes

opnum[R]

Public Instance Methods

initialize_instance() click to toggle source
Calls superclass method
# File lib/ruby_smb/dcerpc/winreg/query_info_key_response.rb, line 23
def initialize_instance
  super
  @opnum = REG_QUERY_INFO_KEY
end
pad_length() click to toggle source

Determines the correct length for the padding in front of lpc_sub_keys. It should always force a 4-byte alignment.

# File lib/ruby_smb/dcerpc/winreg/query_info_key_response.rb, line 30
def pad_length
  offset = (lp_class.abs_offset + lp_class.to_binary_s.length) % 4
  (4 - offset) % 4
end