Skip to content
This repository was archived by the owner on Nov 29, 2025. It is now read-only.

Commit 2396446

Browse files
author
Samuel Hassine
committed
[client] Fix indicator creation
1 parent 91bc71d commit 2396446

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

examples/create_incident_with_ttps_and_indicators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pycti import OpenCTIApiClient
77

88
# Variables
9-
api_url = 'http://localhost:4000'
9+
api_url = 'https://demo.opencti.io'
1010
api_token = 'fa63eb1f-bf14-4777-9190-43b4571cbc8b'
1111

1212
# OpenCTI initialization

examples/create_indicator_of_campaign.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pycti import OpenCTIApiClient
77

88
# Variables
9-
api_url = 'https://demo.opencti.io'
9+
api_url = 'http://localhost:4000'
1010
api_token = 'fa63eb1f-bf14-4777-9190-43b4571cbc8b'
1111

1212
# OpenCTI initialization

pycti/entities/opencti_indicator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ def __init__(self, opencti):
1717
alias
1818
description
1919
graph_data
20-
pattern
20+
indicator_pattern
21+
pattern_type
2122
valid_from
2223
valid_until
2324
score
@@ -376,7 +377,7 @@ def to_stix2(self, **kwargs):
376377
else:
377378
indicator['labels'] = ['indicator']
378379
if self.opencti.not_empty(entity['description']): indicator['description'] = entity['description']
379-
indicator['pattern'] = entity['pattern']
380+
indicator['pattern'] = entity['indicator_pattern']
380381
if self.opencti.not_empty(entity['pattern_type']):
381382
indicator[CustomProperties.PATTERN_TYPE] = entity['pattern_type']
382383
else:

0 commit comments

Comments
 (0)