# You have not selected any rules in the Categories tab.
|
|
Category:
|
|
|
| <
|
$value )
{
$disabled = "False";
$comments = "False";
$findme = "# alert"; //find string for disabled alerts
$disabled_pos = strstr($value, $findme);
$counter2 = 1;
$sid = snort_get_rule_part($value, 'sid:', ';', 0);
//check to see if the sid is numberical
if (!is_numeric($sid))
continue;
//if find alert is false, then rule is disabled
if ($disabled_pos !== false){
$counter2 = $counter2+1;
$textss = "";
$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 = snort_get_rule_part($value, 'msg: "', '";', 0);
else if (strstr($value, 'msg:"'))
$message = snort_get_rule_part($value, 'msg:"', '";', 0);
echo " $textss
$textse
|
$textss $sid $textse
|
$textss $protocol $textse
|
$textss $source $textse
|
$textss $source_port $textse
|
$textss $destination $textse
|
$textss $destination_port $textse
|
$textss $message $textse
| ";
?>
|
|