1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 15:39:03 +00:00

Update some code excerpts in docs/scripting.xml. Make small changes to

scripts/showOwner.nse for the purpose of better presentation. Remove the subtle
bug in the portrule example. We shouldn't put bad examples in print.
This commit is contained in:
david
2008-10-27 17:52:50 +00:00
parent f32ed8acfe
commit 49843daf56
2 changed files with 71 additions and 83 deletions

View File

@@ -22,9 +22,9 @@ portrule = function(host, port)
and port.protocol == "tcp"
and port.state == "open"
then
return true
return true
else
return false
return false
end
end
@@ -44,7 +44,8 @@ action = function(host, port)
try(client_ident:connect(host.ip, 113))
try(client_service:connect(host.ip, port.number))
local localip, localport, remoteip, remoteport = try(client_service:get_info())
local localip, localport, remoteip, remoteport =
try(client_service:get_info())
local request = port.number .. ", " .. localport .. "\n"
@@ -54,7 +55,6 @@ action = function(host, port)
if string.match(owner, "ERROR") then
owner = nil
-- owner = "Service owner could not be determined: " .. owner
else
owner = string.match(owner, "USERID : .+ : (.+)\n", 1)
end
@@ -64,4 +64,3 @@ action = function(host, port)
return owner
end