Package streamer

Examples of streamer.ByteBuffer.writeString()


        buf.writeByte(X224_TPDU_CONNECTION_REQUEST);

        buf.writeShort(0); // Destination reference = 0
        buf.writeShort(0); // Source reference = 0
        buf.writeByte(0); // Class and options = 0
        buf.writeString("Cookie: mstshash=" + userName + "\r\n", RdpConstants.CHARSET_8); // Cookie

        // RDP_NEG_REQ::type
        buf.writeByte(RdpConstants.RDP_NEG_REQ_TYPE_NEG_REQ);
        // RDP_NEG_REQ::flags (0)
        buf.writeByte(RdpConstants.RDP_NEG_REQ_FLAGS);
View Full Code Here


        // Length of combined capabilities + 4 bytes (number of capabilities and
        // padding) (LE)
        header.writeShortLE(buf.length + 4);

        header.writeString(SOURCE_DESC, RdpConstants.CHARSET_8);
        header.writeByte(0);

        // Number of capabilities
        header.writeShortLE(numberCapabilities);
View Full Code Here

        // Length of string in wide characters + two wide \0 (LE)
        buf.writeShortLE(data.length() + 2);

        // Wide string + two wide '\0' characters
        buf.writeString(data + "\0\0", RdpConstants.CHARSET_16);

        // Trim buffer to actual length of data written
        buf.trimAtCursor();

        pushDataToOTOut(buf);
View Full Code Here

        int blocksCursor = BLOCKS_OFFSET;

        ByteBuffer buf = new ByteBuffer(4096);

        // Signature: "NTLMSSP\0"
        buf.writeString(NTLMSSP, RdpConstants.CHARSET_8);
        buf.writeByte(0);

        // NTLM Message Type: NTLMSSP_AUTH (0x00000003)
        buf.writeIntLE(NtlmConstants.NTLMSSP_AUTH);
View Full Code Here

    private ByteBuffer generateNegotiateMessage() {
        ByteBuffer buf = new ByteBuffer(1024);

        // Signature
        buf.writeString("NTLMSSP", RdpConstants.CHARSET_8);
        buf.writeByte(0);

        // Message type
        buf.writeIntLE(NtlmConstants.NEGOTIATE);
View Full Code Here

        // Length of string in wide characters + two wide \0 (LE)
        buf.writeShortLE(data.length() + 2);

        // Wide string + two wide '\0' characters
        buf.writeString(data + "\0\0", RdpConstants.CHARSET_16);

        // Trim buffer to actual length of data written
        buf.trimAtCursor();

        pushDataToOTOut(buf);
View Full Code Here

    private ByteBuffer generateNegotiateMessage() {
        ByteBuffer buf = new ByteBuffer(1024);

        // Signature
        buf.writeString("NTLMSSP", RdpConstants.CHARSET_8);
        buf.writeByte(0);

        // Message type
        buf.writeIntLE(NtlmConstants.NEGOTIATE);
View Full Code Here

        // Length of combined capabilities + 4 bytes (number of capabilities and
        // padding) (LE)
        header.writeShortLE(buf.length + 4);

        header.writeString(SOURCE_DESC, RdpConstants.CHARSET_8);
        header.writeByte(0);

        // Number of capabilities
        header.writeShortLE(numberCapabilities);
View Full Code Here

        int blocksCursor = BLOCKS_OFFSET;

        ByteBuffer buf = new ByteBuffer(4096);

        // Signature: "NTLMSSP\0"
        buf.writeString(NTLMSSP, RdpConstants.CHARSET_8);
        buf.writeByte(0);

        // NTLM Message Type: NTLMSSP_AUTH (0x00000003)
        buf.writeIntLE(NtlmConstants.NTLMSSP_AUTH);
View Full Code Here

        buf.writeByte(X224_TPDU_CONNECTION_REQUEST);

        buf.writeShort(0); // Destination reference = 0
        buf.writeShort(0); // Source reference = 0
        buf.writeByte(0); // Class and options = 0
        buf.writeString("Cookie: mstshash=" + userName + "\r\n", RdpConstants.CHARSET_8); // Cookie

        // RDP_NEG_REQ::type
        buf.writeByte(RdpConstants.RDP_NEG_REQ_TYPE_NEG_REQ);
        // RDP_NEG_REQ::flags (0)
        buf.writeByte(RdpConstants.RDP_NEG_REQ_FLAGS);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.