Add pandora_agent_exec.exe to the win32 agent.

This commit is contained in:
Ramon Novoa 2022-10-20 12:41:10 +02:00
parent 9f12b09fbf
commit 3e73a52df1
2 changed files with 13 additions and 8 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b6c28a6b03b3c10f17f016d30539b5a7e704f86a76af26bfcb343358d325857
size 4780527

View File

@ -449,22 +449,22 @@ sub cleanup_old_commands {
}
################################################################################
# Executes a command using defined timeout.
# Executes a command.
################################################################################
sub execute_command_timeout {
my ($self, $cmd, $timeout) = @_;
my ($self, $cmd, $std_files, $timeout) = @_;
if (!defined($timeout)
|| !looks_like_number($timeout)
|| $timeout <= 0
) {
`$cmd`;
`($cmd) $std_files`;
} elsif ($^O eq 'MSWin32') {
`pandora_agent_exec.exe $timeout $cmd`;
`(pandora_agent_exec.exe $timeout $cmd) $std_files`;
} else {
`pandora_agent_exec $timeout $cmd`;
`(pandora_agent_exec $timeout $cmd) $std_files`;
}
return $?>>8;
}
@ -490,7 +490,8 @@ sub execute_command_block {
do {
$err_level = $self->execute_command_timeout(
"($commands) $std_files",
$commands,
$std_files,
$timeout
);
@ -506,7 +507,8 @@ sub execute_command_block {
do {
$err_level = $self->execute_command_timeout(
"($comm) $std_files",
$comm,
$std_files,
$timeout
);