Nmap Development mailing list archives

[NSE][PATCH] dns.lua doesn't return any TXT answers with retAll


From: jah <jah () zadkiel plus com>
Date: Mon, 25 Aug 2008 23:26:09 +0100

Hello,

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.

Regards,

jah
--- dns.lua.orig        2008-08-23 19:24:48.375000000 +0100
+++ dns.lua     2008-08-25 23:17:23.734375000 +0100
@@ -251,7 +251,7 @@
       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

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: