diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 7e20f019d7..62c403a812 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,22 @@ +2011-07-01 Ramon Novoa + + * pandoradb.sql, + pandoradb.postgreSQL.sql, + pandoradb.oracle.sql, + extras/pandoradb_migrate_v3.2_to_v4.0.sql, + godmode/servers/manage_recontask.php, + godmode/servers/manage_recontask_form.php: Changes needed by the + improved Recon Server. + +2011-06-29 Ramon Novoa + + * include/functions_events.php: Do not update validated events. + +2011-06-29 Ramon Novoa + + * operation/events/events_list.php, + operation/events/events.php: Improved event behaviour. + 2011-06-30 Juan Manuel Ramon * include/styles/dialog.css @@ -42,6 +61,7 @@ general/pandora_help.php general/logon_ok.php: Css style improvements. +>>>>>>> .r4506 2011-06-28 Juan Manuel Ramon * include/styles/pandora.css diff --git a/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql b/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql index a7fcfcc278..d7c59fe9d8 100644 --- a/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql +++ b/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql @@ -188,3 +188,13 @@ ALTER TABLE `tagente_modulo` ADD INDEX module(id_modulo); -- ----------------------------------------------------- ALTER TABLE `tevento` ADD COLUMN (`tags` text NOT NULL); + +-- ----------------------------------------------------- +-- Table `trecon_task` +-- ----------------------------------------------------- + +ALTER TABLE `trecon_task` ADD COLUMN (`os_detect` tinyint(1) unsigned default '0'); +ALTER TABLE `trecon_task` ADD COLUMN (`resolve_names` tinyint(1) unsigned default '0'); +ALTER TABLE `trecon_task` ADD COLUMN (`parent_detection` tinyint(1) unsigned default '0'); +ALTER TABLE `trecon_task` ADD COLUMN (`parent_recursion` tinyint(1) unsigned default '0'); + diff --git a/pandora_console/godmode/servers/manage_recontask.php b/pandora_console/godmode/servers/manage_recontask.php index 792fcbcdfa..620334cd54 100644 --- a/pandora_console/godmode/servers/manage_recontask.php +++ b/pandora_console/godmode/servers/manage_recontask.php @@ -72,7 +72,10 @@ if ((isset ($_GET["update"])) OR ((isset ($_GET["create"])))) { $id_recon_script = 'NULL'; else $id_network_profile = 0; - + $os_detect = (int) get_parameter ("os_detect", 0); + $resolve_names = (int) get_parameter ("resolve_names", 0); + $parent_detection = (int) get_parameter ("parent_detection", 0); + $parent_recursion = (int) get_parameter ("parent_recursion", 1); } // -------------------------------- @@ -98,6 +101,10 @@ if (isset($_GET["update"])) { 'field2' => $field2, 'field3' => $field3, 'field4' => $field4, + 'os_detect' => $os_detect, + 'resolve_names' => $resolve_names, + 'parent_detection' => $parent_detection, + 'parent_recursion' => $parent_recursion ); $where = array('id_rt' => $id); @@ -141,7 +148,12 @@ if (isset($_GET["create"])) { 'field1' => $field1, 'field2' => $field2, 'field3' => $field3, - 'field4' => $field4); + 'field4' => $field4, + 'os_detect' => $os_detect, + 'resolve_names' => $resolve_names, + 'parent_detection' => $parent_detection, + 'parent_recursion' => $parent_recursion + ); if ($name != "") { if (($id_recon_script == 0) && preg_match("/[0-9]+.+[0-9]+.+[0-9]+.+[0-9]+\/+[0-9]/", $network)) diff --git a/pandora_console/godmode/servers/manage_recontask_form.php b/pandora_console/godmode/servers/manage_recontask_form.php index 32f28a42ee..4f7570a40a 100644 --- a/pandora_console/godmode/servers/manage_recontask_form.php +++ b/pandora_console/godmode/servers/manage_recontask_form.php @@ -50,7 +50,12 @@ if (isset ($_GET["update"])) { // Edit mode $mode = "network_sweep"; else $mode = "recon_script"; - + $os_detect = $row["os_detect"]; + $resolve_names = $row["resolve_names"]; + $os_detect = $row["os_detect"]; + $resolve_names = $row["resolve_names"]; + $parent_detection = $row["parent_detection"]; + $parent_recursion = $row["parent_recursion"]; } elseif (isset ($_GET["create"])) { $id_rt = -1; $name = ""; @@ -61,7 +66,7 @@ if (isset ($_GET["update"])) { // Edit mode $id_group = 0; $create_incident = 1; $snmp_community = "public"; - $id_network_profile = 1; + $id_network_profile = 0; $id_os = -1; // Any $recon_ports = ""; // Any $field1 = ""; @@ -70,6 +75,10 @@ if (isset ($_GET["update"])) { // Edit mode $field4 = ""; $id_recon_script = 0; $mode = "network_sweep"; + $os_detect = 0; + $resolve_names = 0; + $parent_detection = 0; + $parent_recursion = 1; } // Headers @@ -134,7 +143,7 @@ $table->data[4][1] = html_print_select ($values, "interval", $interval, '', '', // Module template $table->data[5][0] = "".__('Module template'); $table->data[5][1] = html_print_select_from_sql ('SELECT id_np, name FROM tnetwork_profile', - "id_network_profile", $id_network_profile, '', '', '', true); + "id_network_profile", $id_network_profile, '', __('None'), 0, true); // Recon script $table->data[6][0] = "".__('Recon script'); @@ -187,6 +196,21 @@ $table->data[15][1] = html_print_input_text ('field4', $field4, '', 40, 0, true $table->data[16][0] = "".__('Comments'); $table->data[16][1] = html_print_input_text ('description', $description, '', 45, 0, true); +// OS detection +$table->data[17][0] = "".__('OS detection'); +$table->data[17][1] = html_print_checkbox ('os_detect', 1, $os_detect, true); + +// Name resolution +$table->data[18][0] = "".__('Name resolution'); +$table->data[18][1] = html_print_checkbox ('resolve_names', 1, $resolve_names, true); + +// Parent detection +$table->data[19][0] = "".__('Parent detection'); +$table->data[19][1] = html_print_checkbox ('parent_detection', 1, $parent_detection, true); + +// Parent recursion +$table->data[20][0] = "".__('Parent recursion'); +$table->data[20][1] = html_print_input_text ('parent_recursion', $parent_recursion, '', 1, 0, true); // Different Form url if it's a create or if it's a update form echo '
'; diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index d0eb4693bf..d35804f892 100644 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -703,7 +703,11 @@ CREATE TABLE trecon_task ( field1 VARCHAR2(250) default '', field2 VARCHAR2(250) default '', field3 VARCHAR2(250) default '', - field4 VARCHAR2(250) default '' + field4 VARCHAR2(250) default '', + os_detect NUMBER(5, 0) default 1 NOT NULL, + resolve_names NUMBER(5, 0) default 1 NOT NULL, + parent_detection NUMBER(5, 0) default 1 NOT NULL, + parent_recursion NUMBER(5, 0) default 1 NOT NULL ); CREATE INDEX trecon_task_id_rec_serv_idx ON trecon_task(id_recon_server); diff --git a/pandora_console/pandoradb.postgreSQL.sql b/pandora_console/pandoradb.postgreSQL.sql index 07f7e42614..a9e2795685 100644 --- a/pandora_console/pandoradb.postgreSQL.sql +++ b/pandora_console/pandoradb.postgreSQL.sql @@ -567,7 +567,11 @@ CREATE TABLE "trecon_task" ( "field1" varchar(250) NOT NULL default '', "field2" varchar(250) NOT NULL default '', "field3" varchar(250) NOT NULL default '', - "field4" varchar(250) NOT NULL default '' + "field4" varchar(250) NOT NULL default '', + "os_detect" SMALLINT NOT NULL default 1, + "resolve_names" SMALLINT NOT NULL default 1, + "parent_detection" SMALLINT NOT NULL default 1, + "parent_recursion" SMALLINT NOT NULL default 1 ); CREATE INDEX "trecon_task_id_recon_server_idx" ON "trecon_task"("id_recon_server"); diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 91e47143df..1c49b65dc1 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -619,6 +619,10 @@ CREATE TABLE IF NOT EXISTS `trecon_task` ( `field2` varchar(250) NOT NULL default '', `field3` varchar(250) NOT NULL default '', `field4` varchar(250) NOT NULL default '', + `os_detect` tinyint(1) unsigned default '0', + `resolve_names` tinyint(1) unsigned default '0', + `parent_detection` tinyint(1) unsigned default '0', + `parent_recursion` tinyint(1) unsigned default '0', PRIMARY KEY (`id_rt`), KEY `recon_task_daemon` (`id_recon_server`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;