MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / iterate

Function iterate

python/examples/instruction_iterator.py:28–49  ·  view source on GitHub ↗
(bv: BinaryView)

Source from the content-addressed store, hash-verified

26
27
28def iterate(bv: BinaryView):
29 log_info("-------- %s --------" % bv.file.filename)
30 log_info("START: 0x%x" % bv.start)
31 log_info("ENTRY: 0x%x" % bv.entry_point)
32 log_info("ARCH: %s" % bv.arch.name)
33 log_info("\n-------- Function List --------")
34 """ print all the functions, their basic blocks, and their il instructions """
35 for func in bv.functions:
36 log_info(repr(func))
37 for block in func.low_level_il:
38 log_info("\t{0}".format(block))
39
40 for insn in block:
41 log_info("\t\t{0}".format(insn))
42 """ print all the functions, their basic blocks, and their mc instructions """
43 for func in bv.functions:
44 log_info(repr(func))
45 for block in func:
46 log_info("\t{0}".format(block))
47
48 for insn in block:
49 log_info("\t\t{0}".format(insn))
50
51
52if __name__ == "__main__":

Callers 1

Calls 2

log_infoFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected