Parsing ASN.1 in Lua
I'm looking for an ASN.1 parser for Lua, does this exist or can it be done? My knowledge of C is zero hence the preference to use Lua.
I'm looking for an ASN.1 parser for Lua, does this exist or can it be done? My knowledge of C is zero hence the preference to use Lua.
Don't know if it is going to be repetitive, but in such case, I'd suggest to write a parser (in any language you want - I've used MATLAB) from your format to LUA.
Note that there are many tricks that it is advised to use to make it easier/more generic. For example - you are limited to 200 variables. However, there is solution if you need much more - define one global variable and make it "as struct" which contains all the variables. In such way you can have it generic.
Maybe this help you: https://docplayer.net/46582006-Automa...
In Wireshark we have a script that generates a C dissector from an ASN.1 description with help of conformance files and a template. The resulting C code makes use of basic PER or BER helper dissectors. Unfortunately nothing similar exists for LUA. So if you were to write a LUA dissector for your protocol you would have to write it for the serialized data sent on the wire.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2018-10-18 07:42:27 +0000
Seen: 1,931 times
Last updated: Oct 16 '20
how to invert two bytes in lua script dissector ?
Adjusting Bit order and Endianess in LUA between Dissectors
Error while creating a Lua listener in 2.4.2 with filter
http2 decrypted data in tshark lua script
Decode as LUA - how do I do that?
LUA: dissector wide global table
Reuse (part of) a Wireshark Dissector
Which asn1 module?
X.680 module
I meant what is the protocol you want to dissect.
It's proprietary