我目前正在尝试使用 angr,我需要找到一个字符串“完成!” 这导致程序的“良好终止”。输入是 32 位,我需要知道导致“完成!”的输入。正在打印。我想在我的 python 脚本中使用以下内容:
b = angr.Project('a.out')
arg1 = claripy.BVS('arg1', 32)
b.factory.entry_state(args=['a.out', arg1])
pg = b.factory.simgr()
pg.explore(find=lambda x: b'Done!' in x.posix.dumps(1))
根据我目前对 angr 的了解,这应该导致路径,导致“完成!” 正在打印。我错了吗?使用 found[0] 然后我可以访问结果。但是 angr 给我留下了
<SimulationManager with 1 deadended>
作为我的模拟管理器的输出。我究竟做错了什么?是否需要更多要求才能使其工作?
获得任何帮助。
干杯