Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Malicious Code

by bunnyman (Hermit)
on Apr 26, 2005 at 21:15 UTC ( [id://451770]=note: print w/replies, xml ) Need Help??


in reply to Re: Malicious Code
in thread Malicious Code

The key is the y///. The code simplifies into this:

$_ = '=]=>%-{<-|}<&|`{'; y/ -\/:-@[-`{-}/`-{~" -/;

The y operator is the same thing as the tr operator. The mapping looks like this:

-/:-@[-` ---> `-{~ {-} ---> " -

That's the range of space through forward-slash, concatented with the range of colon through at-sign, and left-square-bracket through backquote, maps onto the range from ` to left-curly-bracket, plus the tilde character. If we check the ASCII character set, we can simplify this into:

-/ ---> `-o :-@ ---> p-v [-` ---> w-{~ { ---> " | ---> space } ---> -

So now, we can rewrite this as:

$_ = '=]=>%-{<-|}<&|`{'; tr/!-\//a-o/; tr/:-@/p-v/; tr/[-^/w-z/; tr/`/~/; tr/{/"/; tr/|/ /; tr/}/-/; print;

It's just a sneaky way to map punctuation characters into alphabet letters.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found