Class: RubySMB::Dcerpc::Netlogon::NetrServerPasswordSet2Request

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/ruby_smb/dcerpc/netlogon/netr_server_password_set2_request.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#opnumObject (readonly)

Returns the value of attribute opnum.



9
10
11
# File 'lib/ruby_smb/dcerpc/netlogon/netr_server_password_set2_request.rb', line 9

def opnum
  @opnum
end

Instance Method Details

#initialize_instanceObject



23
24
25
26
# File 'lib/ruby_smb/dcerpc/netlogon/netr_server_password_set2_request.rb', line 23

def initialize_instance
  super
  @opnum = Netlogon::NETR_SERVER_PASSWORD_SET2
end

#pad_length(prev_element) ⇒ Object

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



30
31
32
33
# File 'lib/ruby_smb/dcerpc/netlogon/netr_server_password_set2_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