Examples of TSRequest


Examples of rdpclient.ntlmssp.asn1.TSRequest

        ntlmState.negotiateMessage = negoToken.toByteArray(); // Store message for MIC calculation in AUTH message

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

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;
        NegoItem negoItem = new NegoItem("NegoItem");
        negoItem.negoToken.value = negoToken;
        tsRequest.negoTokens.tags = new Tag[] {negoItem};

        tsRequest.writeTag(buf);

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

        pushDataToOTOut(buf);
View Full Code Here

Examples of rdpclient.ntlmssp.asn1.TSRequest

    protected void onStart() {
        super.onStart();

        ByteBuffer buf = new ByteBuffer(4096, true);

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

        pushDataToOTOut(buf);
View Full Code Here

Examples of rdpclient.ntlmssp.asn1.TSRequest

        this.ntlmState = ntlmState;
    }

    @Override
    protected void handleOneTimeData(ByteBuffer buf, Link link) {
        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.readTag(buf);

        ByteBuffer encryptedPubKey = tsRequest.pubKeyAuth.value;
        if (encryptedPubKey == null || encryptedPubKey.length == 0)
            throw new RuntimeException("[" + this
                    + "] ERROR: Unexpected message from RDP server. Expected encrypted server public key but got nothing instead. Data: " + buf);
View Full Code Here

Examples of rdpclient.ntlmssp.asn1.TSRequest

        ByteBuffer messageSignatureAndEncryptedServerPublicKey = generateMessageSignatureAndEncryptedServerPublicKey(ntlmState);

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

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;
        NegoItem negoItem = new NegoItem("NegoItem");
        negoItem.negoToken.value = authenticateMessage;

        tsRequest.negoTokens.tags = new Tag[] {negoItem};

        tsRequest.pubKeyAuth.value = messageSignatureAndEncryptedServerPublicKey;

        tsRequest.writeTag(buf);

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

        pushDataToOTOut(buf);
View Full Code Here

Examples of rdpclient.ntlmssp.asn1.TSRequest

    }

    @Override
    public void dump(ByteBuffer buf) {
        buf.rewindCursor();
        TSRequest request = new TSRequest("TSRequest");
        request.readTag(buf);
        System.out.println("TSRequest version: " + request.version.value);
        System.out.println("TSRequest pubKey: " + request.pubKeyAuth.value.toPlainHexString());

        ByteBuffer negoToken = ((NegoItem)request.negoTokens.tags[0]).negoToken.value;
        System.out.println("TSRequest negotoken: " + negoToken.toPlainHexString());
View Full Code Here

Examples of rdpclient.ntlmssp.asn1.TSRequest

            System.out.println("[" + this + "] INFO: Data received: " + buf + ".");

        // Extract server challenge, extract server flags.

        // Parse TSRequest in BER format
        TSRequest request = new TSRequest("TSRequest");
        request.readTag(buf);

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

        parseNtlmChallenge(negoToken);
View Full Code Here

Examples of rdpclient.ntlmssp.asn1.TSRequest

        ntlmState.negotiateMessage = negoToken.toByteArray(); // Store message for MIC calculation in AUTH message

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

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;
        NegoItem negoItem = new NegoItem("NegoItem");
        negoItem.negoToken.value = negoToken;
        tsRequest.negoTokens.tags = new Tag[] {negoItem};

        tsRequest.writeTag(buf);

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

        pushDataToOTOut(buf);
View Full Code Here

Examples of rdpclient.ntlmssp.asn1.TSRequest

    protected void onStart() {
        super.onStart();

        ByteBuffer buf = new ByteBuffer(4096, true);

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

        pushDataToOTOut(buf);
View Full Code Here

Examples of rdpclient.ntlmssp.asn1.TSRequest

            System.out.println("[" + this + "] INFO: Data received: " + buf + ".");

        // Extract server challenge, extract server flags.

        // Parse TSRequest in BER format
        TSRequest request = new TSRequest("TSRequest");
        request.readTag(buf);

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

        parseNtlmChallenge(negoToken);
View Full Code Here

Examples of rdpclient.ntlmssp.asn1.TSRequest

        ByteBuffer messageSignatureAndEncryptedServerPublicKey = generateMessageSignatureAndEncryptedServerPublicKey(ntlmState);

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

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;
        NegoItem negoItem = new NegoItem("NegoItem");
        negoItem.negoToken.value = authenticateMessage;

        tsRequest.negoTokens.tags = new Tag[] {negoItem};

        tsRequest.pubKeyAuth.value = messageSignatureAndEncryptedServerPublicKey;

        tsRequest.writeTag(buf);

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

        pushDataToOTOut(buf);
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.