Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run xml workflows, parse error #189

Open
Borgc opened this issue Dec 19, 2024 · 3 comments
Open

Can't run xml workflows, parse error #189

Borgc opened this issue Dec 19, 2024 · 3 comments

Comments

@Borgc
Copy link

Borgc commented Dec 19, 2024

I'm trying to run workflow.xml from readme page.
java -jar TLS-Client.jar -connect localhost:4433 works good:
[main] INFO : DefaultWorkflowExecutor - Workflow executed as planned.
But when I try java -jar TLS-Client.jar -connect localhost:4433 -workflow_input workflow.xml (just copy xml code from readme and created file with nano) I have the following output

:~/TLS-Attacker/apps$ java -jar TLS-Client.jar -connect localhost:4433 -workflow_input workflow.xml
11:06:02 [main] INFO : Delegate - Processing client delegate host=localhost:4433 sniHostname=null
11:06:02 [main] INFO : Reflections - Reflections took 195 ms to scan 8 urls, producing 252 keys and 2148 values
11:06:03 [main] ERROR: TlsClient - Encountered an uncaught Exception aborting. See debug for more info.
jakarta.xml.bind.UnmarshalException

  • with linked exception:
    [com.sun.istack.SAXParseException2; lineNumber: 4; columnNumber: 19; unexpected element (uri:"", local:"messages"). Expected elements are <{}configuredHttpMessages>,<{}result>,<{}configuredQuicFrames>,<{}connectionAlias>,<{}configuredQuicPackets>,<{}configuredRecords>,<{}executed>,<{}configuredSSL2Messages>,<{}actionOptions>,<{}configuredMessages>,<{}configuredDtlsHandshakeMessageFragments>]
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:444)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:378)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:347)
    at de.rub.nds.tlsattacker.core.workflow.WorkflowTraceSerializer.secureRead(WorkflowTraceSerializer.java:254)
    at de.rub.nds.tlsattacker.client.main.TlsClient.main(TlsClient.java:54)
    Caused by: com.sun.istack.SAXParseException2; lineNumber: 4; columnNumber: 19; unexpected element (uri:"", local:"messages"). Expected elements are <{}configuredHttpMessages>,<{}result>,<{}configuredQuicFrames>,<{}connectionAlias>,<{}configuredQuicPackets>,<{}configuredRecords>,<{}executed>,<{}configuredSSL2Messages>,<{}actionOptions>,<{}configuredMessages>,<{}configuredDtlsHandshakeMessageFragments>
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:693)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.reportError(Loader.java:230)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.reportError(Loader.java:225)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:92)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader.childElement(Loader.java:73)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:236)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:527)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:509)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:49)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:217)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:149)
    at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:376)
    ... 3 more
    Caused by: jakarta.xml.bind.UnmarshalException: unexpected element (uri:"", local:"messages"). Expected elements are <{}configuredHttpMessages>,<{}result>,<{}configuredQuicFrames>,<{}connectionAlias>,<{}configuredQuicPackets>,<{}configuredRecords>,<{}executed>,<{}configuredSSL2Messages>,<{}actionOptions>,<{}configuredMessages>,<{}configuredDtlsHandshakeMessageFragments>
    ... 15 more
    Just a beginner in TLSattacker, help me, please
@ic0ns
Copy link
Contributor

ic0ns commented Dec 20, 2024

Hey,
I think the issue is on us. We updated the names of some of the fields and did not update the readme. It should be:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workflowTrace>
    <Send>
        <configuredMessages>
            <ClientHello>
                <extensions>
                    <ECPointFormat/>
                    <HeartbeatExtension/>
                    <EllipticCurves/>
                </extensions>
            </ClientHello>
        </configuredMessages>
    </Send>
    <Receive>
        <expectedMessages>
            <ServerHello>
                <extensions>
                    <ECPointFormat/>
                </extensions>
            </ServerHello>
            <Certificate/>
            <ServerHelloDone/>
        </expectedMessages>
    </Receive>
    <Send>
        <configuredMessages>
            <RSAClientKeyExchange>
                <computations/>
            </RSAClientKeyExchange>
            <ChangeCipherSpec/>
            <Finished/>
        </configuredMessages>
    </Send>
    <Receive>
        <expectedMessages>
            <ChangeCipherSpec/>
            <Finished/>
        </expectedMessages>
    </Receive>
</workflowTrace>

@Borgc
Copy link
Author

Borgc commented Dec 20, 2024

Thanks a lot

@Borgc Borgc closed this as completed Dec 20, 2024
@ic0ns
Copy link
Contributor

ic0ns commented Dec 23, 2024

Reopening this to remind me to update the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants