def build_results(self, results):
        """Properly format the results"""
        self.add_result_subsection(
            'Exploit mitigation techniques',
            {
                'level': results.get('Plugins', {}).get('mitigation', {}).get('level', None),
                'summary': results.get('Plugins', {}).get('mitigation', {}).get('summary', None),
                'content': results.get('Plugins', {}).get('mitigation', {}).get('plugin_output', None)
            }
        )
        self.add_result_subsection(
            'Suspicious strings',
            {
                'level': results.get('Plugins', {}).get('strings', {}).get('level', None),
                'summary': results.get('Plugins', {}).get('strings', {}).get('summary', None),
                'content': results.get('Plugins', {}).get('strings', {}).get('plugin_output', None)
            }
        )
        self.add_result_subsection(
            'Suspicious imports',
            {
                'level': results.get('Plugins', {}).get('imports', {}).get('level', None),
                'summary': results.get('Plugins', {}).get('imports', {}).get('summary', None),
                'content': results.get('Plugins', {}).get('imports', {}).get('plugin_output', None)
            }
        )
        self.add_result_subsection(
            'Packer',
            {
                'level': results.get('Plugins', {}).get('packer', {}).get('level', None),
                'summary': results.get('Plugins', {}).get('packer', {}).get('summary', None),
                'content': results.get('Plugins', {}).get('packer', {}).get('plugin_output', None)
            }
        )
        self.add_result_subsection(
            'Clamav',
            {
                'level': results.get('Plugins', {}).get('clamav', {}).get('level', None),
                'summary': results.get('Plugins', {}).get('clamav', {}).get('summary', None),
                'content': results.get('Plugins', {}).get('clamav', {}).get('plugin_output', None)
            }
        )
        self.add_result_subsection('Manalyze raw output', json.dumps(results, indent=4))
def build_results ( self , results ) : self . add_result_subsection ( 'Exploit mitigation techniques' , { 'level' : results . get ( 'Plugins' , { } ) . get ( 'mitigation' , { } ) . get ( 'level' , None ) , 'summary' : results . get ( 'Plugins' , { } ) . get ( 'mitigation' , { } ) . get ( 'summary' , None ) , 'content' : results . get ( 'Plugins' , { } ) . get ( 'mitigation' , { } ) . get ( 'plugin_output' , None ) } ) self . add_result_subsection ( 'Suspicious strings' , { 'level' : results . get ( 'Plugins' , { } ) . get ( 'strings' , { } ) . get ( 'level' , None ) , 'summary' : results . get ( 'Plugins' , { } ) . get ( 'strings' , { } ) . get ( 'summary' , None ) , 'content' : results . get ( 'Plugins' , { } ) . get ( 'strings' , { } ) . get ( 'plugin_output' , None ) } ) self . add_result_subsection ( 'Suspicious imports' , { 'level' : results . get ( 'Plugins' , { } ) . get ( 'imports' , { } ) . get ( 'level' , None ) , 'summary' : results . get ( 'Plugins' , { } ) . get ( 'imports' , { } ) . get ( 'summary' , None ) , 'content' : results . get ( 'Plugins' , { } ) . get ( 'imports' , { } ) . get ( 'plugin_output' , None ) } ) self . add_result_subsection ( 'Packer' , { 'level' : results . get ( 'Plugins' , { } ) . get ( 'packer' , { } ) . get ( 'level' , None ) , 'summary' : results . get ( 'Plugins' , { } ) . get ( 'packer' , { } ) . get ( 'summary' , None ) , 'content' : results . get ( 'Plugins' , { } ) . get ( 'packer' , { } ) . get ( 'plugin_output' , None ) } ) self . add_result_subsection ( 'Clamav' , { 'level' : results . get ( 'Plugins' , { } ) . get ( 'clamav' , { } ) . get ( 'level' , None ) , 'summary' : results . get ( 'Plugins' , { } ) . get ( 'clamav' , { } ) . get ( 'summary' , None ) , 'content' : results . get ( 'Plugins' , { } ) . get ( 'clamav' , { } ) . get ( 'plugin_output' , None ) } ) self . add_result_subsection ( 'Manalyze raw output' , json . dumps ( results , indent = 4 ) )
Properly format the results