mirror of https://github.com/MISP/MISP-maltego
fix: [pymisp] fixes #31 no timeout in establishing MISP connection
parent
f23f7ddaa1
commit
84868d8cfb
2
setup.py
2
setup.py
|
@ -36,7 +36,7 @@ setup(
|
||||||
python_requires='>=3.5',
|
python_requires='>=3.5',
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'canari>=3.3.10,<4',
|
'canari>=3.3.10,<4',
|
||||||
'PyMISP>=2.4.114'
|
'PyMISP>=2.4.127'
|
||||||
],
|
],
|
||||||
dependency_links=[
|
dependency_links=[
|
||||||
# custom links for the install_requires
|
# custom links for the install_requires
|
||||||
|
|
|
@ -85,7 +85,7 @@ class MISPConnection():
|
||||||
misp_key = parameters['mispkey'].value
|
misp_key = parameters['mispkey'].value
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise MaltegoException("ERROR: mispurl and mispkey need to be set to something valid")
|
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:
|
except Exception:
|
||||||
if is_local_exec_mode():
|
if is_local_exec_mode():
|
||||||
raise MaltegoException("ERROR: Cannot connect to MISP server. Please verify your MISP_Maltego.conf settings.")
|
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'):
|
if a['type'] in ('url', 'uri'):
|
||||||
yield(URL(url=a['value'], short_title=a['value'], link_label=link_label, notes=notes, bookmark=Bookmark.Green))
|
yield(URL(url=a['value'], short_title=a['value'], link_label=link_label, notes=notes, bookmark=Bookmark.Green))
|
||||||
return
|
return
|
||||||
|
# FIXME implement attachment screenshot type
|
||||||
|
|
||||||
# attribute is from an object, and a relation gives better understanding of the type of attribute
|
# 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']):
|
if a.get('object_relation') and mapping_misp_to_maltego.get(a['object_relation']):
|
||||||
|
|
Loading…
Reference in New Issue