The following example describes how to use the STIX 2 indicator parser.
For more information on the Bundle
object and how it gets created, see the Overview.
from cbc_importer.stix_parsers.v2.parser import STIX2Parser from cbc_sdk import CBCloudAPI from stix2 import parse as stix2parse cbcsdk = CBCloudAPI(profile="default") stix_parser = STIX2Parser(cbcsdk) stix_data = None # This can be string, dict or file-like object stix_content = stix2parse(stix_data, allow_custom=True, version="2.0") iocs = stix_parser._parse_stix_objects(stix_content)