ununtu 屏蔽迅雷

Posted by seobib 2 September,2010 (0)Comment

迅雷的user-agent是

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; )Mozilla/5.0  (compatible; MSIE 6.0; Windows NT 5.0)Mozilla/4.0 (compatible; MSIE  6.0; Windows NT 5.0; .NET CLR 3.5.20706)Mozilla/4.0 (compatible;  MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

通过.htaccess文件屏蔽迅雷的下载/盗链功能:

RewriteEngine On

#Anti Thunder

RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla/4\.0\  \(compatible;\ MSIE\ 6\.0;\ Windows\ NT\ 5\.0\)$  [NC,OR]
RewriteCond   %{HTTP_USER_AGENT}  ^Mozilla/5\.0\ \(compatible;\ MSIE\ 6\.0;\ Windows\  NT\ 5\.0\)$  [NC,OR]
RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla/4\.0\  \(compatible;\ MSIE\ 6\.0;\ Windows\ NT\ 5\.1;\ \)$   [NC,OR]
RewriteCond   %{HTTP_USER_AGENT}  ^Mozilla/4\.0\ \(compatible;\ MSIE\ 6\.0;\ Windows\  NT\ 5\.0;\ \.NET\ CLR\ 3\.5\.20706\)$  [NC,OR]
RewriteCond   %{HTTP_USER_AGENT}  ^Mozilla/4\.0\ \(compatible;\ MSIE\ 6\.0;\ Windows\  NT\ 5\.1;\ SV1;\ \.NET\ CLR\ 1\.1\.4322;\ \.NET\ CLR\ 2\.0\.50727\)$   [NC]
RewriteRule  ^.*\.(gif|jpg|bmp|zip|rar|exe|mp3|swf)$   /    [NC,F]

你可以用Firefox的扩展user-agent switcher来测试效果。

如果你的资料地址已经被迅雷索引,请修改资源的路径地址。

如果用户手动用UltraEdit改写迅雷的user-agent,亦或者本机装虚拟机,虚拟机挂代理,迅雷挂虚拟机中的代理,这种屏蔽方法就失效了。

Related Items

Categories : 网络安全 Tags :
Comments
Leave a comment

Or, take a look at Archives and Categories

Category

Archives