Obfuscate Code Contest

Talk about anything here...

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Obfuscate Code Contest

Postby Darobat » Sat Sep 04, 2004 10:52 am

Greetings
As most of you know, I have a fetish with writting obfuscate code, hence my calculator of doom. Anyway, a while back I talked to Ryan about perhaps hosting a obfuscaed code contest. He agreed that it would be a good idea and would perhaps actually becone a contest. Since then, nothing along those lines has happened, so I have taken initiative to initialize the contest.

Objective
To write the most obfuscated code that willdo something interesting. Not printing hello world or writting the alphabet, but something interesting. How about writing the lyrics to a song or making program that solves math equations? Entries do not need to be autonomous. User input is fine.
Obfuscate:
To make so confused or opaque as to be difficult to perceive or understand
Entries must be in a single *.cpp file

Judging
Code will be judged through a poll once the contest is finished. Not the poll throught message boards though. Just say the top 3 obfuscate pieces of code and I will keep count. The person with the most votes wins!

Note
Code must be compilable on MSVC++ 6.0. Upon recieving submissions, I will compile them to verify their integrity. If The compilation error is simple, I will fix it(i.e. a missing semi-colon), but other than that, the entry will be disqualified.


I havent decided on a date for the contests ending, but It will probably be once most people finish their entries. I am hoping for at least 10 entries. Upon completion of your entry, send it in as a single *.cpp file. Lets get some confusing code!
Code: Select all
#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}
User avatar
Darobat
Moderator
 
Posts: 2572
Joined: Sat Sep 27, 2003 1:19 pm

Postby Lovechild » Sat Sep 04, 2004 11:02 am

you have fun with that :twisted:
User avatar
Lovechild
 
Posts: 1442
Joined: Tue May 18, 2004 12:59 pm
Location: kicken serious but

Postby Andy2005 » Sat Sep 04, 2004 12:18 pm

Code: Select all
#include <stdio.h>
#define sa(ar)(sizeof(ar)/sizeof(ar[0]))
void wstts(int ar[], int l){for(int m=0;m<l;m++)printf("%c",ar[m]+96);}class ___{public:
double q;double operator<(___& ty){double f=((q/ty.q*ty.q)+(2*ty.q)/2);return f;}double
operator&(___& ty){double f=((q/ty.q*ty.q)-(2*ty.q)/2);return f;}double operator|(___&
ty){double f=((q/ty.q*ty.q)*(2*ty.q)/2);return f;}double operator,(___& ty){double f=((
2*q)/(2*ty.q));return f;}};int main(){int c;bool a[4];bool er;___ no;___ nt;___ na;int
n1[]={-27,14,20,5,18,-64,14,21,13,2,5,19,-64,15,14,5,-38,-64};int chcf[]={-87,-44,-50,
-64,4,9,22,9,4,5,-86};int chco[]={-87,-47,-50,-64,1,4,4,-86};int chc[]={-27,14,20,5,18
,-64,25,15,21,18,-64,3,8,15,9,3,5,-64,14,21,13,2,5,18,-86};int grtng[]={-9,5,12,3,15,13
,5,-64,20,15,-64,20,8,5,-64,15,2,6,21,19,1,20,5,4,-64,3,1,12,3,21,12,1,20,15,18,-86};int
chct[]={-87,-46,-50,-64,19,21,2,20,18,1,3,20,-86};int an[]={-7,15,21,18,-64,1,14,19,23,5
,18,-64,9,19,-50,-50,-50};int n2[]={-27,14,20,5,18,-64,14,21,13,2,5,19,-64,20,23,15,-38,
-64,};int chcth[]={-87,-45,-50,-64,13,21,12,20,9,16,12,25,-86};wstts(grtng,sa(grtng));
wstts(chc,sa(chc));wstts(chco,sa(chco));wstts(chct,sa(chct));wstts(chcth,sa(chcth));wstts
(chcf,sa(chcf));scanf("%i",&c);(c==1)?a[0]=true:(c==2)?a[1]=true:(c==3)?a[2]=true:(c==4)?
a[3]=true:er=true;if(er==true)return 0;wstts(n1,sa(n1));scanf("%lf",&no.q);wstts(n2,sa(n2));
scanf("%lf",&nt.q);(a[0]==true)?na.q=(no<nt):(a[1]==true)?na.q=(no&nt):(a[2]==true)?na.q=
(no|nt):(a[3]==true)?na.q=(no,nt):er=false;wstts(an,sa(an));printf("%g\n",na.q);return 0;}

i think i could do this
this could be a page in the magazine
----===========obfuscate code of the month=================--
Step 1) Look at This
Step 2) Get True Combat
User avatar
Andy2005
 
Posts: 1057
Joined: Wed Sep 24, 2003 3:26 pm
Location: NewYork

Postby Darobat » Sat Sep 04, 2004 12:48 pm

Yay! It could be a monthyly contest! Should I judge them or should I just put all entries in?
Code: Select all
#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}
User avatar
Darobat
Moderator
 
Posts: 2572
Joined: Sat Sep 27, 2003 1:19 pm

Postby tomcant » Sat Sep 04, 2004 1:36 pm

I think there should be a some starter ideas for programs to write, otherwise someone could write a really huge program with loads of lines and they would win.... besides, I really can't think of what to write.
If it wasn't for C, we would be using BASI, PASAL and OBOL.
User avatar
tomcant
 
Posts: 3101
Joined: Tue Sep 23, 2003 1:56 am
Location: Colchester, UK

Postby Darobat » Sat Sep 04, 2004 1:45 pm

How about I Implement a theme of the month. You have to create a program that does the themes task but in an incredibly confusing way. The ideas will be simple, but its the fact that your making it hard that counts.

This monts theme can be making aprogram that prints the lyrics to the twelve days of christmas.
Code: Select all
#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}
User avatar
Darobat
Moderator
 
Posts: 2572
Joined: Sat Sep 27, 2003 1:19 pm

Postby MasterMind » Sat Sep 04, 2004 1:47 pm

Glad you told us what "obfuscate", if you didnt tell us, you would be making us obfuscate. :D
I have a Master Mind. That makes Master mistakes.
User avatar
MasterMind
 
Posts: 264
Joined: Thu Aug 26, 2004 8:37 am
Location: At my computer

Postby MasterMind » Sat Sep 04, 2004 1:50 pm

I see one of your interests is obfuscate code. 8)
I have a Master Mind. That makes Master mistakes.
User avatar
MasterMind
 
Posts: 264
Joined: Thu Aug 26, 2004 8:37 am
Location: At my computer

Postby Darobat » Sat Sep 04, 2004 1:51 pm

Hells ya! I dont know why, but I seem to like things that confuse the hell out of people such as advanced math and obfuscate code.
Code: Select all
#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}
User avatar
Darobat
Moderator
 
Posts: 2572
Joined: Sat Sep 27, 2003 1:19 pm

Postby MasterMind » Sat Sep 04, 2004 1:54 pm

lol :twisted:
I have a Master Mind. That makes Master mistakes.
User avatar
MasterMind
 
Posts: 264
Joined: Thu Aug 26, 2004 8:37 am
Location: At my computer

Postby Andy2005 » Sat Sep 04, 2004 3:57 pm

Yay! It could be a monthyly contest! Should I judge them or should I just put all entries in?

As most of you know, I have a fetish with writting obfuscate code

how about both
Step 1) Look at This
Step 2) Get True Combat
User avatar
Andy2005
 
Posts: 1057
Joined: Wed Sep 24, 2003 3:26 pm
Location: NewYork

Postby Darobat » Sat Sep 04, 2004 4:02 pm

Ok. I'm done my entry. lol! Like i mentioned, this months contest is going to be writing an obfuscated piece of code that prints the lyrics to the twelve days of christmas. When you complete it, send it to me at darobat@gmail.com. Please name the .cpp file your name, ie darobat.cpp.
Code: Select all
#include <stdio.h>
struct W{char m,M[4??),w;void x(char
*W)??<w^=w;while(w[W]!=0)putchar(W[w
]^M[w++%5??));}W():m(040),w(0){char*
X="d@PLfAU\x05P)sHEMoTTPF""\31";for(
;w<5;w++[M??)=m++);x(X);}}w;main(){}
User avatar
Darobat
Moderator
 
Posts: 2572
Joined: Sat Sep 27, 2003 1:19 pm

Postby Andy2005 » Sat Sep 04, 2004 4:40 pm

On the first day of Christmas,
my true love sent to me
A partridge in a pear tree.

On the second day of Christmas,
my true love sent to me
Two turtle doves,
And a partridge in a pear tree.

On the third day of Christmas,
my true love sent to me
Three French hens,
Two turtle doves,
And a partridge in a pear tree.

On the fourth day of Christmas,
my true love sent to me
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree.

On the fifth day of Christmas,
my true love sent to me
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree.

On the sixth day of Christmas,
my true love sent to me
Six geese a-laying,
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree.

On the seventh day of Christmas,
my true love sent to me
Seven swans a-swimming,
Six geese a-laying,
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree.

On the eighth day of Christmas,
my true love sent to me
Eight maids a-milking,
Seven swans a-swimming,
Six geese a-laying,
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree.

On the ninth day of Christmas,
my true love sent to me
Nine ladies dancing,
Eight maids a-milking,
Seven swans a-swimming,
Six geese a-laying,
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree.

On the tenth day of Christmas,
my true love sent to me
Ten lords a-leaping,
Nine ladies dancing,
Eight maids a-milking,
Seven swans a-swimming,
Six geese a-laying,
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree.

On the eleventh day of Christmas,
my true love sent to me
Eleven pipers piping,
Ten lords a-leaping,
Nine ladies dancing,
Eight maids a-milking,
Seven swans a-swimming,
Six geese a-laying,
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree.

On the twelfth day of Christmas,
my true love sent to me
Twelve drummers drumming,
Eleven pipers piping,
Ten lords a-leaping,
Nine ladies dancing,
Eight maids a-milking,
Seven swans a-swimming,
Six geese a-laying,
Five golden rings,
Four calling birds,
Three French hens,
Two turtle doves,
And a partridge in a pear tree!

this song? OK
Step 1) Look at This
Step 2) Get True Combat
User avatar
Andy2005
 
Posts: 1057
Joined: Wed Sep 24, 2003 3:26 pm
Location: NewYork

Postby RecursiveS » Sat Sep 04, 2004 4:54 pm

Damn...... gangstarG got there before we had a chance...... :( :(
User avatar
RecursiveS
Site Admin
 
Posts: 1236
Joined: Thu Sep 18, 2003 8:33 am
Location: Dorset, UK

Postby RecursiveS » Sat Sep 04, 2004 4:56 pm

........sorry......... yes, that's the one gangstarG....... 8)
User avatar
RecursiveS
Site Admin
 
Posts: 1236
Joined: Thu Sep 18, 2003 8:33 am
Location: Dorset, UK

Next

Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 2 guests