angr.exploration_techniques.stub_stasher 源代码
from __future__ import annotations
from .base import ExplorationTechnique
[文档]
class StubStasher(ExplorationTechnique):
"""
Stash states that reach a stub SimProcedure.
"""
[文档]
@staticmethod
def post_filter(state):
hook = state.project.hooked_by(state.addr)
return hook and hook.is_stub
[文档]
def step(self, simgr, stash="active", **kwargs):
simgr.step(stash=stash, **kwargs)
simgr.move(stash, "stub", filter_func=self.post_filter)
return simgr