Listing 2. Web Page Header
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD><TITLE>ipchains Log Scanner</TITLE></HEAD>\n";
print "<BODY bgcolor=\"#000080\" text=\"#FFFFFF\" link=\"#BA3E8F\" vlink=\"#BD66DE\"
alink=\"#FF0000\">\n";
print "<H1><i>inside-control</i></H1>\n";
print "<p>Log searched for network access from ";
print "<font color=\"#FFAAAA\">$firstdate</font> to ";
print "<font color=\"#FFAAAA\">$lastdate</font>";
print ".\n </p>\n";
print "<H2>Total Traffic Volume: <font color=yellow>";
print "$total_traffic bytes</font></H2>\n";
print "<hr>\n";
print "<center>\n";
print "<TABLE border=2>\n";
print "<TR><TH>Source IP</TH><TH>Packets</TH>";
print "<TH>Traffic from this host</TH>";
print "<TH>Hosts contacted</TH>";
print "</TR>\n";
Copyright © 1994 - 2019 Linux Journal. All rights reserved.