From 120e897e9ba68067df348a6b48d6c56fb8e11416 Mon Sep 17 00:00:00 2001 From: Emmanuelle Vargas-Gonzalez Date: Thu, 26 Jul 2018 09:00:20 -0400 Subject: [PATCH] Update Indicator example to 2.1 representation. --- README.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index d115c2e..1e35909 100644 --- a/README.rst +++ b/README.rst @@ -33,7 +33,7 @@ be set automatically if not provided as keyword arguments. from stix2 import Indicator indicator = Indicator(name="File hash for malware variant", - labels=["malicious-activity"], + indicator_types=["malicious-activity"], pattern="[file:hashes.md5 = 'd41d8cd98f00b204e9800998ecf8427e']") To parse a STIX JSON string into a Python STIX object, use ``parse()``: @@ -44,13 +44,14 @@ To parse a STIX JSON string into a Python STIX object, use ``parse()``: indicator = parse("""{ "type": "indicator", + "spec_version": "2.1", "id": "indicator--dbcbd659-c927-4f9a-994f-0a2632274394", "created": "2017-09-26T23:33:39.829Z", "modified": "2017-09-26T23:33:39.829Z", - "labels": [ + "name": "File hash for malware variant", + "indicator_types": [ "malicious-activity" ], - "name": "File hash for malware variant", "pattern": "[file:hashes.md5 ='d41d8cd98f00b204e9800998ecf8427e']", "valid_from": "2017-09-26T23:33:39.829952Z" }""")