From b29be6a1b4e9590f82443c4ca557e976ee57d584 Mon Sep 17 00:00:00 2001 From: Jeffrey E Date: Wed, 19 Dec 2018 12:26:06 +0100 Subject: [PATCH] Fix for working with latest version It seems that the latest version of pyMISP or MISP itself has changed it data structure. After reviewing the response, this change seemed logical and it is working (at least for me). --- misp_taxii_hooks/hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misp_taxii_hooks/hooks.py b/misp_taxii_hooks/hooks.py index 81eed0e..4119797 100644 --- a/misp_taxii_hooks/hooks.py +++ b/misp_taxii_hooks/hooks.py @@ -66,7 +66,7 @@ def post_stix(manager, content_block, collection_ids, service_id): for attrib in values: log.info("Checking for existence of %s", attrib) search = MISP.search("attributes", values=str(attrib)) - if search["response"] != []: + if search["response"]["Attribute"] != []: # This means we have it! log.info("%s is a duplicate, we'll ignore it.", attrib) package.attributes.pop([x.value for x in package.attributes].index(attrib))