Code modifications regarding MISP integration

This commit is contained in:
Félix Aime committed 2021-06-09 18:24:37 +02:00
1 parent a481e88251
commit f189f2e100
5 files changed
+138 -325

No files matched your search

+6 -1
View File
@@ -17,12 +17,17 @@ class MISP(object):
def __init__(self):
return None
def add_instance(self, name, url, apikey, verify):
def add_instance(self, instance):
"""
Parse and add a MISP instance to the database.
:return: status of the operation in JSON
"""
url = instance["url"]
name = instance["name"]
apikey = instance["key"]
verify = instance["ssl"]
sameinstances = db.session.query(MISPInst).filter(
MISPInst.url == url, MISPInst.apikey == apikey)
if sameinstances.count():