def run_fauxware(arch): p = angr.Project(os.path.join(test_location, arch, "fauxware")) results = p.factory.simgr().explore(find=target_addrs[arch], avoid=avoid_addrs[arch]) stdin = results.found[0].posix.dumps(0) nose.tools.assert_equal('\x00\x00\x00\x00\x00\x00\x00\x00\x00SOSNEAKY\x00', stdin) # test the divergence detection ancestor = results.found[0].history.closest_common_ancestor((results.avoid + results.active)[0].history) divergent_point = list(HistoryIter(results.found[0].history, end=ancestor))[0] #p.factory.block(divergent_point.addr).pp() assert divergent_point.recent_bbl_addrs[0] == divergences[arch]
def _run_fauxware(self, arch): p = angr.Project(os.path.join(test_location, arch, "fauxware"), auto_load_libs=False) results = p.factory.simulation_manager().explore( find=target_addrs[arch], avoid=avoid_addrs[arch]) stdin = results.found[0].posix.dumps(0) assert b"\x00\x00\x00\x00\x00\x00\x00\x00\x00SOSNEAKY\x00" == stdin # test the divergence detection ancestor = results.found[0].history.closest_common_ancestor( (results.avoid + results.active)[0].history) divergent_point = list( HistoryIter(results.found[0].history, end=ancestor))[0] # p.factory.block(divergent_point.addr).pp() assert divergent_point.recent_bbl_addrs[0] == divergences[arch]