diff --git a/README.md b/README.md index 975be25..8914107 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ make # Use the Manticore CLI manticore basic +cat mcore_*/*0.stdin | ./basic cat mcore_*/*1.stdin | ./basic -cat mcore_*/*2.stdin | ./basic # Use the Manticore API cd ../script diff --git a/examples/script/count_instructions.py b/examples/script/count_instructions.py index 2412576..d1b32a6 100755 --- a/examples/script/count_instructions.py +++ b/examples/script/count_instructions.py @@ -17,11 +17,13 @@ if __name__ == '__main__': sys.exit(2) m = Manticore(sys.argv[1]) - m.context['count'] = 0 + with m.locked_context() as context: + context['count'] = 0 @m.hook(None) def explore(state): - m.context['count'] += 1 + with m.locked_context() as context: + context['count'] += 1 m.run(procs=3) diff --git a/examples/script/multi_arch_sym.py b/examples/script/multi_arch_sym.py index f4901e2..31b5ec0 100755 --- a/examples/script/multi_arch_sym.py +++ b/examples/script/multi_arch_sym.py @@ -16,6 +16,7 @@ if __name__ == '__main__': # Create a new Manticore object m = Manticore(sys.argv[1], sys.argv[2:]) + m.verbosity = 2 if m.arch == 'arm': target = (0x1082c, 'R4') @@ -31,10 +32,5 @@ if __name__ == '__main__': sym_var = state.new_symbolic_value(32, label='from_callback') state.cpu.write_register(target[1], sym_var) - # Start path exploration. start() returns when Manticore finishes - m.verbosity = 2 m.run() - # Print high level statistics - m.dump_stats() - diff --git a/examples/script/run_hook.py b/examples/script/run_hook.py index 21fba4d..8941614 100755 --- a/examples/script/run_hook.py +++ b/examples/script/run_hook.py @@ -25,7 +25,5 @@ if __name__ == '__main__': print "Execution goal reached." print "Instruction bytes: {:08x}".format(instruction) - # Start path exploration. m.run() returns when Manticore - # finishes m.run() diff --git a/examples/script/run_simple.py b/examples/script/run_simple.py index a7c7c98..3148681 100755 --- a/examples/script/run_simple.py +++ b/examples/script/run_simple.py @@ -12,9 +12,5 @@ if __name__ == '__main__': path = sys.argv[1] # Create a new Manticore object m = Manticore(path) - # Start path exploration. start() returns when Manticore - # finishes m.run() - # Print high level statistics - m.dump_stats()