Index of /cool


Here are some more and less interesting things I've written.

Pseudo Random Number Generator (PRNG) based on Linear Feedback Shift Register taken from Content Scramble System and written in asm (compile with nasm)
some of my signatures:
[obfuscated C code, little endian]
int main(void)<%long c<::>=<%0x2D040E67,0x08191833,0x0A051703,0x1C5E4F
%>;char *a=c;putchar(*a++);while(*a)putchar(*a++^=*(a-1));return(0);%>
int main(void)<%long c<::>=<%0x49008639,0x50001000,0xEFC7D296,0x8B037A
%>;char *a=".:@aegiklmnprsyz",*b=(char *)c;char i=sizeof c-1;while(i--
)<%putchar(*((*b&0xf)+a));putchar((*b>>4&0xf)<:a:>);b++;%>return(0);%>
Yet another hand-coded gcc C obfuscated code, just for a test [and scare all people behind my back ;)]
int ll[sizeof(char)], l1; int main() { for (;l1<(unsigned char)-1;)
					l1++<:ll:> = l1^(sizeof(ll)>>3); }

Quite nice ascii.. [put to file, save as .COM, run, have phun ;)]
[16bit assembler code written in hview]
h{eXP^5pTFFFFF5I0P_5WF5>FPZ15GG15R_OO15W^ktGiM ........ pl!$-zz-z}MDME

Code in brainf*ck
++++++[>+++[>+++++++>+++>+++++>++++++<<<<-]>-->->+<<<<-]>>+>-->+.>.<<<+.--
>.<--.->>>.<+<.>+.<<.--.+++.->.<.++++.>.>-->----.+++<.++.>.--.+++++.<++++.

Two codes [C,perl] for decoding password in gg [config.dat]
perl -e 'while($a=getc){print chr(((ord(getc)-65)*16)+(ord($a)-65))}'
main(a){while((a=getchar())!=-1)putchar(((getchar()-'A')<<4)+a-'A');}

Two oneliners to find 'most active people by time of day' who are in all columns :)
grep -v '^#' test | perl -e '%b=(); while (<>) 
	{ $|=0; @a = split " ",$_; $|--?$b{$_}++:1 for @a; }
	foreach $x (keys %b) { print "$x\n" if $b{$x} == 4;}'

grep -v '^#' test | perl -ne '$b{$2}++ while (m/(\w+)\W(\w+)/igc);
	if ($. == 10) { while (($c, $d) = each %b) {print "$c\n" if $d == 4;} }'

This isn't mine, this code is a quine [write itself out, after compiling] ;)
char *test="char *test=%c%s%c;main(){printf(test,34,test,34);}";main(){printf(test,34,test,34);}
Mine no-semicolon-quine, this is the shortest quine in C [non-null] [or am I wrong]:
main(char*a,char*b[a="main(char*a,char*b[a=%c%s%c,printf(a,34,a,34)]){}",printf(a,34,a,34)]){}

99 bottles of beer - mine version of 99 bob as a bash script
zabawka.c - just a toy ;)
strtobin_1337_gim.c - 1337 version of strtobin - simple proggie, that converts passed arguments to hax0rz binary data ;-)
posix_ipc_shared_memory.c - example, how to use posix shared memory objects
The basis for zabawka.c was this ascii which is imho best ascii I've ever made, and I have it as my plan file...