<HTML>
<BODY BACKGROUND="//200.100.100.100/bg.jpg"><H3>Please Click on your desired link</H3></BODY>
<A HREF="http://mis.jangomango.net/its/login.asp"> <h5>IT Help Desk</h5>
<A HREF="http://mis.jangomango.net/NAMS/Login.aspx"> <h5>Network Alarm Management System</h5>
<A HREF="/cgi-bin/cmonitor.pl"> <h5>Cable Modem Signal Status</h5>
</HTML> [root@localhost cgi-bin]# cat cmonitor.pl
#!/usr/bin/perl -w
#use strict;
#my $version = 'v1.2';
#my $date = '14-Oct-2001';
# Free software - GNU GPL - AS IS, NO WARRANTY...
# please keep author's (my) reference...
#
# Setup:
# ------
# Rename the file to tracert.pl tracert.plx or similar based on the
# settings on your system
# and/or put it in a directory which is CGI enabled and make sure you have
# Perl enabled on the server for files with the extension you gave to the file
# Change the following variables to fit your site
# Name of the organization
my $orgname = 'Jango Mango';
#my $command = '/usr/sbin/traceroute'; # this is usually good for Linux and UNIX
#my $command = '/usr/local/bin/traceroute'; # this is also a good guess for UNIX systems
#my $command = 'c:\windows\trace.exe'; # this is a good guess on Windows machines
#Please send an
# You don't have to change anything further.
########################################
# v1.2
# add -wT during development
# use strict
# fix the security prolem: check the input before running traceroute
# options to run traceroute of OSs other than NT so this becomes a platform
# independent interface (bla bla bla)
$|=1;
$ENV{PATH}="/usr/local/net-snmp/bin:/usr/local/net-snmp/sbin:/bin:/usr/bin:/usr/local/bin";
#print $ENV;
print <<HTML;
Content-type: text/html
<html><head><title>Cable Modems Status</title></head><body bgcolor=white>
<h1>WorldCall Cable Modem Status</h1>
<br><b>Developed & Maintained by NOC</right></b><br>
<a href=$orghome> $orgname</a><p>
<font size=2><b For comments </b>
For Comments <b><a href=mailto:$crmail>Feedback</a></b></font><br>
<br><a href=http://200.100.100.100/cgi-bin/clg.cgi>Ping & Dns utilities</a><br>
HTML
#$command ='/var/www/cgi-bin/dmon';
$commandtip ='/var/www/cgi-bin/dmontip';
$qs = $ENV{QUERY_STRING};
#print "$qs";
#print "$qs";
#if (@ARGV) { $qs = $ARGV[0]; } # for command line testing only
if ((defined $qs) and ($qs ne "" )) {
if ($qs =~ /^t=(.*)/) {
$qs=$1;
}
if ( $qs =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ && !((1|$1|$2|$3|$4)&256) ) {
$ipqs=$qs;
print "<hr>";
print "<PRE>";
system "$commandtip $ipqs";
print "</PRE>";
print "<hr>";
}
else {
print "<hr>";
print "<PRE>";
system "$command $qs";
print "</PRE>";
print "<hr>";
}
}
print <<HTML;
Please type in CM IP Address to check the status and press ENTER
<font size=+2 color=blue>
<form>
<input name=t>
</form>
HTML
#<ISINDEX> I have a Perl script embedded in an HTML page
<A HREF="/cgi-bin/cmonitor.pl"> <h5>Cable Modem Signal Status</h5>