From ce517ae68975e6f39c11e3b62d68548bc85b6f6b Mon Sep 17 00:00:00 2001 From: nofiv <41523109+nofiv@users.noreply.github.com> Date: Wed, 15 Apr 2020 16:15:04 +0200 Subject: IDAPython 7.4 porting --- example/ida/symbol_exec.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'example/ida/symbol_exec.py') 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: -- cgit 1.4.1