Skip to content

Instantly share code, notes, and snippets.

Created September 15, 2020 18:25
What would you like to do?
Papa Johns promo code
_bytes = [ int(bits[k:k+8],2) for k in range(0, len(bits), 8)]
for i in range(0, len(_bytes), 3):
byte1, byte2 = _bytes[i+1:i+3]
c = ((byte1 & 0x0f) << 4) | (byte2-0x20 if byte2 > 0x22 else byte2-0x19)
print(c.to_bytes(1, byteorder='little').decode('cp1251'), end="")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment