heisenbug

obfuscate code challenge

4 posts in this topic

Print to the screen the names of all of the Presidents of the United States of America, but hide it in the code in the most obfuscated way you can think of.

To save time:

George Washington

John Adams

Thomas Jefferson

James Madison

James Monroe

John Quincy Adams

Andrew Jackson

Martin Van Buren

William Henry Harrison

John Tyler

James K. Polk

Zachary Taylor

Millard Fillmore

Franklin Pierce

James Buchanan

Abraham Lincoln

Andrew Johnson

Ulysses S. Grant

Rutherford B. Hayes

James Garfield

Chester A. Arthur

Grover Cleveland

Benjamin Harrison

Grover Cleveland

William McKinley

Theodore Roosevelt

William Howard Taft

Woodrow Wilson

Warren G. Harding

Calvin Coolidge

Herbert Hoover

Franklin D. Roosevelt

Harry S. Truman

Dwight D. Eisenhower

John F. Kennedy

Lyndon B. Johnson

Richard M. Nixon

Gerald R. Ford

James Carter

Ronald Reagan

George H. W. Bush

William J. Clinton

George W. Bush

Barack Obama

Edited by heisenbug
0

Share this post


Link to post
Share on other sites

It's a very interesting challenge!! I've never seen something about code obfuscation and you've stimulated my mind to develop something to resolve this exercise!!;)

0

Share this post


Link to post
Share on other sites

#!/usr/bin/env ruby

require 'base64'

string = "R2VvcmdlIFdhc2hpbmd0b24KSm9obiBBZGFtcwpUaG9tYXMgSmVmZmVyc29u\nCkphbWVzIE1hZGlzb2"

string << "4KSmFtZXMgTW9ucm9lCkpvaG4gUXVpbmN5IEFkYW1z\nCkFuZHJldyBKYWNrc29uCk1hcnRpbiBWYW4gQnVyZW4KV2ls"

string << "bGlhbSBIZW5y\neSBIYXJyaXNvbgpKb2huIFR5bGVyCkphbWVzIEsuIFBvbGsKWmFjaGFyeSBU\nYXlsb3IKTWlsbGFy"

string << "ZCBGaWxsbW9yZQpGcmFua2xpbiBQaWVyY2UKSmFtZXMg\nQnVjaGFuYW4KQWJyYWhhbSBMaW5jb2xuCkFuZHJldyBKb2hu"

string << "c29uClVseXNz\nZXMgUy4gR3JhbnQKUnV0aGVyZm9yZCBCLiBIYXllcwpKYW1lcyBHYXJmaWVs\nZApDaGVzdGVyIEE"

string << "uIEFydGh1cgpHcm92ZXIgQ2xldmVsYW5kCkJlbmphbWlu\nIEhhcnJpc29uCkdyb3ZlciBDbGV2ZWxhbmQKV2lsbGlhb"

string << "SBNY0tpbmxleQpU\naGVvZG9yZSBSb29zZXZlbHQKV2lsbGlhbSBIb3dhcmQgVGFmdApXb29kcm93\nIFdpbHNvbgpXYXJy"

string << "ZW4gRy4gSGFyZGluZwpDYWx2aW4gQ29vbGlkZ2UKSGVy\nYmVydCBIb292ZXIKRnJhbmtsaW4gRC4gUm9vc2V2ZWx0Ckhh"

string << "cnJ5IFMuIFRy\ndW1hbgpEd2lnaHQgRC4gRWlzZW5ob3dlcgpKb2huIEYuIEtlbm5lZHkKTHlu\nZG9uIEIuIEpvaG5zb2"

string << "4KUmljaGFyZCBNLiBOaXhvbgpHZXJhbGQgUi4gRm9y\nZApKYW1lcyBDYXJ0ZXIKUm9uYWxkIFJlYWdhbgpHZW9yZ2UgS"

string << "C4gVy4gQnVz\naApXaWxsaWFtIEouIENsaW50b24KR2VvcmdlIFcuIEJ1c2gKQmFyYWNrIE9i\nYW1h\n"

puts Base64.decode64(string)

Edited by turdbeatz
0

Share this post


Link to post
Share on other sites

Come now. We can do better than that, surely. :P

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now