# traceroute.cgi ======================= #!/bin/sh TRACEROUTE=/usr/bin/traceroute echo Content-type: text/html echo if [ -x $TRACEROUTE ]; then if [ $# = 0 ]; then cat << EOM <TITLE>TraceRoute Gateway</TITLE> <H1>TraceRoute Gateway</H1> <ISINDEX> This is a gateway to "traceroute." Type the desired hostname (like hostname.domain.name, eg. net.tamu.edu) in your browser's search dialog, and enter a return.<P> EOM else echo \<PRE\> $TRACEROUTE $* fi else echo Cannot find traceroute on this system. fi # traceroute.cgi =========================== # ping.cgi ================================= #!/bin/sh PING=/bin/ping echo Content-type: text/html echo if [ -x $PING ]; then if [ $# = 0 ]; then cat << EOM <TITLE>TraceRoute Gateway</TITLE> <H1>TraceRoute Gateway</H1> <ISINDEX> This is a gateway to "ping." Type the desired hostname (like hostname.domain.name, eg. "net.tamu.edu") in your browser's search dialog, and enter a return.<P> EOM else echo \<PRE\> $PING -c5 $* fi else echo Cannot find ping on this system. fi # ping.cgi =================================