diff --git a/pymisp/tools/stix.py b/pymisp/tools/stix.py index fe9ca2a..b6463c8 100644 --- a/pymisp/tools/stix.py +++ b/pymisp/tools/stix.py @@ -2,7 +2,8 @@ # -*- coding: utf-8 -*- try: - from misp_stix_converter.converters.buildMISPAttribute import buildEvent, open_stix + from misp_stix_converter.converters.buildMISPAttribute import buildEvent + from misp_stix_converter.converters import convert from misp_stix_converter.converters.convert import MISPtoSTIX has_misp_stix_converter = True except ImportError: @@ -13,7 +14,7 @@ def load_stix(stix, distribution=3, threat_level_id=2, analysis=0): '''Returns a MISPEvent object from a STIX package''' if not has_misp_stix_converter: raise Exception('You need to install misp_stix_converter: pip install git+https://github.com/MISP/MISP-STIX-Converter.git') - stix = open_stix(stix) + stix = convert.load_stix(stix) return buildEvent(stix, distribution=distribution, threat_level_id=threat_level_id, analysis=analysis)