2011-07-01 Ramon Novoa <rnovoa@artica.es>

* 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.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4508 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2011-07-01 12:41:56 +00:00
parent 965e0d7668
commit fa842b0472
7 changed files with 85 additions and 7 deletions

View File

@ -1,3 +1,22 @@
2011-07-01 Ramon Novoa <rnovoa@artica.es>
* 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 <rnovoa@artica.es>
* include/functions_events.php: Do not update validated events.
2011-06-29 Ramon Novoa <rnovoa@artica.es>
* operation/events/events_list.php,
operation/events/events.php: Improved event behaviour.
2011-06-30 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* 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 <juanmanuel.ramon@artica.es>
* include/styles/pandora.css

View File

@ -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');

View File

@ -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))

View File

@ -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] = "<b>".__('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] = "<b>".__('Recon script');
@ -187,6 +196,21 @@ $table->data[15][1] = html_print_input_text ('field4', $field4, '', 40, 0, true
$table->data[16][0] = "<b>".__('Comments');
$table->data[16][1] = html_print_input_text ('description', $description, '', 45, 0, true);
// OS detection
$table->data[17][0] = "<b>".__('OS detection');
$table->data[17][1] = html_print_checkbox ('os_detect', 1, $os_detect, true);
// Name resolution
$table->data[18][0] = "<b>".__('Name resolution');
$table->data[18][1] = html_print_checkbox ('resolve_names', 1, $resolve_names, true);
// Parent detection
$table->data[19][0] = "<b>".__('Parent detection');
$table->data[19][1] = html_print_checkbox ('parent_detection', 1, $parent_detection, true);
// Parent recursion
$table->data[20][0] = "<b>".__('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 '<form name="modulo" method="post" action="index.php?sec=gservers&sec2=godmode/servers/manage_recontask&'.(($id_rt != -1) ? 'update='.$id_rt : 'create=1').'">';

View File

@ -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);

View File

@ -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");

View File

@ -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;