File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,30 @@ sub parse_message {
36
36
37
37
$log -> trace(" Parsing Sourcefire email" );
38
38
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
+ } ;
40
63
41
64
my $body = $href -> {body_html } // $href -> {body_plain };
42
65
$body =~ s / [\n\r ]/ /g;
You can’t perform that action at this time.
0 commit comments