The Signature (was: Re: gar.gnome.mk download location suggestion)



On Fri, 2007-10-19 at 09:59 +0000, Peter wrote:

> > char *t="\10pse\0r\0dtu\0  ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
> > main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
> > (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
> 
> You never did explain what the algorithm was for the encoding here :-).

Probably cause you never asked. :)


> I tried to make the code readable but my feeble attempt failed ):
> 
> Thanks for any clarity you can share on the above.

Well, I never disclosed this information publicly, and I am reluctant to
do so on a mailing list. Being able to search for the answer takes the
fun out of hacking it yourself.

So, for the benefit of anyone else ever wondering about my sig, I guess
I'd better not tell on a publicly archived list. :)


Everyone is welcome to ask privately, though. Based on ambition, I
happily will answer detailed questions, or just hand out hints (as long
as I still remember them ;).


Some hints right now, though.  The program above implements a well known
encoding algorithm -- actually, the decoding part only -- with some
limitations, to keep the implementation as short as possible. NULL can
not be encoded (and thus binary data), and the length is rather limited
to 256.

Of course, I did not initially code the program the way it became my
sig. I applied a bunch of techniques, rewriting and substitution of
commands, to gain another few chars and make it fit into 3 lines. Also,
I abused side effects of commands and even used them for this sole
purpose. The goal was to shorten the code, and to obfuscate it.

The first line, the string, err... char pointer ;)  simply is the
(encoded) input data, used by the algorithm. I guess you did compile and
run the code already. The decoded data will be printed to STDOUT. [1]


Really unfortunately, I seem to have lost the original implementation
this code was derived from. Also, it has been a long time since I wrote
that -- and I forgot some details. :)  Please take the above mentioned
"limitations" of the algorithm with a grain of salt, as they may be
slightly inaccurate. I believe everything above to be true, though. And
of course, I still remember the name of the algorithm. ;)

Maybe I should reverse engineer my own sig myself. Also I still should
have a bunch of details previously sent to other guys, who asked just
like you did. :)

Happy hacking everyone, and feel free to ask further questions. :-)

  guenther


[1] I have seen environments, where you might need to add an 'echo' when
    running the compiled program, to prevent the shell from overriding
    the output with the prompt.

-- 
char *t="\10pse\0r\0dtu\0  ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]