From 62c0d503e1e9c533865fd93a53bfc85cd397463e Mon Sep 17 00:00:00 2001 From: alejandro Date: Tue, 27 Jun 2023 18:06:37 +0200 Subject: [PATCH 1/2] fix in plugin for parse valors --- pandora_server/util/plugin/wizard_wmi_module.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_server/util/plugin/wizard_wmi_module.pl b/pandora_server/util/plugin/wizard_wmi_module.pl index 7d999fd024..ae41e8758b 100755 --- a/pandora_server/util/plugin/wizard_wmi_module.pl +++ b/pandora_server/util/plugin/wizard_wmi_module.pl @@ -130,9 +130,9 @@ my $output = `$wmi_command 2>/dev/null`; my @data = split("\n", $output); -if ($data[0] ne 'CLASS: ' . $config->{'wmiClass'}){ - print $output; - exit 1; +if (index($data[0], 'CLASS: ' . $config->{'wmiClass'}) != 0) { + print $output; + exit 1; } # Parse fields positions From dc6e676c1db6be145515bdec36dec0b47ecadffe Mon Sep 17 00:00:00 2001 From: alejandro Date: Tue, 27 Jun 2023 18:19:28 +0200 Subject: [PATCH 2/2] change path file to pandorawmic --- pandora_server/util/plugin/wizard_wmi_module.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_server/util/plugin/wizard_wmi_module.pl b/pandora_server/util/plugin/wizard_wmi_module.pl index ae41e8758b..23e49a7f83 100755 --- a/pandora_server/util/plugin/wizard_wmi_module.pl +++ b/pandora_server/util/plugin/wizard_wmi_module.pl @@ -30,7 +30,7 @@ Get the result of an arithmetic operation using distinct fields in a WMI query ( Usage: $0 [-wmicPath ""] -host "" [-namespace ""] -user "" -pass "" -wmiClass "" -fieldsList "" [-queryFilter ""] -operation "" --wmicPath Path to wmic command (Default: /usr/bin/wmic) +-wmicPath Path to pandorawmic command (Default: /usr/bin/pandorawmic) -host Target host -namespace WMI namespace @@ -84,7 +84,7 @@ if ($Param{Help}){ my $config; # General parameters -$config->{'wmicPath'} = $Param{wmicPath} || '/usr/bin/wmic'; +$config->{'wmicPath'} = $Param{wmicPath} || '/usr/bin/pandorawmic'; $config->{'host'} = $Param{host} || ''; $config->{'namespace'} = $Param{namespace} || ''; $config->{'user'} = $Param{user} || '';