From 269a9134bbd5714b138c927321924176fe933653 Mon Sep 17 00:00:00 2001 From: Enrique Martin Date: Tue, 6 Feb 2024 00:09:03 +0100 Subject: [PATCH] Added net scan options to welcome wizard --- .../include/functions_welcome_wizard.php | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_welcome_wizard.php b/pandora_console/include/functions_welcome_wizard.php index b3639bd71a..f2574ce13f 100644 --- a/pandora_console/include/functions_welcome_wizard.php +++ b/pandora_console/include/functions_welcome_wizard.php @@ -483,8 +483,26 @@ function create_net_scan($ip_target, $snmp_version, $snmp_communities, $wmi_cred { global $config; include_once $config['homedir'].'/godmode/wizards/HostDevices.class.php'; + include_once $config['homedir'].'/include/functions_groups.php'; - $id_group = 10; + $group_name = 'AutoDiscovery'; + $id_group = db_get_value('id_grupo', 'tgrupo', 'nombre', io_safe_input($group_name)); + if (!($id_group > 0)) { + $id_group = groups_create_group( + io_safe_input($group_name), + [ + 'icon' => 'applications.png', + 'description' => '', + 'contact' => '', + 'other' => '', + ] + ); + + if (!($id_group > 0)) { + $id_group = 10; + } + } + $auth_strings = []; $default_templates = [