From 5fab2326e60ed81dc18e0cfd62fb40a3cec84770 Mon Sep 17 00:00:00 2001 From: terrtia Date: Tue, 30 Jan 2024 11:45:43 +0100 Subject: [PATCH] fix: [misp export] fix empty event on module start --- bin/exporter/MISPExporter.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/exporter/MISPExporter.py b/bin/exporter/MISPExporter.py index 4a0d3a1c..1fd32045 100755 --- a/bin/exporter/MISPExporter.py +++ b/bin/exporter/MISPExporter.py @@ -319,11 +319,7 @@ class MISPExporterAutoDaily(MISPExporter): def __init__(self, url='', key='', ssl=False): super().__init__(url=url, key=key, ssl=ssl) - # create event if don't exists - try: - self.event_id = self.get_daily_event_id() - except MISPConnectionError: - self.event_id = - 1 + self.event_id = - 1 self.date = datetime.date.today() def export(self, obj, tag): @@ -345,6 +341,7 @@ class MISPExporterAutoDaily(MISPExporter): self.add_event_object(self.event_id, obj) except MISPConnectionError: + self.event_id = - 1 return -1