Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Another Monk, Another JAPH

by turo (Friar)
on Jan 14, 2006 at 03:14 UTC ( #523130=obfuscated: print w/replies, xml ) Need Help??

Okay here I go with another 'wanna be oneliner-obfuscated bit of code' (there are a lot of perl and perl-obfuscation masters here in perlmonks, i cannot compete with, but i can try to follow their steps ...!) ...

perl -e '$idx=rand(@ARGV);$ARGV[$idx]=~s/x((?:\d|[a-f])+)/chr(hex("$1" +))/ge;@ARGV=split/\s/,$ARGV[$idx];sub japh{undef$f;(*japh=sub{JaPH},r +eturn)unless($i<@ARGV);$i+=int(++$j/$t);($j%$t==0)and($j=1,$l=length( +$ARGV[$i]),$l+=$l>2?2:10,$f=" "x$l."\b"x$l);$ARGV[$i]or JaPH};$t=10;$ +_=qq(\r|);$|++;m{(?>.)(?{print$f;tr|\|\/\-\\|\/\-\\\||;select("",""," +",0.10);print;print&japh;})(.)(?{($o=$1)=~tr|\/\\|\\\/|;print$o})$}gw +hile 1' \x54\x68\x65\x72\x65\x20\x49\x73\x20\x4d\x6f\x72\x65\x20\x54\ +x68\x61\x6e\x20\x4f\x6e\x65\x20\x57\x61\x79\x20\x54\x6f\x20\x44\x6f\x +20\x49\x74 \x4a\x75\x73\x74\x20\x41\x6e\x6f\x74\x68\x65\x72\x20\x50\x +65\x72\x6c\x20\x48\x61\x63\x6b\x65\x72 \x42\x6f\x72\x6e\x20\x54\x6f\x +20\x42\x65\x20\x57\x69\x6c\x64 \x75\x73\x65\x20\x73\x74\x72\x69\x63\x +74

Do not worry about the string encoded as its decimal ascii code; it is not any malicious shellcode ;) ...

My Initial intention was code some regex code that match a patern contineously ... something like an infinite loop inside a regexp without using any loop statement ...
I suposse i failed :'( ... to much code for shuch a simple thing:

perl -e '$_=qq(\r|);$|++;m{(?>.)(?{tr|\|\/\-\\|\/\-\\\||;select("","", +"",0.10);print})(.)$}gwhile 1'

Do you thing my fellowship PelrMonks, if there is any way to do the same in a shorter way? ... It's only curiosity ;) ...

... Although, the final result was not so bad, isn't it?


PS: It would be funny to use this 'helix' for composing an perl animated ascii art hat:

---.--- (___)__ o.o -- =``||``=
(Not so good as an ascii grapher ...)

perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://523130]
Approved by Dietz
[Discipulus]: choroba if let your company to hire Tanktalus and marioroy ... what a big fishing!
[Discipulus]: i choice prague!!
[choroba]: 1200 years is enough :-)
[marioroy]: Lady_Aleena my $ans = qx! find . -name "*.pl" -exec ls -l {} \\; !;
[Tanktalus]: My basic problem right now is that if I were willing to move, I could be back in Toronto with a pay raise. We have a number of reasons for not wanting to do that.
[marioroy]: I had to backslash the backslash inside qx.
[Tanktalus]: marioroy++ # nice catch
[Lady_Aleena]: marioroy, that makes kinda makes sense.
[Discipulus]: yes i can survive also in younger town.. but when i passed i saw many strange letters..
[Lady_Aleena]: marioroy, sorry, I am not making sense right now.

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-04-23 20:12 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (432 votes). Check out past polls.