Exemple #1
0
    $xml .= "<cell><![CDATA[" . $net->get_threshold_c() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $net->get_threshold_a() . "]]></cell>";
    $rep = "";
    if ($linkedocs = Repository::have_linked_documents($conn, $name, 'net')) {
        $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . urlencode($name) . "&type=net')\" class=\"blue\">[" . $linkedocs . "]</a>&nbsp;";
    }
    $rep .= "<a href=\"../repository/index.php?hmenu=Repository&smenu=Repository\" target='main'><img src=\"../pixmaps/tables/table_edit.png\" title=\"Edit KDB\" alt=\"Edit KDB\" border=0 align=\"absmiddle\"></a>";
    $xml .= "<cell><![CDATA[" . $rep . "]]></cell>";
    /* Nessus
       if ($scan_list = Net_scan::get_list($conn, "WHERE net_name = '$name' AND plugin_id = 3001")) {
           $scan_types = "<img src='../pixmaps/tables/tick.png'>";
       } else {
           $scan_types = "<img src='../pixmaps/tables/cross.png'>";
       }
       $xml.= "<cell><![CDATA[" . $scan_types . "]]></cell>"; */
    // Nagios
    if ($scan_list = Net_scan::get_list($conn, "WHERE net_name = '{$name}' AND plugin_id = 2007")) {
        $scan_types = "<img src='../pixmaps/tables/tick.png'>";
    } else {
        $scan_types = "<img src='../pixmaps/tables/cross.png'>";
    }
    $xml .= "<cell><![CDATA[" . $scan_types . "]]></cell>";
    $xml .= "</row>\n";
}
$xml .= "</rows>\n";
echo $xml;
$db->close($conn);
?>


Exemple #2
0
require_once 'classes/Host_group.inc';
require_once 'classes/Host_scan.inc';
$db = new ossim_db();
$conn = $db->connect();
define("NESSUS", 3001);
$sensor_list = array();
// Quick & dirty sensor index array for "sensor#" further below
$sensor_index = array();
$tmp_index = 0;
//$tmp_sensors = Sensor::get_all($conn, "ORDER BY name ASC");
$tmp_sensors = Sensor::get_list($conn, "ORDER BY name ASC");
// For filtering user perms
$tmp_group_hosts = Host_group_scan::get_list($conn, "WHERE plugin_id = 3001 ORDER BY host_group_name ASC");
$tmp_group_nets = Net_group_scan::get_list($conn, "WHERE plugin_id = 3001 ORDER BY net_group_name ASC");
$tmp_host = Host_scan::get_list($conn, "WHERE plugin_id = 3001 ORDER BY host_ip ASC");
$tmp_nets = Net_scan::get_list($conn, "WHERE plugin_id = 3001 ORDER BY net_name ASC");
$net_group_index = array();
$host_group_index = array();
$hosts_index = array();
$nets_index = array();
$net_group_list = array();
$host_group_list = array();
$hosts_list = array();
$nets_list = array();
foreach ($tmp_sensors as $sensor) {
    if (Sensor::check_plugin_rel($conn, $sensor->get_ip(), NESSUS)) {
        $sensor_index[$sensor->get_name()] = $tmp_index;
        $tmp_index++;
        array_push($sensor_list, $sensor);
    }
}
Exemple #3
0
        <h3><center> <?php 
    echo _("Select sensors for this scan");
    ?>
 </center></h3>
<ul>
<?php 
    $tmp_sensors = Sensor::get_all($conn, "ORDER BY name ASC");
    $sensor_list = array();
    // Quick & dirty sensor index array for "sensor#" further below
    $sensor_index = array();
    $tmp_index = 0;
    $tmp_group_hosts = Host_group_scan::get_list($conn, "ORDER BY host_group_name ASC");
    $tmp_group_nets = Net_group_scan::get_list($conn, "ORDER BY net_group_name ASC");
    $tmp_host = Host_scan::get_list($conn, "ORDER BY host_ip ASC");
    $tmp_nets = Net_scan::get_list($conn, "ORDER BY net_name ASC");
    $global_i = 0;
    define("NESSUS", 3001);
    $net_group_index = array();
    $host_group_index = array();
    $hosts_index = array();
    $nets_index = array();
    $net_group_list = array();
    $host_group_list = array();
    $hosts_list = array();
    $nets_list = array();
    foreach ($tmp_sensors as $sensor) {
        if (Sensor::check_plugin_rel($conn, $sensor->get_ip(), NESSUS)) {
            $sensor_index[$sensor->get_name()] = $tmp_index;
            $tmp_index++;
            array_push($sensor_list, $sensor);