Skip to content

Commit 28ee11c

Browse files
committed
Merge branch 'master' of baltig.sandia.gov:scot/SCOT
2 parents 3df7679 + 2f5c96d commit 28ee11c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

lib/Scot/Parser/Sourcefire.pm

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,30 @@ sub parse_message {
3636

3737
$log->trace("Parsing Sourcefire email");
3838

39-
my $regex = qr{\[(?<sid>.*?)\] "(?<rule>.*?)" \[Impact: (?<impact>.*?)\] +From "(?<from>.*?)" at (?<when>.*?) +\[Classification: (?<class>.*?)\] \[Priority: (?<pri>.*?)\] {(?<proto>.*)} (?<rest>.*) *};
39+
# my $regex = qr{\[(?<sid>.*?)\] "(?<rule>.*?)" \[Impact: (?<impact>.*?)\] +From "(?<from>.*?)" at (?<when>.*?) +\[Classification: (?<class>.*?)\] \[Priority: (?<pri>.*?)\] {(?<proto>.*)} (?<rest>.*) *};
40+
41+
my $regex = qr{
42+
\[(?<sid>.*?)\]
43+
\s
44+
"(?<rule>.*?)"
45+
\s
46+
\[Impact: (?<impact>.*?)\]
47+
\s+
48+
From "(?<from>.*?)"
49+
\s
50+
at
51+
\s
52+
(?<when>.*?)
53+
\s+
54+
\[Classification: (?<class>.*?)\]
55+
\s
56+
\[Priority: (?<pri>.*?)\]
57+
\s
58+
\{(?<proto>.*)\}
59+
\s
60+
(?<rest>.*)
61+
\s*
62+
};
4063

4164
my $body = $href->{body_html} // $href->{body_plain};
4265
$body =~ s/[\n\r]/ /g;

0 commit comments

Comments
 (0)