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

How do I use wxLua from Wireshark in Windows?

0

Could you please provide some detailed instruction on "This is where you would do any fancy GUI stuff with Wireshark's GUI calls or with, e.g., wxWidgets (via wxLua) or Qt (via lqt)."? How do I use wxLua for example? I tried to copy wx.dll from wxLua installer to the Program Files\Wireshark library, but Wireshark crashed as soon as I tried to evaluate 'require "wx"' in the lua console.

asked 24 Oct '12, 02:33

cserby's gravatar image

cserby
1111
accept rate: 0%

converted 24 Oct '12, 21:15

helloworld's gravatar image

helloworld
3.1k42041


One Answer:

1

The crash is probably occurring because you copied lua51.dll from the wxLua distribution to %PROGRAMFILES%\Wireshark. You need to use the same Lua binary from Wireshark.

These steps work for me:

  1. Download wxLua 2.18.2 binaries
  2. Extract and copy wx.dll to %PROGRAMFILES%\Wireshark.
  3. IMPORTANT: Copy %PROGRAMFILES%\Wireshark\liblua5.1.dll to %PROGRAMFILES%\Wireshark\lua51.dll. You need the both binaries in the same directory (one used by Wireshark; the other by wxLua). Do not copy lua51.dll from the wxLua distribution.
  4. Open Wireshark.
  5. Go to menu: Tools > Lua > Evaluate.
  6. In the Evaluate Lua window, copy and paste the text from dialog.wx.lua.
  7. Click Evaluate button.

You should see something like this:

alt text

answered 24 Oct '12, 21:21

helloworld's gravatar image

helloworld
3.1k42041
accept rate: 28%

When I followed above steps and tried to Evaluate simple require("wx") It is giving me error like this

"Lua : Error During execurion of dialog callback: error loading module 'wx' from file C:\Program Files\wireshark\wx.dll: %1 isnot a valid Win32 application"

Can you do something with this error???

(18 Mar '15, 02:17) ankit

That type of error is sometimes due to a 32\64 bit mismatch. Are you sure that Wireshark and wxLua are the same architecture?

(18 Mar '15, 03:40) grahamb ♦