mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Avoid empty script output
This commit is contained in:
@@ -46,7 +46,6 @@ action = function( host, port )
|
||||
stdnse.debug1("Status %s",response['status-line'] or "No Response")
|
||||
if response['status-line'] and response['status-line']:match("200%s+OK") and response['body'] then
|
||||
local body = response['body']:gsub("%%","%%%%")
|
||||
stdnse.debug2("Body %s\n",body)
|
||||
if body:match("([^][\"]+)\">Log") then
|
||||
port.version.name = "hadoop-datanode"
|
||||
port.version.product = "Apache Hadoop"
|
||||
@@ -55,6 +54,8 @@ action = function( host, port )
|
||||
stdnse.debug1("Logs %s",logs)
|
||||
result["Logs"] = logs
|
||||
end
|
||||
end
|
||||
if #result > 0 then
|
||||
return result
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user