'We received an \'exec format\' error (ENOEXEC)
This implies that the user tried to execute e.g.
an ARM binary on a non-ARM system, and does not have
binfmt helpers installed for QEMU.'

def __on_enoexec(self, exception):

    with context.quiet:
        from pwnlib.elf import ELF
        binary = ELF(self.executable)
    qemu = get_qemu_user(arch=binary.arch)
    if (not qemu):
        raise exception
    qemu = which(qemu)
    if qemu:
        self._qemu = qemu
        args = [qemu]
        if self.argv:
            args += ['-0', self.argv[0]]
        args += ['--']
        return [args, qemu]
    self.exception(exception)
