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


Python idaapi.BWN_DISASM屬性代碼示例

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


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

示例1: finish_populating_tform_popup

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

        pos = idc.ScreenEA()
        register_dynamic_action(form, popup, 'Decode All IOCTLs in Function', DecodeAllHandler())
        register_dynamic_action(form, popup, 'Decode IOCTLs using Angr', DecodeAngrHandler())
		# If the second argument to the current selected instruction is an immediately
        # then give the option to decode it.
        if idc.GetOpType(pos, 1) == 5:
            register_dynamic_action(form, popup, 'Decode IOCTL', DecodeHandler())
            if pos in ioctl_tracker.ioctl_locs:
                register_dynamic_action(form, popup, 'Invalid IOCTL', InvalidHandler())
        if len(ioctl_tracker.ioctl_locs) > 0:
            register_dynamic_action(form, popup, 'Show All IOCTLs', ShowAllHandler()) 
開發者ID:FSecureLABS,項目名稱:win_driver_plugin,代碼行數:18,代碼來源:win_driver_plugin.py

示例2: update

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [as 別名]
def update(cls, ctx):
    if ctx.form_type == idaapi.BWN_DISASM:
      return ida_kernwin.AST_ENABLE_FOR_WIDGET
    else:
      return ida_kernwin.AST_DISABLE_FOR_WIDGET 
開發者ID:VirusTotal,項目名稱:vt-ida-plugin,代碼行數:7,代碼來源:plugin_loader.py

示例3: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [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

示例4: get_custom_viewer_hint

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [as 別名]
def get_custom_viewer_hint(self, view, place):
        try:
            tform = idaapi.get_current_tform()
            if idaapi.get_tform_type(tform) != idaapi.BWN_DISASM:
                return None

            curline = idaapi.get_custom_viewer_curline(view, True)
            
            # sometimes get_custom_viewer_place() returns [x, y] and sometimes [place_t, x, y].
            # we want the place_t.
            viewer_place = idaapi.get_custom_viewer_place(view, True)
            if len(viewer_place) != 3:
                return None

            _, x, y = viewer_place
            ea = place.toea()

            # "color" is a bit of misnomer: its the type of the symbol currently hinted
            color = get_color_at_char(curline, x)
            if color != idaapi.COLOR_ADDR:
                return None

            # grab the FAR references to code (not necessarilty a branch/call/jump by itself)
            far_code_references = [xref.to for xref in idautils.XrefsFrom(ea, ida_xref.XREF_FAR) 
                                   if idc.isCode(idc.GetFlags(xref.to))]
            if len(far_code_references) != 1:
                return None

            fva = far_code_references[0]

            # ensure its actually a function
            if not idaapi.get_func(fva):
                return None

            # this magic constant is the number of "important lines" to display by default.
            # the remaining lines get shown if you scroll down while the hint is displayed, revealing more lines.
            return render_function_hint(fva), DEFAULT_IMPORTANT_LINES_NUM
        except Exception as e:
            logger.warning('unexpected exception: %s. Get in touch with @williballenthin.', e, exc_info=True)
            return None 
開發者ID:williballenthin,項目名稱:idawilli,代碼行數:42,代碼來源:hint_calls.py

示例5: idaview_hooks

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [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

示例6: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [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

示例7: updating_actions

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [as 別名]
def updating_actions(self, ctx):
        if ctx.form_type == idaapi.BWN_DISASM:
            with suppress(sark.exceptions.SarkNoFunction):
                self.lines.update(highlight_calls_in_function(ctx.cur_ea))

        return super(UiHooks, self).updating_actions(ctx) 
開發者ID:tmr232,項目名稱:Sark,代碼行數:8,代碼來源:highlight_calls.py

示例8: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [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

示例9: update

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [as 別名]
def update(self, ctx):
        if ctx.form_type == idaapi.BWN_DISASM:
            return idaapi.AST_ENABLE_FOR_WIDGET
        return idaapi.AST_DISABLE_FOR_WIDGET 
開發者ID:tmr232,項目名稱:Sark,代碼行數:6,代碼來源:autoenum.py

示例10: update

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [as 別名]
def update(self, ctx):
        if ctx.form_type in (idaapi.BWN_DISASM, idaapi.BWN_DUMP):
            return idaapi.AST_ENABLE_FOR_WIDGET
        else:
            return idaapi.AST_DISABLE_FOR_WIDGET 
開發者ID:L4ys,項目名稱:LazyIDA,代碼行數:7,代碼來源:LazyIDA.py

示例11: finish_populating_widget_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [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

示例12: finish_populating_tform_popup

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [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

示例13: update

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [as 別名]
def update(self, ctx):
            try:
                if ctx.form_type == idaapi.BWN_DISASM:
                    return idaapi.AST_ENABLE_FOR_FORM
                else:
                    return idaapi.AST_DISABLE_FOR_FORM
            except:
                # Add exception for main menu on >= IDA 7.0
                return idaapi.AST_ENABLE_ALWAYS

    # context menu for Fix idb 
開發者ID:PAGalaxyLab,項目名稱:vxhunter,代碼行數:13,代碼來源:vxhunter_ida.py

示例14: update

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [as 別名]
def update(self, ctx):
            if ctx.form_type == idaapi.BWN_DISASM:
                return idaapi.AST_ENABLE_FOR_WIDGET
            return idaapi.AST_DISABLE_FOR_WIDGET 
開發者ID:polymorf,項目名稱:findcrypt-yara,代碼行數:6,代碼來源:findcrypt3.py

示例15: _create_hooks

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import BWN_DISASM [as 別名]
def _create_hooks(self, install_idabuddy):
        class InstallerUiHooks(idaapi.UI_Hooks):
            def updating_actions(self, ctx):
                if ctx.form_type == idaapi.BWN_DISASM:
                    ida_widget = form_to_widget(ctx.form)
                    idaview = ida_widget.children()[0]
                    install_idabuddy(idaview)
                return super(InstallerUiHooks, self).updating_actions(ctx)

        return InstallerUiHooks() 
開發者ID:tmr232,項目名稱:IDABuddy,代碼行數:12,代碼來源:installer.py


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