Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

bless this japh

by domm (Chaplain)
on Jun 07, 2002 at 09:08 UTC ( [id://172465]=obfuscated: print w/replies, xml ) Need Help??

Not very hard, but exploiting a nice 'feature' that's been around for quite a while ...

#!/usr/bin/perl for(ref bless[],just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

Anybody care to de-obfuscate?

Also makes a nice .sig, so this is the last time you'll see this one:

--
#!/usr/bin/perl -w just another perl hacker
print+seek(DATA,$=*.3,@-)?~~<DATA>:$:__DATA__

Replies are listed 'Best First'.
bless this japh for it has sinned
by c-era (Curate) on Jun 07, 2002 at 15:05 UTC
    Bless this japh for it has sinned. It has been 5 days since its last confession. Since that time it has committed the following sins:
    It has used perl4 syntax in perl5 code
    It has also taken advantage of a for loop just for its $_
    and it has de-reference an anonymous variable in public
    for these and all the sins of its past, it is truly sorry.
Re: bless this japh
by Dog and Pony (Priest) on Jun 07, 2002 at 14:22 UTC
    Anybody care to de-obfuscate?
    Sure, I can give it a shot. :)
Re: bless this japh
by tlhf (Scribe) on Jun 07, 2002 at 14:28 UTC
    Well, with a little deparsing and stuff goin on;
    # ($", $/) = (' ', "\n"); $blessed = ref bless([], 'just::another::perl::hacker'); foreach $element ($blessed) { $element =~ s/:+/$"/g; print $element . $/; }


    For some reason I find it a shame the code only loops once. It looks like it should have a loop in. Maybe add a split somewhere?

    tlhf
    xxx
    Getting it to allow q(just'another'perl'hacker) right in the text is still cool though.
      For some reason I find it a shame the code only loops once.

      As Dog_and_Pony pointed out, the only reason for the for-loop is to put the return value of ref into $_.

      So, in good obfu-manners something (for) is used for soemthing different than what it's ususally used for.

      --
      #!/usr/bin/perl
      for(ref bless[],just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
      

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-19 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found