1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-30 18:19:05 +00:00

Fix a bug: forgot to pass in the protocol version

This commit is contained in:
dmiller
2016-08-31 02:32:25 +00:00
parent 3997b3c196
commit 1bbd6c8e90
3 changed files with 9 additions and 5 deletions

View File

@@ -831,7 +831,7 @@ KEX_ALGORITHMS.RSA_EXPORT = {
local pos
local ret = {rsa={}}
pos, ret.rsa.modulus, ret.rsa.exponent = bin.unpack(">PP", blob)
pos, ret.signed = unpack_signed(blob, pos)
pos, ret.signed = unpack_signed(blob, pos, protocol)
ret.strength = #ret.rsa.modulus
return ret
end
@@ -844,7 +844,7 @@ KEX_ALGORITHMS.DHE_RSA={
local pos
local ret = {}
pos, ret.dhparams, ret.strength = unpack_dhparams(blob)
pos, ret.signed = unpack_signed(blob, pos)
pos, ret.signed = unpack_signed(blob, pos, protocol)
return ret
end
}
@@ -889,7 +889,7 @@ KEX_ALGORITHMS.ECDHE_RSA={
local pos
local ret = {}
pos, ret.ecdhparams, ret.strength = unpack_ecdhparams(blob)
pos, ret.signed = unpack_signed(blob, pos)
pos, ret.signed = unpack_signed(blob, pos, protocol)
return ret
end
}
@@ -968,7 +968,7 @@ KEX_ALGORITHMS.SRP_SHA = {
local pos
local ret = {srp={}}
pos, ret.srp.N, ret.srp.g, ret.srp.s, ret.srp.B = bin.unpack(">PPpP", blob)
pos, ret.signed = unpack_signed(blob, pos)
pos, ret.signed = unpack_signed(blob, pos, protocol)
ret.strength = #ret.srp.N
return ret
end