diff options
| author | William Bruneau <william.bruneau@epfedu.fr> | 2018-06-18 15:28:56 +0200 |
|---|---|---|
| committer | William Bruneau <william.bruneau@epfedu.fr> | 2018-06-19 09:56:02 +0200 |
| commit | 820873ad5fb20168ba2718eef28505144bd06ccd (patch) | |
| tree | 33fa541e01ebf0d67082414c07dbada1978da9db /example/ida/symbol_exec.py | |
| parent | ff8efb442a7802fcbd2b5350b2e53f959287ee10 (diff) | |
| download | miasm-820873ad5fb20168ba2718eef28505144bd06ccd.tar.gz miasm-820873ad5fb20168ba2718eef28505144bd06ccd.zip | |
Allow symbolic execution of one instruction in IDA
Diffstat (limited to 'example/ida/symbol_exec.py')
| -rw-r--r-- | example/ida/symbol_exec.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/example/ida/symbol_exec.py b/example/ida/symbol_exec.py index 63014ece..49c6fdb6 100644 --- a/example/ida/symbol_exec.py +++ b/example/ida/symbol_exec.py @@ -134,6 +134,10 @@ def symbolic_exec(): mdis = machine.dis_engine(bs) start, end = idc.SelStart(), idc.SelEnd() + if start == idc.BADADDR and end == idc.BADADDR: + start = idc.ScreenEA() + end = idc.next_head(start) # Get next instruction address + mdis.dont_dis = [end] asmcfg = mdis.dis_multiblock(start) ira = machine.ira(symbol_pool=mdis.symbol_pool) @@ -151,7 +155,8 @@ def symbolic_exec(): view = symbolicexec_t() all_views.append(view) if not view.Create(modified, machine, mdis.symbol_pool, - "Symbolic Execution - 0x%x to 0x%x" % (start, end)): + "Symbolic Execution - 0x%x to 0x%x" + % (start, idc.prev_head(end))): return view.Show() |