How to run Kragen's .signature puzzle

Written 1999-07-08

This program:

main(int c,char**v){char a[]="ks\0Okjs!\0\0\0\0\0\0\0",*p,*t=strchr
(*++v,64),*o=a+4;int s=socket(2,2,0);*(short*)a=2;p=t;while(*p)(*p++&48)
-48?*o++=atoi(p):0;connect(s,a,16);write(s,*v,t-*v);write(s,"\n",1);while
((c=read(s,a,16))>0)write(1,a,c);}

can be compiled on a Unix system with any C compiler, such as gcc, with a command-line like gcc -Wall junk.c. On some Unices, you might need to add some combination of -lsocket, -lxnet, and -lnsl to the end of the compile command line. Solaris needs either -lxnet or -lsocket.

This produces an executable called a.out. You can run it with a command line like this:

./a.out kragen@207.238.206.3

. . . and it will do its job and give you the output. You can get a line-by-line explanation of what it does if you like.

By the way, on a Linux system, you need to change socket(2,2,0) to socket(2,1,0).

Kragen's .signature puzzle | Kragen's home page