switchOff();
}
private ByteBuffer generateNegotiateMessage() {
ByteBuffer buf = new ByteBuffer(1024);
// Signature
buf.writeString("NTLMSSP", RdpConstants.CHARSET_8);
buf.writeByte(0);
// Message type
buf.writeIntLE(NtlmConstants.NEGOTIATE);
buf.writeIntLE(clientConfigFlags.value); // Flags
// If the NTLMSSP_NEGOTIATE_VERSION flag is set by the client application,
// the Version field MUST be set to the current version (section 2.2.2.10),
// the DomainName field MUST be set to a zero-length string, and the
// Workstation field MUST be set to a zero-length string.
// Domain: ""
buf.writeShortLE(0); // Length
buf.writeShortLE(0); // Allocated space
buf.writeIntLE(0); // Offset
// Workstation: ""
buf.writeShortLE(0); // Length
buf.writeShortLE(0); // Allocated space
buf.writeIntLE(0); // Offset
// OS Version: 6.1 (Build 7601); NTLM Current Revision 15
buf.writeBytes(new byte[] {(byte)0x06, (byte)0x01, (byte)0xb1, (byte)0x1d, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x0f});
// Trim buffer to actual length of data written
buf.trimAtCursor();
return buf;
}