mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
fixed bug with passwords with rare characters
This commit is contained in:
parent
09d0415654
commit
1684ff9f98
@ -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…
x
Reference in New Issue
Block a user