Merge pull request #57 from gekkeharry13/patch-1

PyMISP response structure modification
pull/83/head
Hannah Ward 2018-12-19 11:32:07 +00:00 committed by GitHub
commit 83d43fd704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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))