Add support for ECDSA to ssh-hostkey.nse.

Patch by Adam Števko. http://seclists.org/nmap-dev/2012/q4/181
This commit is contained in:
david 2012-10-31 17:57:26 +00:00
parent d5f3fb6745
commit 4c298e6e67
3 changed files with 20 additions and 0 deletions

View file

@ -136,6 +136,15 @@ local function portaction(host, port)
key = ssh2.fetch_host_key( host, port, "ssh-rsa" )
if key then table.insert( keys, key ) end
key = ssh2.fetch_host_key( host, port, "ecdsa-sha2-nistp256" )
if key then table.insert( keys, key ) end
key = ssh2.fetch_host_key( host, port, "ecdsa-sha2-nistp384" )
if key then table.insert( keys, key ) end
key = ssh2.fetch_host_key( host, port, "ecdsa-sha2-nistp521" )
if key then table.insert( keys, key ) end
for _, key in ipairs( keys ) do
add_key_to_registry( host, key )
table.insert(output_tab, {