Skip to content

Commit

Permalink
Fixed error when running on pastes without filenames
Browse files Browse the repository at this point in the history
Should fix #96
  • Loading branch information
Plazmaz committed Dec 9, 2019
1 parent e277756 commit bd3d631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pastehunter.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def paste_scanner():
# Process the paste data here
try:
# Scan with yara
matches = rules.match(data=raw_paste_data, externals={'filename': paste_data.get('filename')})
matches = rules.match(data=raw_paste_data, externals={'filename': paste_data.get('filename', '')})
except Exception as e:
logger.error("Unable to scan raw paste : {0} - {1}".format(paste_data['pasteid'], e))
continue
Expand Down

0 comments on commit bd3d631

Please sign in to comment.