3 # This script is used to detect people trying to abuse the security hole which
4 # existed in A CGI script direstributed with Apache 1.0.3 and earlier versions.
5 # You can redirect them to here using the "<Location /cgi-bin/phf*>" suggestion
8 # The format logged to is
9 # "[date] remote_addr remote_host [date] referrer user_agent".
11 $LOG = "/var/log/phf_log";
16 $ENV{HTTP_USER_AGENT} .= " via $ENV{HTTP_VIA}" if($ENV{HTTP_VIA});
18 open(LOG, ">>$LOG") || die "boo hoo, phf_log $!";
19 print LOG "[$when] $ENV{REMOTE_ADDR} $ENV{REMOTE_HOST} $ENV{$HTTP_REFERER} $ENV{HTTP_USER_AGENT}\n";
22 print "Content-type: text/html\r\n\r\n<BLINK>Smile, you're on Candid Camera.</BLINK>\n";