in reply to Trojan Horse? (taint mode)
will print out:my $a = q#${system('rm -rf /')}#; print "The command in \$a is $a\n";
and not even attempt to remove my files. Likewise thisThe command in $a is ${system('rm -rf /')}
sets $b to the string we printed out. Printing $b does exactly the same as the above. The only way this is going to come and cause us grief is if we eval $a - as you've suggested.my $b = "The command in \$a is $a\n";
Perhaps the author is mistaken or you've misunderstood the reference, can you post the paragraph or two? I've checked the book errata and it's not mentioned anywhere there, but it's a pretty big mistake if you haven't misunderstood it.
Even authors make mistakes. :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Trojan Horse? (taint mode)
by quinkan (Monk) on Nov 26, 2001 at 05:33 UTC |