![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| | with find -exec | vijay_0209 | Shell Programming and Scripting | 3 | 04-22-2009 06:23 PM |
| exec | JamesByars | UNIX for Advanced & Expert Users | 5 | 12-30-2007 03:35 PM |
| find and exec | big123456 | UNIX for Advanced & Expert Users | 2 | 01-02-2006 12:10 PM |
| exec 3 execution | snehal | UNIX for Advanced & Expert Users | 0 | 11-16-2005 08:11 AM |
| exec | Nisha | Shell Programming and Scripting | 1 | 09-23-2002 06:56 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Help with use of `` vs exec
Hi all,
I had an issue regarding use of `` or exec in perl . `` are considered to be unsafe. Why? In my case an user would be giving some parameters as input and I will form an command of it and execute it using ``. It is important to capture output as i have to parse the output. As well as I need to know success or failure of command. There are many such commands so use of open() to execute the command wont help. I am clearing the input parameters if they contain following metacharacters: $cmd =~ s/&|;|\`|\"|\*|\?|~|\(|\)|\[|\]|\n|\r/-/g; Is this a good solution. I assume this is what taint mode does. If I have to use exec and pass command as array as well as capture output, how can I do that? Thanks, Akshay |
| Bookmarks |
| Tags |
| backticks, exec, metacharacter |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|