class RubySMB::Dcerpc::Winreg::QueryValueRequest

This class represents a BaseRegQueryValue Request Packet as defined in [3.1.5.17 BaseRegQueryValue (Opnum 17)](docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rrp/8bc10aa3-2f91-44e8-aa33-b3263c49ab9d)

Attributes

opnum[R]

Public Instance Methods

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

Determines the correct length for the padding, so that the next field is 4-byte aligned.

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