Module jcifs

Class SmbComSessionSetupAndXResponse

All Implemented Interfaces:
CommonServerMessageBlock, CommonServerMessageBlockRequest, CommonServerMessageBlockResponse, RequestWithPath, Message, Request, Response

public class SmbComSessionSetupAndXResponse extends AndXServerMessageBlock
SMB1 Session Setup AndX Response message. This response contains information about the established session, including native OS, LAN manager, and primary domain information.
  • Constructor Details

    • SmbComSessionSetupAndXResponse

      public SmbComSessionSetupAndXResponse(Configuration config, ServerMessageBlock andx)
      Constructs a session setup AndX response.
      Parameters:
      config - the configuration to use
      andx - the next command in the AndX chain, or null
  • Method Details

    • getNativeLanMan

      public final String getNativeLanMan()
      Returns the native LAN Manager string reported by the server.
      Returns:
      the nativeLanMan
    • getNativeOs

      public final String getNativeOs()
      Returns the native operating system string reported by the server.
      Returns:
      the nativeOs
    • getPrimaryDomain

      public final String getPrimaryDomain()
      Returns the primary domain name of the server.
      Returns:
      the primaryDomain
    • isLoggedInAsGuest

      public final boolean isLoggedInAsGuest()
      Indicates whether the session was established as a guest.
      Returns:
      the isLoggedInAsGuest
    • getBlob

      public final byte[] getBlob()
      Returns the security blob received from the server during extended security negotiation.
      Returns:
      the blob
    • writeParameterWordsWireFormat

      protected int writeParameterWordsWireFormat(byte[] dst, int dstIndex)
      Description copied from class: ServerMessageBlock
      Writes the parameter words portion of the SMB message to the wire format.
      Specified by:
      writeParameterWordsWireFormat in class ServerMessageBlock
      Parameters:
      dst - the destination buffer
      dstIndex - the starting offset in the buffer
      Returns:
      the number of bytes written
    • writeBytesWireFormat

      protected int writeBytesWireFormat(byte[] dst, int dstIndex)
      Description copied from class: ServerMessageBlock
      Writes the data bytes portion of the SMB message to the wire format.
      Specified by:
      writeBytesWireFormat in class ServerMessageBlock
      Parameters:
      dst - the destination buffer
      dstIndex - the starting offset in the buffer
      Returns:
      the number of bytes written
    • readParameterWordsWireFormat

      protected int readParameterWordsWireFormat(byte[] buffer, int bufferIndex)
      Description copied from class: ServerMessageBlock
      Reads the parameter words portion of the SMB message from the wire format.
      Specified by:
      readParameterWordsWireFormat in class ServerMessageBlock
      Parameters:
      buffer - the buffer containing the message data
      bufferIndex - the starting offset in the buffer
      Returns:
      the number of bytes read
    • readBytesWireFormat

      protected int readBytesWireFormat(byte[] buffer, int bufferIndex)
      Description copied from class: ServerMessageBlock
      Reads the data bytes portion of the SMB message from the wire format.
      Specified by:
      readBytesWireFormat in class ServerMessageBlock
      Parameters:
      buffer - the buffer containing the message data
      bufferIndex - the starting offset in the buffer
      Returns:
      the number of bytes read
    • toString

      public String toString()
      Overrides:
      toString in class AndXServerMessageBlock