MCPcopy Create free account
hub / github.com/lief-project/LIEF / print_sections

Function print_sections

api/python/examples/abstract_reader.py:68–80  ·  view source on GitHub ↗
(binary)

Source from the content-addressed store, hash-verified

66
67@exceptions_handler(Exception)
68def print_sections(binary):
69 print("== Sections ==")
70 f_title = "|{:<30} | {:<18}| {:<18}| {:<18}| {:<9}|"
71 f_value = "|{:<30} | 0x{:<16x}| 0x{:<16x}| 0x{:<16x}| {:<9.2f}|"
72 print(f_title.format("Name", "File offset", "Size", "Virtual Address", "Entropy"))
73 for section in binary.sections:
74 print(f_value.format(\
75 section.name,\
76 section.offset,\
77 section.size,\
78 section.virtual_address,\
79 section.entropy))
80 print("")
81
82
83@exceptions_handler(Exception)

Callers 1

mainFunction · 0.70

Calls 2

printFunction · 0.50
formatMethod · 0.45

Tested by

no test coverage detected