mirror of
https://github.com/nmap/nmap.git
synced 2025-12-30 11:29:01 +00:00
Add TCP support to dns.lua
Slightly modified from patch from John Bond: http://seclists.org/nmap-dev/2014/q1/118
This commit is contained in:
@@ -63,7 +63,7 @@ end
|
||||
action = function(host, port)
|
||||
local result = stdnse.output_table()
|
||||
local flag = false
|
||||
local status, resp = dns.query("id.server", {host = host.ip, dtype='TXT', class=dns.CLASS.CH, retAll=true, retPkt=true, nsid=true, dnssec=true})
|
||||
local status, resp = dns.query("id.server", {host = host.ip, port=port.number, proto=port.protocol, dtype='TXT', class=dns.CLASS.CH, retAll=true, retPkt=true, nsid=true, dnssec=true})
|
||||
if ( status ) then
|
||||
local status, nsid = rr_filter(resp.add,'OPT')
|
||||
if ( status ) then
|
||||
@@ -83,7 +83,7 @@ action = function(host, port)
|
||||
result["id.server"] = id_server
|
||||
end
|
||||
end
|
||||
local status, bind_version = dns.query("version.bind", {host = host.ip, dtype='TXT', class=dns.CLASS.CH})
|
||||
local status, bind_version = dns.query("version.bind", {host = host.ip, port=port.number, proto=port.protocol, dtype='TXT', class=dns.CLASS.CH})
|
||||
if ( status ) then
|
||||
flag = true
|
||||
result["bind.version"] = bind_version
|
||||
|
||||
Reference in New Issue
Block a user