move setting UsingSymExec to right place

This commit is contained in:
Alex Groce 2018-12-06 17:16:38 -07:00
parent 062e62106c
commit c2745be882
2 changed files with 8 additions and 7 deletions

View File

@ -281,6 +281,10 @@ def do_run_test(project, test, apis, run_state, should_call_state):
test_state = run_state
mc = DeepAngr(state=test_state)
# Tell the system that we're using symbolic execution.
mc.write_uint32_t(apis["UsingSymExec"], 1)
mc.begin_test(test)
del mc
@ -340,9 +344,6 @@ def hook_apis(args, project, run_state):
mc = DeepAngr(state=run_state)
apis = mc.read_api_table(ea_of_api_table)
# Tell the system that we're using symbolic execution.
mc.write_uint32_t(apis["UsingSymExec"], 1)
# Hook various functions.
hook_function(project, apis['IsSymbolicUInt'], IsSymbolicUInt)
hook_function(project, apis['ConcretizeData'], ConcretizeData)

View File

@ -335,7 +335,10 @@ def do_run_test(state, apis, test, hook_test=False):
state = m.initial_state
mc = DeepManticore(state)
mc.write_uint32_t(apis["UsingSymExec"], 8589934591)
# Tell the system that we're using symbolic execution.
mc.write_uint32_t(apis["UsingSymExec"], 1)
mc.begin_test(test)
del mc
@ -424,9 +427,6 @@ def main_takeover(m, args, takeover_symbol):
base = get_base(m)
apis = mc.read_api_table(ea_of_api_table, base)
# Tell the system that we're using symbolic execution.
mc.write_uint32_t(apis["UsingSymExec"], 1)
del mc
fake_test = TestInfo(takeover_ea, '_takeover_test', '_takeover_file', 0)