1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-11 10:19:03 +00:00

RPC protocol parsing workaround for NetApp 5.0

Dump response lists protocols with trailing null byte
This commit is contained in:
nnposter
2020-01-09 22:36:35 +00:00
parent b1d39d00d4
commit c4f7153c22

View File

@@ -719,6 +719,8 @@ Portmap =
local len
len, pos = string.unpack(">I4", data, pos)
pos, protocol = Util.unmarshall_vopaque(len, data, pos)
-- workaround for NetApp 5.0: trim trailing null bytes
protocol = protocol:match("[^\0]*")
len, pos = string.unpack(">I4", data, pos)
pos, addr = Util.unmarshall_vopaque(len, data, pos)
len, pos = string.unpack(">I4", data, pos)