From 1a6b5448d0c8f3ce29bd1a052c0a4a66dcc99891 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 18 Jun 2013 03:44:53 +0000 Subject: [PATCH] Show debug info for every match. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on a patch by Jesper Kückelhahn. http://seclists.org/nmap-dev/2013/q2/347 --- nselib/ike.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nselib/ike.lua b/nselib/ike.lua index ae02ccedf..4f7d6ee41 100644 --- a/nselib/ike.lua +++ b/nselib/ike.lua @@ -238,17 +238,15 @@ local function lookup(vendor_ids) -- if a match is found, check if it's a version detection or attribute if row.category == 'vendor' then + local debug_string = '' + if row.vendor ~= nil then debug_string = debug_string .. row.vendor .. ' ' end + if row.version ~= nil then debug_string = debug_string .. row.version end + stdnse.print_debug(2, "IKE: Fingerprint: %s matches %s", vendor_id, debug_string) -- Only store the first match if info.vendor == nil then -- the fingerprint contains information about the VID info.vendor = row - - local debug_string = '' - if row.vendor ~= nil then debug_string = debug_string .. row.vendor .. ' ' end - if row.version ~= nil then debug_string = debug_string .. row.version end - - stdnse.print_debug(2, "IKE: Fingerprint: %s matches %s", vendor_id, debug_string) end elseif row.category == 'attribute' then