Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

first post && first obfu

by deliria (Chaplain)
on Jul 04, 2003 at 00:43 UTC ( [id://271342]=obfuscated: print w/replies, xml ) Need Help??

Hey all,

Inspired by Petras I thought I'd try my hand at my very first obfu. Only when I was happily hacking away did i realize this code won't do the same on windows due to the CR-LF play that goes around. It does work on windows, though just not as fancy.

#!/usr/bin/perl -w use strict;$|++;$_=<DATA>;y,a-zA-Z,a-hA-N i-qO-Zr-z,,my @i=split//;pri +nt chr(10).chr(13);my @o=("A");my $c=65;select(undef,undef,undef,0.01 +),$o[$#o+1]=chr(++$c),print chr(8).$o[$#o-1].chr(8)for(0..$#i);print +chr(10).chr(13);for my$c(0..$#i){my($e,$d)=(0,$c);select(undef,undef, +undef,$e),$e=($#o/($#o-$c+1))*0.010,$o[$d]=($c/++$d%2)?chr(ord($o[$d+ +1])):$o[$d],print chr(8).$o[$d].chr(8)for($c..$#i);print$i[$c].chr(10 +);}__DATA__ !rVTUwiCDUheSwHeSAwpaczeS!
Have fun,
Deliria.

Update: I altered the original somewhat so it works properly on windows (and apparently some terminal screens) as well.
#!/usr/bin/perl -w use strict;$|++;$_=<DATA>,y,0-9A-Za-z,G-PzA-B{($_)}="@ ;3r-yC-F81a-q,; +sub _{chr(8)x shift};sub _1{print@_};my@i=split//;my($u,@o)=(undef ,("A"));select($u,$u,$u,0.01),$o[$#o+1]=chr(66+$#o),_1 $o[$#o-1]for(0. +.$#i);_1 _$#o+1;for my$c(0..$#i){my($e,$d)=(0,$c);$e=($#o/($#o-$c+ 1))*0.010,select($u,$u,$u,$e),$o[$d]=($c/++$d%2)?$o[$d+1]:$o[$d],_1 $o +[$d]for($c..$#i);_1 _(1),$i[$c],_ $#o+1 }_1 "\n"__DATA__ !Phnfd1MoPh9MPhkRrqBMRQS3!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://271342]
Approved by diotalevi
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-18 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found