Class: RubySMB::Dcerpc::Svcctl::OpenSCManagerWRequest
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- RubySMB::Dcerpc::Svcctl::OpenSCManagerWRequest
- Defined in:
- lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request.rb
Overview
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.
9 10 11 |
# File 'lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request.rb', line 9 def opnum @opnum end |
Instance Method Details
#initialize_instance ⇒ Object
19 20 21 22 |
# File 'lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request.rb', line 19 def initialize_instance super @opnum = OPEN_SC_MANAGER_W end |
#pad_length(prev_element) ⇒ Object
Determines the correct length for the padding, so that the next field is 4-byte aligned.
26 27 28 29 |
# File 'lib/ruby_smb/dcerpc/svcctl/open_sc_manager_w_request.rb', line 26 def pad_length(prev_element) offset = (prev_element.abs_offset + prev_element.to_binary_s.length) % 4 (4 - offset) % 4 end |