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

Instance Method Summary collapse

Methods inherited from GenericPacket

describe, #display, #packet_smb_version, #status_code

Instance Method Details

#initialize_instanceObject



21
22
23
24
# File 'lib/ruby_smb/smb2/packet/session_setup_request.rb', line 21

def initialize_instance
  super
  smb2_header.command = RubySMB::SMB2::Commands::SESSION_SETUP
end

#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



32
33
34
35
36
# File 'lib/ruby_smb/smb2/packet/session_setup_request.rb', line 32

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



44
45
46
47
48
# File 'lib/ruby_smb/smb2/packet/session_setup_request.rb', line 44

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