From e96b7d55fb01952709698ca6b396cf5d51f7f703 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 16 Aug 2012 11:58:40 +0000 Subject: [PATCH] Use key "type" not "algorithm" in ssh-hostkey structured output. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "algorithm" seems to be a mapping computed by our ssh2 library: ssh-rsa → RSA ssh-dss → DSA "type" is just the string "ssh-rsa" or "ssh-dss". "Type" seems to be the terminology used in the ssh-keygen man page. --- scripts/ssh-hostkey.nse | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/ssh-hostkey.nse b/scripts/ssh-hostkey.nse index eb31b5e11..88700b0b8 100644 --- a/scripts/ssh-hostkey.nse +++ b/scripts/ssh-hostkey.nse @@ -64,13 +64,13 @@ The script also includes a postrule that check for duplicate hosts using the gat -- ssh-dss AAAAB3NzaC1kc3MAAACBANraqxAILTygMTgFu/0snrJck8BkhOpBbN61DAZENgeulLMaJdmNFWZpvhLOJVXSqHt2TCrspbMyvpBH4Fnv7Kb+QBAhXyzeCNnOQ7OVBfqNzkfezoFrQJgOQZSEenP6sCVDqcW2j0KVumnYdPU7FGa8SLfNqA+hUOR2HSSluynFAAAAFQDWKNq4PVbpDA7UExE8JSHnWxv4AwAAAIAWEDdNu5mWfTz52IdxELNjsmn5FvKRmnhPqq/PrTkYqAADL5WYazg7POQZ4yI2nqTq++47ONDK87Wke3qbeIhMrV13Mrgf2JuCUSNqrfEmvzZ2l9x3QyZrj+bJRPRuhwYq8rFup01qaANJ0p4WS/7voNbRhh+l57FkJF+XAJRRTAAAAIEAts1Se+u+hV9ZedXopzfXv1I5ZOSONxZanM10wjM2GRWygCYsHqDM315swBPkzhmB73oBesnhDW3bq0dmW3wvk4gzQZ2E2SHhzVGjlgDpjEahlQ+XGpDZsvqqFGGGx8lvKYFUxBR+UkqMRGmjkHw5sK5ydO1n4R3XJ4FfQFqmoyU= -- 1024 -- 18782fd3be7178a38e584b5a83bd60a8 --- DSA +-- ssh-dss -- -- -- ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwVuv2gcr0maaKQ69VVIEv2ob4OxnuI64fkeOnCXD1lUx5tTA+vefXUWEMxgMuA7iX4irJHy2zer0NQ3Z3yJvr5scPgTYIaEOp5Uo/eGFG9Agpk5wE8CoF0e47iCAPHqzlmP2V7aNURLMODb3jVZuI07A2ZRrMGrD8d888E2ORVORv1rYeTYCqcMMoVFmX9l3gWEdk4yx3w5sD8v501Iuyd1v19mPfyhrI5E1E1nl/Xjp5N0/xP2GUBrdkDMxKaxqTPMie/f0dXBUPQQN697a5q+5lBRPhKYOtn6yQKCd9s1Q22nxn72Jmi1RzbMyYJ52FosDT755Qmb46GLrDMaZMQ== -- 2048 -- f058cef4aaa4591c8edd4d0744c82511 --- RSA +-- ssh-rsa --
-- --@xmloutput @@ -82,7 +82,7 @@ The script also includes a postrule that check for duplicate hosts using the gat -- -- 2c2275604bc33b18a2972c967e28dcdd -- 2048 --- RSA +-- ssh-rsa --
-- -- @@ -93,7 +93,7 @@ The script also includes a postrule that check for duplicate hosts using the gat --
-- 60ac4d51b1cd8509121692761d5d276e -- 1024 --- DSA +-- ssh-dss --
-- @@ -139,7 +139,7 @@ local function portaction(host, port) add_key_to_registry( host, key ) table.insert(output_tab, { fingerprint=stdnse.tohex(key.fingerprint), - algorithm=key.algorithm, + type=key.key_type, bits=key.bits, key=key.full_key }) @@ -193,7 +193,7 @@ local function postaction() hostkeys[fp] = {} revmap[fp] = { fingerprint=stdnse.tohex(key.fingerprint,{separator=":"}), - algorithm=key.algorithm, + type=key.key_type, bits=key.bits } end