From 4e36c3f1b85a83264884434a47a71817041b85d1 Mon Sep 17 00:00:00 2001 From: Calvo Date: Thu, 15 Jun 2023 14:55:54 +0200 Subject: [PATCH] Fix os detection when OS details comes from nmap --- 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 835ae1b82a..cb80b8fd96 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -432,7 +432,7 @@ sub PandoraFMS::Recon::Base::guess_os($$;$) { my $return = `"$self->{pa_config}->{nmap}" -sSU -T5 -F -O --osscan-limit $device 2>$DEVNULL`; return OS_OTHER if ($? != 0); my $str_os; - if ($return =~ /Aggressive OS guesses:(.*?)(?>\(\d+%\),)|^OS details:(.*?)\(.*\)*$/mi) { + if ($return =~ /Aggressive OS guesses:(.*?)(?>\(\d+%\),)|^OS details:(.*?)$/mi) { if(defined($1) && $1 ne "") { $str_os = $1; } else {