From 79df76d612801d447b0b36033c1f786d5e76b883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Mon, 29 Apr 2024 16:09:49 -0600 Subject: [PATCH 1/3] Fix Palo Alto frimeware script --- pandora_console/extras/mr/69.sql | 2 ++ pandora_console/pandoradb_data.sql | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_console/extras/mr/69.sql b/pandora_console/extras/mr/69.sql index 3252223c15..4d134315c4 100644 --- a/pandora_console/extras/mr/69.sql +++ b/pandora_console/extras/mr/69.sql @@ -7771,5 +7771,7 @@ UPDATE `tdiscovery_apps` SET `version` = '1.5' WHERE `short_name` = 'pandorafms. DELETE FROM tevent_response WHERE name = 'Create incident from event'; UPDATE tconfig_os SET `name` = 'Web Server' WHERE `id_os` = 12; +UPDATE `tncm_script` SET content='set cli pager off \n capture:show system info | match app-version:\n sleep:1 exit \n' +WHERE id=24; COMMIT; \ No newline at end of file diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 8a1135b4b2..0204f374d9 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -2568,7 +2568,7 @@ INSERT INTO `tncm_script` VALUES (21,0,'sleep:1 exit\n'), (22,1,'set cli pager off \n capture:show config running\n exit\n'), (23,2,'set cli terminal width 500\n set cli scripting-mode on\n configure\n _applyconfigbackup_\n commit\n'), - (24,3,'set cli pager off \n capture:show system info | match app-version:\n sleep:1 expect:app-version:\s* exit \n'), + (24,3,'set cli pager off \n capture:show system info | match app-version:\n sleep:1 exit \n'), (25,4,'tftp import software from _TFTP_SERVER_IP_ file _FIRMWARE_NAME_\n request system software install version\n reboot\n exit\n'), (26,5,''), (27,7,'set cli pager off \n capture:show system info | match app-version:\n sleep:1 expect:app-version:\s* exit \n'), From 20f63042a70c3f69bc8177ff0331f936471303d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Tue, 30 Apr 2024 08:29:29 -0600 Subject: [PATCH 2/3] Remove line break in get frimeware --- pandora_console/extras/mr/69.sql | 6 ++++++ pandora_console/pandoradb_data.sql | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pandora_console/extras/mr/69.sql b/pandora_console/extras/mr/69.sql index 4d134315c4..7f65ac500a 100644 --- a/pandora_console/extras/mr/69.sql +++ b/pandora_console/extras/mr/69.sql @@ -7774,4 +7774,10 @@ UPDATE tconfig_os SET `name` = 'Web Server' WHERE `id_os` = 12; UPDATE `tncm_script` SET content='set cli pager off \n capture:show system info | match app-version:\n sleep:1 exit \n' WHERE id=24; +UPDATE `tncm_script` SET content='expect:root@% cli\n expect:root> capture:show version|match Junos:\n quit\n expect:root@% exit\n' +WHERE id=17; + +UPDATE `tncm_script` SET content='expect:root@% cli\n expect:root> capture:show version|match Junos:\n quit\n expect:root@% exit\n' +WHERE id=20; + COMMIT; \ No newline at end of file diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 0204f374d9..9a42bd3cfb 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -2561,10 +2561,10 @@ INSERT INTO `tncm_script` VALUES (14,0,'expect:root@% cli\n exit\n'), (15,1,'expect:root@% cli\n expect:root> capture:show configuration | no-more\n capture:\n quit\n expect:root@% exit\n'), (16,2,'expect:root@% cli\n expect:root> configure\n load override terminal\n _applyconfigbackup_\n commit\n exit\n'), - (17,3,'expect:root@% cli\n expect:root> capture:show version|match Junos:\n capture: \n quit\n expect:root@% exit\n'), + (17,3,'expect:root@% cli\n expect:root> capture:show version|match Junos:\n quit\n expect:root@% exit\n'), (18,4,'expect:root@% cli\n expect:root> save software from tftp _TFTP_SERVER_IP_ _FIRMWARE_NAME_ to flash\n reset\n exit\n'), (19,5,''), - (20,7,'expect:root@% cli\n expect:root> capture:show version|match Junos:\n capture: \n quit\n expect:root@% exit\n'), + (20,7,'expect:root@% cli\n expect:root> capture:show version|match Junos:\n quit\n expect:root@% exit\n'), (21,0,'sleep:1 exit\n'), (22,1,'set cli pager off \n capture:show config running\n exit\n'), (23,2,'set cli terminal width 500\n set cli scripting-mode on\n configure\n _applyconfigbackup_\n commit\n'), From f54c68b5c2021073c5e6edb5edad166d76d8eab3 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 10 May 2024 14:37:25 +0200 Subject: [PATCH 3/3] fix mr update for content pandora_enterprise#13231 --- pandora_console/extras/mr/69.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/extras/mr/69.sql b/pandora_console/extras/mr/69.sql index 7f65ac500a..17eb91fa1c 100644 --- a/pandora_console/extras/mr/69.sql +++ b/pandora_console/extras/mr/69.sql @@ -7771,13 +7771,13 @@ UPDATE `tdiscovery_apps` SET `version` = '1.5' WHERE `short_name` = 'pandorafms. DELETE FROM tevent_response WHERE name = 'Create incident from event'; UPDATE tconfig_os SET `name` = 'Web Server' WHERE `id_os` = 12; -UPDATE `tncm_script` SET content='set cli pager off \n capture:show system info | match app-version:\n sleep:1 exit \n' -WHERE id=24; +UPDATE `tncm_script` SET `content` ='set cli pager off \n capture:show system info | match app-version:\n sleep:1 exit \n' +WHERE `content`='set cli pager off \n capture:show system info | match app-version:\n sleep:1 expect:app-version:\s* exit \n'; -UPDATE `tncm_script` SET content='expect:root@% cli\n expect:root> capture:show version|match Junos:\n quit\n expect:root@% exit\n' -WHERE id=17; +UPDATE `tncm_script` SET `content` ='expect:root@% cli\n expect:root> capture:show version|match Junos:\n quit\n expect:root@% exit\n' +WHERE `content`= 'expect:root@% cli\n expect:root> capture:show version|match Junos:\n capture: \n quit\n expect:root@% exit\n'; -UPDATE `tncm_script` SET content='expect:root@% cli\n expect:root> capture:show version|match Junos:\n quit\n expect:root@% exit\n' -WHERE id=20; +UPDATE `tncm_script` SET `content` ='expect:root@% cli\n expect:root> capture:show version|match Junos:\n quit\n expect:root@% exit\n' +WHERE `content`='expect:root@% cli\n expect:root> capture:show version|match Junos:\n capture: \n quit\n expect:root@% exit\n'; COMMIT; \ No newline at end of file