Skip to content

Commit

Permalink
fix: skip incompatible rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo23x0 committed Sep 11, 2020
1 parent bfa1744 commit cd4a53c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions loki-upgrader.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,14 @@ def update_signatures(self, clean=False):
if zipFilePath.endswith("/"):
continue
# Skip incompatible rules
skip = False
for incompatible_rule in self.INCOMPATIBLE_RULES:
if sigName == incompatible_rule:
continue
if sigName.endswith(incompatible_rule):
self.logger.log("NOTICE", "Upgrader", "Skipping incompatible rule %s" % sigName)
skip = True
if skip:
continue
# Extract the rules
self.logger.log("DEBUG", "Upgrader", "Extracting %s ..." % zipFilePath)
if "/iocs/" in zipFilePath and zipFilePath.endswith(".txt"):
targetFile = os.path.join(sigDir, "iocs", sigName)
Expand Down

0 comments on commit cd4a53c

Please sign in to comment.