Login Register






Coding challange! filter_list
Author
Message
Coding challange! #1
I think this thread is not fun enough. I challenge you to create a small useful program and obfuscate it! Here is a nice tutorial from a youtuber named Bisqwit

Here is a GREAT example from mills1
Code:
                 #define P(a,b,c) a##b##c                #include/*++**++*/<curses.h>              int         c,h,            v,x,y,s,                i,b; int            main            () {            initscr(              ); P(cb,          rea,                k)()                ;///        P(n,                  oec,                ho)(       )/*     */             ;for            (curs_set(0); s=        x=COLS/2      ; P(    flu,            shi,          np)()){ timeout(y=c=      v=0);///      P(c,    lea,            r)()          ;for              (P (      mva,     d,             dstr        )(2,                3+x,      G) ;                  ; P(        usl,                  eep,    )(U)){//       P(m,               vad,         dstr                   )( y    >>8,x,//    "    "); for(i=LINES; /*           */ i                   -->0  ; mvinsch(i,0,0>(~c|i-h-H             &h-i                  )?' ' :(i-                      h|h-            i+H)            <0?'|'      :'=' )); if((                       i=( y            +=v=        getch(        )>0?I:v+  A)>>8)>=LINES||mvinch(i*=   0<i,            x)!=' '||' '  !=mvinch(i,3+x))break/*&%   &*/;              mvaddstr(y    >>8,                   x,0>v                      ?F:B        ); i=--s    /-W;                  P(m,                        vpr,        intw)(0,     COLS-9," %u/%u ",(0<i)*                  i,b=b<i?i:      b); refresh(); if(++                    c==D){ c                        -=W; h=rand()%(LINES-H-6                          )+2; } } flash(); }}

Reply

RE: Coding challange! #2
Here is mine

Code:
int main(){int x, y,r=20;for(x=0;x<=2*r;x++) {for(y=0;y<=2*r;y++){int c=' ';   double d= sqrt((double)(x-r)*(x-r)     +(y-r)*(y-r));if(d>r-0.5 && d<r+0.5)         {c=42;}else if(           d<r-0.1 || d<r-0.1       ){c=x>5&&x<36&&y>6&&y<34&&(x+(y     /6))%5>2?33+(x+y)%9:35    ;}putchar(c);} putchar(10);}}
Code:
               *********             ***#########***           **###############**         **###################**        *#######################*       *#########################*      *#####!"#$%&'()!"###########*     *#&'()!"#$%&'#################*    *##'()!"###################$%&##*   *####################'()!"#$%&'###*   *##############"#$%&'()!"#$#######*  *#########&'()!"#$%&'(##############*  *####"#$%&'()!"#####################* *######$%&'##################()!"#####* *#######################$%&'()!"######* *################'()!"#$%&'()#########* *###########"#$%&'()!"#$################* *######'()!"#$%&'(######################* *######()!"###################$%&'######* *#######################()!"#$%&'(######* *##################$%&'()!"#$%##########* *###########'()!"#$%&'()################* *#######$%&'()!"#$######################* *######$%&'(##################)!"#######* *#######################$%&'()!"#$######* *################()!"#$%&'()!#########* *###########$%&'()!"#$%###############* *#####()!"#$%&'()#####################*  *####)!"#$##################%&'(####*  *#####################)!"#$%&'()####*   *##############$%&'()!"#$%&#######*   *########()!"#$%&'()!#############*    *##$%&'()!"#$%##################*     *#%&'()##################!"#$#*      *#################%&'()!"#$%*       *##########)!"#$%&'()!"###*        *#######################*         **###################**           **###############**             ***#########***                *********

Here is the code
Code:
int main() { int x, y, r = 20; for (x = 0; x <= 2 * r; x++) { for (y = 0; y <= 2 * r; y++) { int c = ' '; double d = sqrt((double)(x - r) * (x - r) + (y - r) * (y - r)); if (d > r - 0.5 && d < r + 0.5) { c = 42; } else if(d < r - 0.1) { c = x > 5 && x < 36 && y > 6 && y < 34 && (x + (y / 6)) % 5 > 2 ? 33 + (x + y) % 9 : 35; } putchar(c); } putchar(10); } }

It did took me stable 1 hour
(This post was last modified: 04-21-2019, 11:05 AM by IsBadWritePtr.)

Reply

RE: Coding challange! #3
wow that looks wicked. I like your version better.
My IT skills that I know perfect is SQL, HTML ,css ,wordpress, PHP.
coding skills that I know is Java, JavaScript and C#

Reply

RE: Coding challange! #4
(04-21-2019, 07:18 PM)darkninja1980 Wrote: wow that looks wicked. I like your version better.

Tx! But the font makes it look strange...

Reply

RE: Coding challange! #5
(04-21-2019, 08:14 PM)IsBadWritePtr Wrote:
(04-21-2019, 07:18 PM)darkninja1980 Wrote: wow that looks wicked. I like your version better.

Tx! But the font makes it look strange...

yes I agree the fonts do look strange indeed.
My IT skills that I know perfect is SQL, HTML ,css ,wordpress, PHP.
coding skills that I know is Java, JavaScript and C#

Reply

RE: Coding challange! #6
Here's mine:
Code:
#define C(x,y) x##y #define D(x) C(0,x) #define _(x) #x #define _x(x)^*x #define X(_) (~(7 << 3) & 0x7F) ^ *#_ #include <stdio.h> int main(){char _$[3]=_(%);_$[0^1]=X($);_$[2]=0/**/; C(p, rintf ) (_$,D (C(x,00)) _x("0")); C(pr, intf ) (_$,D (C(x,3A)) _x("x")); C(pri, ntf ) (_$,D (C(x,02)) _x("D")); C(prin, tf ) (_$,D (C(x,10)) _x("E")); C(print, f )(_$,D (C(x,12)) _x("A")); C(prin, tf )(_$,D (C(x,07)) _x("D")); C(pri, ntf )(_$,D (C(x,70)) _x("1")); C(pr, intf )(_$,D (C(x,64)) _x("0")); C(p, rintf )(_$,D (C(x,06)) _x("C")); C(, printf)(_$,D (C(x,07)) _x("C"));}

Preview:
[Image: 74YLIS8.png]

I'm sure you could do better things with <curses.h> but I chose not to use non-standard libs.
(This post was last modified: 04-25-2019, 06:21 AM by 0xDEAD10CC.)

Reply