More code modification regarding MISP integration

This commit is contained in:
Félix Aime 2021-06-10 19:00:06 +02:00
parent 8e09d4e1c8
commit 73946c27e2

View File

@ -3,8 +3,9 @@
from app import db from app import db
from app.db.models import MISPInst from app.db.models import MISPInst
from sqlalchemy.sql import exists
from app.definitions import definitions as defs from app.definitions import definitions as defs
from sqlalchemy.sql import exists
from urllib.parse import unquote from urllib.parse import unquote
from flask import escape from flask import escape
from pymisp import PyMISP from pymisp import PyMISP
@ -27,7 +28,7 @@ class MISP(object):
name = instance["name"] name = instance["name"]
apikey = instance["key"] apikey = instance["key"]
verify = instance["ssl"] verify = instance["ssl"]
last_sync = int(time.time()-31536000) # One year last_sync = int(time.time()-31536000) # One year
sameinstances = db.session.query(MISPInst).filter( sameinstances = db.session.query(MISPInst).filter(
MISPInst.url == url, MISPInst.apikey == apikey) MISPInst.url == url, MISPInst.apikey == apikey)