diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-10-30 12:02:20 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-10-30 13:22:05 +0100 |
commit | 15243d40c7eb2e65cfb57499877d9ef8376b521b (patch) | |
tree | a828b5e215a46582968742dc3179b4b129a17171 /admin | |
parent | 940b1c7f5112cf2690568928ad7d0133c53d2981 (diff) |
#915 Fix run script command
This patch fixes run script command as it now uses REST API instead of
SocketHidra.
Diffstat (limited to 'admin')
-rw-r--r-- | admin/WebConsole/comandos/gestores/gestor_Comandos.php | 3 | ||||
-rw-r--r-- | admin/WebConsole/includes/restfunctions.php | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/admin/WebConsole/comandos/gestores/gestor_Comandos.php b/admin/WebConsole/comandos/gestores/gestor_Comandos.php index 7aaba1e5..27b6fab6 100644 --- a/admin/WebConsole/comandos/gestores/gestor_Comandos.php +++ b/admin/WebConsole/comandos/gestores/gestor_Comandos.php @@ -224,6 +224,9 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){ case OG_CMD_ID_SOFTWARE: software($cadenaip, $atributos); break; + case OG_CMD_ID_SCRIPT: + shell(3, $cadenaip, $atributos); + break; } // En agente nuevo devuelvo siempre correcto $resulhidra = 1; diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index f73b1fe0..5461402f 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -107,6 +107,9 @@ function shell($case, $string_ips, $command) { $ips = explode(';',$string_ips); switch ($case) { + case 3: + $command = substr($command, 4); + /* fall through */ case 1: $data = array(OG_REST_PARAM_CLIENTS => $ips, OG_REST_PARAM_RUN => $command); |