Try this and post the result. Be aware of the security risk of user provided data, see Calling External Commands More Safely for better solutions.
poj#!/usr/bin/perl use strict; use CGI qw(:standard); use CGI::Carp 'fatalsToBrowser' ; # only for test my $id = param('release'); my $cmd = "sudo /usr/bin/amavisd-release $id 2"; my $result; if ($id =~ /^spam-[a-zA-Z0-9-]+\.gz$/) { $result = qx/ $cmd /; } else { $result = "ERROR : Invalid id '$id'"; } print "Content-type: text/plain\n\n"; print "$cmd\n\n$result";
In reply to Re^7: INSERT file contents inside a table
by poj
in thread INSERT file contents inside a table
by theravadamonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |