Git Product home page Git Product logo

Comments (5)

jasonish avatar jasonish commented on June 5, 2024

This is kind of on purpose.. I don't want to the parser to break if Snort extends the rule syntax a little but keeps the general format the same. Just like all the option keywords are not validated to make sure they are know, or have the correct format (plus in the past, optional snort modules could extend the Snort rule syntax, so being strict could break valid rules).

For this case specifically, I think its safe to assume the direction parameters will not be extended. So I'll consider tightening up the regex for only valid directions.

from py-idstools.

cleesmith avatar cleesmith commented on June 5, 2024

Yes, snort is a bit of a "free for all" ... a mess really. I could always re-parse it and validate.
Or if idstools.rule.parse returned the direction as an attribute I could check that, maybe that is more flexible for any future changes.

Also, it sees comments as invalid, but I guess I could check for that before calling parse
... or maybe return the action attribute as "comment" ... not sure on this one as ruleman's goal is
to return a single file of enabled rules called snort.rules and drop everything else.

from py-idstools.

jasonish avatar jasonish commented on June 5, 2024

Yes, snort is a bit of a "free for all" ... a mess really. I could always re-parse it and validate.
Or if idstools.rule.parse returned the direction as an attribute I could check that, maybe that is more flexible for any future changes.

Good idea. I just pushed this change.

Also, it sees comments as invalid, but I guess I could check for that before calling parse
... or maybe return the action attribute as "comment" ... not sure on this one as ruleman's goal is
to return a single file of enabled rules called snort.rules and drop everything else.

The idea here is to parse a file of rules which may contain arbitrary comments. So comments are infact disable rules, so each and every line is evaluated to check to see if its a rule. If its a commented out line that parses as a rule, its returned as a rule, otherwise None should be returned.

from py-idstools.

cleesmith avatar cleesmith commented on June 5, 2024

So the change is only available on master and not 0.4.2 or 0.4.3 ?
That's ok, I'll do pip install git+https://github.com/jasonish/py-idstools.git.
Thanks

from py-idstools.

jasonish avatar jasonish commented on June 5, 2024

You'll need 0.4.3 which is now on PyPI.

On Fri, Dec 12, 2014 at 2:56 PM, chris [email protected] wrote:

So the change is only available on master and not 0.4.2 ?


Reply to this email directly or view it on GitHub
#11 (comment).

from py-idstools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.