import struct, hashlib, binascii, sys img = open('files/backup-srv-03.img','rb').read() state = open('files/rec/var/lib/collector/.state/last.chk','rb').read() mid = open('files/rec/etc/machine-id','rb').read().rstrip(b'\r\n') fs_uuid = 'e45cf08f-1459-4019-800f-45846f787d90' H = lambda b: hashlib.sha256(b).digest() magic, mloc, nonce, ino, tag = struct.unpack('<4s4s8sI4s', state) print(len(state), magic, ino, tag == H(state[:20])[:4]) mask = H(mid + b':resume-v2')[:4] lba_t = struct.unpack('