1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 05:01:29 +00:00

Fix parsing salt value for mysql. Fixes #596

This commit is contained in:
dmiller
2016-11-29 22:35:51 +00:00
parent 30f41875d3
commit 636823622c
2 changed files with 5 additions and 1 deletions

View File

@@ -149,7 +149,7 @@ function receiveGreeting( socket )
stdnse.debug2("reserved bytes are not nulls")
end
if response.capabilities & Capabilities.Support41Auth > 0 then
pos, tmp = bin.unpack("A" .. math.max(13, auth_plugin_len - 8), data, pos)
pos, tmp, _ = bin.unpack("A" .. (math.max(13, auth_plugin_len - 8) - 1) .. "x", data, pos)
response.salt = response.salt .. tmp
end
if response.extcapabilities & ExtCapabilities.SupportsAuthPlugins > 0 then