本文整理汇总了PHP中Protocol::get_protocol_by_number方法的典型用法代码示例。如果您正苦于以下问题:PHP Protocol::get_protocol_by_number方法的具体用法?PHP Protocol::get_protocol_by_number怎么用?PHP Protocol::get_protocol_by_number使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Protocol
的用法示例。
在下文中一共展示了Protocol::get_protocol_by_number方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _
$p_name = Protocol::get_protocol_by_number($proto, TRUE);
if (FALSE === $p_name) {
$p_name = _('UNKNOWN');
}
qroPrintEntry('<FONT>' . $p_name . '</FONT>');
$tmp = '<A HREF="base_stat_ports.php?port_type=2&proto=' . $proto . $tmp_ip_criteria . '">';
qroPrintEntry($tmp . Util::number_format_locale($num_unique_dport, 0) . '</A>');
$tmp = '<A HREF="base_stat_alerts.php?foo=1' . $tmp_ip_criteria . '">';
qroPrintEntry($tmp . Util::number_format_locale($num_unique, 0) . '</A>');
$tmp = '<A HREF="base_qry_main.php?new=1' . '&num_result_rows=-1' . '&submit=' . gettext("Query DB") . '&current_view=-1' . $tmp_ip_criteria . '">';
qroPrintEntry($tmp . Util::number_format_locale($num_occurances, 0) . '</A>');
qroPrintEntryFooter();
}
$i++;
// report_data
$p_name = Protocol::get_protocol_by_number($proto, TRUE);
if (FALSE === $p_name) {
$p_name = '';
}
$report_data[] = array($ip_sip, '', $ip_dip, '', $p_name, "", "", "", "", "", "", $num_unique_dport, $num_unique, $num_occurances, $s_country_img != '' || $d_country_img != '' ? $s_country_img . "####" . $d_country_img : '');
}
$result->baseFreeRows();
$dbo->close($_conn);
$qro->PrintFooter();
$qs->PrintBrowseButtons();
$qs->PrintAlertActionButtons();
$qs->SaveReportData($report_data, $unique_iplinks_report_type);
$qs->SaveState();
echo "<input type='hidden' name='fqdn' value='" . Util::htmlentities($fqdn) . "'>\n";
echo "\n</FORM>\n";
PrintBASESubFooter();
示例2: baseGetHostByAddr
if ($icmp_proto == "6" || $icmp_proto == "17") {
echo '<TD class="header">Org.Source Port</TD>';
}
echo '<TD class="header">Org.Destination IP</TD>';
echo '<TD class="header">Org.Destination Name</TD>';
if ($icmp_proto == "6" || $icmp_proto == "17") {
echo '<TD class="header">Org.Destination Port</TD>';
}
echo '</TR>';
echo '<TR>';
if ($ICMPitype == "5") {
echo '<TD class="plfield">';
echo '<A HREF="base_stat_ipaddr.php?ip=' . $gateway . '&netmask=32" TARGET="_PL_SIP">' . $gateway . '</A></TD>';
echo '<TD class="plfield">' . baseGetHostByAddr($gateway, $ctx, $db) . '</TD>';
}
echo '<TD class="plfield">' . Protocol::get_protocol_by_number($icmp_proto, TRUE) . '</TD>';
echo '<TD class="plfield">';
echo '<A HREF="base_stat_ipaddr.php?ip=' . $icmp_src . '&netmask=32" TARGET="_PL_SIP">' . $icmp_src . '</A></TD>';
echo '<TD class="plfield">' . baseGetHostByAddr($icmp_src, $ctx, $db) . '</TD>';
if ($icmp_proto == "6" || $icmp_proto == "17") {
echo '<TD class="plfield">' . $icmp_src_port . '</TD>';
}
echo '<TD class="plfield">';
echo '<A HREF="base_stat_ipaddr.php?ip=' . $icmp_dst . '&netmask=32" TARGET="_PL_DIP">' . $icmp_dst . '</A></TD>';
echo '<TD class="plfield">' . baseGetHostByAddr($icmp_dst, $ctx, $db) . '</TD>';
if ($icmp_proto == "6" || $icmp_proto == "17") {
echo '<TD class="plfield">' . $icmp_dst_port . '</TD>';
}
echo '</TR>';
echo '</TABLE>';
}
示例3: array
}
$src_net_id = $myrow['src_net'];
$dst_net_id = $myrow['dst_net'];
// 5- Source IP Address
if ($current_sip32 != "") {
$src_output = Asset_host::get_extended_name($_conn, $geoloc, $current_sip, $ctx, $myrow['src_host'], $myrow["src_net"]);
$sip_aux = $src_output['name'];
}
// 6- Destination IP Address
if ($current_dip32 != "") {
$dst_output = Asset_host::get_extended_name($_conn, $geoloc, $current_dip, $ctx, $myrow['dst_host'], $myrow["dst_net"]);
$dip_aux = $dst_output['name'];
}
//
$i++;
$p_name = Protocol::get_protocol_by_number($current_proto);
if (FALSE === $p_name) {
$p_name = '';
}
$report_data[] = array(trim(html_entity_decode($despues)), $myrow["timestamp"], $sip_aux . $current_sport, '', $dip_aux . $current_dport, '', $current_url . "/forensics/bar2.php?value=" . $current_oasset_s . "&value2=" . $current_oasset_d . "&max=5", $current_url . "/forensics/bar2.php?value=" . $current_oprio . "&max=5", $current_url . "/forensics/bar2.php?value=" . $current_oreli . "&max=9", strtoupper(bin2hex($myrow["id"])), $p_name, $rowid, 0, 0, '');
}
$result->baseFreeRows();
$dbo->close($_conn);
$geoloc->close();
$qs->PrintAlertActionButtons();
$qs->SaveReportData($report_data, $events_report_type);
$qs->SaveState();
$db->baseClose();
?>
<form action="base_timeline.php" id="ftl">
<br/>
示例4: array
}
$validate = array('asset_id' => array('validation' => 'OSS_HEX', 'e_message' => 'illegal:' . _('Asset ID')), 's_port' => array('validation' => 'OSS_PORT', 'e_message' => 'illegal:' . _('Port')), 's_protocol' => array('validation' => 'OSS_PROTOCOL_SERVICE', 'e_message' => 'illegal:' . _('Protocol')), 's_name' => array('validation' => 'OSS_ALPHA, OSS_PUNC_EXT', 'e_message' => 'illegal:' . _('Service')));
$data['status'] = 'success';
$data['data'] = _('Your changes have been saved');
$validation_errors = validate_form_fields('POST', $validate);
if (is_array($validation_errors) && !empty($validation_errors)) {
//Formatted message
$error_msg = '<div>' . _('The following errors occurred') . ":</div>\n <div style='padding: 5px;'>" . implode('<br/>', $validation_errors) . '</div>';
Util::response_bad_request($error_msg);
} else {
try {
$db = new ossim_db();
$conn = $db->connect();
$asset_id = POST('asset_id');
$protocol = POST('s_protocol');
$protocol_name = Protocol::get_protocol_by_number($protocol);
$port = POST('s_port');
$service = POST('s_name');
$ctx = Asset_host::get_ctx_by_id($conn, $asset_id);
$n_ports = Port::get_list($conn, " AND port_number = {$port} and protocol_name = '{$protocol_name}'");
if (count($n_ports) == 0) {
Port::insert($conn, $port, $protocol_name, $service, '', $ctx);
} else {
$data['status'] = 'warning';
$data['data'] = _('Warning! This port has already been added');
}
$db->close();
} catch (Exception $e) {
Util::response_bad_request(_('Error! Your changes could not be saved'));
}
}
示例5: list
list($cell_data['PLUGIN_SID_CATEGORY'], $cell_data['PLUGIN_SID_SUBCATEGORY']) = GetCategorySubCategory($myrow["plugin_id"], $myrow["plugin_sid"], $db);
$cell_align['PLUGIN_SID_CATEGORY'] = $cell_align['PLUGIN_SID_SUBCATEGORY'] = "center";
}
$cell_data['DEVICE'] = $deviceips[$myrow["device_id"]] != "" ? $deviceips[$myrow["device_id"]] : "-";
$cell_align['DEVICE'] = "center";
// Source Host
$current_src_host = $myrow["src_host"];
$current_sip32 = $myrow["ip_src"];
$current_sip = inet_ntop($current_sip32);
// Destination Host
$current_dst_host = $myrow["dst_host"];
$current_dip32 = $myrow["ip_dst"];
$current_dip = inet_ntop($current_dip32);
// Port / Protocol
$current_proto = $myrow["ip_proto"];
$current_p_name = Protocol::get_protocol_by_number($current_proto, TRUE);
if (FALSE === $current_p_name) {
$current_p_name = '';
}
$current_sport = $current_dport = "";
if ($myrow["layer4_sport"] != 0) {
$current_sport = ":" . $myrow["layer4_sport"];
}
if ($myrow["layer4_dport"] != 0) {
$current_dport = ":" . $myrow["layer4_dport"];
}
// if ($debug_mode > 1) {
// SQLTraceLog("\n\n");
// SQLTraceLog(__FILE__ . ":" . __LINE__ . ":\n############## <calls to BuildSigByID> ##################");
// }
// SIGNATURE