Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

LUA script how to get all IPs from DNS.A (dns answer)

Hello,

In short, this produces correct result: tshark -r dns_google.pcap -Y dns.a -T fields -e dns.a -e dns.qry.name

result: "172.217.16.46,172.217.20.174,172.217.20.206,216.58.215.78 youtube-ui.l.google.com"

but in case of LUA script (pseudo-code, executed by "tshark -X lua_script:hello.lua -r dns_google.pcap -q -2"), this outputs only first IP:

local dns_test = Field.new("dns.a") print("DNS.A = ", dns_test().value)

result: DNS.A = 172.217.16.46 (rest of IPs missing)

So my question is how to display all DNS.A IPs in LUA? Thanks