0

I'm about to write a dissector for Wireshark in Lua but wanted to test a simple hello world first. But how do know it is running? Can I see the debug print somewhere? This is the script:

-- hello.lua
print("Hello World!")

I run Wireshark 0.99.7 on Windows.

norq
  • 1,404
  • 2
  • 18
  • 35
  • 2
    Any particular reason to use such an old version of Wireshark? The current version is [1.6.3](http://www.wireshark.org/download.html). –  Nov 15 '11 at 00:41
  • Yeah, unfortunately I only have a binary dll, locked to version 0.99.7, that dissect the package that encapsulates the package I am interested in. – norq Nov 15 '11 at 08:37

2 Answers2

5

There's a note on the wireshark Lua page saying:

Please note: On Windows, you may not see any output when running Lua scripts in Wireshark. If the console window is enabled it will be opened after the lua engine is loaded. This does not affect TShark, since it is a console program.

Maybe that's what you're seeing (or not for that matter).

For later use, you'll probably be using wiresharks Lua API functions like these functions

jpjacobs
  • 9,359
  • 36
  • 45
  • 2
    Great link. I used 'report_failure("Hello World!")' and run Wireshak with -X lua_script:hello.lua and I got a popup. – norq Nov 14 '11 at 14:30
3

You can use debug(). If lua is working, you should see it in the console, which can be found in tools->lua->console.

weeska
  • 439
  • 3
  • 7