Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Pattern Matching Obfu

by demerphq (Chancellor)
on Sep 17, 2001 at 03:06 UTC ( #112770=obfuscated: print w/ replies, xml ) Need Help??

I was toying with Pattern Finding problem posted by artist and came up with a solution that I thought might make an interesting obfu. Read that thread to what its supposed to do (especially the updated rules)
use integer;$"="|";$\="\n";$S='Just Another Happy Perl Hacker';$C=5;$L += length($S);%0=();sub o{$l=shift;return 1 if(exists($0{"@$l"}));$0{"@$l +" }++;@n=0..$#$l;for$i(@n){for(@n){next if$i==$_;return 1 if index($$l[$ +i ],$$l[$_])!=-1}}0}@1=map{$_*length($S)/$C}0..$C-1;$.=0;while($.++<$L*1 +00 ){@0=();for(0..$C-1){my$str=($_==$C-1)?substr($S,$1[$_]):substr($S,$1[ +$_ ],$1[$_+1]-$1[$_]);push@0,$str;}$.=0,print"@0" unless(o(\@0));$;=rand( +@1 -1)+1;$1[$;]+=(rand(3)>1)?-1:1;$1[$;]=0 if$1[$;]<0;$1[$;]=$L-1 if$1[$; +] >=$L;$1[$;]=$1[$;-1]+1 if$;>0&&$1[$;]<=$1[$;-1];$1[$;]=$1[$;+1]-1 if$; +< $C-2&&$1[$;]>=$1[$;+1];}

You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)

Comment on Pattern Matching Obfu
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://112770]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2016-02-08 18:10 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (281 votes), past polls