From 80dd68b8d88cbc89e584941e9ba68e57247d2230 Mon Sep 17 00:00:00 2001 From: nnposter Date: Fri, 20 Nov 2026 20:10:55 +0000 Subject: [PATCH] Avoid postaction crash when ssh-hostkey execution was forced --- 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 864abb114..1cbc2d4ff 100644 --- a/scripts/ssh-hostkey.nse +++ b/scripts/ssh-hostkey.nse @@ -377,7 +377,7 @@ local function postaction() local revmap = {} -- create a reverse mapping key_fingerprint -> host(s) - for ip, keys in pairs(nmap.registry.sshhostkey) do + for ip, keys in pairs(nmap.registry.sshhostkey or {}) do for _, key in ipairs(keys) do local fp = ssh1.fingerprint_hex(key.fingerprint, key.algorithm, key.bits) if not hostkeys[fp] then