I'm trying to setup Wireshark so that I can use the LuaInterface to use some of the classes in the .NET framework. I'm able to get it working running through the Lua command line, but when I try to require "CLRPackage"
in the init.lua
startup script, it doesnt appear to find the required files. I get the following exception when starting Wireshark:
Lua: Error during loading:
C:\Program Files\Wireshark\luascript.lua:25: module 'CLRPackage' not found:
no field package.preload['CLRPackage']
no file '.\CLRPackage.lua'
no file 'C:\Program Files\Wireshark\lua\CLRPackage.lua'
no file 'C:\Program Files\Wireshark\lua\CLRPackage\init.lua'
no file 'C:\Program Files\Wireshark\CLRPackage.lua'
no file 'C:\Program Files\Wireshark\CLRPackage\init.lua'
no file 'C:\Program Files\Lua\5.1\lua\CLRPackage.luac'
no file '.\CLRPackage.dll'
no file '.\CLRPackage51.dll'
no file 'C:\Program Files\Wireshark\CLRPackage.dll'
no file 'C:\Program Files\Wireshark\CLRPackage51.dll'
no file 'C:\Program Files\Wireshark\clibs\CLRPackage.dll'
no file 'C:\Program Files\Wireshark\clibs\CLRPackage51.dll'
no file 'C:\Program Files\Wireshark\loadall.dll'
no file 'C:\Program Files\Wireshark\clibs\loadall.dll'
I've tried setting the package.path
and package.cpath
to match what is set at the command line, but that doesnt seem to help.
package.path = ";.\\?.lua;C:\\Program Files\\Lua\\5.1\\lua\\?.lua;C:\\Program Files\\Lua\\5.1\\lua\\?\\init.lua;C:\\Program Files\\Lua\\5.1\\?.lua;C:\\Program Files\\Lua\\5.1\\?\\init.lua;C:\\Program Files\\Lua\\5.1\\lua\\?.luac;C:\\Program Files\\Lua\\5.1\\lua\\?lua"
package.cpath = package.cpath .. ".\\?.dll;.\\?51.dll;C:\\Program Files\\Lua\\5.1\\?.dll;C:\\Program Files\\Lua\\5.1\\?51.dll;C:\\Program Files\\Lua\\5.1\\clibs\\?.dll;C:\\Program Files\\Lua\\5.1\\clibs\\?51.dll;C:\\Program Files\\Lua\\5.1\\loadall.dll;C:\\Program Files\\Lua\\5.1\\clibs\\loadall.dll;C:\\Program Files\\Lua\\5.1\\clibs\\luanet.dll"
When I do this, I get the following error:
Lua: Error during loading:
error loading module 'luanet' from file
'C:\Program Files\Lua\5.1\clibs\luanet.dll':
The spcecified module could not be found.
This is a strange error since the file definitely exists.
I've installed the Lua package for windows in C:\Program Files\Lua\5.1
.
Has anyone been able to get this working? Any help would be appreciated.
I'm using Wireshark 1.4.4 with Lua 5.1.4