mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Fix DNS TXT record parsing
This commit is contained in:
parent
4a4253cc95
commit
9adda8c0f3
2 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue