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

Function main

api/python/examples/disassembler.py:16–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14 print(inst)
15
16def main() -> int:
17 parser = argparse.ArgumentParser()
18 parser.add_argument("file", help='Target file', type=Path)
19 parser.add_argument("address", help='Address to disassemble',
20 type=lambda x: int(x,0))
21
22 args = parser.parse_args()
23
24 target_file = args.file
25 addr = args.address
26
27 target = lief.parse(target_file)
28 if target is None:
29 print(f"Can't load: {target_file}")
30 return 1
31
32 disassemble(target, addr)
33
34if __name__ == "__main__":
35 raise SystemExit(main())

Callers 1

disassembler.pyFile · 0.70

Calls 3

disassembleFunction · 0.70
printFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected