mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
logs.cgi/ids.dat: Rework linking to external rule documentation.
Check if the sid of a rule belongs to sourcefire and link to the changed URL for gathering more details. If the sid of the rule belongs to emergingthreads now link to the emergingthreads documentation. Fixes #11806. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
89f634ff9e
commit
f2f0d61fc1
@@ -335,10 +335,18 @@ print <<END
|
|||||||
<td valign='top'>
|
<td valign='top'>
|
||||||
END
|
END
|
||||||
;
|
;
|
||||||
if ($sid ne "n/a") {
|
if ($sid eq "n/a") {
|
||||||
print "<a href='https://www.snort.org/rule_docs/$sid' ";
|
print $sid;
|
||||||
|
} elsif ($sid < 1000000) {
|
||||||
|
# Link to sourcefire if the the rule sid is less than 1000000.
|
||||||
|
print "<a href='https://www.snort.org/rule_docs/1-$sid' ";
|
||||||
|
print "target='_blank'>$sid</a></td>\n";
|
||||||
|
} elsif ($sid >= 2000000 and $sid < 3000000) {
|
||||||
|
# Link to emergingthreats if the rule sid is between 2000000 and 3000000.
|
||||||
|
print "<a href='http://doc.emergingthreats.net/$sid' ";
|
||||||
print "target='_blank'>$sid</a></td>\n";
|
print "target='_blank'>$sid</a></td>\n";
|
||||||
} else {
|
} else {
|
||||||
|
# No external link for user defined rules
|
||||||
print $sid;
|
print $sid;
|
||||||
}
|
}
|
||||||
print <<END
|
print <<END
|
||||||
|
|||||||
Reference in New Issue
Block a user