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

Re^2: will be happy to read the explanation

by dynamo (Chaplain)
on Nov 20, 2007 at 01:26 UTC ( [id://651832]=note: print w/replies, xml ) Need Help??


in reply to Re: will be happy to read the explanation
in thread will be happy to read the explanation

Thanks, excellent reference--
but how does it get from a state where:
$_ = '=]=>%-{<-|}<&|`{'
to
$_ = 'system"rm -rf/"'
using only the following statement:
y; -/:-@[-`{-};`-{/" -;;
Doesn't tr/// require the destination characters to be included in the mapping? I don't see any alphanumerics in there at all.

Replies are listed 'Best First'.
Re^3: will be happy to read the explanation
by Danikar (Novice) on Nov 20, 2007 at 16:40 UTC
    I am quite confused on how y; -/:-@[-`{-};`-{/" -;; works as well.
      Ah I figured it out. Read up on tr/// and ull get it Think about this $_ = "abc"; y/a-c/x-z/; print $_; # Prints xyz It goes off an ascii table. ` is right before a and { is right after z.

      Ah it all makes sense now.

      y; -/:-@[-`{-};`-{/" -;;

      That translates characters.

      So (space) thru /
      : thru @
      [ thru `
      { thru }

      Take that set of characters and switch it out with the corresponding character in this list
      ` thru { (Includs a-z)
      /
      "
      -

      Pretty nifty.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-03-29 05:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found