![]() |
[perl] OBBBBB-fuscation!
Here's an easy one--a.k.a. "Fun with tr///"
<code>$s='Lvtu Copuifs Rfsm Jbdlfs';$s=~tr/[b-zB-Z]/[a-zA-Z]/;print $s;</code> |
Here's the above, but kicked up a little bit. I put it on three lines for *koff* readability....
I call this one "Fun with tr/// Part II: Around your Ass to Get to your Elbow". Just LOOKIT that line noise in line #2! <code>$s='Lvtu Copuifs Rfsm Jbdlfs'; print "${\&t($s)}\n"; sub t{$x=shift;$x=~tr/[b-zB-Z]/[a-zA-Z]/;return($x)}</code> |
And here's "In Reverse Around your Ass..."
<code>sub t{$x=shift;$x=~tr/[b-zB-Z]/[a-zA-Z]/;return($x)} sub r{$b=shift;@b=split('',$b);foreach $l(@b){unshift @o,${\t($l)}};$o=join('',@o)} $b='sfldbJ msfR sfiupoC utvL'; print "${\r($b)}\n";</code> Okay, now what 'choo got??? :D |
Surely I'm not the only Perl geek at TFP??
Oh well. As long as you've got a camel, you're never really alone.... |
TMTOWTDI
I too, am a perl nerd, but I try not to show it off :) |
perl, maybe, but that? not thanks, I LIKE readable code! :P
|
I love perl.. but that stuff is just a nightmare hehe.
How about perl poetry? |
Yeah, perl is great, but it always makes me wince when I see code like that.
|
i dont get it at all.
wait...i barely know perl :D. i see that you are assigning something to a string and then outputting it in the end. that's 'bout all i get :D> |
@date = split ' ', `date` #lastest perl command used, to write a cgi script to draw a calendar that highlights the correct day.
|
Quote:
It warms my... well, not my heart... |
ratbastid, have you considered learning C and then trying your newly-obtained skills in obfuscation in the IOCCC? :D
|
i love that site :) I dont know enough perl to truly begin to read obfuscated code, although the perlmonks website is a great resource for obfuscated perl, but it just makes me shudder to look at it ;)
at least with obfuscated c, i can still read it :) |
Here's a couple that I've done:
$line =~ s/\\/\\\\/g; # Replaces "\" with "\\" $line =~ s/'/\\\'/g; # Replaces "'" with "\'" $line =~ s/\//\\/g; # Replaces "/" with "\" Now, nothing like above.. but I was still proud of my little work. I'm not a guru yet :) |
A worthy effort, senor Latch! Just LOOK at all those leaning toothpicks!
|
What, you don't like IOCCC? Why don't you start one for perl? ;)
|
I thought there already was one for Perl? Such a useful language, but so easy to obfuscate. I love watching people's brain's explode when they try to read obfuscated Perl.
|
All times are GMT -8. The time now is 10:50 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project