當前位置: 首頁>>代碼示例>>Python>>正文


Python idaapi.attach_action_to_popup方法代碼示例

本文整理匯總了Python中idaapi.attach_action_to_popup方法的典型用法代碼示例。如果您正苦於以下問題:Python idaapi.attach_action_to_popup方法的具體用法?Python idaapi.attach_action_to_popup怎麽用?Python idaapi.attach_action_to_popup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在idaapi的用法示例。


在下文中一共展示了idaapi.attach_action_to_popup方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _inject_ctx_actions

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def _inject_ctx_actions(self, view, popup, view_type):
        """
        Inject context menu entries into IDA's right click menus.

        NOTE: This is only being used for coverage xref at this time, but
        may host additional actions in the future.

        """

        if view_type == idaapi.BWN_DISASMS:

            idaapi.attach_action_to_popup(
                view,
                popup,
                self.ACTION_COVERAGE_XREF,  # The action ID (see above)
                "Xrefs graph from...",      # Relative path of where to add the action
                idaapi.SETMENU_APP          # We want to append the action after ^
            ) 
開發者ID:gaasedelen,項目名稱:lighthouse,代碼行數:20,代碼來源:ida_integration.py

示例2: callback

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def callback(self, event, *args):
        if event == idaapi.hxe_populating_popup:
            form, phandle, vu = args
            if vu.item.citype == idaapi.VDI_FUNC or (vu.item.citype == idaapi.VDI_EXPR and vu.item.e.is_expr() and vu.item.e.type.is_funcptr()):
                idaapi.attach_action_to_popup(form, phandle, ACTION_HX_REMOVERETTYPE, None)
        elif event == idaapi.hxe_double_click:
            vu, shift_state = args
            # auto jump to target if clicked item is xxx->func();
            if vu.item.citype == idaapi.VDI_EXPR and vu.item.e.is_expr():
                expr = idaapi.tag_remove(vu.item.e.print1(None))
                if "->" in expr:
                    # find target function
                    name = expr.split("->")[-1]
                    addr = idc.get_name_ea_simple(name)
                    if addr == idaapi.BADADDR:
                        # try class::function
                        e = vu.item.e
                        while e.x:
                            e = e.x
                        addr = idc.get_name_ea_simple("%s::%s" % (str(e.type).split()[0], name))

                    if addr != idaapi.BADADDR:
                        idc.jumpto(addr)
                        return 1
        return 0 
開發者ID:L4ys,項目名稱:LazyIDA,代碼行數:27,代碼來源:LazyIDA.py

示例3: register_menu_actions

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def register_menu_actions(form):
    widget = form.GetWidget()
    for action in form.menu_actions:
        act_name = action.name
        if act_name != '-':
            act_name = "%s:%s" % (PLUGIN_NAME, action.name)
            idaapi.register_action(
                idaapi.action_desc_t(
                    act_name, 
                    action.title,
                    ActionHandler(form, action), 
                    action.shortcut, 
                    action.tooltip, 
                    action.icon
                )
            )
        if action.checkable is not None:
            idaapi.update_action_checkable(act_name, True)
            idaapi.update_action_checked(act_name, action.checkable)

        idaapi.attach_action_to_popup(widget, None, act_name)

# ----------------------------------------------------------------------- 
開發者ID:danigargu,項目名稱:deREferencing,代碼行數:25,代碼來源:actions.py

示例4: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def finish_populating_widget_popup(form, popup):
    if idaapi.get_widget_type(form) == idaapi.BWN_DISASM:
      idaapi.attach_action_to_popup(
          form,
          popup,
          VTGrepBytes.get_name(),
          'VirusTotal/'
          )
      idaapi.attach_action_to_popup(
          form,
          popup,
          VTGrepWildcards.get_name(),
          'VirusTotal/',
          )
      idaapi.attach_action_to_popup(
          form,
          popup,
          VTGrepWildCardsStrict.get_name(),
          'VirusTotal/',
          )
      idaapi.attach_action_to_popup(
          form,
          popup,
          VTGrepWildCardsFunction.get_name(),
          'VirusTotal/',
          )
    elif idaapi.get_widget_type(form) == idaapi.BWN_STRINGS:
      idaapi.attach_action_to_popup(
          form,
          popup,
          VTGrepStrings.get_name(),
          'VirusTotal/') 
開發者ID:VirusTotal,項目名稱:vt-ida-plugin,代碼行數:34,代碼來源:plugin_loader.py

示例5: finish_populating_tform_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def finish_populating_tform_popup(form, popup):
        idaapi.attach_action_to_popup(form, popup, "Find", "IDAngr/")
        idaapi.attach_action_to_popup(form, popup, "Avoid", "IDAngr/")
        idaapi.attach_action_to_popup(form, popup, "Symbolic", "IDAngr/") 
開發者ID:andreafioraldi,項目名稱:IDAngr,代碼行數:6,代碼來源:main_gui.py

示例6: finish_populating_tform_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def finish_populating_tform_popup(self, form, popup):
        # TODO - Attach to the functions view.
        # if idaapi.get_tform_type(form) == idaapi.BWN_FUNCS:
        #     idaapi.attach_action_to_popup(
        #         form, popup, "my:disasmsaction", None)

        # Attach to the disassembler view only
        if idaapi.get_tform_type(form) == idaapi.BWN_DISASMS:
            idaapi.attach_action_to_popup(
                form, popup, "my:disasmsaction", None)
            idaapi.attach_action_to_popup(
                form, popup, "my:disasmtracker", None)
            idaapi.attach_action_to_popup(
                form, popup, "my:invalidatecache", None) 
開發者ID:Cisco-Talos,項目名稱:GhIDA,代碼行數:16,代碼來源:ghida.py

示例7: _attach_to_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def _attach_to_popup(self, action_name):
        idaapi.attach_action_to_popup(self.GetTCustomControl(), None, action_name) 
開發者ID:tmr232,項目名稱:Sark,代碼行數:4,代碼來源:lca.py

示例8: idaview_hooks

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def idaview_hooks(idaview_handler):
    class Hooks(idaapi.UI_Hooks):
        def finish_populating_widget_popup(self, form, popup):
            if idaapi.get_widget_type(form) == idaapi.BWN_DISASM:
                idaapi.attach_action_to_popup(form, popup, idaview_handler.get_name(), "")

    return Hooks 
開發者ID:tmr232,項目名稱:Sark,代碼行數:9,代碼來源:lca.py

示例9: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def finish_populating_widget_popup(self, form, popup):
        # Or here, after the popup is done being populated by its owner.

        if idaapi.get_widget_type(form) == idaapi.BWN_DISASM:
            idaapi.attach_action_to_popup(form, popup, ShowXrefsGraphFrom.get_name(), '')
            idaapi.attach_action_to_popup(form, popup, ShowXrefsGraphTo.get_name(), '') 
開發者ID:tmr232,項目名稱:Sark,代碼行數:8,代碼來源:xrefsgraph.py

示例10: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def finish_populating_widget_popup(self, form, popup):
        # Or here, after the popup is done being populated by its owner.

        if idaapi.get_widget_type(form) == idaapi.BWN_DISASM:
            idaapi.attach_action_to_popup(form, popup, MarkReachableNodesHandler.get_name(), "Mark/")
            idaapi.attach_action_to_popup(form, popup, MarkUnReachableNodesHandler.get_name(), "Mark/")
            idaapi.attach_action_to_popup(form, popup, MarkReachingNodesHandler.get_name(), "Mark/")
            idaapi.attach_action_to_popup(form, popup, MarkNotReachingNodesHandler.get_name(), "Mark/")
            idaapi.attach_action_to_popup(form, popup, MarkExits.get_name(), "Mark/")
            idaapi.attach_action_to_popup(form, popup, MarkClearHandler.get_name(), "Mark/") 
開發者ID:tmr232,項目名稱:Sark,代碼行數:12,代碼來源:function_flow.py

示例11: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
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) 
開發者ID:cea-sec,項目名稱:miasm,代碼行數:5,代碼來源:symbol_exec.py

示例12: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def finish_populating_widget_popup(self, form, popup):
        idaapi.attach_action_to_popup(form, popup, "mkYARA:generate_loose_yara", "mkYARA/")
        idaapi.attach_action_to_popup(form, popup, "mkYARA:generate_normal_yara", "mkYARA/")
        idaapi.attach_action_to_popup(form, popup, "mkYARA:generate_strict_yara", "mkYARA/")
        idaapi.attach_action_to_popup(form, popup, "mkYARA:generate_data_yara", "mkYARA/") 
開發者ID:fox-it,項目名稱:mkYARA,代碼行數:7,代碼來源:mkyara_plugin.py

示例13: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def finish_populating_widget_popup(self, form, popup):
        form_type = idaapi.get_widget_type(form)

        if form_type == idaapi.BWN_DISASM or form_type == idaapi.BWN_DUMP:
            t0, t1, view = idaapi.twinpos_t(), idaapi.twinpos_t(), idaapi.get_current_viewer()
            if idaapi.read_selection(view, t0, t1) or idc.get_item_size(idc.get_screen_ea()) > 1:
                idaapi.attach_action_to_popup(form, popup, ACTION_XORDATA, None)
                idaapi.attach_action_to_popup(form, popup, ACTION_FILLNOP, None)
                for action in ACTION_CONVERT:
                    idaapi.attach_action_to_popup(form, popup, action, "Convert/")

        if form_type == idaapi.BWN_DISASM and (ARCH, BITS) in [(idaapi.PLFM_386, 32),
                                                               (idaapi.PLFM_386, 64),
                                                               (idaapi.PLFM_ARM, 32),]:
            idaapi.attach_action_to_popup(form, popup, ACTION_SCANVUL, None) 
開發者ID:L4ys,項目名稱:LazyIDA,代碼行數:17,代碼來源:LazyIDA.py

示例14: finish_populating_tform_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def finish_populating_tform_popup(self, form, popup):
        #formtype = idaapi.get_tform_type(form)

        #if formtype == idaapi.BWN_DISASM or idaapi.BWN_DUMP:

        for action, position, condition in self.popups:
            if condition(form):
                idaapi.attach_action_to_popup(form, popup, action, position) 
開發者ID:Tekiter,項目名稱:WatchDBG-IDA,代碼行數:10,代碼來源:util.py

示例15: cb

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import attach_action_to_popup [as 別名]
def cb(event, *args):
    if event == ida_hexrays.hxe_populating_popup:
        widget, phandle, vu = args
        res = idaapi.attach_action_to_popup(vu.ct, None, ACTION_NAME)

    return 0 
開發者ID:fireeye,項目名稱:flare-ida,代碼行數:8,代碼來源:stack_strings_helper.py


注:本文中的idaapi.attach_action_to_popup方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。