当前位置: 首页>>代码示例>>Python>>正文


Python idaapi.msg方法代码示例

本文整理汇总了Python中idaapi.msg方法的典型用法代码示例。如果您正苦于以下问题:Python idaapi.msg方法的具体用法?Python idaapi.msg怎么用?Python idaapi.msg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在idaapi的用法示例。


在下文中一共展示了idaapi.msg方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: prepare_debug_ui

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def prepare_debug_ui(self):
		if idaapi.is_debugger_on():
			idaapi.warning("[%s] the debugger is currently running" % PLUGNAME)
			return

		wd = WaitDialog()
		idaapi.msg("[%s] waiting...\n" % (PLUGNAME))
		wd.thread.start()
		wd.exec_()

		target_pid = wd.get_target_pid()
		if target_pid != -1:
			ida_dbg.attach_process(target_pid,-1)
			ida_dbg.wait_for_next_event(ida_dbg.WFNE_SUSP, -1)
			ida_dbg.continue_process()
		else:
			idaapi.msg("[%s] exit waiting\n" % (PLUGNAME)) 
开发者ID:anic,项目名称:ida2pwntools,代码行数:19,代码来源:ida2pwntools.py

示例2: activate

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def activate(self, ctx):
		ea = ScreenEA()
		str_id = idaapi.get_highlighted_identifier()
		if str_id[-1] == 'h':
			addr = int(str_id[:-1], 16)
		elif str_id[-1] == 'o':
			addr = int(str_id[:-1], 8)
		elif str_id[-1] == 'b':
			addr = int(str_id[:-1], 2)
		else:
			addr = int(str_id)
		temp = self.find_nearest_function(addr)
		if temp != None:
			n = GetFunctionName(ea)
			n_addr = int(n[4:],16)
			idaapi.msg(temp)
			idc.MakeName(n_addr, temp) 
开发者ID:sysopfb,项目名称:Malware_Scripts,代码行数:19,代码来源:find_functions.py

示例3: profile_stop

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def profile_stop(self):
        """
        Stop profiling the application and display results.
        @return:
        """
        # If profiling is activated:
        if self.pr is None:
            return False

        self.pr.disable()
        s = StringIO.StringIO()
        sortby = 'tottime'
        ps = pstats.Stats(self.pr, stream=s).sort_stats(sortby)
        ps.print_stats()

        idaapi.msg("%s\n" % (s.getvalue(), )) 
开发者ID:ynvb,项目名称:DIE,代码行数:18,代码来源:DebugAPI.py

示例4: clear_highlights

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def clear_highlights(self):
        """
        Clear all highlighted items
        @return:
        """
        try:
            self.valueTreeView.collapseAll()

            for persistent_index in self.highligthed_items:
                if persistent_index.isValid():
                    item = self.valueModel.itemFromIndex(persistent_index)
                    item.setBackground(QtCore.Qt.white)
                    cur_font = item.font()
                    cur_font.setBold(False)
                    item.setFont(cur_font)

            self.highligthed_items = []

        except Exception as ex:
            idaapi.msg("Error while clearing highlights: %s\n" % ex)

###############################################################################################
#  Find Items
#
############################################################################################### 
开发者ID:ynvb,项目名称:DIE,代码行数:27,代码来源:ValueViewEx.py

示例5: itemDoubleClickSlot

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def itemDoubleClickSlot(self, index):
        """
        TreeView DoubleClicked Slot.
        @param index: QModelIndex object of the clicked tree index item.
        @return:
        """

        func_context_list = index.data(role=DIE.UI.ContextList_Role)
        try:
            if self.function_view is None:
                self.function_view = DIE.UI.FunctionViewEx.get_view()

            if func_context_list is not None and len(func_context_list) > 0:
                if not self.function_view.isVisible():
                    self.function_view.Show()

                self.function_view.find_context_list(func_context_list)

        except Exception as ex:
            idaapi.msg("Error while loading function view: %s\n" % ex) 
开发者ID:ynvb,项目名称:DIE,代码行数:22,代码来源:ValueViewEx.py

示例6: clear_highlights

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def clear_highlights(self):
        """
        Clear all highlighted items
        @return:
        """
        try:
            self.functionTreeView.collapseAll()

            for persistent_index in self.highligthed_items:
                if persistent_index.isValid():
                    item = self.functionModel.itemFromIndex(persistent_index)
                    item.setBackground(QtCore.Qt.white)
                    cur_font = item.font()
                    cur_font.setBold(False)
                    item.setFont(cur_font)

            self.highligthed_items = []

        except Exception as ex:
            idaapi.msg("Error while clearing highlights: %s\n" % ex)


###############################################################################################
#  Find Items. 
开发者ID:ynvb,项目名称:DIE,代码行数:26,代码来源:FunctionViewEx.py

示例7: on_show_callgraph

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def on_show_callgraph(self, function_context):

        if not isinstance(function_context, DIE.Lib.DIEDb.dbFunction_Context):
            if function_context is not None:
                raise ValueError("Wrong value sent to 'on_show_callgraph': %s. excpected dbFunction_Context" % function_context.__class__)
            else:
                raise ValueError("Wrong value sent to 'on_show_callgraph'")

        graph = nx.DiGraph()

        call_graph = self.die_db.get_call_graph_to(function_context)
        if not call_graph:
            idaapi.msg("No Execution Graph")
            return

        for ctxt_node in call_graph:
            (from_address, to_address) = ctxt_node
            graph.add_edge(from_address, to_address)

        function_name = self.die_db.get_function_name(function_context.function)
        viewer = sark.ui.NXGraph(graph, "Callgraph for {}".format(function_name), handler=sark.ui.AddressNodeHandler())
        viewer.Show()

        return 
开发者ID:ynvb,项目名称:DIE,代码行数:26,代码来源:FunctionViewEx.py

示例8: load_db

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def load_db(self):
        try:
            db_file = idc.AskFile(0, "*.ddb", "Load DIE Db File")
            if db_file is not None:
                self.die_db.load_db(db_file)

            if self.die_db is not None:
                self.show_db_details()

        except DbFileMismatch as mismatch:
            idaapi.msg("Error while loading DIE DB: %s\n" % mismatch)

        except Exception as ex:
            logging.exception("Error while loading DB: %s", ex)
            return False


    ###########################################################################
    # Function View 
开发者ID:ynvb,项目名称:DIE,代码行数:21,代码来源:DIE.py

示例9: show_db_details

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def show_db_details(self):
        """
        Print DB details
        """
        (start_time,
         end_time,
         filename,
         num_of_functions,
         num_of_threads,
         numof_parsed_val) = self.die_db.get_run_info()

        idaapi.msg("Die DB Loaded.\n")
        idaapi.msg("Start Time: %s, End Time %s\n" % (ctime(start_time), ctime(end_time)))
        idaapi.msg("Functions: %d, Threads: %d\n" % (num_of_functions, num_of_threads))
        idaapi.msg("Parsed Values: %d\n" % numof_parsed_val)

    ###########################################################################
    # Mark\Unmark Execution Flow 
开发者ID:ynvb,项目名称:DIE,代码行数:20,代码来源:DIE.py

示例10: show_cfg

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def show_cfg(self):
        """
        Show execution Call flow graph
        """
        cfg = self.die_db.get_call_graph_complete()
        graph = nx.DiGraph()

        if not cfg:
            idaapi.msg("No CFG to display")
            return

        for ctxt_node in cfg:
            (from_address, to_address) = ctxt_node
            graph.add_edge(from_address, to_address)

        viewer = sark.ui.NXGraph(graph, "Callgraph for {}".format("Exection CFG"), handler=sark.ui.AddressNodeHandler())
        viewer.Show() 
开发者ID:ynvb,项目名称:DIE,代码行数:19,代码来源:DIE.py

示例11: show_highlighted_function_meaningful

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def show_highlighted_function_meaningful():
    line = sark.Line()
    meaningful_displayed = False
    for xref in line.xrefs_from:
        try:
            if xref.type.is_flow:
                continue

            function = sark.Function(xref.to)
            show_meaningful_in_function(function)
            meaningful_displayed = True

        except sark.exceptions.SarkNoFunction:
            pass

    if not meaningful_displayed:
        idaapi.msg("[FunctionStrings] No function referenced by current line: 0x{:08X}.\n".format(idc.here())) 
开发者ID:tmr232,项目名称:Sark,代码行数:19,代码来源:meaningful.py

示例12: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def init(self):
        """
        This is called by IDA when it is loading the plugin.
        """

        # initialize the menu actions our plugin will inject
        self._init_action_bulk()
        self._init_action_clear()
        self._init_action_recursive()

        # initialize plugin hooks
        self._init_hooks()

        # done
        idaapi.msg("%s %s initialized...\n" % (self.wanted_name, VERSION))
        return idaapi.PLUGIN_KEEP 
开发者ID:gaasedelen,项目名称:prefix,代码行数:18,代码来源:ida_prefix.py

示例13: term

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def term(self):
        """
        This is called by IDA when it is unloading the plugin.
        """

        # unhook our plugin hooks
        self._hooks.unhook()

        # unregister our actions & free their resources
        self._del_action_bulk()
        self._del_action_clear()
        self._del_action_recursive()

        # done
        idaapi.msg("%s terminated...\n" % self.wanted_name)

    #--------------------------------------------------------------------------
    # Plugin Hooks
    #-------------------------------------------------------------------------- 
开发者ID:gaasedelen,项目名称:prefix,代码行数:21,代码来源:ida_prefix.py

示例14: init

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def init(self):
        """Read directory and load as many plugins as possible."""
        self.plugins = []

        idaapi.msg("BAP Loader activated\n")

        bap.utils.run.check_and_configure_bap()

        plugin_path = os.path.dirname(bap.plugins.__file__)
        idaapi.msg("BAP> Loading plugins from {}\n".format(plugin_path))

        for plugin in sorted(os.listdir(plugin_path)):
            path = os.path.join(plugin_path, plugin)
            if not plugin.endswith('.py') or plugin.startswith('__'):
                continue  # Skip non-plugins
            idaapi.msg('BAP> Loading {}\n'.format(plugin))
            self.plugins.append(idaapi.load_plugin(path))
        return idaapi.PLUGIN_KEEP 
开发者ID:BinaryAnalysisPlatform,项目名称:bap-ida-python,代码行数:20,代码来源:plugin_loader_bap.py

示例15: main

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import msg [as 别名]
def main():
    idaapi.msg("Loading IDASEC\n")
    global IDASEC
    try:
        IDASEC
        IDASEC.OnClose(IDASEC)
        idaapi.msg("reloading IDASec\n")
        IDASEC = IDASecForm()
        return
    except Exception:
        IDASEC = IDASecForm()
    IDASEC.Show("Idasec") 
开发者ID:RobinDavid,项目名称:idasec,代码行数:14,代码来源:idasec.py


注:本文中的idaapi.msg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。