Skip to content

Instantly share code, notes, and snippets.

@duggan
Created May 23, 2019 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duggan/e3d3767998125e2020e308b6c79f1b54 to your computer and use it in GitHub Desktop.
Save duggan/e3d3767998125e2020e308b6c79f1b54 to your computer and use it in GitHub Desktop.
Hacker Sangiovese 2018
#!/usr/bin/env python3
import binascii
content = ''
with open('hacker.txt') as f:
content = f.read().splitlines()
line = ''.join(content)
n = 8
lines = [line[i:i+n] for i in range(0, len(line), n)]
for n in lines:
code = int(n, 2)
try:
byte = binascii.unhexlify('%x' % code)
char = byte.decode('utf-8')
print(char, end="")
except:
print("\nCan't decode: %d" % code)
01001000010000010100001101001011010
00101010100100010000001001100010001
01010101100100010101001100001000000
10000010100000110100101101000101010
100100010000001001100010001010101
011001000101010011000010000000110
010001110101000100010001000100010
001101000110011001100110101000110
110001101100100001100111011001100
110100011001011010001011110100001
001011110011110100111001001010011
010010110011011001110010000110110
01000010001100100011001101000001
00100001000001010000110100101101
00010101010010001000000100110001
00010101010110010001010100110000
10000000110010001110101000100010
0010001000100011010001100110011
0011010100011011000110110010000
1100111011001100110100011001011
0100010111101000010010111100111
1010011100100101001101001011001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment