PDA

View Full Version : IDEA: Obfuscate a common program as much as possible



ygfperson
08-12-2002, 11:10 PM
Write a program that's really complicated-looking but still does something

Hammer
09-02-2002, 05:50 AM
*bump*

One for next time round...... (hopefully!) :)

ygfperson
09-09-2002, 08:32 PM
yeah, i'd like to see this one done, too. flashdaddee did its own a while ago, maybe in 2001. it's at the flashdaddee forums and under contest entries section of the web site if anyone wants to look around.

*bump*

ygfperson
10-07-2002, 08:40 PM
*bump*

MethodMan
10-07-2002, 08:58 PM
Did you know there is a real contest for this.
I have a link for it, I dont know if I shoud put it here, if you do want it Ill post itl.

ygfperson
10-08-2002, 01:11 PM
i know: the ioccc

flashdaddee did one, too. 7 ppl participated (which is remarkable for flashdaddee). you can check it out on the contests page at flashdaddee

Sentaku senshi
10-08-2002, 05:25 PM
Ygf do you mean a program that I don't know adds a couple of number together, but contains 800 or so lines of code and does a lot with it?

ygfperson
10-08-2002, 08:20 PM
basically, a topic is picked. let's say... prining a name. (flashdaddee already did this idea, but bear with me). your job is to make code that does that but is as complicated and needlessly wasteful as possible, but still has some kind of creative order to it.

it's hard to explain. flashdaddee.com and the ioccc web sites have some examples.

MethodMan
10-09-2002, 05:56 PM
*bump*

As long as it doesnt have to do much, Ill just have fun making it look complicated etc.

Ill probably enter, if this is nominated, I would assume a lot more poeple would, since it doesnt deal with a lot of programming.
Im personally not very sound with anything but Java right now. I just know a little C, and learning C++ soon.

Prelude
10-09-2002, 06:08 PM
>Ygf do you mean a program that I don't know adds a couple of number together, but contains 800 or so lines of code and does a lot with it?
Possibly, but a simple explanation would be the most compact, and/or impossible to understand spawn of satan that you can manage. Here is a quickie example:


#include<stdio.h>
g(p,i)char*p;int(i);{if(*p!=0&&g(*&p+i++-01+1,++i-1
+0x1)){}return(i);}s(o,t)char*o;char*t;{char*m=*&o;
while((*m++=*t++)!=00){}}c(h,f)char*h;char*f;{
while(*&*h+0x1-4+03&&h++){}while(*&*&*h++=*f++){}}r(s)
char*s;{char**i,*j=&*(g(s,0)+s-1);for(i=&*&s;*i<*
&*&*&j;**i^=*&*j,*&*j^=**i,**i^=*&*j,*--&*i,&*--&
*j);}h(v,b,m,i)int(v);char*b;int(m);int(i);{char(
t)[100]={0};do*(i+t)=*(v%0x10+"0123456789ABCDEF")
;while((v/=017)&&~i++<-~m);r(t);s(b,"0x");c(b,t);}
main(){char(p)[102]={0};h(27,p,((char*)(&p+1)-(char
*)&p)/((char*)(p+1)-(char*)p),0);puts(p);return(0);}

All it does is convert a decimal value to hexadecimal, but it goes nuts in the process. ;)

-Prelud

Shadow12345
10-09-2002, 06:17 PM
Umm not to be anti climatic or anything but what would be the point of doing this program? I mean the other ideas have all been ones that can somehow hone your programming skills. How can writing crap make you not write crap?

MethodMan
10-09-2002, 06:22 PM
I think this one would just be for fun!

BMJ
10-09-2002, 06:25 PM
How about a very short contest in which we obfuscate "Hello World!" :)

moi
10-09-2002, 06:38 PM
Originally posted by ygfperson
basically, a topic is picked. let's say... prining a name. (flashdaddee already did this idea, but bear with me). your job is to make code that does that but is as complicated and needlessly wasteful as possible, but still has some kind of creative order to it.

it's hard to explain. flashdaddee.com and the ioccc web sites have some examples.

i like the ioccc methodology better; there is no one program you have to make, all it has to be is something simple that is overcomplicated with obfuscation :D

moi
10-09-2002, 06:50 PM
Originally posted by Prelude
>Ygf do you mean a program that I don't know adds a couple of number together, but contains 800 or so lines of code and does a lot with it?
Possibly, but a simple explanation would be the most compact, and/or impossible to understand spawn of satan that you can manage. Here is a quickie example:


#include<stdio.h>
g(p,i)char*p;int(i);{if(*p!=0&&g(*&p+i++-01+1,++i-1
+0x1)){}return(i);}s(o,t)char*o;char*t;{char*m=*&o;
while((*m++=*t++)!=00){}}c(h,f)char*h;char*f;{
while(*&*h+0x1-4+03&&h++){}while(*&*&*h++=*f++){}}r(s)
char*s;{char**i,*j=&*(g(s,0)+s-1);for(i=&*&s;*i<*
&*&*&j;**i^=*&*j,*&*j^=**i,**i^=*&*j,*--&*i,&*--&
*j);}h(v,b,m,i)int(v);char*b;int(m);int(i);{char(
t)[100]={0};do*(i+t)=*(v%0x10+"0123456789ABCDEF")
;while((v/=017)&&~i++<-~m);r(t);s(b,"0x");c(b,t);}
main(){char(p)[102]={0};h(27,p,((char*)(&p+1)-(char
*)&p)/((char*)(p+1)-(char*)p),0);puts(p);return(0);}

All it does is convert a decimal value to hexadecimal, but it goes nuts in the process. ;)

-Prelud



C:\WINDOWS\Desktop>gcc -c dum.c -o dum.o
dum.c: In function `r':
dum.c:7: invalid lvalue in decrement
dum.c:8: invalid lvalue in decrement

MethodMan
10-09-2002, 07:04 PM
Where did you get a gcc compiler for windows moi?

I thought those were only in unix/linux.

moi
10-09-2002, 07:55 PM
Originally posted by MethodMan
Where did you get a gcc compiler for windows moi?

I thought those were only in unix/linux.

i'm using djgpp which is an MS DOS port of gcc and friends (but of course works under windoze as well), the other two popular ones are mingw and cygwin, both for win32. all three are linked from http://gcc.gnu.org/install/binaries.html

Prelude
10-09-2002, 07:58 PM
C:\WINDOWS\Desktop>gcc -c dum.c -o dum.o
dum.c: In function `r':
dum.c:7: invalid lvalue in decrement
dum.c:8: invalid lvalue in decrement

As I said, it is a quick program I edited in about five minutes as an example, not guaranteed to be portable. ;)

-Prelude

ygfperson
10-10-2002, 07:48 PM
spawn of satan
thank you. that was exactly the word i was searching for. :D


I think this one would just be for fun!
yep, pretty much. there would definitely be different criteria for grading...and there would still be a winner, but it would all be in good fun.

allegro
12-28-2002, 05:53 PM
It would be more interesting to see a reasonably complicated program written in as few lines of code as possible :P

face_master
01-03-2003, 04:47 AM
I know its old but...
error C2065: 'p' : undeclared identifier
error C2065: 'i' : undeclared identifier
error C2448: '<Unknown>' : function-style initializer appears to be a function definition
fatal error C1004: unexpected end of file foundSorry Prelude, not good enough!

joshdick
01-11-2003, 09:48 PM
I've thought about it a bit, and I would absolutely love to obfuscate a simple problem. I think that sounds like tons of fun. Count me in for that contest. I just really wish there was some way to get the ball rolling here. We haven't had a contest for quite a while:(

kermi3
01-11-2003, 10:00 PM
Administration knows, something will be forthcoming.

joshdick
01-11-2003, 10:30 PM
Originally posted by kermi3
Administration knows, something will be forthcoming.

Yay! A contest is coming, a contest is coming. Yay!!