Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Obfuscated Code Contest : Prize - 50GB FTP Account
Index -> Contests
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Wolf_Destiny




PostPosted: Fri Feb 29, 2008 2:24 pm   Post subject: Re: Obfuscated Code Contest : Prize - 50GB FTP Account

Alright, time to throw my hat into the ring. Since it can be any language, I made one. Similar commands to Brainf**k, but it reads a bmp. All the commands are described in the program with the help option it gives. The compiler is written in Turing and is pretty basic. Type -? as the filename for more description. The program itself is a simple fizzbuzz program.
Compiler: 008-Distrib.t (attached)
Program: FizzBuzz-final.bmp (attached)



FizzBuzz-final.bmp
 Description:
Fizz Buzz Program
 Filesize:  5.63 KB
 Viewed:  3817 Time(s)

FizzBuzz-final.bmp



008-Distrib.t
 Description:
Compiler

Download
 Filename:  008-Distrib.t
 Filesize:  5.62 KB
 Downloaded:  223 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
OneOffDriveByPoster




PostPosted: Tue Mar 04, 2008 9:58 pm   Post subject: Re: Obfuscated Code Contest : Prize - 50GB FTP Account

Half intentional, half unintentional obfuscated code. It tries to read whitespace separated tokens and returns when the current token is not a valid double.
It has the advantage that it does not look all that obfuscated if people are skimming through your code (I think).
c++:
#include <iostream>
#include <sstream>
#include <new>

using namespace std;

int main(void) {

    string tok; char junk; stringstream ss;
    double n;

    while ( cin >> tok, cin && (ss.~stringstream(), new (&ss) stringstream(tok), (ss >> n) && !(ss >> junk)) ) {
        cout << n << endl;
    }

    cout << "Not valid double value or input error; bye!" << endl;
    return 0;
}
Sane




PostPosted: Wed Mar 05, 2008 9:17 am   Post subject: Re: Obfuscated Code Contest : Prize - 50GB FTP Account

Updated my submission slightly. Might make another fancy one.


C:
#include                                <stdio.h>
#include                               <stdlib.h>
#include                                 <time.h>
#define v                                     '='
#define i                                 '='+'='
#define w                                   while
#define _()                         system("cls")
int c[0X763]={0},cc[0X763]={0};int cccc,ccccc;ccc
(){for(cccc=1;cccc<0X763;cccc++){ccccc=c[cccc%i*(
cccc/v)-'>']+c[cccc%i*(cccc/v)-v]+c[cccc%v-'<'+v*
(cccc/v)]+c[cccc%v-1+      v*(cccc/v)]+c[cccc%v+1
+v* (cccc/v)]+c[cccc%      v+'<'+v*(cccc/v)]+ c [
cccc%i*(cccc/v)+v]+ c      [cccc%i*(cccc/v)+'>'];
cc[cccc%i*(cccc/v)]=c[cccc%i*(cccc/v)]&&ccccc<2?0
:c[cccc%i*(cccc/v)]&&ccccc>3      ?0:!c[cccc%i* (
cccc/v)]&&ccccc==3?1:c[cccc%      i*(cccc/v)]  ;}
memcpy(c,cc,sizeof(c));for (      cccc=1 ; cccc <
0X763;cccc++){putchar(c[cccc%i*(cccc/v)]?'#':' ')
;ccccc=(!(cccc      %      v      ))?putchar(10):
0;}sleep(0X190      )      ;      _();}main( ) {;
;{}; c[0X3A2]=      c      [      0X3A3]=c[0X3A4]
=c[0X3A7]=c[0X3A8]=c[0X3E2]=c[0X421]=1;w(c)ccc();
char __[]=  "Conway's Game Of Life"            ;}


And here's some screenshots of it in action:

Posted Image, might have been reduced in size. Click Image to view fullscreen.
nike52




PostPosted: Thu Mar 13, 2008 11:45 am   Post subject: Re: Obfuscated Code Contest : Prize - 50GB FTP Account

Woah, some pretty fancy code in this thread. @_@ mind boggling
Mackie




PostPosted: Thu Mar 20, 2008 12:21 pm   Post subject: RE:Obfuscated Code Contest : Prize - 50GB FTP Account

Alright! Finally March 20th! I think? So anyway. SO without a whole lot of hulibbulloo, Sane one!

So, Sane PM with your desired name and password for your 60GB FTP Account.
Sane




PostPosted: Thu Mar 27, 2008 6:58 pm   Post subject: RE:Obfuscated Code Contest : Prize - 50GB FTP Account

Weeh! Thanks a lot. I've been in need of some extra disk space. PM is on its way.

Thanks again.
Display posts from previous:   
   Index -> Contests
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 21 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: