Merge branch 'ent-10455-15091-plugin-wizard_wmi_module-rompe-la-ejecucion-cuando-la-contrasena-tiene-un' into 'develop'
fixed bug with passwords with rare characters See merge request artica/pandorafms!5545
This commit is contained in:
commit
4435a64727
|
@ -123,7 +123,7 @@ foreach my $op (@operation){
|
||||||
my $wmi_query = 'SELECT ' . $config->{'fieldsList'} . ' FROM ' . $config->{'wmiClass'} . ($config->{'queryFilter'} ? ' WHERE ' . $config->{'queryFilter'} : '');
|
my $wmi_query = 'SELECT ' . $config->{'fieldsList'} . ' FROM ' . $config->{'wmiClass'} . ($config->{'queryFilter'} ? ' WHERE ' . $config->{'queryFilter'} : '');
|
||||||
|
|
||||||
# Build wmic command
|
# Build wmic command
|
||||||
my $wmi_command = $config->{'wmicPath'} . ' -U ' . $config->{'user'} . '%' . $config->{'pass'} . ($config->{'namespace'} ? ' --namespace="' . $config->{'namespace'} . '"' : '') . ' //' . $config->{'host'} . ' "' . $wmi_query . '"';
|
my $wmi_command = $config->{'wmicPath'} . ' -U ' . "'" . $config->{'user'} . '%' . $config->{'pass'} . "'" . ($config->{'namespace'} ? ' --namespace="' . $config->{'namespace'} . '"' : '') . ' //' . $config->{'host'} . ' "' . $wmi_query . '"';
|
||||||
|
|
||||||
# Run wmic and parse output
|
# Run wmic and parse output
|
||||||
my $output = `$wmi_command 2>/dev/null`;
|
my $output = `$wmi_command 2>/dev/null`;
|
||||||
|
@ -173,4 +173,4 @@ foreach my $k (keys %{$fields_values}){
|
||||||
my $result = eval $operation;
|
my $result = eval $operation;
|
||||||
if (defined($result)){
|
if (defined($result)){
|
||||||
print $result . "\n";
|
print $result . "\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue