Tried to run a simple lua script in tshark, the socket connection worked fine but sending data caused the crash.
Here is the simple lua script (called te.lua),
local host, port = "127.0.0.1", 80
local socket = require("socket")
local tcp = assert(socket.tcp())
tcp:connect(host, port);
–note the newline below
io.write("sending…\n");
tcp:send("GET / HTTP/1.1\r\n\r\n");
io.write("finished sending…\n");
Here is the command line
tshark -Xlua_script:te.lua -r /0000.pcap tcp.port == 0
Using a debugger, here is the stack trace
#0 0x00007fffec4287fc in timeout_markstart ()
from /usr/local/lib/lua/5.2/socket/core.so
#1 0x00007fffec428b49 in buffer_meth_send ()
from /usr/local/lib/lua/5.2/socket/core.so
#2 0x00007ffff268c61d in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0
#3 0x00007ffff26979b4 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0
#4 0x00007ffff268c989 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0
#5 0x00007ffff268bfac in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0
#6 0x00007ffff268cbc1 in ?? () from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0
#7 0x00007ffff2688c9d in lua_pcallk ()
from /usr/lib/x86_64-linux-gnu/liblua5.2.so.0
#8 0x00007ffff5837293 in ?? ()
from /usr/lib/x86_64-linux-gnu/libwireshark.so.3
#9 0x00007ffff5837b80 in ?? ()
from /usr/lib/x86_64-linux-gnu/libwireshark.so.3
#10 0x00000000004097be in ?? ()
#11 0x00007ffff28d3f45 in __libc_start_main (main=0x409500, argc=7,
argv=0x7fffffffde98, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffde88) at libc-start.c:287
#12 0x000000000040c1d3 in _start ()
I am using tshark 1.10.6 on ubuntu 14.04 (64bit).
Any ideas?
Thanks
asked 12 Nov ‘16, 09:48
sharkfun
26●5●5●9
accept rate: 0%
Thanks for the idea, I tried 2.0.0 and don't see the crash. However, it doesn't seem to make the TCP connection though. Any ideas?
Sorry, I've got no ideas about why the TCP connection wouldn't work in the newer version.