Class: RubySMB::Dcerpc::Winreg::OpenKeyRequest
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- RubySMB::Dcerpc::Winreg::OpenKeyRequest
- Defined in:
- lib/ruby_smb/dcerpc/winreg/open_key_request.rb
Overview
This class represents a BaseRegOpenKey Request Packet as defined in 3.1.5.15 BaseRegOpenKey (Opnum 15)
Instance Attribute Summary collapse
-
#opnum ⇒ Object
readonly
Returns the value of attribute opnum.
Instance Method Summary collapse
- #initialize_instance ⇒ Object
-
#pad_length ⇒ Object
Determines the correct length for the padding in front of #dw_options.
Instance Attribute Details
#opnum ⇒ Object (readonly)
Returns the value of attribute opnum.
10 11 12 |
# File 'lib/ruby_smb/dcerpc/winreg/open_key_request.rb', line 10 def opnum @opnum end |
Instance Method Details
#initialize_instance ⇒ Object
20 21 22 23 |
# File 'lib/ruby_smb/dcerpc/winreg/open_key_request.rb', line 20 def initialize_instance super @opnum = REG_OPEN_KEY end |
#pad_length ⇒ Object
Determines the correct length for the padding in front of
dw_options. It should always force a 4-byte alignment.
27 28 29 30 |
# File 'lib/ruby_smb/dcerpc/winreg/open_key_request.rb', line 27 def pad_length offset = (lp_sub_key.abs_offset + lp_sub_key.to_binary_s.length) % 4 (4 - offset) % 4 end |