• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is this riddle?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
On one of job boards, the employer posted this riddle for extra points:

NTc6Njg6NjU6NmU6MjA6Nzk6NmY6NzU6MjA6NjU6NmQ6NjE6Njk6NmM6MjA6NzU6NzM6MmM6MjA6NjM6Njg6NjE6NmU6Njc6NjU6MjA6NzQ6Njg6NjU6MjA6NzM6NzU6NjI6NmE6NjU6NjM6NzQ6MjA6NzQ6NmY6MjA6MjI6NTQ6Njg6NjE6NzQ6Mjc6NzM6MjA6NjE6NmM6NmM6MjA6Nzk6NmY6NzU6MjA6Njc6NmY6NzQ6M2Y6MjI6MjA6NjE6NmU6NjQ6MjA6Nzk6NmY6NzU6NzI6MjA6NzI6NjU6NzM6NzU6NmQ6NjU6MjA6Nzc6Njk6NmM6NmM6MjA6NmQ6NjE6NmI6NjU6MjA6Njk6NzQ6MjA6NzQ6NmY6MjA6NzQ6Njg6NjU6MjA6NzQ6NmY6NzA6MjA6NmY6NjY6MjA6NzQ6Njg6NjU6MjA6NzI6NjU6NzY6Njk6NjU6Nzc6MjA6NzM6NzQ6NjE6NjM6NmI=

Seriously, what is this?
 
Tim Moores
Bartender
Posts: 2946
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like something that was encoded with base-64.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How did you figure it out that it is encoded with base-64?
 
Tim Moores
Bartender
Posts: 2946
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Experience If you'd seen multiple base-64 encoded strings you'd have noticed as well.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any pattern to recognize base-64 encoded strings?
The first time I saw it, I felt it is about hashing or encoding but not really as accurate as your answer
 
Tim Moores
Bartender
Posts: 2946
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The trailing equals sign is a give-away. And, of course, the limited range of characters (just letters and digits, for the most part).
 
Dave Trower
Ranch Hand
Posts: 87
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here are the steps to decode:
1) Go to a base 64 base decode website. There are several, but I went to http://www.opinionatedgeek.com/dotnet/tools/base64decode/
I copied what you put in this post and it decoded to this:
57:68:65:6e:20:79:6f:75:20:65:6d:61:69:6c:20:75:73:2c:20:63:68:61:6e:67:65:20:74:68:65:20:73:75:62:6a:65:63:74:20:74:6f:20:22:54:68:61:74:27:73:20:61:6c:6c:20:79:6f:75:20:67:6f:74:3f:22:20:61:6e:64:20:79:6f:75:72:20:72:65:73:75:6d:65:20:77:69:6c:6c:20:6d:61:6b:65:20:69:74:20:74:6f:20:74:68:65:20:74:6f:70:20:6f:66:20:74:68:65:20:72:65:76:69:65:77:20:73:74:61:63:6b

2) What it decoded to looks like a bunch of 2 digit hexadecimal numbers separated by a colon. The following program converts this to an ascii string.


Here is the answer:
When you email us, change the subject to "That's all you got?" and your resume will make it to the top of the review stack
 
Ryan McGuire
Ranch Hand
Posts: 1078
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm disappointed... the hex-to-character decoding didn't use EDCDIC?

BTW, Integer.parseInt(hexCode, 16);

 
Ryan McGuire
Ranch Hand
Posts: 1078
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ryan McGuire wrote:I'm disappointed... the hex-to-character decoding didn't use EDCDIC?


Before anyone else points it out...
s/EDCDIC/EBCDIC/

Nothing worse than a typo when you're trying to show off.
 
Ashish L. Sharma
Greenhorn
Posts: 16
Android C++ Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave Trower wrote:Here are the steps to decode:
1) Go to a base 64 base decode website. There are several, but I went to http://www.opinionatedgeek.com/dotnet/tools/base64decode/
I copied what you put in this post and it decoded to this:
57:68:65:6e:20:79:6f:75:20:65:6d:61:69:6c:20:75:73:2c:20:63:68:61:6e:67:65:20:74:68:65:20:73:75:62:6a:65:63:74:20:74:6f:20:22:54:68:61:74:27:73:20:61:6c:6c:20:79:6f:75:20:67:6f:74:3f:22:20:61:6e:64:20:79:6f:75:72:20:72:65:73:75:6d:65:20:77:69:6c:6c:20:6d:61:6b:65:20:69:74:20:74:6f:20:74:68:65:20:74:6f:70:20:6f:66:20:74:68:65:20:72:65:76:69:65:77:20:73:74:61:63:6b

2) What it decoded to looks like a bunch of 2 digit hexadecimal numbers separated by a colon. The following program converts this to an ascii string.


Here is the answer:
When you email us, change the subject to "That's all you got?" and your resume will make it to the top of the review stack


Hats Off to you Sir Great Code !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic