mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 12:41:29 +00:00
Add a patch to dns.lua from Patrik Karlsson to cope with some mDNS
implementations.
This commit is contained in:
@@ -68,6 +68,12 @@ local function gotAnswer(rPkt)
|
|||||||
-- have we even got answers?
|
-- have we even got answers?
|
||||||
if #rPkt.answers > 0 then
|
if #rPkt.answers > 0 then
|
||||||
|
|
||||||
|
-- some MDNS implementation incorrectly return an empty question section
|
||||||
|
-- if this is the case return true
|
||||||
|
if rPkt.questions[1] == nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
-- are those answers not just cnames?
|
-- are those answers not just cnames?
|
||||||
if rPkt.questions[1].dtype == types.A then
|
if rPkt.questions[1].dtype == types.A then
|
||||||
for _, v in ipairs(rPkt.answers) do
|
for _, v in ipairs(rPkt.answers) do
|
||||||
|
|||||||
Reference in New Issue
Block a user