예제 #1
0
def make_name():
    """rename current item"""
    """TODO:replace with custom implementation that allows
    parameters such as name and flags ("create name anyway") to be set
    """

    cv = ida_kernwin.get_current_viewer()
    if cv:
        hx = ida_kernwin.get_widget_type(cv) == ida_kernwin.BWN_PSEUDOCODE
        ida_kernwin.process_ui_action("hx:Rename" if hx else "MakeName")
    return
예제 #2
0
    def __call__(self):
        if self.__idx >= len(self.__action_list):
            return False

        # Execute one action
        ida_kernwin.process_ui_action(self.__action_list[self.__idx],
                                      self.__flags)

        # Move to next action
        self.__idx += 1

        # Reschedule
        return True
예제 #3
0
파일: idautils.py 프로젝트: AmesianX/src
    def __call__(self):
        if self.__idx >= len(self.__action_list):
            return False

        # Execute one action
        ida_kernwin.process_ui_action(
                self.__action_list[self.__idx],
                self.__flags)

        # Move to next action
        self.__idx += 1

        # Reschedule
        return True
예제 #4
0
파일: idaSIM.py 프로젝트: kingking888/RESim
 def runToUserSpace(self):
     #self.bookmark_view.runToUserSpace()
     #time.sleep(3)
     print('runToUser do resynch')
     v = ida_kernwin.get_current_viewer()
     r = ida_kernwin.get_view_renderer_type(v)
     dotoggle = False
     ''' work around ida bug "nrect(26)" error '''
     if r == ida_kernwin.TCCRT_GRAPH:
         dotoggle = True
         ida_kernwin.process_ui_action("ToggleRenderer")
     print('resynch to server')
     simicsString = gdbProt.Evalx('SendGDBMonitor("@cgc.resynch()");')
     time.sleep(1)
     eip = gdbProt.getEIPWhenStopped()
     print('resynch got eip 0x%x now sig client' % eip)
     if dotoggle:
         ida_kernwin.process_ui_action("ToggleRenderer")
     self.signalClient()
예제 #5
0
            def delayed_exec(*args):
                output_window_title = "Output window"
                tw = ida_kernwin.find_widget(output_window_title)
                if not tw:
                    raise Exception("Couldn't find widget '%s'" % output_window_title)

                # convert from a SWiG 'TWidget*' facade,
                # into an object that PyQt will understand
                w = ida_kernwin.PluginForm.TWidgetToPyQtWidget(tw)

                line_edit = w.findChild(QtWidgets.QLineEdit)
                if not line_edit:
                    raise Exception("Couldn't find input")
                line_edit.setFocus() # ensure it has focus
                QtWidgets.QApplication.instance().processEvents() # and that it received the focus event

                # inject text into widget
                line_edit.setText(text)

                # and execute the standard 'execute' action
                ida_kernwin.process_ui_action("cli:Execute")
    def __call__(self):
        if self.__idx >= len(self.__action_list):
            return False

        # Execute one action
        aname = self.__action_list[self.__idx]
        print("executing: %s (flags=0x%x)" % (aname, self.__flags))
        print("=> %s" % ida_kernwin.process_ui_action(aname, self.__flags))

        # Move to next action
        self.__idx += 1
        print("index=%d" % self.__idx)

        # Reschedule
        return True