function getrepimg($prio, $rel, $act, $ip = "") { if (intval($prio) == 0) { return ""; } $reptxt = _("IP Priority") . ": <img src='../forensics/bar2.php?value={$prio}&max=9&range=1' border='0' align='absmiddle' style='width:14mm'><br>" . _("IP Reliability") . ": <img src='../forensics/bar2.php?value={$rel}&max=9' border='0' align='absmiddle' style='width:14mm'><br>" . _("IP Activity") . ": <b>" . str_replace(";", ", ", $act) . "</b>"; $reptxt .= "<p style='margin:0px;text-align:right;'><strong>" . _("Click - More Info") . "</strong></p>"; if ($ip != "") { $link = Reputation::getlabslink($ip); $class = "riskinfo trlnk"; $target = "target='lab'"; } else { $link = "javascript:;"; $class = "riskinfo"; $target = ""; } $lnk = "<a href='{$link}' {$target} class='{$class}' style='text-decoration:none' txt='" . Util::htmlentities($reptxt) . "'><img style='margin:0px 2px 2px 0px' align='absmiddle' border='0'"; if ($prio <= 2) { $lnk .= " src='../reputation/images/green.png'"; } elseif ($prio <= 6) { $lnk .= " src='../reputation/images/yellow.png'"; } else { $lnk .= " src='../reputation/images/red.png'"; } return $lnk . "/></a>"; }
?> ; var __confirm_keys = { "yes": "<?php echo Util::js_entities(_('Yes')); ?> ", "no" : "<?php echo Util::js_entities(_('No')); ?> " }; var __otx_url = "<?php echo Reputation::getlabslink('XXXX'); ?> "; var self = this; this.init = function() { //Setting the config for ajax request errors. $.ajaxSetup( { error: function(XMLHttpRequest, textStatus, errorThrown) { //Checking expired session var session = new Session(XMLHttpRequest, ''); if (session.check_session_expired() == true)
$location = '<strong>' . _('UNKNOWN') . '</strong>'; $vulns = Vulnerabilities::get_latest_vulns($conn, $ip); } $net = array_shift(Asset_host::get_closest_net($conn, $ip, $_ctx)); if (is_array($net) && !empty($net)) { $location = ''; if ($net['icon'] != '') { $location = "<img src='data:image/png;base64," . base64_encode($net['icon']) . "' border='0'> "; } $location .= '<strong>' . strtoupper($net['name']) . '</strong> (' . $net['ips'] . ')'; } // OTX / Vulns $subfix = str_replace('_t', '_', $prefix); $rep_tooltip = Reputation::getreptooltip($event_info['rep_prio' . $subfix], $event_info['rep_rel' . $subfix], $event_info['rep_act' . $subfix], FALSE); if ($info_ip['rep'] == 1) { $labs = Reputation::getlabslink($ip); $otx = '<a href="' . $labs . '" class="otx" target="_blank" data-title="' . $rep_tooltip . '">' . _('Yes') . '</a>'; } else { $otx = _('No'); } $nports = $complete ? 20 : 10; //Ports $ports = $data['port']; arsort($ports); $ports = array_slice($ports, 0, $nports, true); ksort($ports); ?> <script type="text/javascript"> function go_vulns(prefix)