From 650c87a5348c9af97f2f07b679caaed8cef5c473 Mon Sep 17 00:00:00 2001 From: Silvian I Date: Thu, 27 May 2021 11:31:16 +0200 Subject: [PATCH] Fix misp API response content parsing --- examples/yara_dump.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/yara_dump.py b/examples/yara_dump.py index ed6bc85..11477d8 100755 --- a/examples/yara_dump.py +++ b/examples/yara_dump.py @@ -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']