Comments (5)
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.
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.
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.
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.
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)
- appStats u2 can't work HOT 1
- Bug: Multiple instances of rule options fields clobber eachother HOT 4
- Recent versions of Snort unified2 not supported. HOT 5
- Feature Request: ability to parse the source, destination, protocol using dictionary.
- SoolRecordReader stop working HOT 2
- eve2pcap.py fails with IPv6 addresses HOT 1
- python2-scapy as pkg dependency
- Connection with suricata-update HOT 2
- Coverting packets object to pcap file HOT 7
- Feature request: mutate metadata key value pairs
- Add .md5 extension between URL's filename and its parameters HOT 1
- Provide option for idstools-u2eve to reload sid-msg.map after updating sid-msg.map contents. HOT 1
- Unified2 Event Types mpls, vlan, and appid not included in u2eve output
- u2json event.appid output is in byte format and mangled
- Tests fail with python 3.11 HOT 1
- Rule parsing fails if last option doesn't close with semi-colon HOT 1
- memory usage increase issue HOT 3
- New release to support python 3.13 HOT 6
- Wrong parsing of pcre and possibly others
- Invalid issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-idstools.