Skip to content

Commit

Permalink
adding support for .yara and adding to threat report title
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason McFarland committed Mar 6, 2019
1 parent 9653a10 commit 763a9a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def generate_feed_from_db():
'timestamp': int(time.mktime(time.gmtime())),
'link': '',
'id': 'binary_{0}'.format(binary.md5),
'title': '',
'title': binary.last_success_msg,
'description': binary.last_success_msg
}

Expand Down Expand Up @@ -83,7 +83,7 @@ def generate_yara_rule_map_hash(yara_rule_path):
def generate_rule_map_remote(yara_rule_path):
ret_dict = dict()
for fn in os.listdir(yara_rule_path):
if fn.lower().endswith(".yar"):
if fn.lower().endswith(".yar") or fn.lower().endswith(".yara"):
ret_dict[fn] = open(os.path.join(yara_rule_path, fn), 'rb').read()

result = update_yara_rules_remote.delay(ret_dict)
Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def generate_rule_map(yara_rule_path):

rule_map = {}
for fn in os.listdir(yara_rule_path):
if fn.lower().endswith(".yar"):
if fn.lower().endswith(".yar") or fn.lower().endswith(".yara"):
fullpath = os.path.join(yara_rule_path, fn)
if not os.path.isfile(fullpath):
continue
Expand Down

0 comments on commit 763a9a1

Please sign in to comment.