From 1f8c858c777a7da59134d257d7defb464dc487e5 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 21 Feb 2020 15:47:05 +0100 Subject: [PATCH] fix: [MISP export] get full list --- bin/export/MispExport.py | 1 + var/www/blueprints/import_export.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/bin/export/MispExport.py b/bin/export/MispExport.py index 40c07b97..b35099f6 100755 --- a/bin/export/MispExport.py +++ b/bin/export/MispExport.py @@ -384,6 +384,7 @@ def create_misp_event(event, distribution=0, threat_level_id=4, publish=False, a misp = PyMISP(misp_url, misp_key, misp_verifycert) #print(event.to_json()) misp_event = misp.add_event(event) + #print(misp_event) # # TODO: handle error event_metadata = extract_event_metadata(misp_event) return event_metadata diff --git a/var/www/blueprints/import_export.py b/var/www/blueprints/import_export.py index 98906114..3d13fcbb 100644 --- a/var/www/blueprints/import_export.py +++ b/var/www/blueprints/import_export.py @@ -152,7 +152,9 @@ def export_object_file(): l_obj_invalid=l_obj_invalid, dict_misp_event_export=dict_misp_event_export) else: if export_to_misp and MispExport.ping_misp(): + l_obj_to_export = AILObjects.get_user_list_of_obj_to_export(user_id) event = MispExport.create_list_of_objs_to_export(l_obj_to_export, r_type='event') + event_metadata = MispExport.create_misp_event(event, distribution=dict_misp_event_export.get('export_to_misp', None), threat_level_id=dict_misp_event_export.get('misp_threat_level_id', None), publish=dict_misp_event_export.get('misp_publish', None),