I am using wireshark/tshark 1.10.6 on ubuntu 12.04. When trying to run
I don't see the "hello.lua" got executed (which should print "hello"). Yes, I have set the /usr/share/wireshark/init.lua to have
The strange thing is, when I run tshark with strace, I don’t see it attempted to open init.lua at all. Any idea why? Thanks! EDIT 1 Thanks to Hadriel who pointed out my error in writing. I updated the problem statement EDIT 2 I am not running it as root, just want to run a lua script using tshark with an input pcap file.
asked 10 Feb ‘15, 11:12 sharkfun edited 10 Feb ‘15, 20:49 |
2 Answers:
OK, so the problem is the version info says "without Lua", which means support for Lua wasn't compiled into tshark/wireshark when it was built for your platform. Therefore it won't load Did Wireshark come with Ubuntu, or did you get it from an RPM installer (i.e., apt-get/yum/whatever)? answered 10 Feb '15, 22:18 Hadriel |
There should be a space between the "
Setting " Also, verify Lua is actually compiled into Wireshark, by running " answered 10 Feb '15, 11:20 Hadriel Thank you Hadriel. Updated my question. (10 Feb '15, 11:27) sharkfun At the top of your init.lua, put this line:
Then see if that gets printed out, to see if init.lua is loaded. Also, can you paste the output of " (10 Feb '15, 11:43) Hadriel Oh, and you're not running tshark with root privileges are you? Wireshark disables Lua by default in such cases. You have to edit the (10 Feb '15, 11:47) Hadriel Updated based on what you requested. I ran it as a normal user. Updated the original question. Thanks Hadriel! (10 Feb '15, 20:50) sharkfun |
Thanks Hadriel!