1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 13:49:03 +00:00

Fix endianness in unpacking IP addresses, since ipOps.fromdword is fixed. Fixes #750

This commit is contained in:
dmiller
2017-03-13 14:58:57 +00:00
parent 3e3f600b8a
commit 2091ce3199
17 changed files with 42 additions and 44 deletions

View File

@@ -341,7 +341,7 @@ ResponseParser = {
local function DecodeAddress(data, pos)
local COMM_TYPES = { [5] = "udp", [6] = "tcp" }
local comm_type, port, ip, _
pos, comm_type, _, _, _, port, ip = bin.unpack(">CCISS<I", data, pos)
pos, comm_type, _, _, _, port, ip = bin.unpack(">CCISSI", data, pos)
return pos, { port = port, ip = ipOps.fromdword(ip),
proto = COMM_TYPES[comm_type] or "unknown" }