Algo curioso: ¿Que hay en estas 19 lineas de código?

long h[4];t(){h[3]-=h[3]/3000;setitimer(0,h,0);}c,d,l,v[]={(int)t,0,2},w,s,I,K
=0,i=276,j,k,q[276],Q[276],*n=q,*m,x=17,f[]={7,-13,-12,1,8,-11,-12,-1,9,-1,1,
12,3,-13,-12,-1,12,-1,11,1,15,-1,13,1,18,-1,1,2,0,-12,-1,11,1,-12,1,13,10,-12,
1,12,11,-12,-1,1,2,-12,-1,12,13,-12,12,13,14,-11,-1,1,4,-13,-12,12,16,-11,-12,
12,17,-13,1,-1,5,-12,12,11,6,-12,12,24};u(){for(i=11;++i<264;)if((k=q[i])-Q[i]
){Q[i]=k;if(i-++I||i%12<1)printf("\033[%d;%dH",(I=i)/12,i%12*2+28);printf(
"\033[%dm  "+(K-k?0:5),k);K=k;}Q[263]=c=getchar();}G(b){for(i=4;i--;)if(q[i?b+
n[i]:b])return 0;return 1;}g(b){for(i=4;i--;q[i?x+n[i]:x]=b);}main(C,V,a)char*
*V,*a;{h[3]=1000000/(l=C>1?atoi(V[1]):2);for(a=C>2?V[2]:"jkl pq";i;i--)*n++=i<
25||i%12<2?7:0;srand(getpid());system("stty cbreak -echo stop u");sigvec(14,v,
0);t();puts("\033[H\033[J");for(n=f+rand()%7*4;;g(7),u(),g(0)){if(c<0){if(G(x+
12))x+=12;else{g(7);++w;for(j=0;j<252;j=12*(j/12+1))for(;q[++j];)if(j%12==10){
for(;j%12;q[j--]=0);u();for(;--j;q[j+12]=q[j]);u();}n=f+rand()%7*4;G(x=17)||(c
=a[5]);}}if(c==*a)G(--x)||++x;if(c==a[1])n=f+4**(m=n),G(x)||(n=m);if(c==a[2])G
(++x)||--x;if(c==a[3])for(;G(x+12);++w)x+=12;if(c==a[4]||c==a[5]){s=sigblock(
8192);printf("\033[H\033[J\033[0m%d\n",w);if(c==a[5])break;for(j=264;j--;Q[j]=
0);while(getchar()-a[4]);puts("\033[H\033[J\033[7m");sigsetmask(s);}}d=popen(
"stty -cbreak echo stop \023;sort -mnr -o HI - HI;cat HI","w");fprintf(d,
"%4d from level %1d by %s\n",w,l,getlogin());pclose(d);}

Si quieres ver de que se trata, entra en Bitelia pero si te gustan los riesgos, Copia el contenido anterior (código c ofuscado) en un archivo de texto, por ejemplo «t.c»

Compilalo:

gcc t.c -o t

y lo ejecutas:

./t

Voila!!! Sorpresa!!! (las teclas son j, k y l. q para salir)

17 Respuestas to “Algo curioso: ¿Que hay en estas 19 lineas de código?”


  1. 1 alejandrocq agosto 4, 2010 a las 2:27 pm

    jaja muy curioso es increíble lo que se puede montar en pocas líneas de código.

    Saludos !

  2. 2 crackiron agosto 4, 2010 a las 4:05 pm

    ¡¡Creo que es mas complejo que no 19 lineas!! Ahora me gustaria descomponerlo para comprender que es lo que hace :S

  3. 3 joseLizana agosto 4, 2010 a las 4:53 pm

    excelente, con tan pocas lineas es increible!!!!

  4. 4 Tavo Tell agosto 4, 2010 a las 7:26 pm

    Che, me tira lo siguiente cuando intento compilarlo:

    juego.c:1: warning: data definition has no type or storage class
    juego.c: In function ‘u’:
    juego.c:6: warning: incompatible implicit declaration of built-in function ‘printf’
    juego.c: In function ‘main’:
    juego.c:16: warning: incompatible implicit declaration of built-in function ‘printf’
    juego.c:18: warning: incompatible implicit declaration of built-in function ‘fprintf’
    juego.c:19: warning: passing argument 1 of ‘fprintf’ makes pointer from integer without a cast
    juego.c:19: note: expected ‘void *’ but argument is of type ‘int’
    juego.c:19: warning: format ‘%s’ expects type ‘char *’, but argument 5 has type ‘int’

    • 5 Cool As Ice agosto 5, 2010 a las 1:43 am

      a mi también me salen mensajes similares pero si me funciona

    • 6 Josemar agosto 5, 2010 a las 3:41 am

      Me arroja estos erroes:

      t.c:1: warning: data definition has no type or storage class
      t.c: In function ‘u’:
      t.c:6: warning: incompatible implicit declaration of built-in function ‘printf’
      t.c: In function ‘main’:
      t.c:16: warning: incompatible implicit declaration of built-in function ‘printf’
      t.c:18: warning: incompatible implicit declaration of built-in function ‘fprintf’
      t.c:19: warning: passing argument 1 of ‘fprintf’ makes pointer from integer without a cast
      t.c:19: note: expected ‘void *’ but argument is of type ‘int’
      t.c:19: warning: format ‘%s’ expects type ‘char *’, but argument 5 has type ‘int’

    • 7 Carlos Ruiz agosto 5, 2010 a las 6:36 am

      Holap:

      Maldición no compilaaa!!!!
      Estoy con DevC++ en WinXP.

      Si a alguien se le ocurre algo, que avise porfaa… xD

      Saludooos 😛

    • 8 Domene agosto 5, 2010 a las 11:22 am

      Es facil te crea un archivo «t» de compilar «t.c». Lo unico que tinenes que hacer es ejecutarlo:

      cd Escritorio/
      chmod +x ./t
      ./t

      Es el básico. si quieres puedes bajarte la versión 1.2.0 desde bitelia

  5. 9 Guty agosto 4, 2010 a las 9:26 pm

    A mi tampoco me dejó compilarlo, que lo parió :s

  6. 10 Mariano agosto 4, 2010 a las 10:22 pm

    A mi tampoco me anda:

    [mariano@pronBox temp]$ gcc test.c -o test
    test.c:1:49: warning: data definition has no type or storage class
    test.c:1:60: warning: cast from pointer to integer of different size
    test.c:1:1: error: initializer element is not constant
    test.c:1:1: error: (near initialization for ‘v[0]’)
    test.c: In function ‘u’:
    test.c:6:27: warning: incompatible implicit declaration of built-in function ‘printf’
    test.c: In function ‘main’:
    test.c:16:7: warning: incompatible implicit declaration of built-in function ‘printf’
    test.c:18:64: warning: incompatible implicit declaration of built-in function ‘fprintf’
    test.c:19:1: warning: passing argument 1 of ‘fprintf’ makes pointer from integer without a cast
    test.c:19:1: note: expected ‘void *’ but argument is of type ‘int’

  7. 11 Antonio agosto 5, 2010 a las 8:35 am

    mejor, que lo ponga todo en una sola línea y ya tenemos «lo que se puede hacer con 1 línea de código».

  8. 12 joel agosto 5, 2010 a las 12:08 pm

    Me ocurre lo mismo que a Tavo Tell.

    ¿alguien es capaz de compilarlo correctamente?

  9. 13 asphixmx agosto 5, 2010 a las 3:38 pm

    A mi me pasa lo mismo que a Tavo

  10. 14 mama21mama agosto 5, 2010 a las 8:45 pm

    jajaj re grozo sabelo!!

    gracias por compartir;

    Saludos.

    PD: miren lo que hace —-> http://w2t.us/h4

  11. 15 carlos agosto 5, 2010 a las 8:47 pm

    a mi me tira 14 errores y 50 advertencias al intentar compilar en xcode

  12. 16 Mayoral agosto 6, 2010 a las 12:22 am

    jaja, interesante… 😛 aunq me salieron los errores al compilarlo, pero hace lo que deberia, aunq tmb no funciona para mover las teclas


  1. 1 YakiBoo » Una de C ofuscado Trackback en agosto 4, 2010 a las 2:38 pm

Deja un comentario







¿Es compatible tu equipo con Ubuntu?


( Muchos fondos de pantalla, aqui )

DESCARGATE SCIFI LIFE

365 Dias de Soledad
Me debes los sueños, las promesas y las noches rotas. Me debes la paz, la sonrisa y la esperanza robadas. Me debes la sangre, las lágrimas y el sudor vertido. Me debes las noches vacías, los abrazos anhelados. Me debes un beso de ajenjo de tu amarga boca.

The Ubuntu Counter Project - user number # 11961
Geo Visitors Map

Archivos

agosto 2010
L M X J V S D
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Blog Stats

  • 31.401.898 hits