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


Python idaapi.install_hexrays_callback方法代碼示例

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


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

示例1: _notify_status_changed

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import install_hexrays_callback [as 別名]
def _notify_status_changed(self, status):

        # enable / disable hook based on the painter being enabled or disabled
        if status:
            self._idp_hooks.hook()
            if idaapi.init_hexrays_plugin():
                idaapi.install_hexrays_callback(self._hxe_callback)
        else:
            self._idp_hooks.unhook()
            if idaapi.init_hexrays_plugin():
                idaapi.remove_hexrays_callback(self._hxe_callback)

        # send the status changed signal...
        super(IDAPainter, self)._notify_status_changed(status)

    #------------------------------------------------------------------------------
    # Paint Actions
    #------------------------------------------------------------------------------ 
開發者ID:gaasedelen,項目名稱:lighthouse,代碼行數:20,代碼來源:ida_painter.py

示例2: main

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import install_hexrays_callback [as 別名]
def main():
    show_banner()

    print "Unregistering old action..."
    ida_kernwin.unregister_action(ACTION_NAME)

    if ida_hexrays.init_hexrays_plugin():
        ida_kernwin.register_action(
            ida_kernwin.action_desc_t(
                ACTION_NAME,
                "Keep sanity (stack strings)",
                stack_strings_ah_t(),
                None))

        print "Registered new action"

        idaapi.install_hexrays_callback(cb)

    else:
        print "[x] No decompiler found!"
        return 
開發者ID:fireeye,項目名稱:flare-ida,代碼行數:23,代碼來源:stack_strings_helper.py

示例3: _init_hexrays_hooks

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import install_hexrays_callback [as 別名]
def _init_hexrays_hooks(self):
        """
        Install Hex-Rrays hooks (when available).

        NOTE: This is called when the ui_ready_to_run event fires.
        """
        if idaapi.init_hexrays_plugin():
            idaapi.install_hexrays_callback(self._hooks.hxe_callback)

    #--------------------------------------------------------------------------
    # IDA Actions
    #-------------------------------------------------------------------------- 
開發者ID:gaasedelen,項目名稱:prefix,代碼行數:14,代碼來源:ida_prefix.py

示例4: init

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import install_hexrays_callback [as 別名]
def init(self):
        """
        Ensure plugin's line modification function is called whenever needed.

        If Hex-Rays is not installed, or is not initialized yet, then plugin
        will not load. To ensure that the plugin loads after Hex-Rays, please
        name your plugin's .py file with a name that starts lexicographically
        after "hexx86f"
        """
        try:
            if idaapi.init_hexrays_plugin():
                def hexrays_event_callback(event, *args):
                    if event == idaapi.hxe_refresh_pseudocode:
                        # We use this event instead of hxe_text_ready because
                        #   MacOSX doesn't seem to work well with it
                        # TODO: Look into this
                        vu, = args
                        self.visit_func(vu.cfunc)
                    return 0
                idaapi.install_hexrays_callback(hexrays_event_callback)
            else:
                return idaapi.PLUGIN_SKIP
        except AttributeError:
            idc.Warning('''init_hexrays_plugin() not found.
            Skipping Hex-Rays plugin.''')
        return idaapi.PLUGIN_KEEP 
開發者ID:BinaryAnalysisPlatform,項目名稱:bap-ida-python,代碼行數:28,代碼來源:hexrays.py

示例5: main

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import install_hexrays_callback [as 別名]
def main():
    if not idaapi.init_hexrays_plugin():
        return False

    print "Hex-rays version %s has been detected" % idaapi.get_hexrays_version()
    idaapi.install_hexrays_callback(event_callback) 
開發者ID:fireeye,項目名稱:flare-ida,代碼行數:8,代碼來源:find_get_proc_address.py


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