From 06c7544041acf51c4a8a9808bd8bcdb57b53ab07 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 29 Oct 2019 15:44:46 +0100 Subject: [PATCH] minor fixes --- pandora_console/extensions/quick_shell.php | 2 +- .../extensions/quick_shell/Gotty.class.php | 74 ------------- .../extensions/quick_shell/old_ext.php | 100 ------------------ .../extensions/quick_shell/old_ext1.php | 76 ------------- .../extensions/quick_shell/test.html | 97 ----------------- .../extensions/quick_shell/test.php | 88 --------------- 6 files changed, 1 insertion(+), 436 deletions(-) delete mode 100644 pandora_console/extensions/quick_shell/Gotty.class.php delete mode 100644 pandora_console/extensions/quick_shell/old_ext.php delete mode 100644 pandora_console/extensions/quick_shell/old_ext1.php delete mode 100644 pandora_console/extensions/quick_shell/test.html delete mode 100644 pandora_console/extensions/quick_shell/test.php diff --git a/pandora_console/extensions/quick_shell.php b/pandora_console/extensions/quick_shell.php index 90ee03bae4..d2e1c5b4e6 100644 --- a/pandora_console/extensions/quick_shell.php +++ b/pandora_console/extensions/quick_shell.php @@ -74,7 +74,7 @@ function quickShell() config_update_value('ws_port', 8080); } - if (isset($config['ws_proxy_url']) === false) { + if (empty($config['ws_proxy_url']) === true) { $ws_url = 'http://'.$config['ws_host'].':'.$config['ws_port']; } else { preg_match('/\/\/(.*)/', $config['ws_proxy_url'], $matches); diff --git a/pandora_console/extensions/quick_shell/Gotty.class.php b/pandora_console/extensions/quick_shell/Gotty.class.php deleted file mode 100644 index c5c79730c0..0000000000 --- a/pandora_console/extensions/quick_shell/Gotty.class.php +++ /dev/null @@ -1,74 +0,0 @@ - false, - 'text' => ''.html_print_image('images/groups_small/application_osx_terminal.png', true, ['title' => __('Wetty')]).'', - ]; - - ui_print_page_header(__('Wetty'), 'images/extensions.png', false, '', true, $buttons); - - $row = 0; - - echo '
'; - - $table->width = '100%'; - $table->class = 'databox data'; - $table->data = []; - $table->head = []; - $table->align = []; - // $table->align[3] = 'left'; - $table->style = []; - $table->size = []; - // $table->size[3] = '10%'; - $table->style[0] = 'font-weight: bold'; - - $table->head[0] = __('Wetty Configuration'); - $table->head[1] = __(''); - - $table->data[$row][0] = __('Wetty ip address connection'); - $table->data[$row][1] = html_print_input_text('wetty_ip', $config['wetty_ip'], '', 25, 25, true); - $row++; - - $table->data[$row][0] = __('Wetty port connection'); - $table->data[$row][1] = html_print_input_text('wetty_port', $config['wetty_port'], '', 25, 25, true); - $row++; - - array_push($table->data, $data); - - html_print_table($table); - - echo '
'; - html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"'); - echo '
'; - - echo '
'; - -} - - -extensions_add_godmode_function('confWetty'); - diff --git a/pandora_console/extensions/quick_shell/old_ext1.php b/pandora_console/extensions/quick_shell/old_ext1.php deleted file mode 100644 index a89abe5dea..0000000000 --- a/pandora_console/extensions/quick_shell/old_ext1.php +++ /dev/null @@ -1,76 +0,0 @@ - false, - 'text' => ''.html_print_image('images/setup.png', true, ['title' => __('Wetty settings')]).'', - ]; - - ui_print_page_header(__('Wetty'), 'images/extensions.png', false, '', true, $buttons); - - $table->width = '100%'; - $table->class = 'databox data'; - $table->data = []; - $table->head = []; - $table->align = []; - // $table->align[3] = 'left'; - $table->style = []; - $table->size = []; - // $table->size[3] = '10%'; - $table->style[0] = 'font-weight: bold'; - - $table->head[0] = __('Wetty'); - - // $data[0] = ''; - $data[0] = ''; - - // $data[0] .= '
'; - array_push($table->data, $data); - - html_print_table($table); - -} - - -extensions_add_godmode_menu_option(__('Wetty'), 'AW', 'gextensions', null, 'v1'); -extensions_add_godmode_function('mainWetty'); diff --git a/pandora_console/extensions/quick_shell/test.html b/pandora_console/extensions/quick_shell/test.html deleted file mode 100644 index 9ac3088204..0000000000 --- a/pandora_console/extensions/quick_shell/test.html +++ /dev/null @@ -1,97 +0,0 @@ - - - WebSocket - - - - - -

WebSocket v2.00

-
- - - - - - diff --git a/pandora_console/extensions/quick_shell/test.php b/pandora_console/extensions/quick_shell/test.php deleted file mode 100644 index 8f5b302232..0000000000 --- a/pandora_console/extensions/quick_shell/test.php +++ /dev/null @@ -1,88 +0,0 @@ - - - - - Quick Shell experiment - - - - -

Prueba

-
- - - - -disconnect($user->socket); - } else { - echo ">> me he conectado al otro lado \n"; - echo "Enviando peticiĆ³n HTTP HEAD ...\n"; - - $out .= 'GET ws://'.$host.':'.$port.'/ws HTTP/1.1'."\r\n"; - $out .= 'Host: '.$host.':'.$port."\r\n"; - $out .= 'Connection: Upgrade'."\r\n"; - $out .= 'Upgrade: websocket'."\r\n"; - //$out .= 'Sec-WebSocket-Key: tqIu95AAeKFFlrLTsixBAA=='."\r\n"; - $out .= 'Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits'."\r\n"; - $out .= 'Sec-WebSocket-Protocol: gotty'."\r\n"; - - $out .= '{"Arguments":"","AuthToken":""}'; - - socket_write($socket, $out); - echo "Leyendo respuesta:\n\n"; - while ($out = socket_read($socket, 2048)) { - echo '['.$out.']'; - } - } - - - - // Disconnect. - $out = "GET / HTTP/1.1\r\n"; - $out .= 'Host: '.$host."\r\n"; - $out .= "Connection: Close\r\n\r\n"; - - socket_write($socket, $out); - echo ">> Recibiendo respuesta de peticion de cierre:\n"; - while ($out = socket_read($socket, 2048)) { - echo '['.$out.']'; - } - - socket_close($socket); -*/