Skip to content

Commit 1f8414d

Browse files
author
Samuel Hassine
committed
[doc] Update examples
1 parent 9811225 commit 1f8414d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/create_indicator_of_campaign.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
name="C2 server of the new campaign",
3030
description="This is the C2 server of the campaign",
3131
pattern_type="stix",
32-
indicator_pattern="[domain-name:value = 'www.5z8.info' AND domain-name:resolves_to_refs[*].value = '198.51.100.1/32']",
33-
main_observable_type="IPv4-Addr",
32+
pattern="[domain-name:value = 'www.5z8.info' AND domain-name:resolves_to_refs[*].value = '198.51.100.1/32']",
33+
x_opencti_main_observable_type="IPv4-Addr",
3434
valid_from=date,
3535
)
3636
print(indicator)

pycti/entities/opencti_indicator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def create(self, **kwargs):
361361
else:
362362
self.opencti.log(
363363
"error",
364-
"[opencti_indicator] Missing parameters: name and pattern and main_observable_type",
364+
"[opencti_indicator] Missing parameters: name or pattern or x_opencti_main_observable_type",
365365
)
366366

367367
"""

0 commit comments

Comments
 (0)