@@ -0,0 +1,676 @@
+#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A%0Afrom api import PyMISP%0A%0Afrom keys import src, dest%0A%0Aurl_source = 'https://misp.circl.lu'%0Aurl_dest = 'https://misppriv.circl.lu'%0Asource = None%0Adestination = None%0A%0Adef init():%0A    global source%0A    global destination%0A    source = PyMISP(url_source, src, 'xml')%0A    destination = PyMISP(url_dest, dest, 'xml')%0A%0Adef copy_event(event_id):%0A    r_src = source.get_event(event_id)%0A    if 'json' in r_src.headers%5B'content-type'%5D:%0A        to_send = r_src.json()%0A    else:%0A        to_send = r_src.text.encode('utf-8')%0A    r_dst = destination.add_event(to_send)%0A    #print r_dst.text%0A%0Aif __name__ == '__main__':%0A    init()%0A    copy_event(0000)%0A%0A

support xml and json copy