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


Python idaapi.GraphViewer方法代碼示例

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


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

示例1: __init__

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import GraphViewer [as 別名]
def __init__(self, title):
        self._title = title
        idaapi.GraphViewer.__init__(self, self._title)

        self._targets = set()
        self._sources = set()

        # This might take a while...
        self._idb_graph = sark.graph.get_idb_graph()

        self._lca_graph = nx.DiGraph()

        self._handlers = [add_function_handler(self),
                          add_address_handler(self)]

        self._current_node_id = 0

        self._disabled_sources = set()

        self._remove_target_handler = remove_target_handler(self)
        self._enable_source_handler = enable_source_handler(self)
        self._disable_source_handler = disable_source_handler(self)

        self._node_ids = {} 
開發者ID:tmr232,項目名稱:Sark,代碼行數:26,代碼來源:lca.py

示例2: __init__

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import GraphViewer [as 別名]
def __init__(self, flow_graph, title):
        idaapi.GraphViewer.__init__(self, title)
        self.flow_graph = flow_graph
        self.result = None
        self.names = {} 
開發者ID:RobinDavid,項目名稱:idasec,代碼行數:7,代碼來源:ida_utils.py

示例3: Show

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import GraphViewer [as 別名]
def Show(self):
        if not idaapi.GraphViewer.Show(self):
            return False
        self.cmd_test = self.AddCommand("Test", "F2")
        if self.cmd_test == 0:
            print "Failed to add popup menu item!"
        return True 
開發者ID:RobinDavid,項目名稱:idasec,代碼行數:9,代碼來源:ida_utils.py

示例4: __init__

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import GraphViewer [as 別名]
def __init__(self, parent, info, close_open=True):   
        self.cur_arena  = parent.cur_arena
        self.heap       = parent.heap
        self.info       = info
        self.bin_type   = info['type']
        self.SetCurrentRendererType(idaapi.TCCRT_GRAPH)
        idaapi.GraphViewer.__init__(self, self.title, close_open) 
開發者ID:danigargu,項目名稱:heap-viewer,代碼行數:9,代碼來源:bingraph.py

示例5: Show

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

        self.cmd_refresh = self.AddCommand("Refresh", "Ctrl+R")
        return True


# -------------------------------------------------------------------------- 
開發者ID:danigargu,項目名稱:heap-viewer,代碼行數:11,代碼來源:bingraph.py

示例6: __init__

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import GraphViewer [as 別名]
def __init__(self, title, classes, final_list):
    idaapi.GraphViewer.__init__(self, title)
    self.selected = None
    self.classes = classes
    self.final_list = final_list
    self.nodes = {}
    self.nodes_ea = {}
    self.graph = {}

    self.last_cmd = 0

    dones = set()
    for ea, tokens in self.classes:
      refs = DataRefsTo(ea)
      refs_funcs = set()
      for ref in refs:
        func = idaapi.get_func(ref)
        if func is not None:
          refs_funcs.add(func.start_ea)

      if len(refs_funcs) == 1:
        func_ea = list(refs_funcs)[0]
        if func_ea in dones:
          continue
        dones.add(func_ea)

        func_name = get_func_name(func_ea)
        tmp = demangle_name(func_name, INF_SHORT_DN)
        if tmp is not None:
          func_name = tmp

        element = [func_ea, func_name, "::".join(tokens), [get_string(ea)]]
        self.final_list.append(element) 
開發者ID:joxeankoret,項目名稱:idamagicstrings,代碼行數:35,代碼來源:IDAMagicStrings.py

示例7: Show

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import GraphViewer [as 別名]
def Show(self):
    if not idaapi.GraphViewer.Show(self):
      return False
    return True

#------------------------------------------------------------------------------- 
開發者ID:joxeankoret,項目名稱:idamagicstrings,代碼行數:8,代碼來源:IDAMagicStrings.py

示例8: __init__

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import GraphViewer [as 別名]
def __init__(self, graph, title="GraphViewer", handler=None, padding=PADDING):
        """Initialize the graph viewer.

        To avoid bizarre IDA errors (crashing when creating 2 graphs with the same title,)
        a counter is appended to the title (similar to "Hex View-1".)

        Args:
            graph: A NetworkX graph to display.
            title: The graph title.
            handler: The default node handler to use when accessing node data.
        """
        title = self._make_unique_title(title)

        idaapi.GraphViewer.__init__(self, title)

        self._graph = graph

        if handler is None:
            handler = self.DEFAULT_HANDLER

        # Here we make sure the handler is an instance of `BasicNodeHandler` or inherited
        # types. While generally being bad Python practice, we still need it here as an
        # invalid handler can cause IDA to crash.
        if not isinstance(handler, BasicNodeHandler):
            raise TypeError("Node handler must inherit from `BasicNodeHandler`.")

        self._default_handler = handler
        self._padding = padding 
開發者ID:tmr232,項目名稱:Sark,代碼行數:30,代碼來源:ui.py

示例9: Show

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

        return True 
開發者ID:tmr232,項目名稱:Sark,代碼行數:7,代碼來源:ui.py

示例10: Show

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

        self._register_handlers()
        self.color_nodes()
        return True 
開發者ID:tmr232,項目名稱:Sark,代碼行數:9,代碼來源:lca.py

示例11: __init__

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import GraphViewer [as 別名]
def __init__(self, ircfg, title, result):
        idaapi.GraphViewer.__init__(self, title)
        self.ircfg = ircfg
        self.result = result
        self.names = {} 
開發者ID:cea-sec,項目名稱:miasm,代碼行數:7,代碼來源:graph_ir.py

示例12: Show

# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import GraphViewer [as 別名]
def Show(self):
        if not idaapi.GraphViewer.Show(self):
            return False
        return True 
開發者ID:cea-sec,項目名稱:miasm,代碼行數:6,代碼來源:graph_ir.py


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