if ( sessionDataExpired( websrvr, sessionId, "404COUNT", 60 ) )
session.data( "404COUNT", "0" )
else
webhost = webhostfromaddr( ClientAddr )
if ( type( webhost ) != "C" )
webhost = ""
end
data = "<H1><FONT COLOR=red>Hack Attack Notification!!!</FONT></H1>You have had way too many attempts accessing unauthorized files on this server. "
data += "Your internal identification information (<FONT COLOR=red>" + webhost + " </FONT>/<FONT COLOR=\"#0000FF\"> " + ClientAddr + "</FONT>) has been logged to a our security system "
data += " and further access to this site will be denied. Have a nice day...<FONT SIZE=1><BR><BR>SmartDesk Personal Web Server v1.1, www.smartdesk.com</FONT><BR>\r\n"
elseif ( isdir( filename ) || right( filename, 1 ) == "//" ) // check if it references another directory
fname = fileFixPath( filename + "\\" + defURL )
if ( fileExists( fname ) )
filename = fname
flag = 0
else
fname = fileFixPath( filename + "\\index.ap" )
if ( fileExists( fname ) )
filename = fname
flag = 0
else
fname = fileFixPath( filename + "\\index.htm" )
if ( fileExists( fname ) )
filename = fname
flag = 0
end
end
end
end
if ( flag )
data = "<H1>File Not Found</H1>The server was unable to locate the <B>" + url + "</B> file.<FONT SIZE=1><BR>SmartDesk Personal Web Server v1.1, www.smartdesk.com</FONT><BR>\r\n"
webServerSend( websrvr, hclient, "HTTP/1.0 404 Resource not found\r\nDate: " + webGMT( ) + "\r\nContent-Type: text/html\r\nContent-Length: " + len( data ) + "\r\n\r\n" + data )