From 84868d8cfbdacd2101a2ee4c3cf4288c464b3677 Mon Sep 17 00:00:00 2001 From: Christophe Vandeplas Date: Thu, 28 May 2020 10:25:35 +0200 Subject: [PATCH] fix: [pymisp] fixes #31 no timeout in establishing MISP connection --- setup.py | 2 +- src/MISP_maltego/transforms/common/util.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 75b82a6..d8b4730 100755 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ setup( python_requires='>=3.5', install_requires=[ 'canari>=3.3.10,<4', - 'PyMISP>=2.4.114' + 'PyMISP>=2.4.127' ], dependency_links=[ # custom links for the install_requires diff --git a/src/MISP_maltego/transforms/common/util.py b/src/MISP_maltego/transforms/common/util.py index 582df22..b49886b 100644 --- a/src/MISP_maltego/transforms/common/util.py +++ b/src/MISP_maltego/transforms/common/util.py @@ -85,7 +85,7 @@ class MISPConnection(): misp_key = parameters['mispkey'].value except AttributeError: raise MaltegoException("ERROR: mispurl and mispkey need to be set to something valid") - self.misp = PyMISP(misp_url, misp_key, misp_verify, 'json', misp_debug, tool='misp_maltego') + self.misp = PyMISP(misp_url, misp_key, misp_verify, 'json', misp_debug, tool='misp_maltego', timeout=(2, 60)) except Exception: if is_local_exec_mode(): raise MaltegoException("ERROR: Cannot connect to MISP server. Please verify your MISP_Maltego.conf settings.") @@ -219,6 +219,7 @@ def attribute_to_entity(a, link_label=None, event_tags=[], only_self=False): if a['type'] in ('url', 'uri'): yield(URL(url=a['value'], short_title=a['value'], link_label=link_label, notes=notes, bookmark=Bookmark.Green)) return + # FIXME implement attachment screenshot type # attribute is from an object, and a relation gives better understanding of the type of attribute if a.get('object_relation') and mapping_misp_to_maltego.get(a['object_relation']):