ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-users: Re: [Wireshark-users] lua starter (tshark -X is not working)

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 11 Feb 2015 00:34:21 -0800
On Feb 11, 2015, at 12:18 AM, sothy shan <sothy.e98@xxxxxxxxx> wrote:

> when I do
> 
> $tshark -v
> TShark 1.8.10 (SVN Rev Unknown from unknown)
> Copyright 1998-2013 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Compiled (64-bit) with GLib 2.28.8, with libpcap, ... without Lua, ...
> 
> I got the above.

Well, there's your answer.

Your version of Wireshark, including TShark, was not built with support for Lua, so it cannot and will not run *any* Lua scripts.

If you want to run a Lua script, you will need to get a version of Wireshark that *is* built with Lua.

> Built using gcc 4.4.7 20120313 (Red Hat 4.4.7-9).

So are you running some flavor of Red Hat Linux or Fedora?

And are you using the version of Wireshark that was packaged with the system?  If so, you might have to build Wireshark from source to get a version that includes Lua.
 
> In my machine, I dont have wireshark GUI, have
> tshark. Therefore, there is no init.lua file in my machine.

Unless whoever packaged Wireshark did a bad job, it's irrelevant whether you have the Wireshark GUI or not - init.lua should, at least if Wireshark was built with Lua support, include init.lua.

But even if you *did* have init.lua, it would make no difference - the problem is that there's no Lua interpreter in your version of TShark, so it couldn't do anything with init.lua if it were there.