Source code for angr.exploration_techniques.tech_builder
from.importExplorationTechnique
[docs]classTechniqueBuilder(ExplorationTechnique):""" This meta technique could be used to hook a couple of simulation manager methods without actually creating a new exploration technique, for example: class SomeComplexAnalysis(Analysis): def do_something(): simgr = self.project.factory.simulation_manager() simgr.use_tech(ProxyTechnique(step_state=self._step_state)) simgr.run() def _step_state(self, state): # Do stuff! pass In the above example, the _step_state method can access all the necessary stuff, hidden in the analysis instance, without passing that instance to a one-shot-styled exploration technique. """
def_its_a_func(func):""" In case the target func doesn't have it's `im_func` attr set. :param func: :return: """iffuncisnotNone:func.im_func=Truereturnfunc