[ZeroBrane Studio] Re: error loading module 'socket.core'

  • From: "Steve Russell" <steve.russell@xxxxxxxxxxxxxxxxxxxxx>
  • To: <zerobrane@xxxxxxxxxxxxx>
  • Date: Wed, 10 Sep 2014 13:47:26 +0100

Hi,

I had already tried that too, same error.

I've since setup a clean Windows XP machine, installed the latest Wireshark and 
ZB to attempt the documented Wireshark debug by executing the instructions in 
the ldbg.bat file:

C:\Program Files\Wireshark>"C:\Program Files\Wireshark\ldbg.bat"
C:\Program Files\Wireshark>set ZBS=C:\ZeroBraneStudio
C:\Program Files\Wireshark>set 
LUA_PATH=.\?.lua;C:\ZeroBraneStudio\lualibs/?/?.lua;C:\ZeroBraneStudio\lualibs/?.lua
C:\Program Files\Wireshark>set 
LUA_CPATH=C:\ZeroBraneStudio\bin/?.dll;C:\ZeroBraneStudio\bin/clibs/?.dll
C:\Program Files\Wireshark>tshark -X lua_script:test.lua

Then tshark crashes.

If I rename the lua51.dll in the ZB\bin folder & run the script I get a 
dialogue box from tshark complaining that lua51.dll can't be found so I am 
presuming Wireshark was built against Lua 5.1.  If I force the 5.2 libs I get 
this:

C:\Program Files\Wireshark>"C:\Program Files\Wireshark\ldbg.bat"
C:\Program Files\Wireshark>set ZBS=C:\ZeroBraneStudio
C:\Program Files\Wireshark>set 
LUA_PATH=.\?.lua;C:\ZeroBraneStudio\lualibs/?/?.lua;C:\ZeroBraneStudio\lualibs/?.lua
C:\Program Files\Wireshark>set 
LUA_CPATH=C:\ZeroBraneStudio\bin/?.dll;C:\ZeroBraneStudio\bin/clibs52/?.dll
C:\Program Files\Wireshark>tshark -X lua_script:test.lua
tshark: Lua: Error during loading:
 C:\ZeroBraneStudio\lualibs/mobdebug/mobdebug.lua:139: bad argument #1 to 
'pairs' (table expected, got function)
Capturing on 'Local Area Connection 2'

There must be a step I'm missing somewhere to get this working.

Regards,
Steve

-----Original Message-----
From: zerobrane-bounce@xxxxxxxxxxxxx [mailto:zerobrane-bounce@xxxxxxxxxxxxx] On 
Behalf Of Paul K
Sent: 09 September 2014 18:30
To: zerobrane@xxxxxxxxxxxxx
Subject: [ZeroBrane Studio] Re: error loading module 'socket.core'

Hi Steve,

> ZBS=C:\Program Files (x86)\ZeroBrane
> LUA_CPATH=C:\Program Files (x86)\ZeroBrane/bin/?.dll;C:\Program Files 
> (x86)\ZeroBrane/bin/clibs/?.dll

> I get:
> Failed to load file : error loading module ‘socket.core’ from file 
> “C:\Program Files (x86)\ZeroBrane/bin/clibs/socket\core.dll”:The specified 
> module could not be found.

I think you are loading Lua 5.1 modules to use with Lua 5.2 and this is causing 
the error you see. Try changing LUA_CPATH to C:\Program Files 
(x86)\ZeroBrane/bin/?.dll;C:\Program Files (x86)\ZeroBrane/bin/clibs52/?.dll 
(note using clibs52 instead of clibs).

If that fixes the issue for you, I'll update the documentation...

Paul.


Other related posts: