Skip Menu |

This queue is for tickets about the Parse-Snort CPAN distribution.

Report information
The Basics
Id: 92408
Status: open
Priority: 0/
Queue: Parse-Snort

People
Owner: Nobody in particular
Requestors: frederriffic [...] yahoo.ca
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.8



Subject: Does not work with preprocessor rules
Date: Thu, 23 Jan 2014 07:10:03 -0800 (PST)
To: "bug-Parse-Snort [...] rt.cpan.org" <bug-Parse-Snort [...] rt.cpan.org>
From: Fred Maillou <frederriffic [...] yahoo.ca>
Since regular rules and pre-procesor (and decoder) rules shares a similar structure, it can be expected that the module works also with these.  Which would be useful.  Unfortunately, it does not seem so.  It cannot read the sid and gid of those rules (maybe it cannot read more, I haven't checked it out fully). Test code: # standard rules from snort VRT update pack open (FH, "< preprocessor.rules"); my @rules = <FH>; close FH; # Only take into account the enabled rules my @enabledRules = grep(!/^#/, @rules); foreach my $rule (@enabledRules) {     my $tmprule = Parse::Snort->new();     $tmprule->parse($rule);     my $sid = $tmprule->sid();     my $gid = $tmprule->gid();     if (not defined $gid) {         $gid = 1;     }     say "$gid";     say "$sid"; } Output is like: 1 Use of uninitialized value $sid in string at ./srp1 line 27. 1 Use of uninitialized value $sid in string at ./srp1 line 27.
Thanks for the bug report! On Thu Jan 23 10:12:59 2014, frederriffic@yahoo.ca wrote: Show quoted text
> Since regular rules and pre-procesor (and decoder) rules shares a > similar structure, it can be expected that the module works also with > these.
Can you paste an example pre-processor rule that isn't parsing correctly?
Hi, sorry for the long wait. But I think we fixed this in version 0.8.