pycti 6.2.4__py3-none-any.whl → 6.2.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pycti might be problematic. Click here for more details.

pycti/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = "6.2.4"
2
+ __version__ = "6.2.6"
3
3
 
4
4
  from .api.opencti_api_client import OpenCTIApiClient
5
5
  from .api.opencti_api_connector import OpenCTIApiConnector
@@ -15,6 +15,7 @@ from .entities.opencti_campaign import Campaign
15
15
  from .entities.opencti_case_incident import CaseIncident
16
16
  from .entities.opencti_case_rfi import CaseRfi
17
17
  from .entities.opencti_case_rft import CaseRft
18
+ from .entities.opencti_channel import Channel
18
19
  from .entities.opencti_course_of_action import CourseOfAction
19
20
  from .entities.opencti_data_component import DataComponent
20
21
  from .entities.opencti_data_source import DataSource
@@ -84,6 +85,7 @@ __all__ = [
84
85
  "CaseIncident",
85
86
  "CaseRfi",
86
87
  "CaseRft",
88
+ "Channel",
87
89
  "Task",
88
90
  "ConnectorType",
89
91
  "CourseOfAction",
@@ -1,5 +1,6 @@
1
1
  # coding: utf-8
2
2
 
3
+ import datetime
3
4
  import json
4
5
  import uuid
5
6
 
@@ -395,10 +396,12 @@ class Grouping:
395
396
  """
396
397
 
397
398
  @staticmethod
398
- def generate_id(name, context):
399
+ def generate_id(name, context, created):
399
400
  name = name.lower().strip()
400
401
  context = context.lower().strip()
401
- data = {"name": name, "context": context}
402
+ if isinstance(created, datetime.datetime):
403
+ created = created.isoformat()
404
+ data = {"name": name, "context": context, "created": created}
402
405
  data = canonicalize(data, utf8=False)
403
406
  id = str(uuid.uuid5(uuid.UUID("00abedb4-aa42-466c-9c01-fed23315a9b7"), data))
404
407
  return "grouping--" + id
@@ -140,7 +140,7 @@ class ThreatActorGroup:
140
140
  @staticmethod
141
141
  def generate_id(name):
142
142
  name = name.lower().strip()
143
- data = {"name": name}
143
+ data = {"name": name, "opencti_type": "Threat-Actor-Group"}
144
144
  data = canonicalize(data, utf8=False)
145
145
  id = str(uuid.uuid5(uuid.UUID("00abedb4-aa42-466c-9c01-fed23315a9b7"), data))
146
146
  return "threat-actor--" + id
@@ -140,7 +140,7 @@ class ThreatActorIndividual:
140
140
  @staticmethod
141
141
  def generate_id(name):
142
142
  name = name.lower().strip()
143
- data = {"name": name}
143
+ data = {"name": name, "opencti_type": "Threat-Actor-Individual"}
144
144
  data = canonicalize(data, utf8=False)
145
145
  id = str(uuid.uuid5(uuid.UUID("00abedb4-aa42-466c-9c01-fed23315a9b7"), data))
146
146
  return "threat-actor--" + id
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycti
3
- Version: 6.2.4
3
+ Version: 6.2.6
4
4
  Summary: Python API client for OpenCTI.
5
5
  Home-page: https://github.com/OpenCTI-Platform/client-python
6
6
  Author: Filigran
@@ -26,7 +26,7 @@ Requires-Dist: pika ~=1.3.0
26
26
  Requires-Dist: python-json-logger ~=2.0.4
27
27
  Requires-Dist: PyYAML ~=6.0
28
28
  Requires-Dist: requests ~=2.32.2
29
- Requires-Dist: setuptools ~=70.1.0
29
+ Requires-Dist: setuptools ~=70.3.0
30
30
  Requires-Dist: cachetools ~=5.3.0
31
31
  Requires-Dist: prometheus-client ~=0.20.0
32
32
  Requires-Dist: opentelemetry-api ~=1.22.0
@@ -1,4 +1,4 @@
1
- pycti/__init__.py,sha256=lUIDIc_ofIFcwSXqrDU8jWSCzX2fs6vpYzygjqunlbI,5157
1
+ pycti/__init__.py,sha256=CHfuXKX1NdRxCpovI6YfpyliaEKDEOVlsq4t3RnCH54,5218
2
2
  pycti/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  pycti/api/opencti_api_client.py,sha256=c-xyfmas2LkYNIY8j4-dHBJepHNL6uNhageyJOvYdQc,29834
4
4
  pycti/api/opencti_api_connector.py,sha256=fYF0Jy9KIMFNt1RC_A1rpWomVJ-oj5HiSsBem4W0J5U,3549
@@ -21,7 +21,7 @@ pycti/entities/opencti_data_source.py,sha256=QeBDLuH5BZs0_rnQmXZGs0wWfxfC6qPcRFE
21
21
  pycti/entities/opencti_event.py,sha256=Pam3eeR_Ytl_the-kV9IxXcfJKs2vRqN61igyDAlVE4,16706
22
22
  pycti/entities/opencti_external_reference.py,sha256=9Vz6ZIaE6im1f5hoEqizq5E31DQ7oFuqlXb-9JGy3Ao,13216
23
23
  pycti/entities/opencti_feedback.py,sha256=tK_Y3ZK2h33xQTzsjxu3x8Za3cBsgkBth_xNzEj2Hms,32314
24
- pycti/entities/opencti_grouping.py,sha256=dNl2kjv4ZB5V0vOlReeCqizF2Nxu3j9gaUrQyxES-nA,29896
24
+ pycti/entities/opencti_grouping.py,sha256=Er4931oZy4rQzH4HOOOPOQotqH9HsDFoVKFXRNF-5J4,30034
25
25
  pycti/entities/opencti_identity.py,sha256=w9gIySPWgbFYTucYMnzyAxcuYx3v-Of9kvMlUGajiJE,22823
26
26
  pycti/entities/opencti_incident.py,sha256=KAaqn0mnlyIKJ2whtbK0Eg8AbfQfxKvppS9hyfn_04s,18553
27
27
  pycti/entities/opencti_indicator.py,sha256=gh69C4Wu2Z08PcI2LC9p_FtKC1Qq8I1DjVsukz17kGI,20842
@@ -49,8 +49,8 @@ pycti/entities/opencti_stix_object_or_stix_relationship.py,sha256=9P-yVkexzd-8sA
49
49
  pycti/entities/opencti_stix_sighting_relationship.py,sha256=OPbdanElqnAj7cLu2eh1P5PBh_54xfxnW36HX_5wnEs,28077
50
50
  pycti/entities/opencti_task.py,sha256=gDlUVyeRcIlIoh5bKtar-NmFa5_3OmMd4OkRVi_AYco,24612
51
51
  pycti/entities/opencti_threat_actor.py,sha256=lRdPhXX_HsNSE5rTwkke_U5T_FAPGD22ow2-YeZdaYc,9950
52
- pycti/entities/opencti_threat_actor_group.py,sha256=BUVh_VBvINynq6foIAuHpOUq6QTrxCsyHFl2yMugO80,19572
53
- pycti/entities/opencti_threat_actor_individual.py,sha256=As0AGGJH8q3JKlqKDgOU3ARWk4OMn8CIGtsgU0J-s6I,19814
52
+ pycti/entities/opencti_threat_actor_group.py,sha256=RLwufTb8vFvOHgV81VXf2cA1sREz12Tzwp9uRXONu88,19610
53
+ pycti/entities/opencti_threat_actor_individual.py,sha256=b4Zqd40ehrFeaU6f_bSY6343Dg5vq6PuiDtKLXUrv78,19857
54
54
  pycti/entities/opencti_tool.py,sha256=5A20xY0fDBNLkbQP_32srjS3FXEVYGNxhe1I1YnaIbA,15237
55
55
  pycti/entities/opencti_vocabulary.py,sha256=6JfOByggvSxvkfIXk1b60T7fyWOhxZ6YFkGbSeV8F-4,5988
56
56
  pycti/entities/opencti_vulnerability.py,sha256=mcalUyvONG3otffpJhtx6xtfd9nIO43WiHmvWJ6LSxQ,20670
@@ -66,8 +66,8 @@ pycti/utils/opencti_stix2.py,sha256=WAVgvTcj8P0QfN_K2-avCeFwSkxVtBz1nh0dA63Nlr4,
66
66
  pycti/utils/opencti_stix2_splitter.py,sha256=A2GqoiFzEga8hslgA3mm4FDoObFsWgx4zK4DdcWTguc,4907
67
67
  pycti/utils/opencti_stix2_update.py,sha256=CnMyqkeVA0jgyxEcgqna8sABU4YPMjkEJ228GVurIn4,14658
68
68
  pycti/utils/opencti_stix2_utils.py,sha256=4r9qglN3AIN8JH1B9Ts2o20Qn3K203M4c5-lIPzRpZ4,4138
69
- pycti-6.2.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
70
- pycti-6.2.4.dist-info/METADATA,sha256=bydyjyHCIAE6jehhaEMHuePg6mPCyDFDoa25LHyiYyM,5432
71
- pycti-6.2.4.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
72
- pycti-6.2.4.dist-info/top_level.txt,sha256=cqEpxitAhHP4VgSA6xmrak6Yk9MeBkwoMTB6k7d2ZnE,6
73
- pycti-6.2.4.dist-info/RECORD,,
69
+ pycti-6.2.6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
70
+ pycti-6.2.6.dist-info/METADATA,sha256=l8ETVtRKXPIYNFYJA41RTU5ObIM_Y_ozwuDfMYov4ng,5432
71
+ pycti-6.2.6.dist-info/WHEEL,sha256=YiKiUUeZQGmGJoR_0N1Y933DOBowq4AIvDe2-UIy8E4,91
72
+ pycti-6.2.6.dist-info/top_level.txt,sha256=cqEpxitAhHP4VgSA6xmrak6Yk9MeBkwoMTB6k7d2ZnE,6
73
+ pycti-6.2.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.3.0)
2
+ Generator: setuptools (71.0.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
File without changes