| 43 | |
| 44 | |
| 45 | def _parse_args() -> argparse.Namespace: |
| 46 | parser = argparse.ArgumentParser(description="detect base address of position-dependent raw firmware binaries") |
| 47 | parser.add_argument("path", help="path to the position-dependent raw firmware binary or directory") |
| 48 | parser.add_argument("--debug", action="store_true", help="enable debug logging") |
| 49 | parser.add_argument("--reasons", action="store_true", help="show reasons for base address selection") |
| 50 | parser.add_argument("--analysis", type=str, help="analysis level", default="full") |
| 51 | parser.add_argument("--arch", type=str, help="architecture of the binary") |
| 52 | return parser.parse_args() |
| 53 | |
| 54 | |
| 55 | def _setup_logger(debug: bool) -> None: |