class RubySMB::SMB2::Packet::SessionSetupRequest

An SMB2 SessionSetupRequest Packet as defined in [2.2.5 SMB2 SESSION_SETUP Request](msdn.microsoft.com/en-us/library/cc246563.aspx)

Constants

COMMAND

Public Instance Methods

set_type1_blob(type1_message) click to toggle source

Takes a serialized NTLM Type 1 message and wraps it in the GSS ASN1 encoding and inserts it into the {RubySMB::SMB2::Packet::SessionSetupRequest#buffer} as well as updating the {RubySMB::SMB2::Packet::SessionSetupRequest#security_buffer_length}

@param type1_message [String] the serialized NTLM Type 1 message @return [void]

# 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) click to toggle source

Takes a serialized NTLM Type 3 message and wraps it in the GSS ASN1 encoding and inserts it into the {RubySMB::SMB2::Packet::SessionSetupRequest#buffer} as well as updating the {RubySMB::SMB2::Packet::SessionSetupRequest#security_buffer_length}

@param type3_message [String] the serialized NTLM Type 3 message @return [void]

# 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