EntropySink

Technical & Scientific => Programming => Topic started by: pianorain on June 16, 2005, 04:57:06 PM

Title: Code Obfuscation
Post by: pianorain on June 16, 2005, 04:57:06 PM
A personal hobby of mine is code obfuscation.  Today I was reminded of trigraphs and just had to try it out.
Code: [Select]
#include //factorials
main(b,d,p)long b;int*d;??((d=&p)&&(p=??-!printf("Ent??/
er an integer between 0 and??/
 12 (inclusive): "));(p<(p??'*
d)|??!p>((!(d[b??'b??)^p)<<(!(
p??'*d)<<(!(p^d??(!??-b??))<(*d??'p))))-(!(*d??'p)<<(!(p^+
d??(*d??'p??))<scanf("%d",d));for(b=!!+printf
("%d! is ",*d);d??(+!??-b]>!(p
??'*d);b*=p--);return(p%+b??'b
*b^*d),!printf("%d??/n",b);??>
Yum...factorials.  Got the idea for this from this homework posting on Cboard (http://cboard.cprogramming.com/showthread.php?t=66401).