#!/usr/bin/perl print "Content-type: text/html\n\n"; if (($ENV{'REMOTE_HOST'} eq $ENV{'REMOTE_ADDR'}) && ($ENV{'REMOTE_ADDR'} =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/)) { $Address = pack('C4', $1, $2, $3, $4); $DNS_Address = (gethostbyaddr($Address, 2))[0]; $ENV{'REMOTE_HOST'} = $DNS_Address if $DNS_Address; } $ENV{'REMOTE_HOST'} =~ tr/[A-Z]/[a-z]/; $ADATE= qx("/bin/date"); print "
"; print "";
print " "; print ""; print "You are at IP Address $ENV{'REMOTE_ADDR'} "; print "Which resolves to $ENV{'REMOTE_HOST'} "; print "It is now $ADATE "; if ($ENV{'REMOTE_USER'} gt " ") { print "You are really "; print "$ENV{'REMOTE_USER'} "; } else { print "Rats. Your server will not reveal your true identity. "; } print "You enjoy surfing with ","$ENV{'HTTP_USER_AGENT'} "; print " "; print " "; print "Hmmm. If I were a spammer. "; print "I am NOT either doing it or showing you how, but if "; print "you are using Netscape or MSIE with your mail enabled- I could "; print "with a small JAVA applet- have your e-mail address in my "; print "mailbox right now!"; print " "; print "Hmmm. If I were a marketer what would this "; print "small amount of information tell me?"; print "
"; print "All of this information is actually captured in the various "; print "server logs. By collecting this information in my CGI script, "; print "such as a survey, I do not have to try and figure out which "; print "hit it was- an impossible task!"; print " "; print "So when you do a CGI script, keep in mind that you might try "; print "logging accesses. This will be a topic for another day. "; print "Next time you complete any type of HTML/CGI form and hit "; print "SUBMIT- remember what you are really telling that server!"; print " "; print " The Cast of Characters"; print "
"; print " "; print ""; print " |
"; foreach $item (keys %ENV) { print "$item = $ENV{$item}\n"; }