diff options
| author | Ajax <commial@gmail.com> | 2017-07-05 10:03:37 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-07-05 11:22:42 +0200 |
| commit | 788dfeeffb1ee6408010cd1b3428a6ad980ec9aa (patch) | |
| tree | d4f3fed12b94a036036449ce1f2d4168e1653206 /example/ida/symbol_exec.py | |
| parent | 29465f3d55821d3a68f21ada20d45c4f6c6c5e63 (diff) | |
| download | miasm-788dfeeffb1ee6408010cd1b3428a6ad980ec9aa.tar.gz miasm-788dfeeffb1ee6408010cd1b3428a6ad980ec9aa.zip | |
IDA/SymbExec: clean & fix imports, export main function
Diffstat (limited to 'example/ida/symbol_exec.py')
| -rw-r--r-- | example/ida/symbol_exec.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/example/ida/symbol_exec.py b/example/ida/symbol_exec.py index 70e1cfc1..7599dde7 100644 --- a/example/ida/symbol_exec.py +++ b/example/ida/symbol_exec.py @@ -84,7 +84,7 @@ def symbolic_exec(): machine = guess_machine() mdis = machine.dis_engine(bs) - start, end = SelStart(), SelEnd() + start, end = idc.SelStart(), idc.SelEnd() mdis.dont_dis = [end] blocks = mdis.dis_multibloc(start) @@ -115,10 +115,11 @@ def symbolic_exec(): view.Show() -idaapi.CompileLine('static key_F3() { RunPythonStatement("symbolic_exec()"); }') -idc.AddHotkey("F3", "key_F3") +if __name__ == "__main__": + idaapi.CompileLine('static key_F3() { RunPythonStatement("symbolic_exec()"); }') + idc.AddHotkey("F3", "key_F3") -print "=" * 50 -print """Available commands: - symbolic_exec() - F3: Symbolic execution of current selection -""" + print "=" * 50 + print """Available commands: + symbolic_exec() - F3: Symbolic execution of current selection + """ |