in reply to My first attempt at obfu
Realizing that i'm not a master at obfu, the following code may or may not be more difficult to parse than the original. But i had fun with the exercise, and hopefully this will help others a bit as well...
That being said, here's another Attempted Helpfulness...
First of all, let's seperate that obfu into some proper white-spacing to see where to begin. My formatting attempts produced:
Not to nitpick, but here's a few points:#/usr/bin/perl -w use strict; $_[$_]=0 for 0..7; my$i; for my$a(grep{s@^00@@} unpack'B8'x28, join'', map{chr} split/\*+/, q{61*31*28*32*20*40*25*63*63*9*52*58*49*18*30*47*20*2*10*4*8*63*63*1*3 +6*2*13*30} ){ $i=0; grep{$_[$i++].=$_}split//,$a; length$_[0]==8 && print pack'B8',$_ for@_; length$_[0]==8 && grep{$_=0}@_; } print"\n";
1
Alright, that splitting on asterisk has to go bye-bye...
2$_[$_]=0 for 0..7;my$i; for my$a(grep{s@^00@@} unpack'B8'x28, join'', map{chr} '61312832204025636309525849183047200210040863630136021330'=~/ +../g ){ $i=0; grep{$_[$i++].=$_}split//,$a; length$_[0]==8 && print pack'B8',$_ for@_; length$_[0]==8 && grep{$_=0}@_; } print"\n";
3sub{split//,'0'x6;my$i; for my $a(grep{s@^00@@} unpack'B8'x28, join'', map{chr} '61312832204025636309525849183047200210040863630136021330'=~/ +../g ){ $i=0; grep{$_[$i++].=$_}split//,$a; length$_[0]==8 && print pack'B8',$_ for@_; length$_[0]==8 && grep{$_=0}@_; }print"\n"}->()
4sub{split//,'0'x6;my$i; for (grep{s@^00@@} unpack'B8'x28, join'', map{chr} '61312832204025636309525849183047200210040863630136021330'=~/ +../g ){ $i=0; grep{$_[$i++].=$_}/./g; length$_[0]==8 && print pack'B8',$_ for@_; length$_[0]==8 && grep{$_=0}@_; }print"\n"}->()
5sub{split//,'0'x6;$;--; for (grep{s@^00@@} unpack'B8'x28, join'', map{chr} '61312832204025636309525849183047200210040863630136021330'=~/ +../g ){ map{$_[($;+=1)%=6].=$_}/./g; length$_[0]==8 && print pack'B8',$_ for@_; length$_[0]==8 && grep{$_=0}@_; }print"\n"}->()
6sub{split//,'0'x6;$;--; for (grep{s@^00@@} unpack'B8'x28, join'', map{chr} '61312832204025636309525849183047200210040863630136021330'=~/ +../g ){ map{$_[($;+=1)%=6].=$_}/./g; for (@_) { length==8 && (print(pack'B8',$_) and ($_=0)) } }print"\n"}->()
some notes:
7 (final version)sub{split//,'0'x6;$;--; for (grep{s@^00@@} unpack'B8'x28, join'', map{chr} '61312832204025636309525849183047200210040863630136021330'=~/ +../g ){ map{$_[($;+=1)%=6].=$_}/./g; @{[/./g]}-8???:($_=-1+print pack'B8',$_)for@_ }print"\n"}->()
It still compiles and runs under strict and warnings, but now it's more difficult to break it into chewable chunks. Anyway, that's the process i went through after running your obfu. Sorry about the long post, but with any luck it was helpful...sub{split q,,,q;0;x6;$;--;for(grep s,^00,,,unpack'B8'x28,join'',map ch +r,q,61 312832204025636309525849183047200210040863630136021330,=~m,..,g){map$_ +[($;+= 1)%=6].=$_,m,.,g;@{[m,.,g]}-8???:($_=-1+print pack'B8',$_)for@_}print$ +/}->()
nuf evah,
jynx
update: fixed a typo (thanx to Ferret for catching it)
Also, i would like to note that this was an obfuscation before i twisted it. The reason is because the algorithm is difficult to comprehend. All i did was add some window dressing to it. i hope i didn't sound critical in the above post, because this was a good first obfu before the window dressing :-)
|
|---|