in reply to perl -s is evil?
% ./evildashs.pl -\<=0 -\>=0 -\(=0 -\)=0
The following code might raise some eyebrows....
I don't think this actually gives the process any new powers, but it would allow someone to execute code that was only supposed to be invoked as root.#! /usr/bin/perl -wsT use strict; print "\$) = ", $), "\n"; print "\$( = ", $(, "\n"; print "\$< = ", $<, "\n"; print "\$> = ", $>, "\n"; __END__ =head1 OUTPUT $) = 0 $( = 0 $< = 0 $> = 0
Oh, right. I should include the obligatory link to Getopt::Std and Getopt::Long for a much better way to handle command line options.
-Blake
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: perl -s is evil?
by belg4mit (Prior) on Nov 15, 2001 at 21:28 UTC |