Beispiel #1
0
<?php 
}
// Sesion::menu_perms("MenuControlPanel", "ControlPanelEvents")
?>

<?php 
if (Host_vulnerability::in_host_vulnerability($conn, $host)) {
    ?>
&nbsp;&nbsp;<b>Vulnerabilites</b><br/><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="../vulnmeter/index.php?noimages=1&host=<?php 
    echo $host;
    ?>
" target="report">
<?php 
    $ip_stats = Host_vulnerability::get_list($conn, "WHERE ip = \"{$host}\"", "ORDER BY scan_date DESC", $ggregated = true, 1);
    foreach ($ip_stats as $host_vuln) {
        $scan_date = $host_vuln->get_scan_date();
    }
    ?>
    <?php 
    echo gettext("Vulnmeter");
    ?>
 </a><br/>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="../vulnmeter/<?php 
    echo date("YmdHis", strtotime($scan_date));
    ?>
/<?php 
    echo ereg_replace("\\.", "_", $host);
    ?>
/index.html"
Beispiel #2
0
<?php 
if (!Session::menu_perms("MenuControlPanel", "BusinessProcessesEdit")) {
    print _("You don't have permissions to view the risk maps reports");
    exit;
}
$db = new ossim_db();
$conn = $db->connect();
$id = request("id");
ossim_valid($id, OSS_DIGIT, OSS_ALPHA, OSS_SCORE, OSS_PUNC, OSS_SPACE, ".", 'illegal:' . _("id"));
if (ossim_error()) {
    die("Error!!" . ossim_error());
}
$host = Host::get_list($conn, " where ip='" . $id . "' or hostname='" . $id . "'");
$id = $host[0]->ip;
$hostname = $host[0]->hostname;
$scanrow = Host_vulnerability::get_list($conn, " where ip='" . $id . "' and vulnerability>0 ", " order by scan_date desc", false);
if (!$scanrow) {
    echo "<br>Not scaned yet.<br>";
    ?>
<a href="" target="_self" onclick="history.go(-1);return false;">[ <?php 
    echo gettext("Go Back");
    ?>
 ]</a><?php 
    exit;
}
$ipstr = ereg_replace("\\.", "_", $scanrow[0]->ip);
$fdate = $scanrow[0]->scan_date;
$sdate = ereg_replace(":", "", $scanrow[0]->scan_date);
$sdate = ereg_replace("-", "", $sdate);
$sdate = ereg_replace(" ", "", $sdate);
$sql = 'select p.reliability,p.priority,p.name from host_plugin_sid h, plugin_sid p where p.plugin_id=3001 and h.plugin_id=3001 and h.plugin_sid=p.sid and h.host_ip=inet_aton( ? ) order by reliability desc,priority desc';