From 9c7f865b6d92f45c761663cbbc8e696fc5ae4c64 Mon Sep 17 00:00:00 2001 From: Alaeddine Mesbahi Date: Wed, 21 Aug 2024 11:08:03 +0100 Subject: [PATCH] Fix crash in nmap OS crash. --- agent/nmap_agent.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/agent/nmap_agent.py b/agent/nmap_agent.py index e1bcf9bd..799de9a9 100644 --- a/agent/nmap_agent.py +++ b/agent/nmap_agent.py @@ -381,6 +381,13 @@ def _emit_fingerprints( if isinstance(os_match, list): if len(os_match) > 0: os_match_highest = os_match[0] + if ( + isinstance(os_match_highest, list) + and len(os_match_highest) > 0 + ): + os_match_highest = os_match_highest[0] + else: + continue else: continue elif isinstance(os_match, dict):