Skip to content

Commit

Permalink
fix: [MISP export] get full list
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Feb 21, 2020
1 parent 32b0231 commit 1f8c858
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/export/MispExport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions var/www/blueprints/import_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 1f8c858

Please sign in to comment.