diff options
-rw-r--r-- | admin/WebConsole/comandos/gestores/gestor_Comandos.php | 5 | ||||
-rw-r--r-- | admin/WebConsole/includes/restfunctions.php | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/admin/WebConsole/comandos/gestores/gestor_Comandos.php b/admin/WebConsole/comandos/gestores/gestor_Comandos.php index 20c262af..943fdac7 100644 --- a/admin/WebConsole/comandos/gestores/gestor_Comandos.php +++ b/admin/WebConsole/comandos/gestores/gestor_Comandos.php @@ -25,6 +25,7 @@ define('OG_CMD_ID_WAKEUP', 1); define('OG_CMD_ID_POWEROFF', 2); define('OG_CMD_ID_REBOOT', 5); define('OG_CMD_ID_HARDWARE', 6); +define('OG_CMD_ID_SOFTWARE', 7); define("OG_CMD_ID_SCRIPT", 8); define('OG_CMD_ID_SESSION', 9); define('OG_CMD_ID_SENDMESSAGE', 16); @@ -139,6 +140,9 @@ switch ($idcomando) { break; case OG_CMD_ID_HARDWARE: hardware($cadenaip); + break; + case OG_CMD_ID_SOFTWARE: + software($cadenaip); } if($ambito==0){ // Ambito restringido a un subconjuto de ordenadores con formato (idordenador1,idordenador2,etc) @@ -200,6 +204,7 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){ $idcomando != OG_CMD_ID_SESSION && $idcomando != OG_CMD_ID_POWEROFF && $idcomando != OG_CMD_ID_HARDWARE && + $idcomando != OG_CMD_ID_SOFTWARE && $idcomando != OG_CMD_ID_REBOOT) { // EnvĂo al servidor $shidra=new SockHidra($servidorhidra,$hidraport); diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index 6e761468..159eab48 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -16,6 +16,7 @@ define('OG_REST_CMD_REBOOT', 'reboot'); define('OG_REST_CMD_STOP', 'stop'); define('OG_REST_CMD_REFRESH', 'refresh'); define('OG_REST_CMD_HARDWARE', 'hardware'); +define('OG_REST_CMD_SOFTWARE', 'software'); define('OG_REST_PARAM_CLIENTS', 'clients'); define('OG_REST_PARAM_ADDR', 'addr'); @@ -193,6 +194,15 @@ function hardware($string_ips) { common_request(OG_REST_CMD_HARDWARE, POST, $data); } +function software($string_ips) { + + $ips = explode(';',$string_ips); + + $data = array(OG_REST_PARAM_CLIENTS => $ips); + + common_request(OG_REST_CMD_SOFTWARE, POST, $data); +} + /* * @function multiRequest. * @param URLs array (may include header and POST data), cURL options array. |