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

My Lua dissector isn’t finding the CRC32 module

0

Hi, I have a .lua file. Can I get please instructions how to add it the wireshark and decode my message correctly (I have wireshark with version 1.8.6)?

I added it to my personal plugins folder and this is the message code every time I launch the program.

Lua: Error during loading:
 [string "C:\Users\morton.sherwood\AppData\Roaming\Wi..."]:7: module 'CRC32' not found:
    no field package.preload['CRC32']
    no file '.\CRC32.lua'
    no file 'C:\Program Files (x86)\Wireshark\lua\CRC32.lua'
    no file 'C:\Program Files (x86)\Wireshark\lua\CRC32\init.lua'
    no file 'C:\Program Files (x86)\Wireshark\CRC32.lua'
    no file 'C:\Program Files (x86)\Wireshark\CRC32\init.lua'
    no file '.\CRC32.dll'
    no file '.\CRC3251.dll'
    no file 'C:\Program Files (x86)\Wireshark\CRC32.dll'
    no file 'C:\Program Files (x86)\Wireshark\CRC3251.dll'
    no file 'C:\Program Files (x86)\Wireshark\clibs\CRC32.dll'
    no file 'C:\Program Files (x86)\Wireshark\clibs\CRC3251.dll'
    no file 'C:\Program Files (x86)\Wireshark\loadall.dll'
    no file 'C:\Program Files (x86)\Wireshark\clibs\loadall.dll'

Thank you

asked 07 Aug '13, 14:43

morton's gravatar image

morton
11335
accept rate: 0%

edited 08 Aug '13, 00:27

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196

Could you please show some or all of the Lua code for your dissector? Make sure what code is included is the code that's trying to use "CRC32".

(07 Aug '13, 18:58) Guy Harris ♦♦

Hi, I cannot show all the code, but I have this line:

require('CRC32')

this is the only line I have in my code which refernce to CRC32.

Thank you

(07 Aug '13, 23:30) morton

One Answer:

1

require('CRC32')

As the documentation for require says, it loads the module with the name passed to it as an argument. This means that you will need to have a CRC32 module available; either you don't have it available, in which case you will have to add it to your Lua installation, or it's not in one of the directories in which it's searching, in which case you will somehow have to configure Lua to search for it where it's loaded.

answered 08 Aug '13, 00:26

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

Thank you It solves my problem

(09 Aug '13, 02:50) morton

If a supplied answer resolves your question can you please "accept" it by clicking the checkmark icon next to it. This highlights good answers for the benefit of subsequent users with the same or similar questions.

(09 Aug '13, 05:09) Kurt Knochner ♦