pycti 6.5.8__tar.gz → 6.5.10__tar.gz

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.

Files changed (79) hide show
  1. {pycti-6.5.8 → pycti-6.5.10}/PKG-INFO +3 -2
  2. {pycti-6.5.8 → pycti-6.5.10}/pycti/__init__.py +1 -1
  3. {pycti-6.5.8 → pycti-6.5.10}/pycti/api/opencti_api_client.py +1 -1
  4. {pycti-6.5.8 → pycti-6.5.10}/pycti/api/opencti_api_connector.py +3 -0
  5. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_indicator.py +12 -5
  6. {pycti-6.5.8 → pycti-6.5.10}/pycti/utils/constants.py +1 -3
  7. {pycti-6.5.8 → pycti-6.5.10}/pycti.egg-info/PKG-INFO +3 -2
  8. {pycti-6.5.8 → pycti-6.5.10}/LICENSE +0 -0
  9. {pycti-6.5.8 → pycti-6.5.10}/README.md +0 -0
  10. {pycti-6.5.8 → pycti-6.5.10}/pycti/api/__init__.py +0 -0
  11. {pycti-6.5.8 → pycti-6.5.10}/pycti/api/opencti_api_playbook.py +0 -0
  12. {pycti-6.5.8 → pycti-6.5.10}/pycti/api/opencti_api_work.py +0 -0
  13. {pycti-6.5.8 → pycti-6.5.10}/pycti/connector/__init__.py +0 -0
  14. {pycti-6.5.8 → pycti-6.5.10}/pycti/connector/opencti_connector.py +0 -0
  15. {pycti-6.5.8 → pycti-6.5.10}/pycti/connector/opencti_connector_helper.py +0 -0
  16. {pycti-6.5.8 → pycti-6.5.10}/pycti/connector/opencti_metric_handler.py +0 -0
  17. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/__init__.py +0 -0
  18. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/indicator/__init__.py +0 -0
  19. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/indicator/opencti_indicator_properties.py +0 -0
  20. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_attack_pattern.py +0 -0
  21. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_campaign.py +0 -0
  22. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_case_incident.py +0 -0
  23. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_case_rfi.py +0 -0
  24. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_case_rft.py +0 -0
  25. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_channel.py +0 -0
  26. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_course_of_action.py +0 -0
  27. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_data_component.py +0 -0
  28. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_data_source.py +0 -0
  29. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_event.py +0 -0
  30. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_external_reference.py +0 -0
  31. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_feedback.py +0 -0
  32. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_grouping.py +0 -0
  33. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_identity.py +0 -0
  34. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_incident.py +0 -0
  35. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_infrastructure.py +0 -0
  36. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_intrusion_set.py +0 -0
  37. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_kill_chain_phase.py +0 -0
  38. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_label.py +0 -0
  39. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_language.py +0 -0
  40. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_location.py +0 -0
  41. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_malware.py +0 -0
  42. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_malware_analysis.py +0 -0
  43. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_marking_definition.py +0 -0
  44. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_narrative.py +0 -0
  45. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_note.py +0 -0
  46. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_observed_data.py +0 -0
  47. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_opinion.py +0 -0
  48. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_report.py +0 -0
  49. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_stix.py +0 -0
  50. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_stix_core_object.py +0 -0
  51. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_stix_core_relationship.py +0 -0
  52. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_stix_cyber_observable.py +0 -0
  53. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_stix_domain_object.py +0 -0
  54. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_stix_nested_ref_relationship.py +0 -0
  55. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_stix_object_or_stix_relationship.py +0 -0
  56. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_stix_sighting_relationship.py +0 -0
  57. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_task.py +0 -0
  58. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_threat_actor.py +0 -0
  59. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_threat_actor_group.py +0 -0
  60. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_threat_actor_individual.py +0 -0
  61. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_tool.py +0 -0
  62. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_vocabulary.py +0 -0
  63. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/opencti_vulnerability.py +0 -0
  64. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/stix_cyber_observable/__init__.py +0 -0
  65. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_deprecated.py +0 -0
  66. {pycti-6.5.8 → pycti-6.5.10}/pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_properties.py +0 -0
  67. {pycti-6.5.8 → pycti-6.5.10}/pycti/utils/__init__.py +0 -0
  68. {pycti-6.5.8 → pycti-6.5.10}/pycti/utils/opencti_logger.py +0 -0
  69. {pycti-6.5.8 → pycti-6.5.10}/pycti/utils/opencti_stix2.py +0 -0
  70. {pycti-6.5.8 → pycti-6.5.10}/pycti/utils/opencti_stix2_identifier.py +0 -0
  71. {pycti-6.5.8 → pycti-6.5.10}/pycti/utils/opencti_stix2_splitter.py +0 -0
  72. {pycti-6.5.8 → pycti-6.5.10}/pycti/utils/opencti_stix2_update.py +0 -0
  73. {pycti-6.5.8 → pycti-6.5.10}/pycti/utils/opencti_stix2_utils.py +0 -0
  74. {pycti-6.5.8 → pycti-6.5.10}/pycti.egg-info/SOURCES.txt +0 -0
  75. {pycti-6.5.8 → pycti-6.5.10}/pycti.egg-info/dependency_links.txt +0 -0
  76. {pycti-6.5.8 → pycti-6.5.10}/pycti.egg-info/requires.txt +0 -0
  77. {pycti-6.5.8 → pycti-6.5.10}/pycti.egg-info/top_level.txt +0 -0
  78. {pycti-6.5.8 → pycti-6.5.10}/pyproject.toml +0 -0
  79. {pycti-6.5.8 → pycti-6.5.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pycti
3
- Version: 6.5.8
3
+ Version: 6.5.10
4
4
  Summary: Python API client for OpenCTI.
5
5
  Home-page: https://github.com/OpenCTI-Platform/client-python
6
6
  Author: Filigran
@@ -55,6 +55,7 @@ Provides-Extra: doc
55
55
  Requires-Dist: autoapi~=2.0.1; extra == "doc"
56
56
  Requires-Dist: sphinx-autodoc-typehints~=2.5.0; extra == "doc"
57
57
  Requires-Dist: sphinx-rtd-theme~=3.0.2; extra == "doc"
58
+ Dynamic: license-file
58
59
 
59
60
  # OpenCTI client for Python
60
61
 
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = "6.5.8"
2
+ __version__ = "6.5.10"
3
3
 
4
4
  from .api.opencti_api_client import OpenCTIApiClient
5
5
  from .api.opencti_api_connector import OpenCTIApiConnector
@@ -280,7 +280,7 @@ class OpenCTIApiClient:
280
280
  if is_multiple_files:
281
281
  # [(var_name + "." + i)] if is_multiple_files else
282
282
  for _ in file_var_item["file"]:
283
- file_vars[str(map_index)] = [(var_name + "." + str(map_index))]
283
+ file_vars[str(map_index)] = [var_name + "." + str(map_index)]
284
284
  map_index += 1
285
285
  else:
286
286
  file_vars[str(map_index)] = [var_name]
@@ -61,6 +61,9 @@ class OpenCTIApiConnector:
61
61
  connectorsForWorker {
62
62
  id
63
63
  name
64
+ connector_user {
65
+ api_token
66
+ }
64
67
  config {
65
68
  connection {
66
69
  host
@@ -48,6 +48,7 @@ class Indicator:
48
48
  :param list customAttributes: (optional) list of attributes keys to return
49
49
  :param bool getAll: (optional) switch to return all entries (be careful to use this without any other filters)
50
50
  :param bool withPagination: (optional) switch to use pagination
51
+ :param bool toStix: (optional) get in STIX
51
52
 
52
53
  :return: List of Indicators
53
54
  :rtype: list
@@ -63,21 +64,26 @@ class Indicator:
63
64
  get_all = kwargs.get("getAll", False)
64
65
  with_pagination = kwargs.get("withPagination", False)
65
66
  with_files = kwargs.get("withFiles", False)
67
+ to_stix = kwargs.get("toStix", False)
66
68
 
67
69
  self.opencti.app_logger.info(
68
70
  "Listing Indicators with filters", {"filters": json.dumps(filters)}
69
71
  )
70
72
  query = (
71
73
  """
72
- query Indicators($filters: FilterGroup, $search: String, $first: Int, $after: ID, $orderBy: IndicatorsOrdering, $orderMode: OrderingMode) {
73
- indicators(filters: $filters, search: $search, first: $first, after: $after, orderBy: $orderBy, orderMode: $orderMode) {
74
+ query Indicators($filters: FilterGroup, $search: String, $first: Int, $after: ID, $orderBy: IndicatorsOrdering, $orderMode: OrderingMode, $toStix: Boolean) {
75
+ indicators(filters: $filters, search: $search, first: $first, after: $after, orderBy: $orderBy, orderMode: $orderMode, toStix: $toStix) {
74
76
  edges {
75
77
  node {
76
78
  """
77
79
  + (
78
- custom_attributes
79
- if custom_attributes is not None
80
- else (self.properties_with_files if with_files else self.properties)
80
+ "toStix"
81
+ if to_stix
82
+ else (
83
+ custom_attributes
84
+ if custom_attributes is not None
85
+ else (self.properties_with_files if with_files else self.properties)
86
+ )
81
87
  )
82
88
  + """
83
89
  }
@@ -102,6 +108,7 @@ class Indicator:
102
108
  "after": after,
103
109
  "orderBy": order_by,
104
110
  "orderMode": order_mode,
111
+ "toStix": to_stix,
105
112
  },
106
113
  )
107
114
  if get_all:
@@ -1,6 +1,4 @@
1
- """These are the custom STIX properties and observation types used internally by OpenCTI.
2
-
3
- """
1
+ """These are the custom STIX properties and observation types used internally by OpenCTI."""
4
2
 
5
3
  from enum import Enum
6
4
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pycti
3
- Version: 6.5.8
3
+ Version: 6.5.10
4
4
  Summary: Python API client for OpenCTI.
5
5
  Home-page: https://github.com/OpenCTI-Platform/client-python
6
6
  Author: Filigran
@@ -55,6 +55,7 @@ Provides-Extra: doc
55
55
  Requires-Dist: autoapi~=2.0.1; extra == "doc"
56
56
  Requires-Dist: sphinx-autodoc-typehints~=2.5.0; extra == "doc"
57
57
  Requires-Dist: sphinx-rtd-theme~=3.0.2; extra == "doc"
58
+ Dynamic: license-file
58
59
 
59
60
  # OpenCTI client for Python
60
61
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes