class RubySMB::Dcerpc::Winreg::CreateKeyRequest

This class represents a BaseRegCreateKey Request Packet as defined in [3.1.5.7 BaseRegCreateKey (Opnum 6)](docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rrp/c7186ae2-1c82-45e9-933b-97d9873657e8)

Constants

REG_CREATED_NEW_KEY

Create disposition: The key did not exist and was created.

REG_KEY_TYPE_NON_VOLATILE

Options: bitwise OR of one of the key types (REG_KEY_TYPE_*), and any or none of the other options:

This key is not volatile. The key and all its values MUST be persisted to the backing store and is preserved when the registry server loses context due to a computer restart, reboot, or shut down process.

This key is a symbolic link to another key.

REG_KEY_TYPE_VOLATILE

This key is volatile. The key with all its subkeys and values MUST NOT be preserved when the registry server loses context due to a computer restart, reboot, or shut down process.

REG_OPENED_EXISTING_KEY

The key already existed and was opened without being changed.

REG_OPTION_BACKUP_RESTORE

Indicates that the caller wishes to assert its backup and/or restore privileges.

REG_OPTION_DONT_VIRTUALIZE

Indicates that the caller wishes to disable limited user access virtualization for this operation.

Indicates that the caller wishes to open the targeted symlink source rather than the symlink target.

Attributes

opnum[R]

Public Instance Methods

initialize_instance() click to toggle source
Calls superclass method
# File lib/ruby_smb/dcerpc/winreg/create_key_request.rb, line 57
def initialize_instance
  super
  @opnum = REG_CREATE_KEY
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/create_key_request.rb, line 64
def pad_length(prev_element)
  offset = (prev_element.abs_offset + prev_element.to_binary_s.length) % 4
  (4 - offset) % 4
end