#!/usr/bin/perl #domain name suffix - if we need it $domainName=""; # Get the input $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); # Un-Webify plus signs and %-encoding $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } print "Content-type: text/html\n\n"; print <<__HTML__; Rockmountain®/Webinterface™

NETCOOL®/ Webinterface


__HTML__ $nodeName = "seres"; if (! $FORM{"\$selected_rows.Node"}) { print "

No Node Specified.

"; die; } else { $nodeName = $FORM{"\$selected_rows.Node"}.$domainName; print "

Pinging host ".$nodeName."

\n"; } $USER = "User"; $HOST="hostname"; $CMD="/usr/sbin/ping"; #open(PING,"/usr/sbin/ping -s ".$nodeName." 64 10 |"); open(PING,"ssh ".$USER."@".$HOST." /bin/ping -s ".$nodeName." 64 10 |"); $old_fh = select(STDOUT); $| = 1; select($old_fh); print "
";
while() {
        print;
}
print "
"; print "

"; print <<__HTML__;
__HTML__