mirror of https://github.com/CIRCL/lookyloo
chg: Add support to timeout in the MISP module
parent
dca06bd272
commit
f017ef5bef
|
@ -14,6 +14,7 @@
|
|||
"apikey": null,
|
||||
"url": "https://misp.url",
|
||||
"verify_tls_cert": true,
|
||||
"timeout": 10,
|
||||
"enable_lookup": false,
|
||||
"enable_push": false
|
||||
},
|
||||
|
|
|
@ -33,7 +33,8 @@ class MISP():
|
|||
self.enable_lookup = False
|
||||
self.enable_push = False
|
||||
try:
|
||||
self.client = PyMISP(url=config['url'], key=config['apikey'], ssl=config['verify_tls_cert'])
|
||||
self.client = PyMISP(url=config['url'], key=config['apikey'],
|
||||
ssl=config['verify_tls_cert'], timeout=config['timeout'])
|
||||
except Exception as e:
|
||||
self.available = False
|
||||
self.logger.warning(f'Unable to connect to MISP: {e}')
|
||||
|
|
Loading…
Reference in New Issue