diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2020-06-10 12:14:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-10 12:14:34 +0200 |
| commit | 030d19ae958b40e52dd8dfe4475fc181eae1480e (patch) | |
| tree | c75f089b9860588342492b1068ba0bc3c26dea85 /example/ida/symbol_exec.py | |
| parent | dd2fd9c8e424463591782472192627cfdbe397f5 (diff) | |
| parent | ce517ae68975e6f39c11e3b62d68548bc85b6f6b (diff) | |
| download | miasm-030d19ae958b40e52dd8dfe4475fc181eae1480e.tar.gz miasm-030d19ae958b40e52dd8dfe4475fc181eae1480e.zip | |
Merge pull request #1185 from nofiv/IDAPython74
Ported IDAPython code to the 7.4 version
Diffstat (limited to 'example/ida/symbol_exec.py')
| -rw-r--r-- | example/ida/symbol_exec.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/example/ida/symbol_exec.py b/example/ida/symbol_exec.py index c0ed89f3..d1141119 100644 --- a/example/ida/symbol_exec.py +++ b/example/ida/symbol_exec.py @@ -124,7 +124,7 @@ def get_focused_view(): class Hooks(idaapi.UI_Hooks): - def finish_populating_tform_popup(self, form, popup): + def finish_populating_widget_popup(self, form, popup): idaapi.attach_action_to_popup(form, popup, 'my:expand', None) idaapi.attach_action_to_popup(form, popup, 'my:translate', None) @@ -135,7 +135,7 @@ def symbolic_exec(): from utils import guess_machine - start, end = idc.SelStart(), idc.SelEnd() + start, end = idc.read_selection_start(), idc.read_selection_end() bs = bin_stream_ida() machine = guess_machine(addr=start) @@ -143,7 +143,7 @@ def symbolic_exec(): mdis = machine.dis_engine(bs) if start == idc.BADADDR and end == idc.BADADDR: - start = idc.ScreenEA() + start = idc.get_screen_ea() end = idc.next_head(start) # Get next instruction address mdis.dont_dis = [end] @@ -197,7 +197,7 @@ idaapi.register_action(action_translate) if __name__ == '__main__': idaapi.CompileLine('static key_F3() { RunPythonStatement("symbolic_exec()"); }') - idc.AddHotkey("F3", "key_F3") + idc.add_idc_hotkey("F3", "key_F3") print("=" * 50) print("""Available commands: |