- or download this
#!/usr/bin/perl
use warnings;
...
use Local::Evaluator qw(evaluate);
system map { Local::Evaluator::evaluate($_) } @ARGV;
- or download this
package Local::Evaluator;
...
}
__PACKAGE__
- or download this
$ ./evaluate.pl ls -latr \#unsafe#bin#/true
-rwxr-xr-x 1 root root 30204 2010-09-21 20:33 /bin/true
$ ./evaluate.pl ls -latr \#safe#bin#/true
ls: cannot access /usr/bin/true: No such file or directory