From f017ef5bef4801dc81f6d2feda616cf6c1bcc8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 1 Feb 2021 13:01:44 +0100 Subject: [PATCH] chg: Add support to timeout in the MISP module --- config/modules.json.sample | 1 + lookyloo/modules.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/modules.json.sample b/config/modules.json.sample index 506c7cf..9c3d899 100644 --- a/config/modules.json.sample +++ b/config/modules.json.sample @@ -14,6 +14,7 @@ "apikey": null, "url": "https://misp.url", "verify_tls_cert": true, + "timeout": 10, "enable_lookup": false, "enable_push": false }, diff --git a/lookyloo/modules.py b/lookyloo/modules.py index 0540d2c..3e8aae2 100644 --- a/lookyloo/modules.py +++ b/lookyloo/modules.py @@ -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}')