-
There are two kinds of whitespace in the text file (
sed 's/\(.\)/\1\n/g' TheMessage.txt | sort | uniq -c
), transform one into 0 and other into 1:with open("TheMessage.txt", 'r', encoding='utf-8') as file: content = file.read() space1, space2 = set(content) print(content.replace(space1, '0').replace(space2, '1'))
-
Transform the binary into ASCII:
echo "obase=16; ibase=2; <binary-string> | bc | xxd -r -p"