Class: RubySMB::SMB2::Packet::SessionSetupRequest
- Inherits:
-
GenericPacket
- Object
- BinData::Record
- GenericPacket
- RubySMB::SMB2::Packet::SessionSetupRequest
- 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
-
#set_security_buffer(buffer) ⇒ void
Takes the specified security buffer string and inserts it into the #buffer as well as updating the #security_buffer_length This method DOES NOT wrap the security buffer in any way.
-
#set_type1_blob(type1_message) ⇒ void
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.
-
#set_type3_blob(type3_message) ⇒ void
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.
Methods inherited from GenericPacket
describe, #display, fields_hashed, format_field, from_hex, #initialize_instance, #packet_smb_version, read, #status_code, #valid?, walk_fields
Instance Method Details
#set_security_buffer(buffer) ⇒ void
This method returns an undefined value.
Takes the specified security buffer string and inserts it into the #buffer as well as updating the #security_buffer_length This method DOES NOT wrap the security buffer in any way.
27 28 29 30 |
# File 'lib/ruby_smb/smb2/packet/session_setup_request.rb', line 27 def set_security_buffer(buffer) self.security_buffer_length = buffer.length self.buffer = buffer 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
38 39 40 41 42 |
# File 'lib/ruby_smb/smb2/packet/session_setup_request.rb', line 38 def set_type1_blob() gss_blob = RubySMB::Gss.gss_type1() 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
50 51 52 53 54 |
# File 'lib/ruby_smb/smb2/packet/session_setup_request.rb', line 50 def set_type3_blob() gss_blob = RubySMB::Gss.gss_type3() self.security_buffer_length = gss_blob.length self.buffer = gss_blob end |