Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

What is this riddle?

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • 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?
 
Saloon Keeper
Posts: 6507
158
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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
Posts: 3479
Mac Objective C Clojure
  • 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
Saloon Keeper
Posts: 6507
158
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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
Posts: 3479
Mac Objective C Clojure
  • 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
Saloon Keeper
Posts: 6507
158
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • 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).
 
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
 
Rancher
Posts: 1197
22
  • 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
Rancher
Posts: 1197
22
  • 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.
 
Greenhorn
Posts: 16
Android Eclipse IDE C++
  • 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 !!!
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic