LearnLib harness to infer every FTP state model via Active Learning.
Before running the learner, you need to edit the config.properties. Here you find a typical setup:
-
ip: 127.0.0.1
[ip target]
-
port: 2200
[server port]
-
commands: USER ubuntu,NOOP,PWD,TYPE,PORT,CDUP,CWD,RETR,ABOR,DELE,PASS ubuntu,REST,SIZE,MKD,RMD,STOR,SYST,APPE,RNFR,RNTO,OPTS,AUTH,PBSZ,PROT,SITE [list of commands, separated by a comma] NB:You don't have to add the QUIT command
-
debug: true
[the default value is false]
-
timing_info: true
[if enabled, the learner will add the cost -- in terms of seconds -- for every transition]
-
Via jar file:
- java -jar ftpLearner.jar
-
via Eclipse:
- File -> Open Project from File System
- Select the project
- Run it
If you enable the debug mode, you can see every request and response:
The inferred state model is saved in a .dot file:
If you want to merge all the clouds into a single edge labelled with "others/{list of response codes}", you can run the script simplify_model.py
python3 simplify_model.py <input_file> <output_file>
to obtain something like this:
Implementation | Inferred | Number of states |
---|---|---|
Light FTP | Yes | 5 |
bftpd | Yes | 8 |
pure-ftp | Yes | 5 |
ProFTPd | Yes | 7 |