This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

how to load 3rd party module into my lua script

0

Hello, I am beginning Lua scripting in general and for Wireshark dissectors in specific. I am trying to write a basic script that reads an xml file that contains some values of fields in my packets. For this I require two modules(LuaXml and Bit), Bit is for some binary operations. I would like to know how to use these modules with Wireshark? I tried to use the LuaForWindows tool but it supports Lua 5.1 and my Wireshark version comes with Lua5.2 I tried to copy the dll file for LuaXml(downloaded directly from their website) to my Wireshark directory and it seems to work fine. But for the Bit module, I had to build the dll file myself using MSVC10 but then Wireshark crashes without any error(the typical Windows crash). I would like to know the proper way of integrating 3rd party modules into my Wireshark script.

Thanks a lot in advance

asked 09 Apr '15, 02:20

Amine%20Ahd's gravatar image

Amine Ahd
6114
accept rate: 33%


One Answer:

0

I found another alternative that might help anyone in the future. instead of using a C library, I have found a pure Lua library that solved my problem. I had just to copy the .lua files inside the lua/ directory in Wireshark and require the library in my script.

answered 09 Apr '15, 04:28

Amine%20Ahd's gravatar image

Amine Ahd
6114
accept rate: 33%

If suppose the information in xml file i want to validate using xsd schema then is there any possibility in lua to validate xml file or xsd schema. means Is lua provies any kind of API which validate xsd scema???

(10 Apr '15, 22:59) ankit