mirror of
https://github.com/nmap/nmap.git
synced 2025-12-31 03:49:01 +00:00
Fix DNS TXT record parsing
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [NSE] Fixed DNS TXT record parsing which caused asn-query to fail in Nmap
|
||||
7.80 and later. [David Fifield, Mike Pattrick]
|
||||
|
||||
Nmap 7.94 [2023-05-19]
|
||||
|
||||
o Zenmap and Ndiff now use Python 3! Thanks to the many contributors who made
|
||||
|
||||
@@ -1160,9 +1160,8 @@ decoder[types.PTR] = decDomain
|
||||
decoder[types.TXT] =
|
||||
function (entry, data, pos)
|
||||
|
||||
local len = entry.data:len()
|
||||
local np = pos - #entry.data
|
||||
local txt_len
|
||||
local len = #entry.data
|
||||
local np = pos - len
|
||||
local txt
|
||||
|
||||
if len > 0 then
|
||||
@@ -1170,7 +1169,7 @@ function (entry, data, pos)
|
||||
entry.TXT.text = {}
|
||||
end
|
||||
|
||||
while np < len do
|
||||
while np < pos do
|
||||
txt, np = string.unpack("s1", data, np)
|
||||
table.insert( entry.TXT.text, txt )
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user