def finish_populating_tform_popup(self, form, popup): if idaapi.get_tform_title(form).startswith("IDA View"): idaapi.attach_action_to_popup( form, popup, "Kam1n0:indexCurrent", None) idaapi.attach_action_to_popup( form, popup, "Kam1n0:queryCurrent", None) idaapi.attach_action_to_popup( form, popup, "Kam1n0:queryFragment", None) if idaapi.get_tform_title(form) == "Functions window": idaapi.attach_action_to_popup( form, popup, "Kam1n0:querySelected", None) idaapi.attach_action_to_popup( form, popup, "Kam1n0:indexSelected", None)
def touch_window(target): """ Touch a window/widget/form to ensure it gets drawn by IDA. XXX/HACK: We need to ensure that widget we will analyze actually gets drawn so that there are colors for us to steal. To do this, we switch to it, and switch back. I tried a few different ways to trigger this from Qt, but could only trigger the full painting by going through the IDA routines. """ # get the currently active widget/form title (the form itself seems transient...) if using_ida7api: twidget = idaapi.get_current_widget() title = idaapi.get_widget_title(twidget) else: form = idaapi.get_current_tform() title = idaapi.get_tform_title(form) # touch/draw the widget by playing musical chairs if using_ida7api: # touch the target window by switching to it idaapi.activate_widget(target, True) flush_ida_sync_requests() # locate our previous selection previous_twidget = idaapi.find_widget(title) # return us to our previous selection idaapi.activate_widget(previous_twidget, True) flush_ida_sync_requests() else: # touch the target window by switching to it idaapi.switchto_tform(target, True) flush_ida_sync_requests() # locate our previous selection previous_form = idaapi.find_tform(title) # lookup our original form and switch back to it idaapi.switchto_tform(previous_form, True) flush_ida_sync_requests()
def finish_populating_tform_popup(form, popup): """ Arguments: Return Value: Description: - TODO: - Doc String """ if idaapi.get_tform_title(form) == "IDA View-A": idaapi.attach_action_to_popup(form, popup, "Finds:Set", "AngryIDA/Finds/") idaapi.attach_action_to_popup(form, popup, "Finds:Remove", "AngryIDA/Finds/") idaapi.attach_action_to_popup(form, popup, "Finds:Print", "AngryIDA/Finds/") idaapi.attach_action_to_popup(form, popup, "Avoids:Set", "AngryIDA/Avoids/") idaapi.attach_action_to_popup(form, popup, "Avoids:Remove", "AngryIDA/Avoids/") idaapi.attach_action_to_popup(form, popup, "Avoids:Print", "AngryIDA/Avoids/") idaapi.attach_action_to_popup(form, popup, "Explore:Run", "AngryIDA/Explore/") idaapi.attach_action_to_popup(form, popup, "Explore:Options", "AngryIDA/Explore/") idaapi.attach_action_to_popup(form, popup, "Refresh:Refresh", "AngryIDA/") idaapi.attach_action_to_popup(form, popup, "Quit:Quit", "AngryIDA/")
def finish_populating_tform_popup(self, form, popup): if idaapi.get_tform_title(form) == "Patcherex": for act in self.acts: idaapi.attach_action_to_popup(form, popup, "patcherex:" + act, None)
def current_tform_changed(self, a1, a2): #print "tform", idaapi.get_tform_title(a1) tm = MyIDAViewWrapper(idaapi.get_tform_title(a1), self.bps_shared_memory) if(tm not in self.binds): tm.Bind() self.binds.append(tm)
def current_tform_changed(self, a1, a2): #print "tform", idaapi.get_tform_title(a1) tm = MyIDAViewWrapper(idaapi.get_tform_title(a1)) if tm.Bind(): self.binds.append(tm) return 0