#!/usr/bin/perl # BSD users will need to change this to /usr/local/bin/perl ############################################################### # By J.R. Greer jrg@albedo.net # ftp://ftp.albedo.net/pub/portmaster/ # http://www.albedo.net/pub/portmaster/ # # (c) 1997,98 all rights reserved # # Version 0.25 # # The program is placed under the GNU Public License (GPL) # You may copy freely or modify the code in anyway as long # as the above information stays intact. # # # This program requires pmwho by johan Persson, jp@abc.se # path to PMWHO $PMWHO = "/sbin/pmwho"; # # The path and name to the CGI $CGI = "http://www.albedo.net/cgi-bin/pmrtm.pl"; # # Define Your portmasters here @PORTMASTERS = ("pm1","pm2","pm3"); # You may need to define them with full names # ("pm1.domain.com ..... # # PORRT is the Key letter to identify the individual Portmasters # it must match Exactly the portmasterd defined above, Letters # Can NOT be duplicated and should be capitals. @PORTT=("A","B","C"); # # # define the number of seconds for auto refresh. $REFRESH="60"; # # These set when the users idle time changes colour $WYELLOW=6; $WRED=20; # # Show tiles $TITLE=1; $SDATE=0; # # Show Host IP (lets You fit a lot more on the screen) $SHIP=0; # $SHIP=1; # turn on IP security $SECURITY = 1; # # A list of IP addresses allowed to use this program # Place the IP of Your workstation here or You will not be able # to use this program. @IPLIST = ( "127.0.0.1", "169.42.55.12", ); # Filter from DNS (Not used) $FILTER = "domain.com"; # # This sets the number of columbs wide to set the display # this can be set to 2,3 or 4 @PORTS must have the same number # of entries per line $WIDTH=3; # @PORTS = ( "A0,A1,A2", "A3,A4,A5", "A6,A7,A8", "A9,A10,A11", "A12,A13,A14", "A15,A16,A17", "A18,A19,A20", "A21,A22,B1", "B2,B3,B4", "B5,B7,B8", "B9,C1,C2", "C3,C4,C5", "C6,C7,C8", "C9,C10,C11", "C12,C13,C14", "C15,C16,C17", "C18,C19,C20", "C21,C22,C23", "C24,C25,C26", "C27,C28,C29"); # # This is used for modem load $NUMPORTS = 59; ########################################################################## # Do not Edit below this line unless You really understand PERL ########################################################################## ####### First Print the HTML Header print "Content-type: text/html\n\n"; if ($SECURITY == 1){ foreach (@IPLIST) { if ($ENV{'REMOTE_ADDR'} eq $_) {$SECURE = 1;} } if ($SECURE == 0) { print "