Class: RubySMB::Dcerpc::Request

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

Overview

The Request PDU as defined in The request PDU

Constant Summary collapse

PTYPE =
PTypes::REQUEST

Instance Method Summary collapse

Instance Method Details

#calculate_padding_sizeObject

Per the spec (MS_RPCE 2.2.2.11): start of the trailer should be a multiple of 16 bytes offset from the start of the stub



141
142
143
# File 'lib/ruby_smb/dcerpc/request.rb', line 141

def calculate_padding_size
  (16 - (stub.num_bytes % 16)) % 16
end

#enable_encrypted_stubObject



150
151
152
# File 'lib/ruby_smb/dcerpc/request.rb', line 150

def enable_encrypted_stub
  @params[:endpoint] = 'Encrypted'
end

#has_auth_verifier?Boolean

Returns:

  • (Boolean)


154
155
156
# File 'lib/ruby_smb/dcerpc/request.rb', line 154

def has_auth_verifier?
  self.pdu_header.auth_length > 0
end

#initialize_instanceObject



145
146
147
148
# File 'lib/ruby_smb/dcerpc/request.rb', line 145

def initialize_instance
  super
  pdu_header.ptype = PTYPE
end