def __init__(self, negotiate_flags, domain_name, workstation):
self.signature = NTLM_SIGNATURE<EOL>self.message_type = struct.pack('<STR_LIT>', MessageTypes.NTLM_NEGOTIATE)<EOL>if domain_name is None:<EOL><INDENT>self.domain_name = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>self.domain_name = domain_name<EOL>negotiate_flags |=NegotiateFlags.NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED<EOL><DEDENT>if workstation is None:<EOL><INDENT>self.workstation = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>self.workstation = workstation<EOL>negotiate_flags |=NegotiateFlags.NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED<EOL><DEDENT>negotiate_flags -= NegotiateFlags.NTLMSSP_NEGOTIATE_UNICODE<EOL>negotiate_flags |= NegotiateFlags.NTLMSSP_NEGOTIATE_OEM<EOL>self.domain_name = self.domain_name.encode('<STR_LIT:ascii>')<EOL>self.workstation = self.workstation.encode('<STR_LIT:ascii>')<EOL>self.version = get_version(negotiate_flags)<EOL>self.negotiate_flags = struct.pack('<STR_LIT>', negotiate_flags)<EOL>
[MS-NLMP] v28.0 2016-07-14

2.2.1.1 NEGOTIATE_MESSAGE
The NEGOTIATE_MESSAGE defines an NTLM Negotiate message that is sent
from the client to the server. This message allows the client to
specify its supported NTLM options to the server.

:param negotiate_flags: A NEGOTIATE structure that contains a set of
    bit flags. These flags are the options the client supports
:param domain_name: The domain name of the user to authenticate with,
    default is None
:param workstation: The worksation of the client machine, default is
    None

Attributes:
    signature: An 8-byte character array that MUST contain the ASCII
        string 'NTLMSSP\0'
    message_type: A 32-bit unsigned integer that indicates the message
        type. This field must be set to 0x00000001
    negotiate_flags: A NEGOTIATE structure that contains a set of bit
        flags. These flags are the options the client supports
    version: Contains the windows version info of the client. It is
        used only debugging purposes and are only set when
        NTLMSSP_NEGOTIATE_VERSION flag is set
    domain_name: A byte-array that contains the name of the client
        authentication domain that MUST Be encoded in the negotiated
        character set
    workstation: A byte-array that contains the name of the client
        machine that MUST Be encoded in the negotiated character set