From b9ad0b1bce5cf5f3099cba58c686df303bcb3246 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Thu, 2 Jun 2022 16:42:20 +0200 Subject: [PATCH] chg: [AIL2AIL Sync] update exchange format --- bin/core/ail_2_ail.py | 10 ++++++---- bin/packages/Item.py | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/core/ail_2_ail.py b/bin/core/ail_2_ail.py index 70269e82..2dd12ea6 100755 --- a/bin/core/ail_2_ail.py +++ b/bin/core/ail_2_ail.py @@ -1205,11 +1205,13 @@ def create_ail_stream(Object): 'type': Object.get_type()} # OBJECT META - ail_stream['meta'] = {'ail_mime-type': 'text/plain'} + ail_stream['meta'] = {'ail:mime-type': 'text/plain'} + ail_stream['meta']['compress'] = 'gzip' + ail_stream['meta']['encoding'] = 'base64' ail_stream['meta']['ail:id'] = Object.get_id() - ail_stream['meta']['ail:tags'] = Object.get_tags() - # GLOBAL PAYLOAD - ail_stream['meta']['ail:uuid'] = get_ail_uuid() + ail_stream['meta']['tags'] = Object.get_tags() + # GLOBAL META + ail_stream['meta']['uuid_org'] = get_ail_uuid() # OBJECT PAYLOAD ail_stream['payload'] = Object.get_ail_2_ail_payload() diff --git a/bin/packages/Item.py b/bin/packages/Item.py index f8f96f93..336a565b 100755 --- a/bin/packages/Item.py +++ b/bin/packages/Item.py @@ -637,8 +637,7 @@ class Item(AbstractObject): return content.decode() def get_ail_2_ail_payload(self): - payload = {'raw': self.get_gzip_content(b64=True), - 'compress': 'gzip'} + payload = {'raw': self.get_gzip_content(b64=True)} return payload # # TODO: @@ -667,6 +666,9 @@ class Item(AbstractObject): def get_svg_icon(self): pass + def get_misp_object(self): + pass + ############################################################################ ############################################################################ ############################################################################