1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 00:19:01 +00:00

Clarified parsing of the volume list in AFP FPGetSrvrParms

This commit is contained in:
nnposter
2020-08-04 02:16:17 +00:00
parent 1d72ec21df
commit 03d6fc9201

View File

@@ -830,16 +830,12 @@ Proto = {
data = response:getPacketData()
parms.server_time, parms.vol_count, pos = string.unpack(">I4B", data)
-- we should now be at the leading zero preceding the first volume name
-- next is the length of the volume name, move pos there
pos = pos + 1
parms.volumes = {}
for i=1, parms.vol_count do
local volume_name
volume_name, pos = string.unpack("s1", data, pos)
pos = pos + 1
-- pos+1 to skip over the volume bitmap
volume_name, pos = string.unpack("s1", data, pos + 1)
table.insert(parms.volumes, string.format("%s", volume_name) )
end