Ask Your Question
0

Parsing ASN.1 in Lua

asked 2018-10-18 07:42:27 +0000

marty84 gravatar image

updated 2019-01-30 17:24:09 +0000

cmaynard gravatar image

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.

edit retag flag offensive close merge delete

Comments

Which asn1 module?

Anders gravatar imageAnders ( 2018-10-18 15:25:32 +0000 )edit

X.680 module

marty84 gravatar imagemarty84 ( 2018-10-18 21:14:47 +0000 )edit

I meant what is the protocol you want to dissect.

Anders gravatar imageAnders ( 2018-10-19 07:42:47 +0000 )edit

It's proprietary

marty84 gravatar imagemarty84 ( 2018-10-21 07:05:31 +0000 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2020-10-16 14:55:10 +0000

BMWE gravatar image

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.

edit flag offensive delete link more
0

answered 2019-07-29 14:34:14 +0000

wborkowsk gravatar image
edit flag offensive delete link more
0

answered 2018-10-21 18:10:56 +0000

Anders gravatar image

updated 2018-10-22 06:38:17 +0000

Jaap gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-10-18 07:42:27 +0000

Seen: 1,877 times

Last updated: Oct 16 '20