Пример #1
0
                }
            } else {
                $scantype = "<img src='../pixmaps/tables/cross.png'>";
            }
        }
    }
    $xml .= "<cell><![CDATA[" . $host->get_threshold_c() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host->get_threshold_a() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host->get_alert() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host->get_persistence() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host->get_rrd_profile() . "]]></cell>";
    $apps = Host::get_apps($conn, $ip);
    if (count($apps) > 0) {
        $xml .= "<cell><![CDATA[<a href='javascript:;' onclick=\"view_apps('{$ip}')\" class='blue' target=\"main\">[" . count($apps) . "]&nbsp;<img src='../pixmaps/tools.png' title='" . count($apps) . _(" apps found") . "' border='0' align='absmiddle'></a>]]></cell>";
    } else {
        $xml .= "<cell><![CDATA[<img src='../pixmaps/tools_gray.png' title='" . _("No apps found") . "' border='0'>]]></cell>";
    }
    $rep = "";
    if ($linkedocs = Repository::have_linked_documents($conn, $ip, 'host')) {
        //$rep.= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/index.php?search_bylink=$ip&hmenu=Repository&smenu=Repository')\" class=\"blue\" target=\"main\">[" . $linkedocs . "]</a>&nbsp;";
        $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . urlencode($ip) . "&type=host')\" class=\"blue\" target=\"main\">[" . $linkedocs . "]</a>&nbsp;";
    }
    $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('addrepository.php?id_host=" . $ip . "&name_host=" . urlencode($host->get_hostname()) . "')\"><img src=\"../pixmaps/tables/table_row_insert.png\" border=0 title=\"Add KDB\" alt=\"Add KDB\" align=\"absmiddle\"></a>";
    $rep .= "&nbsp;<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[" . utf8_encode($rep) . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $scantype . "]]></cell>";
    $xml .= "</row>\n";
}
$xml .= "</rows>\n";
echo $xml;
$db->close($conn);
Пример #2
0
 if ($desc == "") {
     $desc = "&nbsp;";
 }
 $xml .= "<cell><![CDATA[" . utf8_encode($desc) . "]]></cell>";
 $xml .= "<cell><![CDATA[" . $net->get_asset() . "]]></cell>";
 $sensors = "";
 if ($sensor_list = $net->get_sensors($conn)) {
     foreach ($sensor_list as $sensor) {
         $sensors .= ($sensors == "" ? '' : ', ') . $sensor->get_sensor_name();
     }
 }
 $xml .= "<cell><![CDATA[" . utf8_encode($sensors) . "]]></cell>";
 $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 {
Пример #3
0
    $xml .= "<cell><![CDATA[" . $net_group->get_threshold_a() . "]]></cell>";
    /* Nessus
       if ($scan_list = Net_group_scan::get_list($conn, "WHERE net_group_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>"; */
    $desc = $net_group->get_descr();
    if ($desc == "") {
        $desc = "&nbsp;";
    }
    $xml .= "<cell><![CDATA[" . utf8_encode($desc) . "]]></cell>";
    // KDB
    $rep = '';
    if ($linkedocs = Repository::have_linked_documents($conn, $id, 'net_group')) {
        $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . $id . "&type=net_group&nosize=1')\" class=\"blue\" target=\"main\">[" . $linkedocs . "]</a>&nbsp;";
    }
    $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/asset_repository.php?id=" . $id . "&name=" . urlencode($name) . "&linktype=net_group')\"><img src=\"../pixmaps/tables/table_row_insert.png\" border=0 title=\"Add KDB\" alt=\"Add KDB\" align=\"absmiddle\"></a>";
    $xml .= "<cell><![CDATA[" . utf8_encode($rep) . "]]></cell>";
    // Notes
    $rep = '';
    if ($notes = Notes::howmanynotes($conn, $id, 'net_group')) {
        $rep .= "<a href=\"javascript:;\" onclick=\"GB_notes('../asset_details/ajax/view_notes.php?type=net_group&id=" . $id . "')\" class=\"blue\" target=\"main\">[" . $notes . "]</a>&nbsp;";
    }
    $rep .= "<a href=\"javascript:;\" onclick=\"GB_notes('../asset_details/ajax/view_notes.php?type=net_group&id=" . $id . "')\"><img src=\"../pixmaps/notes.png\" border=0 title=\"View Notes\" alt=\"View Notes\" width='16px' align=\"absmiddle\"></a>";
    $xml .= "<cell><![CDATA[" . utf8_encode($rep) . "]]></cell>";
    $xml .= "</row>\n";
}
$xml .= "</rows>\n";
echo $xml;
Пример #4
0
        // Osvdb starting
        $nessus_id = $vulnerability_data->get_nessus_id();
        $osvdb_id = Osvdb::get_osvdbid_by_nessusid($conn, $nessus_id);
        if ($osvdb_id) {
            $nessus_id = "<a href=\"osvdb.php?id=" . $osvdb_id . "\">" . $nessus_id . "</a>";
        }
        // Osvdb end
        // Add name and kdb link
        require_once "classes/Host.inc";
        require_once "classes/Repository.inc";
        $txt_temp = '';
        $hostname_temp = Host::ip2hostname($conn, $vulnerability_data->get_ip());
        if ($hostname_temp != $vulnerability_data->get_ip()) {
            $txt_temp .= $hostname_temp . ' - ';
        }
        if ($linkedocs = Repository::have_linked_documents($conn, $vulnerability_data->get_ip(), 'host')) {
            $txt_temp .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . urlencode($vulnerability_data->get_ip()) . "&type=host')\" class='blue' target='main'>[" . $linkedocs . "] " . _('Knowledge DB') . "</a>";
        }
        if ($txt_temp != '') {
            $txt_temp = ' (' . $txt_temp . ')';
        }
        echo "<strong>IP:</strong> " . $vulnerability_data->get_ip() . $txt_temp . "<br>";
        echo "<strong>Port:</strong> " . $vulnerability_data->get_port() . "<br/>";
        echo "<strong>Scanner ID:</strong> " . $nessus_id . "<br/>";
        echo "<strong>Risk:</strong> " . $vulnerability_data->get_risk() . "<br/>";
        echo "<strong>Description:</strong> " . Osvdb::sanity($vulnerability_data->get_description()) . "<br/>";
    }
} elseif ($ref == 'Custom') {
    $custom_list = $incident->get_custom($conn);
    echo "<table class='noborder' width='100%' id='custom_table'>";
    foreach ($custom_list as $custom) {
Пример #5
0
            $sensors .= ($sensors == "" ? '' : ', ') . $sensor->get_sensor_name();
        }
    }
    $xml .= "<cell><![CDATA[" . utf8_encode($sensors) . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host_group->get_threshold_c() . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $host_group->get_threshold_a() . "]]></cell>";
    /* Nessus
       if ($scan_list = Host_group_scan::get_list($conn, "WHERE host_group_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
    $rep = "";
    if ($linkedocs = Repository::have_linked_documents($conn, $host_group->get_name(), 'host_group')) {
        $rep .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . urlencode($name) . "&type=host_group')\" 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>";
    if ($scan_list = Host_group_scan::get_list($conn, "WHERE host_group_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);