Nmap Development mailing list archives

No results from asn-query.nse


From: Mike Pattrick <mkp () redhat com>
Date: Sun, 4 Jun 2023 18:40:24 -0400

Restore TXT record decoding in nselib.dns
---
 nselib/dns.lua | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/nselib/dns.lua b/nselib/dns.lua
index ba00d0aec..c32e741fe 100644
--- a/nselib/dns.lua
+++ b/nselib/dns.lua
@@ -1169,8 +1169,10 @@ function (entry, data, pos)
     entry.TXT.text = {}
   end
 
-  while np < len do
-    txt, np = string.unpack("s1", data, np)
+  while len > 0 do
+    txt_len, np = string.unpack(">B", data, np)
+    txt, np = string.unpack("c" .. txt_len, data, np)
+    len = len - txt_len - 1
     table.insert( entry.TXT.text, txt )
   end
 
-- 
2.31.1

_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at https://seclists.org/nmap-dev/


Current thread: