From e77657a1219a443b3679086729144c5df40a9d3a Mon Sep 17 00:00:00 2001 From: Calvo Date: Tue, 23 May 2023 17:56:41 +0200 Subject: [PATCH] Fix nmap os detection with OS details --- pandora_server/lib/PandoraFMS/DiscoveryServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index f17d2c5363..a556334ee0 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -433,7 +433,7 @@ sub PandoraFMS::Recon::Base::guess_os($$;$) { return OS_OTHER if ($? != 0); my $str_os; if ($return =~ /Aggressive OS guesses:\s*(.*)|OS details:\s(.*)/) { - if($1 ne "") { + if(defined($1) && $1 ne "") { $str_os = $1; } else { $str_os = $2;