spectere.net
The Chatterbox => Computing => Topic started by: annon on March 23, 2010, 07:43:22 PM
-
I tried writing an obfuscated C program today after seeing a lot of much cooler obfuscated programs. It was a lot of fun to write.
\
#\
in\
clu\
de<s\
tdio.\
h>////
int m\
ain(){\
char fo\
o,*_="/)\
:e`=HKl]D\
pm>oa[o^`t\
,>luW_!\x20\
#lf\n[rvdb!'\
Wc";for(foo='\
\x1';foo<'\xe'\
;foo+=('\15')/'\
\xd')printf("%c"\
,*(_+=((*_)-(*(_+\
'\xf'/'\17')))));}
I want to learn a lot more C so I can do/understand some of the stuff I see in competitions.
So yeah, anyone else a fan of obfuscation?
EDIT: Suppose I should post links.
http://en.wikipedia.org/wiki/Obfuscated_code
http://www.ioccc.org/years.html
-
I don't code, but I like the way obfuscation looks.
What is your program supposed to do?
-
It prints "Hello World!"
Here's a better version that doesn't have any whitespace (save for newlines), but might not compile since I didn't import stdio.h.
\
m\
ai\
n()\
{cha\
r*_="\
/):e`=\
HKl]Dpm\
>oa[o^`t\
,>luW_!\x\
20#lf\n[rv\
db!'Wc";whi\
le(*_)printf\
("%c",*(_+=*_\
-*(_+1)));}
-
Obfuscated code is always fun. It amazes me some of the weird stuff people take advantage of to obfuscate their code. Of course, I'm more fascinated by stuff involving making cracking/reverse engineering/detection and such harder. It's amazing the lengths that people will go to to ensure that their program is harder to hack/decompile/be located by detectors (viruses and the like are generally in the latter part of those).
-
I made another one. This one calculates pi to 7 digits.
#define foo (double)(k+1)*(k+1)
main(){
int i;double
j;char*s="Pie!";
double pi=2;int k=
1;while(*s )k*=*(s
++);k++;while(k=~-
k--)pi*=(foo)/
(foo-1);
printf("%1.7f\n", pi);}
-
Nice work. lol: char*s="Pie!"
-
Oh hey guys.
d(e,l,t,a)
{/***/return
e-l? putchar
(l%( (t^a)<<
(e/a ))?l/((
t^a) <<(e/a)
)+-( abs(((t
^a)<< (t/a))\
-l%( (t^a)<<
(e/a ))))&&l
/((t ^a)<<(e
/a)) -(t^a)-
(e/a) ?a:t:((
t^a)<<(e/a))+~(t^a)|(e/a)),d(e,l+t/a,
t,a):/***************************/a/t;}
main(void){return((((d(73,1,35,32)))));}