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

How to Run protocal #9

Open
Saranya237 opened this issue Apr 21, 2023 · 3 comments
Open

How to Run protocal #9

Saranya237 opened this issue Apr 21, 2023 · 3 comments

Comments

@Saranya237
Copy link

Saranya237 commented Apr 21, 2023

Hi,
After reading your paper about fuzzing protocol states, I'm really interested in your work. Now the tool is built successfully. but i don't know how to run config and mapping. would you please tell me how to use the tool? and how to run protocol? Thank you!

I attached the protocol -> build.xml file run
state.txt

@jderuiter
Copy link
Owner

You will have to start by constructing the mapper component which translates the abstract input messages (fixed strings) received from StateLearner to actual messages that are understood by your protocol implementation, and the other way around from the responses received to abstract messages (strings) that StateLearner can use to construct the model. Optionally the mapper needs to handle the setup and tear down of sessions with the protocol implementation, and it needs to reset the protocol implementation/set up a new session when the string 'RESET' is received.

Once you have this you need to supply the input messages that your mapper supports to StateLearner in a config file. An example for this you can find in https://github.com/jderuiter/statelearner/tree/master/examples/socket

@Saranya237
Copy link
Author

I'm getting this error
what should i do, please help.....

Apr 28, 2023 11:48:19 AM nl.cypherpunk.statelearner.Learner
INFO: Using socket SUL
Apr 28, 2023 11:48:19 AM nl.cypherpunk.statelearner.Learner
INFO: Using socket SUL
Apr 28, 2023 11:48:19 AM nl.cypherpunk.statelearner.Learner learn
INFO: Using learning algorithm ExtensibleLStarMealy
Apr 28, 2023 11:48:19 AM nl.cypherpunk.statelearner.Learner learn
INFO: Using learning algorithm ExtensibleLStarMealy
Apr 28, 2023 11:48:19 AM nl.cypherpunk.statelearner.Learner learn
INFO: Using equivalence algorithm MealyRandomWordsEQOracle
Apr 28, 2023 11:48:19 AM nl.cypherpunk.statelearner.Learner learn
INFO: Using equivalence algorithm MealyRandomWordsEQOracle
Apr 28, 2023 11:48:19 AM nl.cypherpunk.statelearner.Learner learn
INFO: Starting learning
Apr 28, 2023 11:48:19 AM nl.cypherpunk.statelearner.Learner learn
INFO: Starting learning
Apr 28, 2023 11:48:19 AM de.learnlib.logging.LearnLogger logPhase
INFO: Starting round 1
Apr 28, 2023 11:48:19 AM de.learnlib.logging.LearnLogger logPhase
INFO: Starting round 1
Sending symbol: RESET
java.net.SocketException: Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:320)
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:347)
at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:800)
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:270)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:313)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:176)
at java.base/java.io.BufferedReader.fill(BufferedReader.java:162)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:329)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:396)
at nl.cypherpunk.statelearner.socket.SocketSUL.pre(SocketSUL.java:119)
at nl.cypherpunk.statelearner.LogOracle.answerQuerySteps(LogOracle.java:79)
at nl.cypherpunk.statelearner.LogOracle.answerQuery(LogOracle.java:105)
at nl.cypherpunk.statelearner.LogOracle.processQueries(LogOracle.java:123)
at de.learnlib.oracles.CounterOracle.processQueries(CounterOracle.java:66)
at de.learnlib.oracles.CounterOracle.processQueries(CounterOracle.java:66)
at de.learnlib.algorithms.lstargeneric.table.ObservationTable.initialize(ObservationTable.java:185)
at de.learnlib.algorithms.lstargeneric.AbstractLStar.startLearning(AbstractLStar.java:77)
at de.learnlib.algorithms.lstargeneric.AbstractAutomatonLStar.startLearning(AbstractAutomatonLStar.java:185)
at nl.cypherpunk.statelearner.Learner.learn(Learner.java:226)
at nl.cypherpunk.statelearner.Learner.main(Learner.java:355)
Exception in thread "main" java.lang.RuntimeException: java.net.SocketException: Connection reset
at nl.cypherpunk.statelearner.socket.SocketSUL.pre(SocketSUL.java:123)
at nl.cypherpunk.statelearner.LogOracle.answerQuerySteps(LogOracle.java:79)
at nl.cypherpunk.statelearner.LogOracle.answerQuery(LogOracle.java:105)
at nl.cypherpunk.statelearner.LogOracle.processQueries(LogOracle.java:123)
at de.learnlib.oracles.CounterOracle.processQueries(CounterOracle.java:66)
at de.learnlib.oracles.CounterOracle.processQueries(CounterOracle.java:66)
at de.learnlib.algorithms.lstargeneric.table.ObservationTable.initialize(ObservationTable.java:185)
at de.learnlib.algorithms.lstargeneric.AbstractLStar.startLearning(AbstractLStar.java:77)
at de.learnlib.algorithms.lstargeneric.AbstractAutomatonLStar.startLearning(AbstractAutomatonLStar.java:185)
at nl.cypherpunk.statelearner.Learner.learn(Learner.java:226)
at nl.cypherpunk.statelearner.Learner.main(Learner.java:355)
Caused by: java.net.SocketException: Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:320)
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:347)
at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:800)
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:270)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:313)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:176)
at java.base/java.io.BufferedReader.fill(BufferedReader.java:162)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:329)
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:396)
at nl.cypherpunk.statelearner.socket.SocketSUL.pre(SocketSUL.java:119)
... 10 more

@jderuiter
Copy link
Owner

You'll need to provide some more details on what you are exactly doing (what's running, how does your config look like, etc) to be able to provide any sensible feedback

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

No branches or pull requests

2 participants