Add brief example descriptions to README (#120)

* Added brief example descriptions to README
* Update config script
* Update sym.py API usage
* Remove individual example descriptions
* fix mcore init
* consistently document examples
* make basic_sym runnable
* More path fixes
* cleanup; update api
This commit is contained in:
Yan
2017-04-10 14:31:51 -04:00
committed by GitHub
parent a41eb6feba
commit 5c112e56f3
7 changed files with 57 additions and 94 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env python
import sys
from manticore import Manticore
'''
Demonstrates the ability to set a basic hook on a specific program counter and
the ability to read from memory.
'''
if __name__ == '__main__':
path = sys.argv[1]
pc = int(sys.argv[2], 0)
m = Manticore(path)
# Trigger an event when PC reaches a certain value
@m.hook(pc)
def reached_goal(state):
cpu = state.cpu
assert cpu.PC == pc
instruction = cpu.read_int(cpu.PC)
print "Execution goal reached."
print "Instruction bytes: {:08x}".format(instruction)
# Start path exploration. m.run() returns when Manticore
# finishes
m.run()