def main(): a = p.parse_args() if not a.offset.startswith('0x'): a.offset = '0x' + a.offset offset = int(a.offset, 16) bytes = unhex(a.bytes) elf = ELF(a.elf) elf.write(offset, bytes) sys.stdout.write(elf.get_data())