mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 12:19:02 +00:00
Use CRLF, not just LF, in auth-owners.nse. Send CRLF in the request and
strip it from the response. Previously only LF was stripped from the response so each user name had a CR at the end of it (invisible in the terminal).
This commit is contained in:
@@ -19,6 +19,7 @@ Attempts to find the owner of an open TCP port by querying an auth
|
|||||||
-- 5666/tcp open unknown
|
-- 5666/tcp open unknown
|
||||||
-- |_ auth-owners: root
|
-- |_ auth-owners: root
|
||||||
|
|
||||||
|
-- The protocol is documented in RFC 1413.
|
||||||
|
|
||||||
author = "Diman Todorov <diman.todorov@gmail.com>"
|
author = "Diman Todorov <diman.todorov@gmail.com>"
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ action = function(host, port)
|
|||||||
local localip, localport, remoteip, remoteport =
|
local localip, localport, remoteip, remoteport =
|
||||||
try(client_service:get_info())
|
try(client_service:get_info())
|
||||||
|
|
||||||
local request = port.number .. ", " .. localport .. "\n"
|
local request = port.number .. ", " .. localport .. "\r\n"
|
||||||
|
|
||||||
try(client_ident:send(request))
|
try(client_ident:send(request))
|
||||||
|
|
||||||
@@ -64,7 +65,7 @@ action = function(host, port)
|
|||||||
if string.match(owner, "ERROR") then
|
if string.match(owner, "ERROR") then
|
||||||
owner = nil
|
owner = nil
|
||||||
else
|
else
|
||||||
owner = string.match(owner, "USERID : .+ : (.+)\n", 1)
|
owner = string.match(owner, "USERID : .+ : (.-)\r?\n", 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
try(client_ident:close())
|
try(client_ident:close())
|
||||||
|
|||||||
Reference in New Issue
Block a user