Class: RubySMB::SMB2::Packet::SessionSetupRequest

Inherits:
GenericPacket
  • Object
show all
Defined in:
lib/ruby_smb/smb2/packet/session_setup_request.rb

Overview

An SMB2 SessionSetupRequest Packet as defined in 2.2.5 SMB2 SESSION_SETUP Request

Constant Summary collapse

COMMAND =
RubySMB::SMB2::Commands::SESSION_SETUP

Instance Method Summary collapse

Methods inherited from GenericPacket

describe, #display, fields_hashed, format_field, #initialize_instance, #packet_smb_version, read, #status_code, #valid?, walk_fields

Instance Method Details

#set_type1_blob(type1_message) ⇒ void

This method returns an undefined value.

Takes a serialized NTLM Type 1 message and wraps it in the GSS ASN1 encoding and inserts it into the #buffer as well as updating the #security_buffer_length

Parameters:

  • type1_message (String)

    the serialized NTLM Type 1 message



27
28
29
30
31
# File 'lib/ruby_smb/smb2/packet/session_setup_request.rb', line 27

def set_type1_blob(type1_message)
  gss_blob = RubySMB::Gss.gss_type1(type1_message)
  self.security_buffer_length = gss_blob.length
  self.buffer = gss_blob
end

#set_type3_blob(type3_message) ⇒ void

This method returns an undefined value.

Takes a serialized NTLM Type 3 message and wraps it in the GSS ASN1 encoding and inserts it into the #buffer as well as updating the #security_buffer_length

Parameters:

  • type3_message (String)

    the serialized NTLM Type 3 message



39
40
41
42
43
# File 'lib/ruby_smb/smb2/packet/session_setup_request.rb', line 39

def set_type3_blob(type3_message)
  gss_blob = RubySMB::Gss.gss_type3(type3_message)
  self.security_buffer_length = gss_blob.length
  self.buffer = gss_blob
end