mirror of https://github.com/MISP/MISP
fix: [stix export] Added all the needed paths to load the required python libraries
parent
9a86b2c35a
commit
3a1fbf7023
|
@ -22,10 +22,15 @@ import json
|
|||
import sys
|
||||
import traceback
|
||||
from pathlib import Path
|
||||
from stix.core import STIXPackage
|
||||
from typing import Union
|
||||
|
||||
sys.path.append(str(Path(__file__).resolve().parent / 'misp-stix'))
|
||||
_current_path = Path(__file__).resolve().parent
|
||||
sys.path.insert(0, str(_current_path.parents[2] / 'cti-python-stix2'))
|
||||
sys.path.insert(1, str(_current_path / 'python-stix'))
|
||||
sys.path.insert(2, str(_current_path / 'python-cybox'))
|
||||
sys.path.insert(3, str(_current_path / 'mixbox'))
|
||||
sys.path.insert(4, str(_current_path / 'misp-stix'))
|
||||
from stix.core import STIXPackage
|
||||
from misp_stix_converter import MISPtoSTIX1EventsParser, _get_json_events, _get_xml_events
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,12 @@ import json
|
|||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.append(str(Path(__file__).resolve().parent / 'misp-stix'))
|
||||
_current_path = Path(__file__).resolve().parent
|
||||
sys.path.insert(0, str(_current_path.parents[2] / 'cti-python-stix2'))
|
||||
sys.path.insert(1, str(_current_path / 'python-stix'))
|
||||
sys.path.insert(2, str(_current_path / 'python-cybox'))
|
||||
sys.path.insert(3, str(_current_path / 'mixbox'))
|
||||
sys.path.insert(4, str(_current_path / 'misp-stix'))
|
||||
from misp_stix_converter import stix1_framing, stix20_framing, stix21_framing
|
||||
|
||||
|
||||
|
|
|
@ -22,10 +22,15 @@ import json
|
|||
import sys
|
||||
import traceback
|
||||
from pathlib import Path
|
||||
from stix2.base import STIXJSONEncoder
|
||||
from typing import Union
|
||||
|
||||
sys.path.append(str(Path(__file__).resolve().parent.parent / 'misp-stix'))
|
||||
_scripts_path = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(_scripts_path.parents[2] / 'cti-python-stix2'))
|
||||
sys.path.insert(1, str(_scripts_path / 'python-stix'))
|
||||
sys.path.insert(2, str(_scripts_path / 'python-cybox'))
|
||||
sys.path.insert(3, str(_scripts_path / 'mixbox'))
|
||||
sys.path.insert(4, str(_scripts_path / 'misp-stix'))
|
||||
from stix2.base import STIXJSONEncoder
|
||||
from misp_stix_converter import MISPtoSTIX20Parser, MISPtoSTIX21Parser
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue