1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Don't print trailing '=' in ssh hostkey fingerprints (sha256)

This commit is contained in:
dmiller
2019-06-26 03:22:24 +00:00
parent 9aebe62edb
commit 5ab1270cbc

View File

@@ -130,7 +130,7 @@ end
-- @param bits Key size in bits.
fingerprint_base64 = function( fingerprint, hash, algorithm, bits )
fingerprint = base64.enc(fingerprint)
return ("%d %s:%s (%s)"):format( bits, hash, fingerprint, algorithm )
return ("%d %s:%s (%s)"):format( bits, hash, fingerprint:match("[^=]+"), algorithm )
end
--- Format a key fingerprint in Bubble Babble.