(self, filename)
handle file being analyzed for the first time.
handle file being analyzed for the first time.
handle file being analyzed for the first time .
def notify_newfile(self, filename):
        '''
        handle file being analyzed for the first time.
        '''
        logger.info('new file: %s', filename)
        self.load()

        wasm_nn = netnode.Netnode('$ wasm.offsets')
        wasm_nn['functions'] = {f['index']: f['offset'] for f in self.functions.values() if 'offset' in f}
        wasm_nn['globals'] = {g['index']: g['offset'] for g in self.globals.values() if 'offset' in g}

        for Analyzer in (idawasm.analysis.llvm.LLVMAnalyzer, ):
            ana = Analyzer(self)

            if ana.taste():
                logger.debug('%s analyzing', Analyzer.__name__)
                ana.analyze()
            else:
                logger.debug('%s declined analysis', Analyzer.__name__)
def notify_newfile ( self , filename ) : logger . info ( 'new file: %s' , filename ) self . load ( ) wasm_nn = netnode . Netnode ( '$ wasm.offsets' ) wasm_nn [ 'functions' ] = { f [ 'index' ] : f [ 'offset' ] for f in self . functions . values ( ) if 'offset' in f } wasm_nn [ 'globals' ] = { g [ 'index' ] : g [ 'offset' ] for g in self . globals . values ( ) if 'offset' in g } for Analyzer in ( idawasm . analysis . llvm . LLVMAnalyzer , ) : ana = Analyzer ( self ) if ana . taste ( ) : logger . debug ( '%s analyzing' , Analyzer . __name__ ) ana . analyze ( ) else : logger . debug ( '%s declined analysis' , Analyzer . __name__ )