[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Proto api is not working in Lua5.2.3
- From: Thomas Buergel <Thomas.Buergel@...>
- Date: Thu, 11 Sep 2014 10:45:13 +0000
> > Proto = require("proto")
> stdin:1: module 'proto' not found:
> no field package.preload['proto']
> no file 'C:\Users\bimmanue\Downloads\lua-5.2.3_Win32_bin\lua\proto.lua'
> no file 'C:\Users\bimmanue\Downloads\lua-5.2.3_Win32_bin\lua\proto\init.lua'
> no file 'C:\Users\bimmanue\Downloads\lua-5.2.3_Win32_bin\proto.lua'
> no file 'C:\Users\bimmanue\Downloads\lua-5.2.3_Win32_bin\proto\init.lua'
>
> no file '.\proto.lua'
> no file 'C:\Users\bimmanue\Downloads\lua-5.2.3_Win32_bin\proto.dll'
> no file 'C:\Users\bimmanue\Downloads\lua-5.2.3_Win32_bin\loadall.dll'
> no file '.\proto.dll'
> stack traceback:
> [C]: in function 'require'
> stdin:1: in main chunk
> [C]: in ?
> objective : Am adding some lua scripts for customized protocol .
A little more context may be helpful.
My psychic debugging leads me to believe you’re trying to do something with Wireshark’s Lua extension [1].
Lua is used as an extension language, embedded in Wireshark, and the Wireshark host exposes functionality that is not standard Lua, such as for example the "Proto" function you're trying to call. As such, it won't work in a standalone Lua interpreter; rather, you would have to run it inside Wireshark itself.
If you're using the excellent ZeroBraneStudio [2], you can actually debug the Wireshark scripts to a certain extent [3].
Otherwise, I would refer to the Wireshark documentation and help channels.
HTH,
Tom
[1] http://wiki.wireshark.org/Lua
[2] http://studio.zerobrane.com/
[3] http://notebook.kulchenko.com/zerobrane/debugging-wireshark-lua-scripts-with-zerobrane-studio