Cannot locate the init.lua file

2.6k views Asked by At

I'm currently working with Wireshark installed in CentOs and I want to use Lua to do some automated packet analysis.

As mentioned in this I tried to run tshark -X lua_script:hello.lua to see if I get Hello World!. But since I did not then I checked the tshark whether it does not have lua linked with it by using tshark -v command. I got the result and part of it said that 'without lua'. So I assume that wireshark is not linked with lua.

Then as mentioned in this link I tried to change the value of "disable_lua" but I tried to find the init.lua file but I cannot find this file in the system.

Can anyone tell where is this file is located and is it really a problem with the tshark not been linked with lua?

3

There are 3 answers

2
Yu Hao On BEST ANSWER

If your Wireshark is not built with Lua, you can't bet Lua support. You can install a new version.

When installing from source on Linux, run ./configure --help to see the options, one of them are:

--with-lua[=DIR]        use liblua (located in directory DIR, if supplied)
                        for the Lua scripting plugin [default=yes, if
                        available]

Make sure to enable this.

0
Paul Kulchenko On

I have a recent version of wireshark for Windows (1.12.0; the latest one is 1.12.2) and it shows "with Lua 5.2" and includes init.lua in the same folder as wireshark itself.

It seems like the wireshark you have is not linked with Lua. You can check if there is a different package available or build it from the source.

0
robert On

If you're on Redhat/Centos you'll need to install the wireshark-devel package as well as base wireshark.

yum install -y wireshark-devel