pycti 6.1.5__tar.gz → 6.1.7__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.
- {pycti-6.1.5 → pycti-6.1.7}/PKG-INFO +1 -1
- {pycti-6.1.5 → pycti-6.1.7}/pycti/__init__.py +1 -1
- {pycti-6.1.5 → pycti-6.1.7}/pycti/connector/opencti_connector_helper.py +39 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_stix_core_relationship.py +7 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_stix_nested_ref_relationship.py +7 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_stix_object_or_stix_relationship.py +7 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_stix_sighting_relationship.py +7 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti.egg-info/PKG-INFO +1 -1
- {pycti-6.1.5 → pycti-6.1.7}/LICENSE +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/README.md +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/api/__init__.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/api/opencti_api_client.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/api/opencti_api_connector.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/api/opencti_api_playbook.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/api/opencti_api_work.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/connector/__init__.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/connector/opencti_connector.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/connector/opencti_metric_handler.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/__init__.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_attack_pattern.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_campaign.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_case_incident.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_case_rfi.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_case_rft.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_channel.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_course_of_action.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_data_component.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_data_source.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_event.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_external_reference.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_feedback.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_grouping.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_identity.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_incident.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_indicator.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_infrastructure.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_intrusion_set.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_kill_chain_phase.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_label.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_language.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_location.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_malware.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_malware_analysis.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_marking_definition.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_narrative.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_note.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_observed_data.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_opinion.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_report.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_stix.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_stix_core_object.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_stix_cyber_observable.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_stix_domain_object.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_task.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_threat_actor.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_threat_actor_group.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_threat_actor_individual.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_tool.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_vocabulary.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/entities/opencti_vulnerability.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/utils/__init__.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/utils/constants.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/utils/opencti_logger.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/utils/opencti_stix2.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/utils/opencti_stix2_splitter.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/utils/opencti_stix2_update.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti/utils/opencti_stix2_utils.py +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti.egg-info/SOURCES.txt +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti.egg-info/dependency_links.txt +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti.egg-info/requires.txt +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pycti.egg-info/top_level.txt +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/pyproject.toml +0 -0
- {pycti-6.1.5 → pycti-6.1.7}/setup.cfg +0 -0
|
@@ -838,6 +838,45 @@ class OpenCTIConnectorHelper: # pylint: disable=too-many-public-methods
|
|
|
838
838
|
self.connector_state = connector_configuration["connector_state"]
|
|
839
839
|
self.connector_config = connector_configuration["config"]
|
|
840
840
|
|
|
841
|
+
# Overwrite connector config for RabbitMQ if given manually / in conf
|
|
842
|
+
self.connector_config["connection"]["host"] = get_config_variable(
|
|
843
|
+
"MQ_HOST",
|
|
844
|
+
["mq", "host"],
|
|
845
|
+
config,
|
|
846
|
+
default=self.connector_config["connection"]["host"],
|
|
847
|
+
)
|
|
848
|
+
self.connector_config["connection"]["port"] = get_config_variable(
|
|
849
|
+
"MQ_PORT",
|
|
850
|
+
["mq", "port"],
|
|
851
|
+
config,
|
|
852
|
+
isNumber=True,
|
|
853
|
+
default=self.connector_config["connection"]["port"],
|
|
854
|
+
)
|
|
855
|
+
self.connector_config["connection"]["vhost"] = get_config_variable(
|
|
856
|
+
"MQ_VHOST",
|
|
857
|
+
["mq", "vhost"],
|
|
858
|
+
config,
|
|
859
|
+
default=self.connector_config["connection"]["vhost"],
|
|
860
|
+
)
|
|
861
|
+
self.connector_config["connection"]["use_ssl"] = get_config_variable(
|
|
862
|
+
"MQ_USE_SSL",
|
|
863
|
+
["mq", "use_ssl"],
|
|
864
|
+
config,
|
|
865
|
+
default=self.connector_config["connection"]["use_ssl"],
|
|
866
|
+
)
|
|
867
|
+
self.connector_config["connection"]["user"] = get_config_variable(
|
|
868
|
+
"MQ_USER",
|
|
869
|
+
["mq", "user"],
|
|
870
|
+
config,
|
|
871
|
+
default=self.connector_config["connection"]["user"],
|
|
872
|
+
)
|
|
873
|
+
self.connector_config["connection"]["pass"] = get_config_variable(
|
|
874
|
+
"MQ_PASS",
|
|
875
|
+
["mq", "pass"],
|
|
876
|
+
config,
|
|
877
|
+
default=self.connector_config["connection"]["pass"],
|
|
878
|
+
)
|
|
879
|
+
|
|
841
880
|
# Start ping thread
|
|
842
881
|
if not self.connect_run_and_terminate:
|
|
843
882
|
self.ping = PingAlive(
|
|
@@ -521,6 +521,7 @@ class StixCoreRelationship:
|
|
|
521
521
|
start_time_stop = kwargs.get("startTimeStop", None)
|
|
522
522
|
stop_time_start = kwargs.get("stopTimeStart", None)
|
|
523
523
|
stop_time_stop = kwargs.get("stopTimeStop", None)
|
|
524
|
+
filters = kwargs.get("filters", None)
|
|
524
525
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
525
526
|
if id is not None:
|
|
526
527
|
self.opencti.app_logger.info("Reading stix_core_relationship", {"id": id})
|
|
@@ -543,6 +544,12 @@ class StixCoreRelationship:
|
|
|
543
544
|
return self.opencti.process_multiple_fields(
|
|
544
545
|
result["data"]["stixCoreRelationship"]
|
|
545
546
|
)
|
|
547
|
+
elif filters is not None:
|
|
548
|
+
result = self.list(filters=filters, customAttributes=custom_attributes)
|
|
549
|
+
if len(result) > 0:
|
|
550
|
+
return result[0]
|
|
551
|
+
else:
|
|
552
|
+
return None
|
|
546
553
|
elif from_id is not None and to_id is not None:
|
|
547
554
|
result = self.list(
|
|
548
555
|
fromOrToId=from_or_to_id,
|
|
@@ -178,6 +178,7 @@ class StixNestedRefRelationship:
|
|
|
178
178
|
stop_time_start = kwargs.get("stopTimeStart", None)
|
|
179
179
|
stop_time_stop = kwargs.get("stopTimeStop", None)
|
|
180
180
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
181
|
+
filters = kwargs.get("filters", None)
|
|
181
182
|
if id is not None:
|
|
182
183
|
self.opencti.app_logger.info(
|
|
183
184
|
"Reading stix_observable_relationship", {"id": id}
|
|
@@ -201,6 +202,12 @@ class StixNestedRefRelationship:
|
|
|
201
202
|
return self.opencti.process_multiple_fields(
|
|
202
203
|
result["data"]["stixRefRelationship"]
|
|
203
204
|
)
|
|
205
|
+
elif filters is not None:
|
|
206
|
+
result = self.list(filters=filters, customAttributes=custom_attributes)
|
|
207
|
+
if len(result) > 0:
|
|
208
|
+
return result[0]
|
|
209
|
+
else:
|
|
210
|
+
return None
|
|
204
211
|
else:
|
|
205
212
|
result = self.list(
|
|
206
213
|
fromOrToId=from_or_to_id,
|
|
@@ -481,6 +481,7 @@ class StixObjectOrStixRelationship:
|
|
|
481
481
|
def read(self, **kwargs):
|
|
482
482
|
id = kwargs.get("id", None)
|
|
483
483
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
484
|
+
filters = kwargs.get("filters", None)
|
|
484
485
|
if id is not None:
|
|
485
486
|
self.opencti.app_logger.info(
|
|
486
487
|
"Reading StixObjectOrStixRelationship", {"id": id}
|
|
@@ -504,6 +505,12 @@ class StixObjectOrStixRelationship:
|
|
|
504
505
|
return self.opencti.process_multiple_fields(
|
|
505
506
|
result["data"]["stixObjectOrStixRelationship"]
|
|
506
507
|
)
|
|
508
|
+
elif filters is not None:
|
|
509
|
+
result = self.list(filters=filters)
|
|
510
|
+
if len(result) > 0:
|
|
511
|
+
return result[0]
|
|
512
|
+
else:
|
|
513
|
+
return None
|
|
507
514
|
else:
|
|
508
515
|
self.opencti.app_logger.error("Missing parameters: id")
|
|
509
516
|
return None
|
|
@@ -431,6 +431,7 @@ class StixSightingRelationship:
|
|
|
431
431
|
last_seen_start = kwargs.get("lastSeenStart", None)
|
|
432
432
|
last_seen_stop = kwargs.get("lastSeenStop", None)
|
|
433
433
|
custom_attributes = kwargs.get("customAttributes", None)
|
|
434
|
+
filters = kwargs.get("filters", None)
|
|
434
435
|
if id is not None:
|
|
435
436
|
self.opencti.app_logger.info("Reading stix_sighting", {"id": id})
|
|
436
437
|
query = (
|
|
@@ -452,6 +453,12 @@ class StixSightingRelationship:
|
|
|
452
453
|
return self.opencti.process_multiple_fields(
|
|
453
454
|
result["data"]["stixSightingRelationship"]
|
|
454
455
|
)
|
|
456
|
+
elif filters is not None:
|
|
457
|
+
result = self.list(filters=filters)
|
|
458
|
+
if len(result) > 0:
|
|
459
|
+
return result[0]
|
|
460
|
+
else:
|
|
461
|
+
return None
|
|
455
462
|
elif from_id is not None and to_id is not None:
|
|
456
463
|
result = self.list(
|
|
457
464
|
fromOrToId=from_or_to_id,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|