Package streamer

Examples of streamer.ByteBuffer.writeByte()


    }

    private void sendChannelRequest(int channel) {
        ByteBuffer buf = new ByteBuffer(5, true);

        buf.writeByte(0x38); // Channel Join request

        buf.writeShort(state.serverUserChannelId - 1001); // ChannelJoinRequest::initiator: 1004
        buf.writeShort(channel);

        pushDataToOTOut(buf);
View Full Code Here


            throw new RuntimeException("Packet is too long: " + buf + ".");

        ByteBuffer data = new ByteBuffer(6);

        // FastPath, 1 event, no checksum, not encrypted
        data.writeByte(0x4);

        // Length of full packet, including length field, in network order.
        // Topmost bit of first byte indicates that field has 2 bytes
        data.writeShort((1 + 2 + buf.length) | 0x8000);
        data.trimAtCursor();
View Full Code Here

        // Length of packet
        ByteBuffer buf = new ByteBuffer(1024, true);

        // MCS Send Data Request PDU
        buf.writeByte(0x64);

        // Initiator: 0x03 + 1001 = 1004
        buf.writeShort(3);

        // Channel ID: 1003
View Full Code Here

        // Channel ID: 1003
        buf.writeShort(1003);

        // Data priority: high, segmentation: begin | end (0x40 | 0x20 | 0x10 = 0x70)
        buf.writeByte(0x70);

        // User data length: (variable length field)
        int length = 224 + userName.length + password.length + alternateShell.length + domain.length + workingDir.length + clientAddress.length + clientDir.length;
        buf.writeShort(length | 0x8000);
View Full Code Here

        // eventHeader (1 byte): An 8-bit, unsigned integer. The format of this
        // field is the same as the eventHeader byte field described in section
        // 2.2.8.1.2.2. The eventCode bitfield (3 bits in size) MUST be set to
        // FASTPATH_INPUT_EVENT_SCANCODE (0). The eventFlags bitfield (5 bits in
        // size) contains flags describing the keyboard event.
        outBuf.writeByte((scanCode >> 8) | (FASTPATH_INPUT_EVENT_SCANCODE << 5) | ((order.pressed) ? 0 : FASTPATH_INPUT_KBDFLAGS_RELEASE));

        // keyCode (1 byte): An 8-bit, unsigned integer. The scancode of the key
        // which triggered the event.
        outBuf.writeByte(scanCode);
View Full Code Here

        // size) contains flags describing the keyboard event.
        outBuf.writeByte((scanCode >> 8) | (FASTPATH_INPUT_EVENT_SCANCODE << 5) | ((order.pressed) ? 0 : FASTPATH_INPUT_KBDFLAGS_RELEASE));

        // keyCode (1 byte): An 8-bit, unsigned integer. The scancode of the key
        // which triggered the event.
        outBuf.writeByte(scanCode);

        // Push buffer to one pad only, so it can be modified without copying of
        // data
        pushDataToPad(STDOUT, outBuf);
    }
View Full Code Here

        ByteBuffer outBuf = new ByteBuffer(7, true);

        // eventHeader (1 byte): An 8-bit, unsigned integer. EventCode bitfield (top
        // 3 bits) MUST be set to FASTPATH_INPUT_EVENT_MOUSE (1). The
        // eventFlags bitfield (low 5 bits) MUST be zeroed out.
        outBuf.writeByte(FASTPATH_INPUT_EVENT_MOUSE << 5);

        // pointerFlags (2 bytes): A 16-bit, unsigned integer.
        outBuf.writeShortLE(getPointerFlags(order));

        // xPos (2 bytes): A 16-bit, unsigned integer. The x-coordinate of the
View Full Code Here

        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);

        // Although the protocol allows authentication to succeed if the client
View Full Code Here

    public byte[] ntlm_compute_ntlm_v2_response() {
        ByteBuffer buf = new ByteBuffer(4096);

        byte[] ntlm_v2_hash = ntlm_compute_ntlm_v2_hash();

        buf.writeByte(0x1); // RespType
        buf.writeByte(0x1); // HighRespType
        buf.writeShort(0); // reserved
        buf.writeInt(0); // reserved
        buf.writeBytes(clientChallengeTimestamp); // Timestamp, 8 bytes
        buf.writeBytes(clientChallenge); // Client nonce, 8 bytes
View Full Code Here

        ByteBuffer buf = new ByteBuffer(4096);

        byte[] ntlm_v2_hash = ntlm_compute_ntlm_v2_hash();

        buf.writeByte(0x1); // RespType
        buf.writeByte(0x1); // HighRespType
        buf.writeShort(0); // reserved
        buf.writeInt(0); // reserved
        buf.writeBytes(clientChallengeTimestamp); // Timestamp, 8 bytes
        buf.writeBytes(clientChallenge); // Client nonce, 8 bytes
        buf.writeInt(0); // reserved
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.