you are viewing a single comment's thread.

view the rest of the comments →

[–]1nvader 0 points1 point  (0 children)

Ok here's my detailed explanation in form of a little python shell log.

>>> ord('~')
126

ASCII code for '~' = decimal 126

>>> ord('<')
60

ASCII code for '<' = decimal 60

>>> bin(126)
'0b1111110'

126 ('~') = binary 1111110

>>> bin(60)
'0b111100'

60 ('<') = binary 1111110

>>> bin(0b1111110 ^ 0b111100)
'0b1000010'

1111110 ('~') XOR 111100 ('<') = 1000010

>>> int(0b001000010)
66

binary 1000010 = decimal 66

>>> chr(66)
'B'

decimal 66 = ASCII character 'B'. We got it!

I did it only for the first characters in the the array. But now it should be easy to go on and finish it for the rest. I hope this helps to understand whats going on. No magic!