aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort
diff options
context:
space:
mode:
Diffstat (limited to 'config/snort')
-rwxr-xr-xconfig/snort/snort_rules.php3
-rwxr-xr-xconfig/snort/snort_rules_edit.php4
2 files changed, 4 insertions, 3 deletions
diff --git a/config/snort/snort_rules.php b/config/snort/snort_rules.php
index 63c1f851..f332a96d 100755
--- a/config/snort/snort_rules.php
+++ b/config/snort/snort_rules.php
@@ -384,6 +384,7 @@ function popup(url)
foreach (array_keys($rules_map) as $k1) {
foreach (array_keys($rules_map[$k1]) as $k2) {
$sid = snort_get_sid($rules_map[$k1][$k2]['rule']);
+ $gid = snort_get_gid($rules_map[$k1][$k2]['rule']);
if (isset($disablesid[$sid])) {
$textss = "<span class=\"gray\">";
$textse = "</span>";
@@ -447,7 +448,7 @@ function popup(url)
?>
<td width="3%" align="center" valign="middle" nowrap class="list">
<a href="javascript: void(0)"
- onclick="popup('snort_rules_edit.php?id=<?=$id;?>&openruleset=<?=$currentruleset;?>&ids=<?=$sid;?>')"><img
+ onclick="popup('snort_rules_edit.php?id=<?=$id;?>&openruleset=<?=$currentruleset;?>&ids=<?=$sid;?>&gid=<?=$gid;?>')"><img
src="../themes/<?= $g['theme']; ?>/images/icons/icon_right.gif"
title="<?php echo gettext("Click to view rule"); ?>" width="17" height="17" border="0"></a>
<!-- Codes by Quackit.com -->
diff --git a/config/snort/snort_rules_edit.php b/config/snort/snort_rules_edit.php
index 318df6f9..ab1a24b2 100755
--- a/config/snort/snort_rules_edit.php
+++ b/config/snort/snort_rules_edit.php
@@ -70,7 +70,7 @@ $contents = '';
if (substr($file, 0, 10) == "IPS Policy") {
$rules_map = snort_load_vrt_policy($a_rule[$id]['ips_policy']);
if (isset($_GET['ids']))
- $contents = $rules_map[1][trim($_GET['ids'])]['rule'];
+ $contents = $rules_map[$_GET['gid']][trim($_GET['ids'])]['rule'];
else {
$contents = "# Snort IPS Policy - " . ucfirst($a_rule[$id]['ips_policy']) . "\n\n";
foreach (array_keys($rules_map) as $k1) {
@@ -85,7 +85,7 @@ if (substr($file, 0, 10) == "IPS Policy") {
// Is it a SID to load the rule text from?
elseif (isset($_GET['ids'])) {
$rules_map = snort_load_rules_map("{$snortdir}/rules/{$file}");
- $contents = $rules_map[1][trim($_GET['ids'])]['rule'];
+ $contents = $rules_map[$_GET['gid']][trim($_GET['ids'])]['rule'];
}
// Is it our special flowbit rules file?
elseif ($file == $flowbit_rules_file)