From dc74809a680f84d8c1afffd5e52750c91c2a71ac Mon Sep 17 00:00:00 2001 From: fyodor Date: Tue, 26 Aug 2008 01:01:27 +0000 Subject: [PATCH] Applied patch from Jah: Attached corrects answerFetcher[types.TXT]() in dns.lua which inserts v.data into answers only if v.domain is present - I believe the test should be for v.data. This was preventing TXT answers from being returned from dns.query() with the retAll option. --- nselib/dns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nselib/dns.lua b/nselib/dns.lua index 708167149..b8d340d12 100644 --- a/nselib/dns.lua +++ b/nselib/dns.lua @@ -251,7 +251,7 @@ answerFetcher[types.TXT] = else local answers = {} for _, v in ipairs(dec.answers) do - if v.domain then table.insert(answers, string.sub(v.data, 2)) end + if v.data then table.insert(answers, string.sub(v.data, 2)) end end return answers end