mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Adds support for Ed25519 keys to script ssh-hostkey
This commit is contained in:
parent
3961450aad
commit
8bc9473a55
3 changed files with 8 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [NSE] Script ssh-hostkey now recognizes and reports Ed25519 keys [nnposter]
|
||||
|
||||
o [NSE][GH#627] Fixed script hang in several brute scripts due to the "threads"
|
||||
script-arg not being converted to a number. Error message was
|
||||
"nselib/brute.lua:1188: attempt to compare number with string" [Arne Beer]
|
||||
|
|
|
|||
|
|
@ -314,6 +314,9 @@ fetch_host_key = function( host, port, key_type )
|
|||
elseif key_type == 'ecdsa-sha2-nistp521' then
|
||||
algorithm = "ECDSA"
|
||||
bits = "521"
|
||||
elseif key_type == 'ssh-ed25519' then
|
||||
algorithm = "EdDSA"
|
||||
bits = "256"
|
||||
else
|
||||
stdnse.debug1("Unsupported key type: %s", key_type )
|
||||
end
|
||||
|
|
|
|||
|
|
@ -300,6 +300,9 @@ local function portaction(host, port)
|
|||
key = ssh2.fetch_host_key( host, port, "ecdsa-sha2-nistp521" )
|
||||
if key then table.insert( keys, key ) end
|
||||
|
||||
key = ssh2.fetch_host_key( host, port, "ssh-ed25519" )
|
||||
if key then table.insert( keys, key ) end
|
||||
|
||||
if #keys == 0 then
|
||||
return nil
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue