Skip to content

Commit

Permalink
die bump + yara load restore
Browse files Browse the repository at this point in the history
  • Loading branch information
doomedraven committed Jan 4, 2025
1 parent 2e53d84 commit db1beca
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 123 deletions.
13 changes: 7 additions & 6 deletions lib/cuckoo/common/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,13 @@ def init_yara(self, raise_exception: bool = False):
log.warning("Missing Yara directory: %s?", category_root)
continue

for filename in os.listdir(category_root):
if not filename.endswith((".yar", ".yara")):
continue
filepath = os.path.join(category_root, filename)
rules[f"rule_{category}_{len(rules)}"] = filepath
indexed.append(filename)
for category_root, _, filenames in os.walk(category_root, followlinks=True):
for filename in filenames:
if not filename.endswith((".yar", ".yara")):
continue
filepath = os.path.join(category_root, filename)
rules[f"rule_{category}_{len(rules)}"] = filepath
indexed.append(filename)

# Need to define each external variable that will be used in the
# future. Otherwise Yara will complain.
Expand Down
Loading

0 comments on commit db1beca

Please sign in to comment.