Class: RubySMB::Dcerpc::Winreg::CreateKeyRequest
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- RubySMB::Dcerpc::Winreg::CreateKeyRequest
- Defined in:
- lib/ruby_smb/dcerpc/winreg/create_key_request.rb
Overview
This class represents a BaseRegCreateKey Request Packet as defined in 3.1.5.7 BaseRegCreateKey (Opnum 6)
Constant Summary collapse
- 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.
0x00000000
- 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.
0x00000001
- REG_KEY_TYPE_SYMLINK =
This key is a symbolic link to another key.
0x00000002
- REG_OPTION_BACKUP_RESTORE =
Indicates that the caller wishes to assert its backup and/or restore privileges.
0x00000004
- REG_OPTION_OPEN_LINK =
Indicates that the caller wishes to open the targeted symlink source rather than the symlink target.
0x00000008
- REG_OPTION_DONT_VIRTUALIZE =
Indicates that the caller wishes to disable limited user access virtualization for this operation.
0x00000010
- REG_CREATED_NEW_KEY =
Create disposition: The key did not exist and was created.
0x00000001
- REG_OPENED_EXISTING_KEY =
The key already existed and was opened without being changed.
0x00000002
Instance Attribute Summary collapse
-
#opnum ⇒ Object
readonly
Returns the value of attribute opnum.
Instance Method Summary collapse
- #initialize_instance ⇒ Object
-
#pad_length(prev_element) ⇒ Object
Determines the correct length for the padding, so that the next field is 4-byte aligned.
Instance Attribute Details
#opnum ⇒ Object (readonly)
Returns the value of attribute opnum.
42 43 44 |
# File 'lib/ruby_smb/dcerpc/winreg/create_key_request.rb', line 42 def opnum @opnum end |
Instance Method Details
#initialize_instance ⇒ Object
57 58 59 60 |
# 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) ⇒ Object
Determines the correct length for the padding, so that the next field is 4-byte aligned.
64 65 66 67 |
# 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 |