about summary refs log tree commit diff stats
path: root/example/ida/symbol_exec.py
diff options
context:
space:
mode:
authornofiv <41523109+nofiv@users.noreply.github.com>2020-04-15 16:15:04 +0200
committernofiv <41523109+nofiv@users.noreply.github.com>2020-04-16 00:47:24 +0200
commitce517ae68975e6f39c11e3b62d68548bc85b6f6b (patch)
tree1a37e191af67d3f4659be99d92a90aecda3c5f4a /example/ida/symbol_exec.py
parent6b79e8c5ab820222e440d4b96d73dd1258630eb8 (diff)
downloadmiasm-ce517ae68975e6f39c11e3b62d68548bc85b6f6b.tar.gz
miasm-ce517ae68975e6f39c11e3b62d68548bc85b6f6b.zip
IDAPython 7.4 porting
Diffstat (limited to 'example/ida/symbol_exec.py')
-rw-r--r--example/ida/symbol_exec.py8
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: