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.
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.
Maybe this help you: https://docplayer.net/46582006-Automa...
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.
To enter a block of code:
Comments
Which asn1 module?
X.680 module
I meant what is the protocol you want to dissect.
It's proprietary