mirror of
https://github.com/nmap/nmap.git
synced 2026-07-11 18:55:08 +00:00
Clarified parsing of the volume list in AFP FPGetSrvrParms
This commit is contained in:
parent
1d72ec21df
commit
03d6fc9201
1 changed files with 2 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue