1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix a crash in rpc-grind when scanning a non-RPC service

This commit is contained in:
dmiller
2024-06-03 19:00:29 +00:00
parent 296d8bd1e7
commit 929a29d310

View File

@@ -103,6 +103,7 @@ local isRPC = function(host, port)
-- If we got response, set port to open -- If we got response, set port to open
nmap.set_port_state(host, port, "open") nmap.set_port_state(host, port, "open")
if #data >= 8 then
rxid, msgtype = string.unpack(">I4 I4", data) rxid, msgtype = string.unpack(">I4 I4", data)
-- If response XID does match request XID -- If response XID does match request XID
-- and message type equals 1 (REPLY) then -- and message type equals 1 (REPLY) then
@@ -112,6 +113,7 @@ local isRPC = function(host, port)
end end
end end
end end
end
stdnse.debug1("RPC checking function response data is not RPC.") stdnse.debug1("RPC checking function response data is not RPC.")
end end