mirror of
https://github.com/nmap/nmap.git
synced 2026-01-04 13:49:03 +00:00
Make ssh1 and ssh2 fetch_host_key return the same structure
This was indirectly causing the crash reported here: http://seclists.org/nmap-dev/2014/q4/332 ssh1.fetch_host_key now returns a table with the full_key value containing a key as it would be output by ssh-keygen. The previous value named full_key is now named "key".
This commit is contained in:
@@ -107,7 +107,8 @@ fetch_host_key = function(host, port)
|
||||
fp_input = mod:tobin()..exp:tobin()
|
||||
|
||||
return {exp=exp,mod=mod,bits=host_key_bits,key_type='rsa1',fp_input=fp_input,
|
||||
full_key=exp:todec()..' '..mod:todec(),algorithm="RSA1",
|
||||
full_key=('%d %s %s'):format(host_key_bits, exp:todec(), mod:todec()),
|
||||
key=('%s %s'):format(exp:todec(), mod:todec()), algorithm="RSA1",
|
||||
fingerprint=openssl.md5(fp_input)}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user