当前位置: 首页>>代码示例>>PHP>>正文


PHP Asset_host::get_extended_location方法代码示例

本文整理汇总了PHP中Asset_host::get_extended_location方法的典型用法代码示例。如果您正苦于以下问题:PHP Asset_host::get_extended_location方法的具体用法?PHP Asset_host::get_extended_location怎么用?PHP Asset_host::get_extended_location使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Asset_host的用法示例。


在下文中一共展示了Asset_host::get_extended_location方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: qroPrintEntryHeader

     $no_ip = false;
 }
 qroPrintEntryHeader($i);
 /* Generating checkbox value -- nikns */
 $addr_type == SOURCE_IP ? $src_ip = $currentIP : ($dst_ip = $currentIP);
 $tmp_rowid = $src_ip . "_" . $dst_ip . "_" . $ctx;
 echo '    <TD><INPUT TYPE="checkbox" NAME="action_chk_lst[' . $i . ']" VALUE="' . $tmp_rowid . '">';
 echo '    <INPUT TYPE="hidden" NAME="action_lst[' . $i . ']" VALUE="' . $tmp_rowid . '"></TD>';
 /* Check for a NULL IP which indicates an event (e.g. portscan)
  * which has no IP
  */
 if ($no_ip) {
     qroPrintEntry(gettext("unknown"));
     qroPrintEntry(gettext("N/A"), "center", "middle");
 } else {
     $geo_info = Asset_host::get_extended_location($_conn, $geoloc, $currentIP);
     if ($geo_info['html_icon'] != '') {
         $country_img = $geo_info['html_icon'] . ' ';
         $slnk = $current_url . preg_replace("/.*src\\='\\/ossim([^']+)'.*/", "\\1", $country_img);
     } else {
         $country_img = "";
         $slnk = "";
     }
     $div = '<div id="' . $currentIP . ';' . $currentIP . ';' . $host_id . '" ctx="' . (Session::show_entities() ? $ctx : Session::get_default_ctx()) . '" class="HostReportMenu" style="padding:0px 0px 0px 25px">';
     //'.getrepbgcolor($prio,1).'
     $bdiv = '</div>';
     qroPrintEntry($div . $country_img . "&nbsp;" . BuildAddressLink($currentIP, 32) . $currentIP . '</A>&nbsp;' . $bdiv, 'left', '', 'nowrap');
     qroPrintEntry(getrepimg($prio, $rel, $act, $currentIP), "center", "middle");
 }
 if ($resolve_IP == 1) {
     qroPrintEntry('&nbsp;&nbsp;' . baseGetHostByAddr($currentIP, $ctx, $db) . '&nbsp;&nbsp;');
开发者ID:alienfault,项目名称:ossim,代码行数:31,代码来源:base_stat_uaddr.php

示例2: preg_replace

 //&amp;layer4=' . IPProto2str($proto);
 $tmp_rowid = $sip . "_" . $dip . "_" . $proto;
 //echo '    <TD><INPUT TYPE="checkbox" NAME="action_chk_lst[' . $i . ']" VALUE="' . $tmp_rowid . '"></TD>';
 //echo '        <INPUT TYPE="hidden" NAME="action_lst[' . $i . ']" VALUE="' . $tmp_rowid . '">';
 echo "<td></td>";
 $geo_info = Asset_host::get_extended_location($_conn, $geoloc, $ip_sip);
 if ($geo_info['html_icon'] != '') {
     $s_country_img = $geo_info['html_icon'] . ' ';
     $slnk = $current_url . preg_replace("/.*src\\='\\/ossim([^']+)'.*/", "\\1", $s_country_img);
 } else {
     $s_country_img = "";
     $slnk = "";
 }
 $div1 = '<div id="' . $ip_sip . ';' . $ip_sip . ';' . $src_host . '" ctx="' . $ctx . '" class="HostReportMenu">';
 $bdiv1 = '</div>';
 $geo_info = Asset_host::get_extended_location($_conn, $geoloc, $ip_dip);
 if ($geo_info['html_icon'] != "") {
     $d_country_img = $geo_info['html_icon'] . " ";
     $dlnk = $current_url . preg_replace("/.*src\\='\\/ossim([^']+)'.*/", "\\1", $d_country_img);
 } else {
     $d_country_img = "";
     $dlnk = "";
 }
 $div2 = '<div id="' . $ip_dip . ';' . $ip_dip . ';' . $dst_host . '" ctx="' . $ctx . '" class="HostReportMenu">';
 $bdiv2 = '</div>';
 if ($fqdn == "yes") {
     qroPrintEntry('<FONT>' . $sip_fqdn . '</FONT>');
 }
 qroPrintEntry($div1 . $s_country_img . BuildAddressLink($ip_sip, 32) . $ip_sip . '</A>' . $bdiv1, "", "", "nowrap");
 qroPrintEntry('<img src="images/dash.png" border="0">');
 qroPrintEntry($div2 . $d_country_img . BuildAddressLink($ip_dip, 32) . $ip_dip . '</A>' . $bdiv2, "", "", "nowrap");
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:base_stat_iplink.php

示例3: preg_match

$dst_loc = preg_match("/data-title\\s*=\\s*'([^\\d]+)'/", $dst_img, $matches) ? $dst_img . ' <a target="_blank" href="' . $gmaps_url . '">' . $matches[1] . '</a>' : '';
$ip_dst_data = (preg_match("/data-title\\s*=\\s*'\\d+/", $dst_img) ? $dst_img . ' ' : ' ') . ($myrow2['dst_host'] != '' ? '<A HREF="#" data-url="' . Menu::get_menu_url(AV_MAIN_PATH . '/av_asset/common/views/detail.php?asset_id=' . $myrow2['dst_host'], 'environment', 'assets', 'assets') . '">' : '<A HREF="#" data-url="' . AV_MAIN_PATH . '/forensics/base_stat_ipaddr.php?ip=' . $current_dip . '&amp;netmask=32">') . $dip_aux . ($current_dip == $dip_aux ? '' : ' [' . $current_dip . ']');
$reptooltip_dst = getreptooltip($idm_data["rep_prio_dst"], $idm_data["rep_rel_dst"], $idm_data["rep_act_dst"], $current_dip);
// Destination Map
$dst_latitude = $dst_longitude = 0;
if (valid_hex32($myrow2['dst_host'])) {
    if ($dst_obj = Asset_host::get_object($_conn, $myrow2['dst_host'])) {
        $coordinates = $dst_obj->get_location();
        if (floatval($coordinates['lat']) != 0) {
            $dst_latitude = floatval($coordinates['lat']);
        }
        if (floatval($coordinates['lon']) != 0) {
            $dst_longitude = floatval($coordinates['lon']);
        }
        if (empty($dst_loc)) {
            $dst_location = Asset_host::get_extended_location($_conn, $geoloc, $current_dip, $myrow2['dst_host']);
            if ($dst_location['country']['code']) {
                $dst_loc = '<img src="../pixmaps/flags/' . $dst_location['country']['code'] . '.png"/> <a target="_blank" href="' . $gmaps_url . '">' . $dst_location['country']['name'] . '</a>';
            }
        }
    }
}
if (!$dst_latitude && !$dst_longitude) {
    $record = $geoloc->get_location_from_file($current_dip);
    if ($record->latitude != 0 && $record->longitude != 0) {
        $dst_latitude = $record->latitude;
        $dst_longitude = $record->longitude;
    }
    if (empty($dst_loc) && $record->country_name != '') {
        $dst_loc = '<img src="../pixmaps/flags/' . strtolower($record->country_code) . '.png"/> <a target="_blank" href="' . $gmaps_url . '">' . $record->country_name . '</a>';
    }
开发者ID:alienfault,项目名称:ossim,代码行数:31,代码来源:base_qry_alert.php


注:本文中的Asset_host::get_extended_location方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。