mce has asked for the wisdom of the Perl Monks concerning the following question:
I might be totally wrong about this issue, but here if goes.
It is a security issue when using shell escapes (in CGI).
I have a program like
This generates this outputmy $cmd="ls"; my $arg1=" file; ls"; my $arg2=" file"; system($cmd,$arg1,$arg2); warn qx/$cmd $arg1 $arg2/; warn `$cmd $arg1 $arg2`;
What I want to achieve, is to capture the output of a command, which system will not allow.
Any suggestions?
---------------------------
Dr. Mark Ceulemans
Senior Consultant
BMC, Belgium
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: system versus qx security
by zby (Vicar) on Oct 03, 2003 at 10:40 UTC | |
by Jenda (Abbot) on Oct 03, 2003 at 14:58 UTC |