本文整理汇总了Python中Misc.function_boundaries方法的典型用法代码示例。如果您正苦于以下问题:Python Misc.function_boundaries方法的具体用法?Python Misc.function_boundaries怎么用?Python Misc.function_boundaries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Misc
的用法示例。
在下文中一共展示了Misc.function_boundaries方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BinaryGraph
# 需要导入模块: import Misc [as 别名]
# 或者: from Misc import function_boundaries [as 别名]
def BinaryGraph():
"""
This calculates a graph of the whole binary.
:return: a graph in NetworkX format
"""
FG = nx.DiGraph()
for f_ea in Functions():
# TODO: Test a bit more the restrictions regarding
# the types of XRefs
for xref in XrefsTo(f_ea, 1):
(s, e) = misc.function_boundaries(xref.frm)
if s:
FG.add_edge(s, f_ea)
return FG
示例2: binary_graph
# 需要导入模块: import Misc [as 别名]
# 或者: from Misc import function_boundaries [as 别名]
def binary_graph():
"""
This calculates a graph of the whole binary.
:return: a *DiGraph* in NetworkX format
"""
fg = nx.DiGraph()
for f_ea in Functions():
for xref in XrefsTo(f_ea, True):
# NOTE: only code xrefs (that is, call sub_xxx or
# alike but not data refs, mov [eax], sub_xxx
if not xref.iscode:
continue
(s, e) = misc.function_boundaries(xref.frm)
if s:
fg.add_edge(s, f_ea)
return fg