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