本文整理汇总了PHP中filter_expand_alias函数的典型用法代码示例。如果您正苦于以下问题:PHP filter_expand_alias函数的具体用法?PHP filter_expand_alias怎么用?PHP filter_expand_alias使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了filter_expand_alias函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: gettext
<td colspan="2" valign="top" class="listtopic"><?php
echo gettext("Define Ports (port variables)");
?>
</td>
</tr>
<?php
foreach ($snort_ports as $key => $server) {
if (strlen($server) > 40) {
$server = substr($server, 0, 40) . "...";
}
$label = strtoupper($key);
$value = "";
$title = "";
if (!empty($pconfig["def_{$key}"])) {
$value = htmlspecialchars($pconfig["def_{$key}"]);
$title = trim(filter_expand_alias($pconfig["def_{$key}"]));
}
?>
<tr>
<td width='30%' valign='top' class='vncell'><?php
echo gettext("Define");
?>
<?php
echo $label;
?>
</td>
<td width="70%" class="vtable">
<input name="def_<?php
echo $key;
?>
" type="text" size="40" autocomplete="off" class="formfldalias" id="def_<?php
开发者ID:schinken,项目名称:pfsense-packages,代码行数:31,代码来源:snort_define_servers.php
示例2: foreach
</script>
<script type="text/javascript" src="/javascript/suggestions.js">
</script>
<script type="text/javascript">
<?php
$isfirst = 0;
$aliases = "";
$addrisfirst = 0;
$portisfirst = 0;
$aliasesaddr = "";
$aliasesport = "";
if (isset($config['aliases']['alias']) && is_array($config['aliases']['alias'])) {
foreach ($config['aliases']['alias'] as $alias_name) {
// Skip any Aliases that resolve to an empty string
if (trim(filter_expand_alias($alias_name['name'])) == "") {
continue;
}
if ($alias_name['type'] == "host" || $alias_name['type'] == "network") {
if ($addrisfirst == 1) {
$aliasesaddr .= ",";
}
$aliasesaddr .= "'" . $alias_name['name'] . "'";
$addrisfirst = 1;
} elseif ($alias_name['type'] == "port") {
if ($portisfirst == 1) {
$aliasesport .= ",";
}
$aliasesport .= "'" . $alias_name['name'] . "'";
$portisfirst = 1;
}
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:snort_ftp_client_engine.php
示例3: gettext
echo gettext("Bind-To IP Address Alias");
?>
</td>
<td class="vtable">
<?php
if ($pengcfg['name'] != "default") {
?>
<table width="95%" border="0" cellpadding="2" cellspacing="0">
<tbody>
<tr>
<td class="vexpl"><input name="policy_bind_to" type="text" class="formfldalias" id="policy_bind_to" size="32"
value="<?php
echo htmlspecialchars($pengcfg['bind_to']);
?>
" title="<?php
echo trim(filter_expand_alias($pengcfg['bind_to']));
?>
" autocomplete="off"/>
<?php
echo gettext("IP List to bind this engine to. (Cannot be blank)");
?>
</td>
<td class="vexpl" align="right"><input type="submit" class="formbtns" name="select_alias" value="Aliases"
title="<?php
echo gettext("Select an existing IP alias");
?>
"/></td>
</tr>
<tr>
<td class="vexpl" colspan="2"><?php
echo gettext("This policy will apply for packets with destination addresses contained within this IP List.");
开发者ID:LFCavalcanti,项目名称:pfsense-packages,代码行数:31,代码来源:suricata_os_policy_engine.php
示例4: gettext
?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell">
<?php
echo gettext("Assigned Aliases:");
?>
</td>
<td width="78%" class="vtable">
<input autocomplete="off" name="address" type="text" class="formfldalias" id="address" size="30" value="<?php
echo htmlspecialchars($pconfig['address']);
?>
"
title="<?php
echo trim(filter_expand_alias($pconfig['address']));
?>
"/>
<input type="button" class="formbtns" value="Aliases" onclick="selectAlias();"
title="<?php
echo gettext("Select an existing IP alias");
?>
"/>
</td>
</tr>
<tr>
<td width="22%" valign="top"> </td>
<td width="78%">
<input id="save" name="save" type="submit" class="formbtn" value="Save" />
<input id="cancel" name="cancel" type="submit" class="formbtn" value="Cancel" />
</td>
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:snort_passlist_edit.php
示例5: log_error
log_error("[snort] WARNING: unable to resolve IP Address Alias [{$v['bind_to']}] for HTTP_INSPECT server '{$v['name']}' ... skipping this server engine.");
continue;
}
} else {
log_error("[snort] WARNING: unable to resolve IP Address Alias [{$v['bind_to']}] for HTTP_INSPECT server '{$v['name']}' ... skipping this server engine.");
continue;
}
$http_inspect_servers .= $buffer;
$http_inspect_servers .= "\tprofile {$v['server_profile']} \\\n";
if ($v['no_alerts'] == "on") {
$http_inspect_servers .= "\tno_alerts \\\n";
}
if ($v['ports'] == "default" || empty($v['ports'])) {
$http_inspect_servers .= "\tports { {$http_ports} } \\\n";
} elseif (is_alias($v['ports'])) {
$tmp = trim(filter_expand_alias($v['ports']));
if (!empty($tmp)) {
$tmp = preg_replace('/\\s+/', ' ', $tmp);
$tmp = snort_expand_port_range($tmp, ' ');
$http_inspect_servers .= "\tports { {$tmp} } \\\n";
} else {
log_error("[snort] WARNING: unable to resolve Ports Alias [{$v['ports']}] for HTTP_INSPECT server '{$v['name']}' ... using safe default instead.");
$http_inspect_servers .= "\tports { {$http_ports} } \\\n";
}
} else {
log_error("[snort] WARNING: unable to resolve Ports Alias [{$v['ports']}] for HTTP_INSPECT server '{$v['name']}' ... using safe default instead.");
$http_inspect_servers .= "\tports { {$http_ports} } \\\n";
}
$http_inspect_servers .= "\tserver_flow_depth {$v['server_flow_depth']} \\\n";
$http_inspect_servers .= "\tclient_flow_depth {$v['client_flow_depth']} \\\n";
$http_inspect_servers .= "\thttp_methods { GET POST PUT SEARCH MKCOL COPY MOVE LOCK UNLOCK NOTIFY POLL BCOPY BDELETE BMOVE LINK UNLINK OPTIONS HEAD DELETE TRACE TRACK CONNECT SOURCE SUBSCRIBE UNSUBSCRIBE PROPFIND PROPPATCH BPROPFIND BPROPPATCH RPC_CONNECT PROXY_SUCCESS BITS_POST CCM_POST SMS_POST RPC_IN_DATA RPC_OUT_DATA RPC_ECHO_DATA } \\\n";
开发者ID:randyqx,项目名称:pfsense-packages,代码行数:31,代码来源:snort_generate_conf.php
示例6: trim
// Remove trailing newline
$host_os_policy = trim($host_os_policy);
}
// Add the HTTP Server-specific policies if configured, otherwise
// just set default to IDS for all networks.
if (!is_array($suricatacfg['libhtp_policy']['item'])) {
$suricatacfg['libhtp_policy']['item'] = array();
}
if (empty($suricatacfg['libhtp_policy']['item'])) {
$http_hosts_default_policy = "default-config:\n personality: IDS\n request-body-limit: 4096\n response-body-limit: 4096\n";
$http_hosts_default_policy .= " double-decode-path: no\n double-decode-query: no\n uri-include-all: no\n";
} else {
foreach ($suricatacfg['libhtp_policy']['item'] as $k => $v) {
if ($v['bind_to'] != "all") {
$engine = "server-config:\n - {$v['name']}:\n";
$tmp = trim(filter_expand_alias($v['bind_to']));
if (!empty($tmp)) {
$engine .= " address: [";
$tmp = preg_replace('/\\s+/', ',', $tmp);
$list = explode(',', $tmp);
foreach ($list as $addr) {
if (is_ipaddrv6($addr) || is_subnetv6($addr)) {
$engine .= "\"{$addr}\", ";
} elseif (is_ipaddrv4($addr) || is_subnetv4($addr)) {
$engine .= "{$addr}, ";
} else {
log_error("[suricata] WARNING: invalid IP address value '{$addr}' in Alias {$v['bind_to']} will be ignored.");
continue;
}
}
$engine = trim($engine, ' ,');
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:suricata_generate_yaml.php
示例7: foreach
</thead>
<tbody>
<?php
$i = 0;
foreach ($a_aliases as $alias) {
?>
<?php
if (!in_array($alias['type'], $a_types)) {
continue;
}
if (($alias['type'] == "network" || $alias['type'] == "host") && $multi_ip != "yes" && !snort_is_single_addr_alias($alias['name'])) {
$textss = "<span class=\"gray\">";
$textse = "</span>";
$disable = true;
$tooltip = gettext("Aliases resolving to multiple address entries cannot be used with the destination target.");
} elseif (($alias['type'] == "network" || $alias['type'] == "host") && trim(filter_expand_alias($alias['name'])) == "") {
$textss = "<span class=\"gray\">";
$textse = "</span>";
$disable = true;
$tooltip = gettext("Aliases representing a FQDN host cannot be used in Snort preprocessor configurations.");
} else {
$textss = "";
$textse = "";
$disable = "";
$selectablealias = true;
$tooltip = gettext("Selected entry will be imported. Click to toggle selection.");
}
?>
<?php
if ($disable) {
?>
开发者ID:LFCavalcanti,项目名称:pfsense-packages,代码行数:31,代码来源:snort_select_alias.php
示例8: foreach
$i = 0;
foreach ($a_aliases as $alias) {
?>
<?php
if ($alias['type'] != "host" && $alias['type'] != "network") {
continue;
}
if (isset($used[$alias['name']])) {
continue;
}
if (!$multi_ip && !snort_is_single_addr_alias($alias['name'])) {
$textss = "<span class=\"gray\">";
$textse = "</span>";
$disable = true;
$tooltip = gettext("Aliases resolving to multiple addresses cannot be used with the '{$eng}'.");
} elseif (trim(filter_expand_alias($alias['name'])) == "") {
$textss = "<span class=\"gray\">";
$textse = "</span>";
$disable = true;
$tooltip = gettext("Aliases representing a FQDN host cannot be used in Snort preprocessor configurations.");
} else {
$textss = "";
$textse = "";
$disable = "";
$selectablealias = true;
$tooltip = gettext("Selected entries will be imported. Click to toggle selection of this entry.");
}
?>
<?php
if ($disable) {
?>
开发者ID:LFCavalcanti,项目名称:pfsense-packages,代码行数:31,代码来源:snort_import_aliases.php
示例9: htmlspecialchars
<td class="listlr"
ondblclick="document.location='snort_passlist_edit.php?id=<?php
echo $i;
?>
';">
<?php
echo htmlspecialchars($list['name']);
?>
</td>
<td class="listr"
ondblclick="document.location='snort_passlist_edit.php?id=<?php
echo $i;
?>
';"
title="<?php
echo filter_expand_alias($list['address']);
?>
">
<?php
echo gettext($list['address']);
?>
</td>
<td class="listbg"
ondblclick="document.location='snort_passlist_edit.php?id=<?php
echo $i;
?>
';">
<font color="#FFFFFF"> <?php
echo htmlspecialchars($list['descr']);
?>
开发者ID:MarkVLK,项目名称:pfsense-packages,代码行数:31,代码来源:snort_passlist.php
注:本文中的filter_expand_alias函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论