Hi all, I've been using Wireshark for a while and also building LUA dissectors for some proprietary protocols. Before you can use a dissector, you need to add it to the appropriate dissector table. I would like to use the abilities from Wireshark to represent the contents of a binary file, similar to "ASN.1 Basic Encoding Rules(.)" however I do not know if it is possible to register a dissector for use as file dissector. I can understand that the dissectors are called on packets read, however this would make it very powerfull in some occasions. Thanks and best regards, Sjoerd asked 30 Dec '13, 02:42 sjoerdvandoorn |
2 Answers:
No, that's not possible.
Yes, and that's why a similar project has already been started (TFShark - Terminal FileShark) Maybe you want to take a look at that and probably contribute ideas and/or code. Regards answered 30 Dec '13, 12:58 Kurt Knochner ♦ |
It is possible to register a dissector for the file in Lua, but involves two steps:
I am working on a Zip Archive file dissector for Lua, but you can probably adjust this template to your needs: https://git.lekensteyn.nl/peter/wireshark-notes/commit/?id=bad766a9ef81f7267cdb8e4f82db692a83ba2f9a Examples of usage:
Other examples of a FileHandler can be found in the Wireshark source tree ( answered 21 Dec '16, 02:48 Lekensteyn |