Esempio n. 1
0
        echo $host_mac["old_date"];
        ?>
" value="<?php 
        echo "ignore" . $host_mac["ip"];
        ?>
" <?php 
        if ($host_mac["mac"] == $host_mac["old_mac"]) {
            echo "disabled";
        }
        ?>
 >
</td>
</tr>
<?php 
        if ($ex_mac == $host_mac["ip"] && $ex_macs == $host_mac["sensor"]) {
            if ($host_mac_ip_list = Host_mac::get_ip_list($conn, $host_mac["ip"], $host_mac["sensor"])) {
                foreach ($host_mac_ip_list as $host_mac_ip) {
                    $delta = Util::date_diff($host_mac_ip["date"], $host_mac_ip["old_date"], 'yMdhms');
                    if ($delta == "00:00:00") {
                        $delta = "-";
                    }
                    ?>
	  <tr <?php 
                    if ($host_mac_ip["mac"] != $host_mac_ip["old_mac"]) {
                        echo 'bgcolor="#eac3c3"';
                    } else {
                        echo 'bgcolor="#dfe7f0"';
                    }
                    ?>
>
	  <td>&nbsp;</td>
Esempio n. 2
0
                 $title = Util::htmlentities($title) . " <font style=\"font-weight:normal;font-size:80%\">(" . count($hg) . " " . _("hosts") . ")</font>";
                 $tooltip = $macv;
                 $li = "key:'{$mac_key}', url:'{$mac_url}', icon:'../../pixmaps/theme/mac.png', isLazy:true, title:'{$title}', tooltip:'{$tooltip}'\n";
                 $buffer .= ($j > $from ? "," : "") . "{ {$li} }\n";
             }
             $j++;
         }
         if ($j > $to) {
             $li = "key:'macs', page:'{$nextpage}', isFolder:true, isLazy:true, icon:'../../pixmaps/theme/mac.png', title:'" . _("next") . " {$maxresults} " . _("MAC/Vendor") . "'";
             $buffer .= ",{ {$li} }\n";
         }
         $buffer .= "]";
     }
 } else {
     if (preg_match("/mac_(.*)/", $key, $found)) {
         if ($hg_list = Host_mac::get_mac_vendor_list($conn, $ossim_hosts, $filter)) {
             $k = 0;
             $html = "";
             $length_hn = 20;
             uasort($hg_list, 'cmpf');
             $buffer .= "[";
             foreach ($hg_list[$found[1]] as $ip => $host_name) {
                 if ($k >= $from && $k < $to) {
                     $host_key = utf8_encode($key . $k);
                     $host_name = $host_name == $ip || $host_name == '' ? "" : utf8_encode($host_name);
                     $aux_hname = strlen($host_name) > $length_hn ? substr($host_name, 0, $length_hn) . "..." : $host_name;
                     $title = $host_name == "" ? $ip : "{$ip} <font style=\"font-size:80%\">(" . Util::htmlentities($aux_hname) . ")</font>";
                     $tooltip = $host_name == "" ? $ip : $ip . " (" . Util::htmlentities($host_name) . ")";
                     $html .= "{ key:'{$host_key}', url:'{$ip}', icon:'../../pixmaps/theme/host.png', title:'{$title}', tooltip:'{$tooltip}'},\n";
                 }
                 $k++;
Esempio n. 3
0
        ?>
</td>
<?php 
        if ($ex_mac) {
            ?>
  <td colspan="1">&nbsp;</td>
  <td colspan="1">&nbsp;</td>
  <td colspan="1">&nbsp;</td>
<?php 
        }
        ?>
</tr>

<?php 
        if ($ex_mac == $anom_mac["ip"] && $ex_macs == $anom_mac["sensor"]) {
            if ($anom_mac_ip_list = Host_mac::get_anom_ip_list($conn, $ex_mac, $ex_macs)) {
                foreach ($anom_mac_ip_list as $anom_mac_ip) {
                    ?>
	
	<tr bgcolor="#EFEFEF">
	<td>&nbsp;</td>
	<td>
	<A HREF="<?php 
                    echo Sensor::get_sensor_link($conn, $anom_mac_ip["ip"]) . "/" . $anom_mac_ip["ip"] . ".html";
                    ?>
" target="_blank" title="<?php 
                    echo $anom_mac_ip["ip"];
                    ?>
">
	<?php 
                    echo Host::ip2hostname($conn, $anom_mac_ip["ip"]);
Esempio n. 4
0
        if (ossim_error()) {
            die(ossim_error());
        }
        Host_mac::ack_ign($conn, $ip, $date, $sensor, "ack");
    } elseif (preg_match("/^ignore/i", $ip)) {
        $ip = ereg_replace("ignore", "", $ip);
        $ip = ereg_replace("_", ".", $ip);
        $sensor = ereg_replace("_", ".", $sensor);
        $date = ereg_replace("_", " ", $date);
        ossim_valid($ip, OSS_IP_ADDR, 'illegal:' . _("ip"));
        ossim_valid($sensor, OSS_IP_ADDR, 'illegal:' . _("Sensor"));
        ossim_valid($date, OSS_ALPHA, OSS_PUNC, OSS_SPACE, 'illegal:' . _("Date"));
        if (ossim_error()) {
            die(ossim_error());
        }
        Host_mac::ack_ign($conn, $ip, $date, $sensor, "ignore");
    }
}
$db->close($conn);
?>
    <p> <?php 
echo gettext("Successfully Acked/Deleted");
?>
 </p>
<?php 
//$location = "$back";
$location = "anomalies.php";
sleep(2);
echo "<script>\n///history.go(-1);\nwindow.location='{$location}';\n</script>\n";
?>
</body>
Esempio n. 5
0
    echo gettext("Operating System");
    ?>
 </th>
        <td>
<?php 
    echo $os["os"];
    echo Host_os::get_os_pixmap($conn, $host);
    ?>
        </td>
      </tr>
<?php 
}
?>

<?php 
if ($mac = Host_mac::get_ip_data($conn, $host)) {
    ?>
      <tr>
        <th>MAC</th>
        <td><?php 
    echo $mac["mac"];
    ?>
</td>
      </tr>
<?php 
}
?>
    
      
<?php 
if ($netbios_list = Host_netbios::get_list($conn, "WHERE ip = '{$host}'")) {