()
| 14 | print(inst) |
| 15 | |
| 16 | def 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 | |
| 34 | if __name__ == "__main__": |
| 35 | raise SystemExit(main()) |
no test coverage detected