From d38b46e75c822b26984d20f405b76185335e5054 Mon Sep 17 00:00:00 2001 From: dmiller Date: Fri, 6 Feb 2015 19:50:24 +0000 Subject: [PATCH] ssh-hostkey: don't print output if no keys found --- scripts/ssh-hostkey.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ssh-hostkey.nse b/scripts/ssh-hostkey.nse index a6ab2b021..6b1e9279b 100644 --- a/scripts/ssh-hostkey.nse +++ b/scripts/ssh-hostkey.nse @@ -289,7 +289,7 @@ local function portaction(host, port) key = ssh2.fetch_host_key( host, port, "ecdsa-sha2-nistp521" ) if key then table.insert( keys, key ) end - if #keys < 0 then + if #keys == 0 then return nil end