()
| 257 | |
| 258 | |
| 259 | def main(): |
| 260 | args = parse_args() |
| 261 | if args.input.count('-') > 1: |
| 262 | raise Exception("'-' input cannot be used multiple times") |
| 263 | if args.format == "elf" and "ELFFile" not in globals(): |
| 264 | raise Exception("elftools module not found") |
| 265 | |
| 266 | output = open_output(args.output) |
| 267 | write_header(output) |
| 268 | for path in args.input: |
| 269 | image = load_image(args.format, path) |
| 270 | drivers = load_drivers(image) |
| 271 | dump_drivers(drivers, output) |
| 272 | |
| 273 | |
| 274 | if __name__ == "__main__": |
no test coverage detected