How to use the pymisp.tools.reportlab_generator.register_value_to_file function in pymisp

To help you get started, weā€™ve selected a few pymisp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_very_long_json(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:
            self.init_event()
            self.mispevent.load_file(self.test_folder + 'very_long_event.json')
            reportlab_generator.register_value_to_file(reportlab_generator.convert_event_in_pdf_buffer(self.mispevent),
                                                       self.storage_folder + "very_long_event.pdf")
github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_objects_2_json(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:

            config = {}
            config[self.moduleconfig[0]] = "http://localhost:8080"
            config[self.moduleconfig[1]] = "My Wonderful CERT"

            self.init_event()
            self.mispevent.load_file(self.test_folder + 'mainly_objects_2.json')
            reportlab_generator.register_value_to_file(
                reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config),
                self.storage_folder + "mainly_objects_2.pdf")
github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_sightings_1_json(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:

            config = {}
            config[self.moduleconfig[0]] = "http://localhost:8080"
            config[self.moduleconfig[1]] = "My Wonderful CERT"

            self.init_event()
            self.mispevent.load_file(self.test_folder + 'sighting_1.json')
            reportlab_generator.register_value_to_file(
                reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config),
                self.storage_folder + "sighting_1.pdf")
github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_basic_event(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:
            self.init_event()
            reportlab_generator.register_value_to_file(reportlab_generator.convert_event_in_pdf_buffer(self.mispevent),
                                                       self.storage_folder + "basic_event.pdf")
github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_utf(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:
            config = {}
            config[self.moduleconfig[0]] = "http://localhost:8080"
            config[self.moduleconfig[1]] = "My Wonderful CERT"
            config[self.moduleconfig[2]] = True
            config[self.moduleconfig[3]] = True
            config[self.moduleconfig[4]] = True
            config[self.moduleconfig[5]] = True

            self.init_event()
            self.mispevent.load_file(self.test_folder + 'japanese_test.json')
            reportlab_generator.register_value_to_file(
                reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config),
                self.storage_folder + "japanese_test.pdf")
github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_textual_json(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:

            config = {}
            config[self.moduleconfig[0]] = "http://localhost:8080"
            config[self.moduleconfig[1]] = "My Wonderful CERT"
            config[self.moduleconfig[2]] = True

            self.init_event()
            self.mispevent.load_file(self.test_folder + 'very_long_event.json')
            reportlab_generator.register_value_to_file(
                reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config),
                self.storage_folder + "textual.pdf")
github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_related_events(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:
            config = {}
            config[self.moduleconfig[0]] = "http://localhost:8080"
            config[self.moduleconfig[1]] = "My Wonderful CERT"
            config[self.moduleconfig[2]] = True
            config[self.moduleconfig[3]] = True
            config[self.moduleconfig[4]] = True

            self.init_event()
            self.mispevent.load_file(self.test_folder + 'galaxy_1.json')
            reportlab_generator.register_value_to_file(
                reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config),
                self.storage_folder + "related_events.pdf")
github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_objects_1_json(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:

            config = {}
            config[self.moduleconfig[0]] = "http://localhost:8080"
            config[self.moduleconfig[1]] = "My Wonderful CERT"

            self.init_event()
            self.mispevent.load_file(self.test_folder + 'mainly_objects_1.json')
            reportlab_generator.register_value_to_file(
                reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config),
                self.storage_folder + "mainly_objects_1.pdf")
github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_related_events_too_simple(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:
            config = {}
            config[self.moduleconfig[0]] = "http://localhost:8080"
            config[self.moduleconfig[1]] = "My Wonderful CERT"
            config[self.moduleconfig[2]] = True
            config[self.moduleconfig[3]] = True
            config[self.moduleconfig[4]] = True

            self.init_event()
            self.mispevent.load_file(self.test_folder + 'to_delete1.json')
            reportlab_generator.register_value_to_file(
                reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config),
                self.storage_folder + "related_events_no_related.pdf")
github MISP / PyMISP / tests / test_reportlab.py View on Github external
def test_full_config_json(self):
        if self.check_python_2():
            self.assertTrue(True)
        else:

            config = {}
            config[self.moduleconfig[0]] = "http://localhost:8080"
            config[self.moduleconfig[1]] = "My Wonderful CERT"

            self.init_event()
            self.mispevent.load_file(self.test_folder + 'very_long_event.json')
            reportlab_generator.register_value_to_file(
                reportlab_generator.convert_event_in_pdf_buffer(self.mispevent, config),
                self.storage_folder + "config_complete_event.pdf")