1
0
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:
dmiller
2018-02-21 03:10:27 +00:00
parent 01e7430797
commit 370825918a
5 changed files with 9 additions and 6 deletions

View File

@@ -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