Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The original challenge: https://www.reddit.com/r/ChallengeAccepted/comments/2ifbnp/i_challenge_you_to_decode_this_string/
- Answer: It's base32. 0-9A-V
- 32 10
- ------
- 0 0
- 1 1
- 2 2
- 3 3
- 4 4
- 5 5
- 6 6
- 7 7
- 8 8
- 9 9
- A 10
- B 11
- C 12
- D 13
- E 14
- F 15
- G 16
- H 17
- I 18
- J 19
- K 20
- L 21
- M 22
- N 23
- O 24
- P 25
- Q 26
- R 27
- S 28
- T 29
- U 30
- V 31
- Because 2^5 = 32, one character encodes 5 bits. And because ASCII characters are 8 bits, that means it gets pretty
- complicated.
- H e l l o
- 4 8 6 5 6 c 6 c 6 f
- 0100-1000 0110-0101 0110-1100 0110-1100 0110-1111
- 0100100001100101011011000110110001101111
- 01001 00001 10010 10110 11000 11011 00011 01111
- 9 1 18 22 24 27 3 15
- 91IMOR3F
- I don't remember how I dealt with trailing bits. I probably just padded it to the right with 0's (edit: padded to the left, actually), or maybe python has a built-in way to convert to base32 (edit: *from* base32, but not *to*), and python's base32 happens to be the same base32 as described here (edit: it is).
- I still have said (very old and poorly written to such a degree that I can't even understand what it's trying to do) python program, which I wrote for doing this conversion
- $ b32c.py b 46RRECTP62T3LDHGN8QBFDPPI282KD1II0SR5CDP6AT10ETNN4P10D5PI0OJ1DPGMSO9E
- Congratulations! The secret word is banana.
- So there you go.
- Source code: https://pastebin.com/tAerN5tF
- Improved source code (2018-07-29): https://pastebin.com/pH4fxCLM
- Old explanation: https://pastebin.com/epDEqVKV
Add Comment
Please, Sign In to add comment