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

Fix DH parameter extraction in tls.lua (Jacob Gajek)

This commit is contained in:
dmiller
2015-06-17 21:17:43 +00:00
parent 965d06072d
commit ce9eb6b0f3
2 changed files with 5 additions and 4 deletions

View File

@@ -1,7 +1,8 @@
# Nmap Changelog ($Id$); -*-text-*-
o [NSE] Fix Diffie-Hellman parameter extraction in tls.lua. [Jacob Gajek]
o [NSE] Added http-webdav-scan, which detects WebDAV installations. [Gyanendra Mishra]
o [NSE] Remove ahbl.org checks from dnsbl.lua, since the service was shut down.
[Forrest B.]

View File

@@ -690,7 +690,7 @@ local cipher_info_cache = {
-- A couple helpers for server_key_exchange parsing
local function unpack_dhparams (blob, pos)
local p, g, y
pos, p, g, y = bin.unpack(">PPP", blob)
pos, p, g, y = bin.unpack(">PPP", blob, pos)
return pos, {p=p, g=g, y=y}, #p
end
@@ -941,7 +941,7 @@ KEX_ALGORITHMS.DHE_PSK = {
local pos
local ret = {}
pos, ret.psk_identity_hint = bin.unpack(">P", blob)
pos, ret.dhparams, ret.strength = unpack_dhparams(blob)
pos, ret.dhparams, ret.strength = unpack_dhparams(blob, pos)
return ret
end
}
@@ -955,7 +955,7 @@ KEX_ALGORITHMS.ECDHE_PSK={
local pos
local ret = {}
pos, ret.psk_identity_hint = bin.unpack(">P", blob)
pos, ret.ecdhparams, ret.strength = unpack_ecdhparams(blob)
pos, ret.ecdhparams, ret.strength = unpack_ecdhparams(blob, pos)
return ret
end
}