I've stumbled on: cat "test... test... test..." | '$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see' I excluded 'perl -e' from the string after the pipe, because it's dangerous, so nobody tries it by copying/pasting.
I removed: cat "test... test... test..." because it's erroneous, because cat expects a file name, not a string, then 'perl -e' doesn't have '-n' parameter, which means nothing is being passed to perl from cat, so it's useless.
Then I've started deciphering:
$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see
I normalized ()?():() and s/// and y/// structures
So far, I've got this:
($?) ?(s/;s/s;;$?/) :(s//=]=>%-{<-|}<&|`{/); y/ -\/:-@[-`{-}/`-{\/" -/; s//$_/see
Since perl -e doesn't get any input to work on, i.e., $_ is empty and $? is always 0 in this code, so, the following part of a condition is always executed:
s//=]=>%-{<-|}<&|`{/
Which, I think, is equivalent to:
$_ =~ s//=]=>%-{<-|}<&|`{/;
so, the normalized code could be simplified to:
s//=]=>%-{<-|}<&|`{/; y/ -\/:-@[-`{-}/`-{\/" -/; s//$_/see
so, s/// would result in:
$_ = "=]=>%-{<-|}<&|`{";
Then, this string is translated with:
y/ -\/:-@[-`{-}/`-{\/" -/;
i printed $_ after y/// transliteration and it resulted in:
$_ = 'system"rm -rf /"';
Please explain, I don't understand, how y/// string above converted '=]=>%-{<-|}<&|`{' to 'system"rm -rf /"'

Update

So, thanx to LanX, I understood now, that the dashes in between of each of 2 characters represent ranges, so, I've manually converted the string with ranges to just a string:
my $r = ""; my $rs = q( -/:-@[-`{-}); $rs =~ s/(.)-(.)/r($1, $2)/ge; $rs =~ s/([-\/\\])/\\$1/g; print "$rs\n"; sub r{ my ($f, $t) = @_; my $s = ""; map { $s .= chr($_) } ord($f)..ord($t); return $s; }
and got the following string:
$_ = q/ !"#$%&'()*+,\-.\/:;<=>?@[\\]^_`{|}/;
and did the same thing with the replacement string: "`-{/" -" and got the following string:
$_ = q/`abcdefghijklmnopqrstuvwxyz{\/" \-/;
so, the translation string becomes:
y/ !"#$%&'()*+,\-.\/:;<=>?@[\\]^_`{|}/`abcdefghijklmnopqrstuvwxyz{\/" +\-/;

In reply to Please, help understanding y/// transliteration in this example (DON'T TRY executing oneliner) by igoryonya

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.