-
Notifications
You must be signed in to change notification settings - Fork 165
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
New Feature: XML-Handler #130
base: master
Are you sure you want to change the base?
Conversation
Offers methods for saving and loading a list of Symbols inclusivly the sessions
Nice work! |
Another question: is this feature similar to the symbol/message pickling ? or does it provide more coverage of the dumpable objects ? |
Could you also change the targeted branch from 'master' to 'next' ?as 'next' is the integration branch ;) |
I added some doc-tests and a little explanation on how to use it. The tests are pretty basic because it is not easy to evaluate if the XML File is ok or not. I did a lot of testing to evaluate my XML-Modul in the past, but this test scripts are not easy portable to the Netzob tests. This is why i cant test with a Symbol with all possible extras e.g: encoding Function, with size and aggregation fields and so on.... So about the feature itself. It is pretty close to the XML Exporter from the Netzob Version 0.4.2. If have not studied the JSON Pickeling in detail but i think the XML Exporter is a bit better in cases of security. If you have any additional questions feel free to contact me. But at this point I dont know how to make my work more practical are easier to understand. But i have some diagrams to show the sturcture if you need this for your documentation |
Thanks for the explanation. It will take a bit more time to review this PR, as it introduces lots of code (even though it is mainly related to XML-save and restore). |
Offers methods for saving and loading a list of Symbols inclusivly the sessions.
This Modul saves and loads a Symbol + all included data. The approach is adapted from the XML-Modul from the Netzob release 0.4.2. For every class involved there are 4 methods:
saveToXML(): Creates a XML-Node and calls XMLProperties()
XMLProperties(): Adds the XML-Attributs to the Node.
loadFromXML(): Creates a Python Object out of the XML Node and calls RestoreFromXML()
RestoreFromXML(): Loads the attributs from the XML Node and provieds it to the loadFromXML() Method