idstools.scripts.rulecat module¶
-
class
idstools.scripts.rulecat.
AllRuleMatcher
[source]¶ Bases:
object
Matcher object to match all rules.
-
class
idstools.scripts.rulecat.
DropRuleFilter
(matcher)[source]¶ Bases:
object
Filter to modify an idstools rule object to a drop rule.
-
class
idstools.scripts.rulecat.
FileTracker
[source]¶ Bases:
object
Used to check if files are modified.
Usage: Add files with add(filename) prior to modification. Test with any_modified() which will return True if any of the checksums have been modified.
-
class
idstools.scripts.rulecat.
FilenameMatcher
(filename)[source]¶ Bases:
object
Matcher object to match a rule by its filename. This is similar to a group but has no specifier prefix.
-
class
idstools.scripts.rulecat.
GroupMatcher
(pattern)[source]¶ Bases:
object
Matcher object to match an idstools rule object by its group (ie: filename).
-
class
idstools.scripts.rulecat.
IdRuleMatcher
(generatorId, signatureId)[source]¶ Bases:
object
Matcher object to match an idstools rule object by its signature ID.
-
class
idstools.scripts.rulecat.
ModifyRuleFilter
(matcher, pattern, repl)[source]¶ Bases:
object
Filter to modify an idstools rule object.
Important note: This filter does not modify the rule inplace, but instead returns a new rule object with the modification.
-
class
idstools.scripts.rulecat.
ReRuleMatcher
(pattern)[source]¶ Bases:
object
Matcher object to match an idstools rule object by regular expression.
-
class
idstools.scripts.rulecat.
ThresholdProcessor
[source]¶ Bases:
object
-
patterns
= [re.compile('\\s+(re:"(.*)")'), re.compile('\\s+(re:(.*?)),.*'), re.compile('\\s+(re:(.*))')]¶
-
-
idstools.scripts.rulecat.
build_report
(prev_rulemap, rulemap)[source]¶ Build a report of changes between 2 rulemaps.
Returns a dict with the following keys that each contain a list of rules. - added - removed - modified