Jump to content


Photo

obfuscate code challenge


  • Please log in to reply
3 replies to this topic

#1 heisenbug

heisenbug

    Gibson Hacker

  • Members
  • 79 posts
  • Country:
  • Gender:Male

Posted 04 March 2011 - 09:43 PM

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, 04 March 2011 - 09:44 PM.


#2 AlexZ

AlexZ

    elite

  • Members
  • 114 posts
  • Country:
  • Gender:Male

Posted 09 March 2011 - 07:20 AM

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!!;)

#3 turdbeatz

turdbeatz

    the 0ne

  • Members
  • 1 posts
  • Gender:Male

Posted 04 March 2014 - 02:24 AM

#!/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, 04 March 2014 - 02:24 AM.


#4 phr34kc0der

phr34kc0der

    SUPR3M3 31337 Mack Daddy P1MP

  • Members
  • 469 posts
  • Country:
  • Gender:Male

Posted 04 March 2014 - 05:58 PM

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






BinRev is hosted by the great people at Lunarpages!