I wrote a Dissector by lua and I wrote two modules:"common.lua" and "main.lua". In init.lua file,I use dofile(DATA_DIR.."main.lua"). In main.lua,I use "local common = require("common");". main.lua and common.lua are in the same folder. But when I open wireshark,it's error.This error message:"module 'common' not found: no field package.preload['common'] no file '/usr/local/share/lua/5.2/common.lua' no file '/usr/local/share/lua/5.2/common/init.lua' no file '/usr/local/lib/lua/5.2/common.lua' no file '/usr/local/lib/lua/5.2/common/init.lua' no file './common.lua' no file '/usr/local/lib/lua/5.2/common.so' no file '/usr/local/lib/lua/5.2/loadall.so' no file './common.so'" Is that "require" function can't use in wireshark? What should I do? asked 04 Feb '15, 00:02 fayn |
One Answer:
Have a look at this answer to similar problem https://ask.wireshark.org/questions/38996/unable-to-load-custom-module answered 04 Feb '15, 01:43 izopizo |