diff --git a/scripts/lua/flow_details.lua b/scripts/lua/flow_details.lua index 916a59e02f38..48e9dc37a04c 100644 --- a/scripts/lua/flow_details.lua +++ b/scripts/lua/flow_details.lua @@ -1699,7 +1699,7 @@ else end historicalProtoHostHref(ifid, flow["cli.ip"], flow["proto.l4"], flow["proto.ndpi_id"], - page_utils.safe_html(flow["protos.dns.last_query"] or '')) + page_utils.safe_html(flow["protos.dns.last_query"] or '')) if (flow["category"] ~= nil) then print(" " .. getCategoryIcon(flow["protos.dns.last_query"], flow["category"])) @@ -1707,6 +1707,16 @@ else printAddCustomHostRule(flow["protos.dns.last_query"]) + if(flow["protos.dns.last_rsp"] ~= nil) then + local ips = split(flow["protos.dns.last_rsp"], ",") + + -- print("

".. i18n("response") ..":

") + end + print("\n") end diff --git a/src/Flow.cpp b/src/Flow.cpp index 4231a2498f8d..f1b30428af70 100644 --- a/src/Flow.cpp +++ b/src/Flow.cpp @@ -7734,9 +7734,11 @@ void Flow::lua_get_dns_info(lua_State *vm) const { lua_push_str_table_entry(vm, "protos.dns.last_query", protos.dns.last_query); + if(protos.dns.last_rsp) + lua_push_str_table_entry(vm, "protos.dns.last_rsp", protos.dns.last_rsp); + if (hasInvalidDNSQueryChars()) - lua_push_bool_table_entry(vm, "protos.dns.invalid_chars_in_query", - true); + lua_push_bool_table_entry(vm, "protos.dns.invalid_chars_in_query", true); } } }