Merge pull request #749 from slv008/main

Fix misp API response content parsing
744
Raphaël Vinot 2021-05-27 08:54:32 -07:00 committed by GitHub
commit f344b3995a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ attr_cnt_duplicate = 0
attr_cnt_changed = 0
yara_rules = []
yara_rule_names = []
if 'response' in result and 'Attribute' in result['response']:
for attribute in result['response']['Attribute']:
if result.get('Attribute'):
for attribute in result.get('Attribute'):
value = attribute['value']
event_id = attribute['event_id']
attribute_id = attribute['id']