B1KMusic

46RRECTP6... solution

Jul 29th, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. The original challenge: https://www.reddit.com/r/ChallengeAccepted/comments/2ifbnp/i_challenge_you_to_decode_this_string/
  2.  
  3. Answer: It's base32. 0-9A-V
  4.  
  5. 32 10
  6. ------
  7. 0 0
  8. 1 1
  9. 2 2
  10. 3 3
  11. 4 4
  12. 5 5
  13. 6 6
  14. 7 7
  15. 8 8
  16. 9 9
  17. A 10
  18. B 11
  19. C 12
  20. D 13
  21. E 14
  22. F 15
  23. G 16
  24. H 17
  25. I 18
  26. J 19
  27. K 20
  28. L 21
  29. M 22
  30. N 23
  31. O 24
  32. P 25
  33. Q 26
  34. R 27
  35. S 28
  36. T 29
  37. U 30
  38. V 31
  39.  
  40. Because 2^5 = 32, one character encodes 5 bits. And because ASCII characters are 8 bits, that means it gets pretty
  41. complicated.
  42.  
  43. H e l l o
  44. 4 8 6 5 6 c 6 c 6 f
  45. 0100-1000 0110-0101 0110-1100 0110-1100 0110-1111
  46. 0100100001100101011011000110110001101111
  47. 01001 00001 10010 10110 11000 11011 00011 01111
  48. 9 1 18 22 24 27 3 15
  49. 91IMOR3F
  50.  
  51. 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).
  52.  
  53. 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
  54.  
  55. $ b32c.py b 46RRECTP62T3LDHGN8QBFDPPI282KD1II0SR5CDP6AT10ETNN4P10D5PI0OJ1DPGMSO9E
  56. Congratulations! The secret word is banana.
  57.  
  58. So there you go.
  59.  
  60. Source code: https://pastebin.com/tAerN5tF
  61. Improved source code (2018-07-29): https://pastebin.com/pH4fxCLM
  62. Old explanation: https://pastebin.com/epDEqVKV
Add Comment
Please, Sign In to add comment