mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Applied the following patch from Chris Woodbury to make ms-sql-info run less
often: http://seclists.org/nmap-dev/2011/q1/1102 [Patrik]
This commit is contained in:
parent
4ea062b1e3
commit
c7af8736a7
1 changed files with 11 additions and 1 deletions
|
|
@ -115,7 +115,17 @@ hostrule = function(host)
|
|||
if ( mssql.Helper.WasDiscoveryPerformed( host ) ) then
|
||||
return mssql.Helper.GetDiscoveredInstances( host ) ~= nil
|
||||
else
|
||||
return true
|
||||
local sqlDefaultPort = nmap.get_port_state( host, {number = 1433, protocol = "tcp"} )
|
||||
local sqlBrowserPort = nmap.get_port_state( host, {number = 1434, protocol = "udp"} )
|
||||
-- smb.get_port() will return nil if no SMB port was scanned OR if SMB ports were scanned but none was open
|
||||
local smbPortNumber = smb.get_port( host )
|
||||
|
||||
if ( (stdnse.get_script_args( {"mssql.instance-all", "mssql.instance-name", "mssql.instance-port"} ) ~= nil) or
|
||||
(sqlBrowserPort and sqlBrowserPort.state ~= "closed") or
|
||||
(sqlDefaultPort and sqlDefaultPort.state ~= "closed") or
|
||||
(smbPortNumber ~= nil) ) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue