+
+
+ Category:
+
+ |
+
+
+ $value )
+ {
+ $disabled = "False";
+ $comments = "False";
+ $findme = "# alert"; //find string for disabled alerts
+ $disabled_pos = strstr($value, $findme);
-
-
- Category: ";
-
- //string for populating category select
- $currentruleset = basename($rulefile);
-
- ?>
-
-
- ";
- $textse = "";
- $iconb = "icon_block_d.gif";
- }
- else
- {
- $textss = $textse = "";
- $iconb = "icon_block.gif";
- }
-
- if ($disabled_pos !== false){
- $ischecked = "";
- }else{
- $ischecked = "checked";
- }
-
- $rule_content = explode(' ', $tempstring);
-
- $protocol = $rule_content[$counter2];//protocol location
- $counter2++;
- $source = $rule_content[$counter2];//source location
- $counter2++;
- $source_port = $rule_content[$counter2];//source port location
- $counter2 = $counter2+2;
- $destination = $rule_content[$counter2];//destination location
- $counter2++;
- $destination_port = $rule_content[$counter2];//destination port location
-
- if (strstr($tempstring, 'msg: "'))
- $message = get_middle($tempstring, 'msg: "', '";', 0);
- if (strstr($tempstring, 'msg:"'))
- $message = get_middle($tempstring, 'msg:"', '";', 0);
-
- echo "
-
- $textss\n";
- ?>
-
-
-
-
- |
- $textss
- $sid
- $textse
- |
-
- $textss
- $protocol";
- ?>
-
- |
- $textss
- $source
- $textse
- |
-
- $textss
- $source_port
- $textse
- |
-
- $textss
- $destination
- $textse
- |
-
- $textss
- $destination_port
- $textse
- | ";
- ?>
- ";
+ $textse = "";
+ $iconb = "icon_block_d.gif";
+
+ $ischecked = "";
+ } else {
+ $textss = $textse = "";
+ $iconb = "icon_block.gif";
+
+ $ischecked = "checked";
+ }
+
+ $rule_content = explode(' ', $value);
+
+ $protocol = $rule_content[$counter2];//protocol location
+ $counter2++;
+ $source = substr($rule_content[$counter2], 0, 20) . "...";//source location
+ $counter2++;
+ $source_port = $rule_content[$counter2];//source port location
+ $counter2 = $counter2+2;
+ $destination = substr($rule_content[$counter2], 0, 20) . "...";//destination location
+ $counter2++;
+ $destination_port = $rule_content[$counter2];//destination port location
+
+ if (strstr($value, 'msg: "'))
+ $message = get_middle($value, 'msg: "', '";', 0);
+ else if (strstr($value, 'msg:"'))
+ $message = get_middle($value, 'msg:"', '";', 0);
+
+ echo " $textss\n";
+ ?>
+
+
+
+
+ |
+ $textss
+ $sid
+ $textse
+ |
+
+ $textss
+ $protocol";
+ echo "$textse
+ |
+
+ $textss
+ $source
+ $textse
+ |
+
+ $textss
+ $source_port
+ $textse
+ |
+
+ $textss
+ $destination
+ $textse
+ |
+
+ $textss
+ $destination_port
+ $textse
+ |
+
+ $textss
$message
$textse
- | ";
- ?>
-
+ | ";
+ ?>
+
-
- ![edit rule](../themes/<?= $g['theme']; ?>/images/icons/icon_e.gif) |
+
+ ![edit rule](../themes/<?= $g['theme']; ?>/images/icons/icon_e.gif) |
-
+
- |
- ";
- ?>
-
- |