Package streamer

Examples of streamer.ByteBuffer.unref()


                System.out.println("AV Target Name: " + data.readString(length, RdpConstants.CHARSET_16));
                break;
            default:
                System.out.println("Unknown NTLM target info attribute: " + type + ". Data: " + data + ".");
            }
            data.unref();
        }

    }
}
View Full Code Here


        //*DEBUG*/writeAVPair(buf, MSV_AV_EOL, "");
        //*DEBUG*/writeAVPair(buf, MSV_AV_EOL, "");
        buf.trimAtCursor();

        authenticateTargetInfo = buf.toByteArray();
        buf.unref();

        return authenticateTargetInfo;
    }

    public void testConstructAuthenticateTargetInfo() {
View Full Code Here

        buf.writeBytes(clientChallenge); // Client nonce, 8 bytes
        buf.writeInt(0); // reserved
        buf.writeBytes(authenticateTargetInfo); // Target Info block
        buf.trimAtCursor();
        byte[] bufBytes = buf.toByteArray();
        buf.unref();

        ntProofStr2 = computeNtProofStr(ntlm_v2_hash, CryptoAlgos.concatenationOf(serverChallenge, bufBytes));

        ntChallengeResponse = CryptoAlgos.concatenationOf(ntProofStr2, bufBytes);
View Full Code Here

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;

        ByteBuffer tsCredentialsBuf = generateTSCredentials();
        tsRequest.authInfo.value = encryptTSCredentials(tsCredentialsBuf);
        tsCredentialsBuf.unref();

        tsRequest.writeTag(buf);

        // Trim buffer to actual length of data written
        buf.trimAtCursor();
View Full Code Here

        //* DEBUG */System.out.println("TSPasswordCreds:\n" + tsPasswordCredsBuf.dump());

        tsCredentials.credentials.value = tsPasswordCredsBuf;

        tsCredentials.writeTag(buf);
        tsPasswordCredsBuf.unref();

        // Trim buffer to actual length of data written
        buf.trimAtCursor();
        //* DEBUG */System.out.println("TSCredentials:\n" + buf.dump());

View Full Code Here

                    if (actualLength < 0) {
                        if (verbose)
                            System.out.println("[" + this + "] INFO: End of stream.");

                        buf.unref();
                        closeStream();
                        sendEventToAllPads(Event.STREAM_CLOSE, Direction.OUT);
                        return;
                    }
View Full Code Here

                    if (actualLength == 0) {
                        if (verbose)
                            System.out.println("[" + this + "] INFO: Empty buffer is read from stream.");

                        buf.unref();
                        return;
                    }

                    buf.length = actualLength;
View Full Code Here

        ByteBuffer negoToken = ((NegoItem)request.negoTokens.tags[0]).negoToken.value;
        ntlmState.challengeMessage = negoToken.toByteArray(); // Store message for MIC calculation in AUTH message

        parseNtlmChallenge(negoToken);

        negoToken.unref();
        buf.unref();
        switchOff();
    }

    public void parseNtlmChallenge(ByteBuffer buf) {
View Full Code Here

        // ServerChallenge
        ByteBuffer challenge = buf.readBytes(8);
        ntlmState.serverChallenge = challenge.toByteArray();
        if (verbose)
            System.out.println("[" + this + "] INFO: Server challenge: " + challenge + ".");
        challenge.unref();

        // Reserved/context
        buf.skipBytes(8);

        // TargetInfo
View Full Code Here

        // Store raw target info block for Type3 message
        ntlmState.serverTargetInfo = targetInfo.toByteArray();

        // Parse target info block
        parseTargetInfo(targetInfo);
        targetInfo.unref();

        // OS Version, NTLM revision, 8 bytes, Optional. Ignore it.

        // Ignore rest of buffer with allocated blocks
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.