ASP completely blocks Xunlei, Tornado, and Express from downloading site resources.
Author:Eve Cole
Update Time:2009-06-26 18:10:00
program code
<%
'Block mainstream download tools
Dimxurl,xtool
'Get browser AGENT
xurl=lcase(Request.ServerVariables("HTTP_USER_AGENT"))
'Define prohibited AGENTs. The following 5 include the latest versions of Express, Tornado and Thunder. You can add them by yourself!
xtool="mozilla/4.0(compatible;msie5.00;windows98)"&_
"mozilla/4.0(compatible;msie6.0;windows+nt5.0)"&_
"mozilla/4.0(compatible;msie6.0;windowsnt5.1;)"&_
"mozilla/4.0(compatible;msie6.0;windowsnt5.0;.netclr1.1.4322)"&_
"mozilla/4.0(compatible;msie6.0;windowsnt5.0;.netclr3.5.20706)"&_
"mozilla/4.0(compatible;msie6.0;windowsnt5.1;sv1;.netclr1.1.4322;.netclr2.0.50727)"
'Determine whether the AGENT is legal
IfInStr(xtool,xurl)>0Then
'The download tool directly reports a 404 error
Response.Status="404NotFound"
Response.End
EndIf
'Other code is below
Response.Write "Browse the content normally. You can use the download tool to test download the page to see if it can be downloaded?"
%>