很抱歉,这个问题很可能没有意义。我刚接触Angr,遇到了一个小问题。假设我有一个二进制程序“mybinary”,我在其中输入一些东西,它会进行一些操作,并根据这些操作进行检查,以找到一个标志。(正常的crackme风格。)
但是,程序第一次运行时需要一个字符串tid输入。我有tid,它只是一个32位的字母和数字字符串
因此,为了运行它,我必须执行“/mybinary‘tid字符串’”,而不是“/mybinary”
在将文件加载到Angr项目中的上下文中,我如何做到这一点
比如,如果我的angr代码是这样的:
import angr
import claripy
#Whatever variables.
base_addr = #Whatever the base address is.
proj = angr.Project("./mybinary", main_opts={'base_addr': base_addr})
#Some code for defining flag characters.
state = proj.factory.full_init_state(
args=['./mybinary'],
add_options=angr.options.unicorn,
stdin=flag,
)
#Some code to create and run simulation with success and failure.
我如何编辑它,使其运行“/mybinary”而不是“/mybinary”
谢谢你的帮助
以下是您应该如何实例化状态以满足您的需要:
根据documentation的规定:
此外,在您的案例中似乎不需要
full_init_state
entry_state
应该足够(same documentation):相关问题 更多 >
编程相关推荐